moved normalizeColor and changed dependencies (#27372)

Summary:
Originally, normalizeColor.js was in Library/Color/ however, I noticed that its tests were in a completely different directly (Library/StyleSheet/__tests__) which was confusing. The other files such as processColor.js, setNormalizedAlphaColor.js had their tests in Library/StyleSheet/__tests__ as well.

## Changelog

[Internal] [Changed] - Moved normalizeColor.js to a more appropriate directory where its tests live.
Pull Request resolved: https://github.com/facebook/react-native/pull/27372

Test Plan: I simply moved a file and changed dependencies. The code should still function as is.

Reviewed By: rickhanlonii, mdvacca

Differential Revision: D18760210

Pulled By: yungsters

fbshipit-source-id: 4c2400acabab35ccbb2533faa5c1d6487c9bf48e
This commit is contained in:
Isabel B 2019-12-03 15:58:00 -08:00 коммит произвёл Facebook Github Bot
Родитель 71cb0d8392
Коммит d3980dceab
8 изменённых файлов: 7 добавлений и 7 удалений

Просмотреть файл

@ -17,7 +17,7 @@ const AnimatedWithChildren = require('./AnimatedWithChildren');
const NativeAnimatedHelper = require('../NativeAnimatedHelper');
const invariant = require('invariant');
const normalizeColor = require('../../../Color/normalizeColor');
const normalizeColor = require('../../../StyleSheet/normalizeColor');
type ExtrapolateType = 'extend' | 'identity' | 'clamp';

Просмотреть файл

@ -22,7 +22,7 @@ const View = require('../View/View');
const SoundManager = require('../Sound/SoundManager');
const keyMirror = require('fbjs/lib/keyMirror');
const normalizeColor = require('../../Color/normalizeColor');
const normalizeColor = require('../../StyleSheet/normalizeColor');
import type {EdgeInsetsProp} from '../../StyleSheet/EdgeInsetsPropType';
import type {PressEvent} from '../../Types/CoreEventTypes';

Просмотреть файл

@ -9,7 +9,7 @@
'use strict';
const normalizeColor = require('../Color/normalizeColor');
const normalizeColor = require('../StyleSheet/normalizeColor');
const colorPropType = function(
isRequired,

Просмотреть файл

@ -10,7 +10,7 @@
'use strict';
import normalizeColor from '../Color/normalizeColor.js';
import normalizeColor from '../StyleSheet/normalizeColor.js';
import {Touchable, View} from 'react-native';
import * as React from 'react';

Просмотреть файл

@ -10,7 +10,7 @@
'use strict';
const normalizeColor = require('../../Color/normalizeColor');
const normalizeColor = require('../normalizeColor');
describe('normalizeColor', function() {
it('should accept only spec compliant colors', function() {

Просмотреть файл

@ -11,7 +11,7 @@
'use strict';
const setNormalizedColorAlpha = require('../setNormalizedColorAlpha');
const normalizeColor = require('../../Color/normalizeColor');
const normalizeColor = require('../normalizeColor');
describe('setNormalizedColorAlpha', function() {
it('should adjust the alpha of the color passed in', function() {

Просмотреть файл

@ -12,7 +12,7 @@
const Platform = require('../Utilities/Platform');
const normalizeColor = require('../Color/normalizeColor');
const normalizeColor = require('./normalizeColor');
/* eslint no-bitwise: 0 */
function processColor(color?: ?(string | number)): ?number {