mirror of
https://github.com/zebrajr/react.git
synced 2025-12-06 12:20:20 +01:00
* shared/src -> shared It's not a real package and doesn't even have package.json. This will also make importing less weird if we drop Haste. * Get rid of shared/utils Moved event-specific into shared/event. Moved rest to the root since distinction has always been pretty arbitrary. * Fix references to old shared/src paths
38 lines
1.0 KiB
JavaScript
38 lines
1.0 KiB
JavaScript
/**
|
|
* Copyright (c) 2013-present, Facebook, Inc.
|
|
*
|
|
* This source code is licensed under the MIT license found in the
|
|
* LICENSE file in the root directory of this source tree.
|
|
*/
|
|
|
|
'use strict';
|
|
|
|
const reactVersion = require('../../package.json').version;
|
|
const versions = {
|
|
'packages/react/package.json': require('../../packages/react/package.json')
|
|
.version,
|
|
'packages/react-dom/package.json': require('../../packages/react-dom/package.json')
|
|
.version,
|
|
'packages/react-test-renderer/package.json': require('../../packages/react-test-renderer/package.json')
|
|
.version,
|
|
'packages/shared/ReactVersion.js': require('../../packages/shared/ReactVersion'),
|
|
};
|
|
|
|
let allVersionsMatch = true;
|
|
Object.keys(versions).forEach(function(name) {
|
|
const version = versions[name];
|
|
if (version !== reactVersion) {
|
|
allVersionsMatch = false;
|
|
console.log(
|
|
'%s version does not match package.json. Expected %s, saw %s.',
|
|
name,
|
|
reactVersion,
|
|
version
|
|
);
|
|
}
|
|
});
|
|
|
|
if (!allVersionsMatch) {
|
|
process.exit(1);
|
|
}
|