mirror of
https://github.com/hanzoai/react.git
synced 2026-09-24 17:02:27 +00:00
Use ReactVersions module as package allowlist (#21613)
Instead of keeping a separate allowlist in sync, we use ReactVersions.js as the source of truth for which packages get published.
This commit is contained in:
@@ -50,7 +50,6 @@ const experimentalPackages = [
|
||||
'react-fs',
|
||||
'react-pg',
|
||||
'react-server-dom-webpack',
|
||||
'react-server',
|
||||
];
|
||||
|
||||
// TODO: Export a map of every package and its version.
|
||||
|
||||
@@ -11,6 +11,7 @@ const {join} = require('path');
|
||||
const createLogger = require('progress-estimator');
|
||||
const prompt = require('prompt-promise');
|
||||
const theme = require('./theme');
|
||||
const {stablePackages, experimentalPackages} = require('../../ReactVersions');
|
||||
|
||||
// https://www.npmjs.com/package/progress-estimator#configuration
|
||||
const logger = createLogger({
|
||||
@@ -132,42 +133,11 @@ const getCommitFromCurrentBuild = async () => {
|
||||
};
|
||||
|
||||
const getPublicPackages = isExperimental => {
|
||||
// TODO: Use ReactVersions.js as source of truth.
|
||||
const packageNames = Object.keys(stablePackages);
|
||||
if (isExperimental) {
|
||||
return [
|
||||
'create-subscription',
|
||||
'eslint-plugin-react-hooks',
|
||||
'jest-react',
|
||||
'react',
|
||||
'react-art',
|
||||
'react-dom',
|
||||
'react-is',
|
||||
'react-reconciler',
|
||||
'react-refresh',
|
||||
'react-test-renderer',
|
||||
'use-subscription',
|
||||
'scheduler',
|
||||
'react-fetch',
|
||||
'react-fs',
|
||||
'react-pg',
|
||||
'react-server-dom-webpack',
|
||||
];
|
||||
} else {
|
||||
return [
|
||||
'create-subscription',
|
||||
'eslint-plugin-react-hooks',
|
||||
'jest-react',
|
||||
'react',
|
||||
'react-art',
|
||||
'react-dom',
|
||||
'react-is',
|
||||
'react-reconciler',
|
||||
'react-refresh',
|
||||
'react-test-renderer',
|
||||
'use-subscription',
|
||||
'scheduler',
|
||||
];
|
||||
packageNames.push(...experimentalPackages);
|
||||
}
|
||||
return packageNames;
|
||||
};
|
||||
|
||||
const handleError = error => {
|
||||
|
||||
Reference in New Issue
Block a user