chore: rename normalize-color to normalize-colors (umbrella 480) (#34571)

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 https://github.com/react-native-community/discussions-and-proposals/pull/480

Pull Request resolved: https://github.com/facebook/react-native/pull/34571

Reviewed By: cortinico

Differential Revision: D39235696

Pulled By: hoxyq

fbshipit-source-id: b6d5fcae9fb5c953c2f7b48f73a95cd883ff8f63
This commit is contained in:
Thibault Malbranche
2022-12-01 08:46:57 -08:00
committed by Facebook GitHub Bot
parent 879d303fc7
commit dc3355920d
6 changed files with 17 additions and 7 deletions
+5
View File
@@ -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
@@ -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', () => {
+1 -1
View File
@@ -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),
+1 -1
View File
@@ -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",
+2 -2
View File
@@ -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",
+5
View File
@@ -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"