Skip to content

Commit

Permalink
chore: rename normalize-color to normalize-colors (umbrella 480) (#34571
Browse files Browse the repository at this point in the history
)

Summary:
## Changelog

<!-- Help reviewers and the release process by writing your own changelog entry. For an example, see:
https://reactnative.dev/contributing/changelogs-in-pull-requests
-->

[General] [Changed] - Rename normalize-color to normalize-colors as part of react-native-community/discussions-and-proposals#480

Pull Request resolved: #34571

Reviewed By: cortinico

Differential Revision: D39235696

Pulled By: hoxyq

fbshipit-source-id: b6d5fcae9fb5c953c2f7b48f73a95cd883ff8f63
  • Loading branch information
Titozzz authored and facebook-github-bot committed Dec 1, 2022
1 parent 879d303 commit dc33559
Show file tree
Hide file tree
Showing 6 changed files with 17 additions and 7 deletions.
5 changes: 5 additions & 0 deletions .circleci/verdaccio.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,11 @@ uplinks:
maxSockets: 40
maxFreeSockets: 10
packages:
# Get @react-native/normalize-color from npm registry, since its used in deprecated-react-native-prop-types package
'@react-native/normalize-color':
access: $all
publish: $authenticated
proxy: npmjs
# Group and isolate all local packages, avoid being proxy from outside
'@react-native/*':
access: $all
Expand Down
6 changes: 3 additions & 3 deletions Libraries/StyleSheet/__tests__/normalizeColor-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,11 @@
const {OS} = require('../../Utilities/Platform');
const normalizeColor = require('../normalizeColor');

it('forwards calls to @react-native/normalize-color', () => {
jest.resetModules().mock('@react-native/normalize-color', () => jest.fn());
it('forwards calls to @react-native/normalize-colors', () => {
jest.resetModules().mock('@react-native/normalize-colors', () => jest.fn());

expect(require('../normalizeColor')('#abc')).not.toBe(null);
expect(require('@react-native/normalize-color')).toBeCalled();
expect(require('@react-native/normalize-colors')).toBeCalled();
});

describe('iOS', () => {
Expand Down
2 changes: 1 addition & 1 deletion Libraries/StyleSheet/normalizeColor.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
import type {ProcessedColorValue} from './processColor';
import type {ColorValue} from './StyleSheet';

import _normalizeColor from '@react-native/normalize-color';
import _normalizeColor from '@react-native/normalize-colors';

function normalizeColor(
color: ?(ColorValue | ProcessedColorValue),
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -114,8 +114,8 @@
"@react-native-community/cli-platform-ios": "10.0.0-alpha.3",
"@react-native/assets-registry": "^0.72.0",
"@react-native/gradle-plugin": "^0.72.1",
"@react-native/normalize-color": "2.1.0",
"@react-native/polyfills": "2.0.0",
"@react-native/normalize-colors": "^0.72.0",
"abort-controller": "^3.0.0",
"anser": "^1.4.9",
"base64-js": "^1.1.2",
Expand Down
4 changes: 2 additions & 2 deletions packages/normalize-color/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@react-native/normalize-color",
"version": "2.1.0",
"name": "@react-native/normalize-colors",
"version": "0.72.0",
"description": "Color normalization for React Native.",
"repository": {
"type": "git",
Expand Down
5 changes: 5 additions & 0 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2252,6 +2252,11 @@
prompts "^2.4.0"
semver "^6.3.0"

"@react-native/normalize-color@*":
version "2.1.0"
resolved "https://registry.yarnpkg.com/@react-native/normalize-color/-/normalize-color-2.1.0.tgz#939b87a9849e81687d3640c5efa2a486ac266f91"
integrity sha512-Z1jQI2NpdFJCVgpY+8Dq/Bt3d+YUi1928Q+/CZm/oh66fzM0RUl54vvuXlPJKybH4pdCZey1eDTPaLHkMPNgWA==

"@reactions/component@^2.0.2":
version "2.0.2"
resolved "https://registry.yarnpkg.com/@reactions/component/-/component-2.0.2.tgz#40f8c1c2c37baabe57a0c944edb9310dc1ec6642"
Expand Down

0 comments on commit dc33559

Please sign in to comment.