Skip to content

Commit

Permalink
refactor(react-native-github/normalze-color): normalize-color -> norm…
Browse files Browse the repository at this point in the history
…alize-colors

Summary:
Changelog:
[General][Changed] - renamed normalize-color package to normalize-colors as a part of [migration to monorepo structure](facebook#34692)

Differential Revision: https://internalfb.com/D41264764

fbshipit-source-id: 82decf15d82cdda8854bb90c30137a81f99ab0cb
  • Loading branch information
Ruslan Lesiutin authored and facebook-github-bot committed Nov 17, 2022
1 parent a78ce98 commit a071e14
Show file tree
Hide file tree
Showing 7 changed files with 18 additions and 8 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
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -934,7 +934,7 @@
- Rename deprecated `Keyboard.removeEventListener` to `Keyboard.removeListener`. ([8880c09076](https://github.com/facebook/react-native/commit/8880c09076e4727768ace26a74766cbe6f64021c) by [@yungsters](https://github.com/yungsters))
- Update `Modal`'s mock to not render its children when it is not visible ([ec614c16b3](https://github.com/facebook/react-native/commit/ec614c16b331bf3f793fda5780fa273d181a8492) by [@AntoineDoubovetzky](https://github.com/AntoineDoubovetzky))
- Upgraded `react-devtools-core` dependency to 4.19.1 ([356236471a](https://github.com/facebook/react-native/commit/356236471abc6b5b8c139223e15388fd1eecd2d1) by [@jstejada](https://github.com/jstejada))
- React-native/normalize-color now supports Node.js ([65e58f26e1](https://github.com/facebook/react-native/commit/65e58f26e1fbd06b1ae32e2ab3a2616c8eef08e0) by [@yungsters](https://github.com/yungsters))
- React-native/normalize-colors now supports Node.js ([65e58f26e1](https://github.com/facebook/react-native/commit/65e58f26e1fbd06b1ae32e2ab3a2616c8eef08e0) by [@yungsters](https://github.com/yungsters))
- Updated to Contributor Covenant v2.1 ([19f8d2f7da](https://github.com/facebook/react-native/commit/19f8d2f7da13f4524f31acf7aa10cc0aa91b5da4))


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 '../../packages/normalize-color';

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 @@ -28,6 +28,7 @@
"LICENSE",
"local-cli",
"packages/polyfills",
"packages/normalize-color",
"React-Core.podspec",
"react-native.config.js",
"react.gradle",
Expand Down Expand Up @@ -114,7 +115,6 @@
"@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",
"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 @@ -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"
Expand Down

0 comments on commit a071e14

Please sign in to comment.