From dc3355920d7f6f4ef887e0ff01153e23e660b5ea Mon Sep 17 00:00:00 2001 From: Thibault Malbranche Date: Thu, 1 Dec 2022 08:46:57 -0800 Subject: [PATCH] chore: rename normalize-color to normalize-colors (umbrella 480) (#34571) Summary: ## Changelog [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 --- .circleci/verdaccio.yml | 5 +++++ Libraries/StyleSheet/__tests__/normalizeColor-test.js | 6 +++--- Libraries/StyleSheet/normalizeColor.js | 2 +- package.json | 2 +- packages/normalize-color/package.json | 4 ++-- yarn.lock | 5 +++++ 6 files changed, 17 insertions(+), 7 deletions(-) diff --git a/.circleci/verdaccio.yml b/.circleci/verdaccio.yml index cec3a220475903..7ec6fd1f9a91af 100644 --- a/.circleci/verdaccio.yml +++ b/.circleci/verdaccio.yml @@ -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 diff --git a/Libraries/StyleSheet/__tests__/normalizeColor-test.js b/Libraries/StyleSheet/__tests__/normalizeColor-test.js index b5e9732d4820c2..a8c7e586224ea0 100644 --- a/Libraries/StyleSheet/__tests__/normalizeColor-test.js +++ b/Libraries/StyleSheet/__tests__/normalizeColor-test.js @@ -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', () => { diff --git a/Libraries/StyleSheet/normalizeColor.js b/Libraries/StyleSheet/normalizeColor.js index dec9004d08215c..c9cabcf33d13c2 100755 --- a/Libraries/StyleSheet/normalizeColor.js +++ b/Libraries/StyleSheet/normalizeColor.js @@ -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), diff --git a/package.json b/package.json index 8a1c65f87daa3c..b20f400483b063 100644 --- a/package.json +++ b/package.json @@ -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", diff --git a/packages/normalize-color/package.json b/packages/normalize-color/package.json index 27fe68afd5cbfe..7fbb1c31cb5f3b 100644 --- a/packages/normalize-color/package.json +++ b/packages/normalize-color/package.json @@ -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", diff --git a/yarn.lock b/yarn.lock index cda934f1614c46..75874dd444c969 100644 --- a/yarn.lock +++ b/yarn.lock @@ -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"