From fab925f720444edd2fc81f1767f96091bfed82fe Mon Sep 17 00:00:00 2001 From: Thibault Malbranche Date: Fri, 2 Sep 2022 11:02:37 +0200 Subject: [PATCH 1/4] chore: rename normalize-color to normalize-colors (umbrella discussion 480) --- .circleci/verdaccio.yml | 5 +++++ BUCK | 2 +- Libraries/StyleSheet/__tests__/normalizeColor-test.js | 6 +++--- Libraries/StyleSheet/normalizeColor.js | 2 +- package.json | 2 +- packages/{normalize-color => normalize-colors}/.npmignore | 0 packages/{normalize-color => normalize-colors}/BUCK | 2 +- .../__tests__/normalizeColor-test.js | 0 packages/{normalize-color => normalize-colors}/index.js | 0 .../{normalize-color => normalize-colors}/index.js.flow | 0 packages/{normalize-color => normalize-colors}/package.json | 6 +++--- 11 files changed, 15 insertions(+), 10 deletions(-) rename packages/{normalize-color => normalize-colors}/.npmignore (100%) rename packages/{normalize-color => normalize-colors}/BUCK (95%) rename packages/{normalize-color => normalize-colors}/__tests__/normalizeColor-test.js (100%) rename packages/{normalize-color => normalize-colors}/index.js (100%) rename packages/{normalize-color => normalize-colors}/index.js.flow (100%) rename packages/{normalize-color => normalize-colors}/package.json (61%) diff --git a/.circleci/verdaccio.yml b/.circleci/verdaccio.yml index 37e5d23b380227..49893164b4b8fd 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/BUCK b/BUCK index f900a2be0e0e42..6a95a5238e7ca6 100644 --- a/BUCK +++ b/BUCK @@ -761,7 +761,7 @@ rn_library( "//xplat/js/RKJSModules/vendor/react-test-renderer:react-test-renderer", "//xplat/js/RKJSModules/vendor/scheduler:scheduler", "//xplat/js/react-native-github/packages/assets:assets", - "//xplat/js/react-native-github/packages/normalize-color:normalize-color", + "//xplat/js/react-native-github/packages/normalize-colors:normalize-colors", "//xplat/js/react-native-github/packages/polyfills:polyfills", "//xplat/js/tools/metro/packages/metro-runtime/src/modules:modules", "//xplat/js/tools/metro/packages/metro-runtime/src/polyfills:polyfills", 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 efc43ed0877e67..ad101cdf5dca6b 100644 --- a/package.json +++ b/package.json @@ -113,7 +113,7 @@ "@react-native-community/cli-platform-android": "10.0.0-alpha.4", "@react-native-community/cli-platform-ios": "10.0.0-alpha.3", "@react-native/assets": "1.0.0", - "@react-native/normalize-color": "2.1.0", + "@react-native/normalize-colors": "^0.72.0", "@react-native/polyfills": "2.0.0", "abort-controller": "^3.0.0", "anser": "^1.4.9", diff --git a/packages/normalize-color/.npmignore b/packages/normalize-colors/.npmignore similarity index 100% rename from packages/normalize-color/.npmignore rename to packages/normalize-colors/.npmignore diff --git a/packages/normalize-color/BUCK b/packages/normalize-colors/BUCK similarity index 95% rename from packages/normalize-color/BUCK rename to packages/normalize-colors/BUCK index faaff9e880b021..38f25cc2eaee69 100644 --- a/packages/normalize-color/BUCK +++ b/packages/normalize-colors/BUCK @@ -2,7 +2,7 @@ load("@fbsource//tools/build_defs/third_party:yarn_defs.bzl", "yarn_workspace") load("@fbsource//xplat/js:JS_DEFS.bzl", "rn_library") rn_library( - name = "normalize-color", + name = "normalize-colors", labels = [ "pfh:ReactNative_CommonInfrastructurePlaceholder", ], diff --git a/packages/normalize-color/__tests__/normalizeColor-test.js b/packages/normalize-colors/__tests__/normalizeColor-test.js similarity index 100% rename from packages/normalize-color/__tests__/normalizeColor-test.js rename to packages/normalize-colors/__tests__/normalizeColor-test.js diff --git a/packages/normalize-color/index.js b/packages/normalize-colors/index.js similarity index 100% rename from packages/normalize-color/index.js rename to packages/normalize-colors/index.js diff --git a/packages/normalize-color/index.js.flow b/packages/normalize-colors/index.js.flow similarity index 100% rename from packages/normalize-color/index.js.flow rename to packages/normalize-colors/index.js.flow diff --git a/packages/normalize-color/package.json b/packages/normalize-colors/package.json similarity index 61% rename from packages/normalize-color/package.json rename to packages/normalize-colors/package.json index 27fe68afd5cbfe..31da96aab3011d 100644 --- a/packages/normalize-color/package.json +++ b/packages/normalize-colors/package.json @@ -1,11 +1,11 @@ { - "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", "url": "git@github.com:facebook/react-native.git", - "directory": "packages/normalize-color" + "directory": "packages/normalize-colors" }, "license": "MIT" } From b0d376e16073ef0a140386fbef56b11de3358fff Mon Sep 17 00:00:00 2001 From: Thibault Malbranche Date: Fri, 23 Sep 2022 14:15:41 +0200 Subject: [PATCH 2/4] revert buck changes --- BUCK | 2 +- packages/normalize-colors/BUCK | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/BUCK b/BUCK index 6a95a5238e7ca6..2c78c7332640a0 100644 --- a/BUCK +++ b/BUCK @@ -761,7 +761,7 @@ rn_library( "//xplat/js/RKJSModules/vendor/react-test-renderer:react-test-renderer", "//xplat/js/RKJSModules/vendor/scheduler:scheduler", "//xplat/js/react-native-github/packages/assets:assets", - "//xplat/js/react-native-github/packages/normalize-colors:normalize-colors", + "//xplat/js/react-native-github/packages/normalize-colors:normalize-color", "//xplat/js/react-native-github/packages/polyfills:polyfills", "//xplat/js/tools/metro/packages/metro-runtime/src/modules:modules", "//xplat/js/tools/metro/packages/metro-runtime/src/polyfills:polyfills", diff --git a/packages/normalize-colors/BUCK b/packages/normalize-colors/BUCK index 38f25cc2eaee69..faaff9e880b021 100644 --- a/packages/normalize-colors/BUCK +++ b/packages/normalize-colors/BUCK @@ -2,7 +2,7 @@ load("@fbsource//tools/build_defs/third_party:yarn_defs.bzl", "yarn_workspace") load("@fbsource//xplat/js:JS_DEFS.bzl", "rn_library") rn_library( - name = "normalize-colors", + name = "normalize-color", labels = [ "pfh:ReactNative_CommonInfrastructurePlaceholder", ], From d5554bdc7663e97136ea5c8a5bca95f56636fd6e Mon Sep 17 00:00:00 2001 From: Thibault Malbranche Date: Fri, 23 Sep 2022 14:40:42 +0200 Subject: [PATCH 3/4] revert renaming --- BUCK | 2 +- packages/{normalize-colors => normalize-color}/.npmignore | 0 packages/{normalize-colors => normalize-color}/BUCK | 0 .../__tests__/normalizeColor-test.js | 0 packages/{normalize-colors => normalize-color}/index.js | 0 packages/{normalize-colors => normalize-color}/index.js.flow | 0 packages/{normalize-colors => normalize-color}/package.json | 2 +- 7 files changed, 2 insertions(+), 2 deletions(-) rename packages/{normalize-colors => normalize-color}/.npmignore (100%) rename packages/{normalize-colors => normalize-color}/BUCK (100%) rename packages/{normalize-colors => normalize-color}/__tests__/normalizeColor-test.js (100%) rename packages/{normalize-colors => normalize-color}/index.js (100%) rename packages/{normalize-colors => normalize-color}/index.js.flow (100%) rename packages/{normalize-colors => normalize-color}/package.json (84%) diff --git a/BUCK b/BUCK index 2c78c7332640a0..f900a2be0e0e42 100644 --- a/BUCK +++ b/BUCK @@ -761,7 +761,7 @@ rn_library( "//xplat/js/RKJSModules/vendor/react-test-renderer:react-test-renderer", "//xplat/js/RKJSModules/vendor/scheduler:scheduler", "//xplat/js/react-native-github/packages/assets:assets", - "//xplat/js/react-native-github/packages/normalize-colors:normalize-color", + "//xplat/js/react-native-github/packages/normalize-color:normalize-color", "//xplat/js/react-native-github/packages/polyfills:polyfills", "//xplat/js/tools/metro/packages/metro-runtime/src/modules:modules", "//xplat/js/tools/metro/packages/metro-runtime/src/polyfills:polyfills", diff --git a/packages/normalize-colors/.npmignore b/packages/normalize-color/.npmignore similarity index 100% rename from packages/normalize-colors/.npmignore rename to packages/normalize-color/.npmignore diff --git a/packages/normalize-colors/BUCK b/packages/normalize-color/BUCK similarity index 100% rename from packages/normalize-colors/BUCK rename to packages/normalize-color/BUCK diff --git a/packages/normalize-colors/__tests__/normalizeColor-test.js b/packages/normalize-color/__tests__/normalizeColor-test.js similarity index 100% rename from packages/normalize-colors/__tests__/normalizeColor-test.js rename to packages/normalize-color/__tests__/normalizeColor-test.js diff --git a/packages/normalize-colors/index.js b/packages/normalize-color/index.js similarity index 100% rename from packages/normalize-colors/index.js rename to packages/normalize-color/index.js diff --git a/packages/normalize-colors/index.js.flow b/packages/normalize-color/index.js.flow similarity index 100% rename from packages/normalize-colors/index.js.flow rename to packages/normalize-color/index.js.flow diff --git a/packages/normalize-colors/package.json b/packages/normalize-color/package.json similarity index 84% rename from packages/normalize-colors/package.json rename to packages/normalize-color/package.json index 31da96aab3011d..7fbb1c31cb5f3b 100644 --- a/packages/normalize-colors/package.json +++ b/packages/normalize-color/package.json @@ -5,7 +5,7 @@ "repository": { "type": "git", "url": "git@github.com:facebook/react-native.git", - "directory": "packages/normalize-colors" + "directory": "packages/normalize-color" }, "license": "MIT" } From d7b39e7884d97e8968907ed9e1e39de2e4aa0049 Mon Sep 17 00:00:00 2001 From: Ruslan Lesiutin Date: Fri, 25 Nov 2022 12:37:54 +0000 Subject: [PATCH 4/4] feat(@react-native/normalize-colors): update yarn.lock to inclode deprecated @react-native/normalize-color --- yarn.lock | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/yarn.lock b/yarn.lock index a7a0923d055442..b13411b4287f73 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2262,6 +2262,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"