diff --git a/.eslintrc.js b/.eslintrc.js index 005727b5e14d4..563b3ffa6e528 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -539,7 +539,6 @@ module.exports = { __EXTENSION__: 'readonly', __PROFILE__: 'readonly', __TEST__: 'readonly', - __UMD__: 'readonly', __VARIANT__: 'readonly', __unmockReact: 'readonly', gate: 'readonly', diff --git a/packages/react-art/package.json b/packages/react-art/package.json index 386bd57237d94..1a4996bc88040 100644 --- a/packages/react-art/package.json +++ b/packages/react-art/package.json @@ -34,7 +34,6 @@ "README.md", "index.js", "cjs/", - "umd/", "Circle.js", "Rectangle.js", "Wedge.js" diff --git a/packages/react-cache/package.json b/packages/react-cache/package.json index 1c78f26594f6c..e0f8c0913ca02 100644 --- a/packages/react-cache/package.json +++ b/packages/react-cache/package.json @@ -12,8 +12,7 @@ "LICENSE", "README.md", "index.js", - "cjs/", - "umd/" + "cjs/" ], "peerDependencies": { "react": "^17.0.0" diff --git a/packages/react-dom/client.js b/packages/react-dom/client.js index 21aac9369ebb8..5011372e2faec 100644 --- a/packages/react-dom/client.js +++ b/packages/react-dom/client.js @@ -27,13 +27,13 @@ export function createRoot( options?: CreateRootOptions, ): RootType { if (__DEV__) { - (Internals: any).usingClientEntryPoint = true; + Internals.usingClientEntryPoint = true; } try { return createRootImpl(container, options); } finally { if (__DEV__) { - (Internals: any).usingClientEntryPoint = false; + Internals.usingClientEntryPoint = false; } } } @@ -44,13 +44,13 @@ export function hydrateRoot( options?: HydrateRootOptions, ): RootType { if (__DEV__) { - (Internals: any).usingClientEntryPoint = true; + Internals.usingClientEntryPoint = true; } try { return hydrateRootImpl(container, children, options); } finally { if (__DEV__) { - (Internals: any).usingClientEntryPoint = false; + Internals.usingClientEntryPoint = false; } } } diff --git a/packages/react-dom/package.json b/packages/react-dom/package.json index 962ab9ea6443b..3c4b8bd50a2bd 100644 --- a/packages/react-dom/package.json +++ b/packages/react-dom/package.json @@ -47,8 +47,7 @@ "unstable_testing.js", "unstable_testing.react-server.js", "unstable_server-external-runtime.js", - "cjs/", - "umd/" + "cjs/" ], "exports": { ".": { diff --git a/packages/react-dom/src/client/ReactDOM.js b/packages/react-dom/src/client/ReactDOM.js index 61660e9843369..913b9359037dc 100644 --- a/packages/react-dom/src/client/ReactDOM.js +++ b/packages/react-dom/src/client/ReactDOM.js @@ -89,7 +89,7 @@ function createRoot( options?: CreateRootOptions, ): RootType { if (__DEV__) { - if (!(Internals: any).usingClientEntryPoint && !__UMD__) { + if (!Internals.usingClientEntryPoint) { console.error( 'You are importing createRoot from "react-dom" which is not supported. ' + 'You should instead import it from "react-dom/client".', @@ -105,7 +105,7 @@ function hydrateRoot( options?: HydrateRootOptions, ): RootType { if (__DEV__) { - if (!(Internals: any).usingClientEntryPoint && !__UMD__) { + if (!Internals.usingClientEntryPoint) { console.error( 'You are importing hydrateRoot from "react-dom" which is not supported. ' + 'You should instead import it from "react-dom/client".', diff --git a/packages/react-is/package.json b/packages/react-is/package.json index 07360a88e614f..9c1f014ee2ee4 100644 --- a/packages/react-is/package.json +++ b/packages/react-is/package.json @@ -21,7 +21,6 @@ "LICENSE", "README.md", "index.js", - "cjs/", - "umd/" + "cjs/" ] } diff --git a/packages/react-refresh/package.json b/packages/react-refresh/package.json index 45c7bd8300ea2..e10d6667f57df 100644 --- a/packages/react-refresh/package.json +++ b/packages/react-refresh/package.json @@ -13,8 +13,7 @@ "README.md", "babel.js", "runtime.js", - "cjs/", - "umd/" + "cjs/" ], "main": "runtime.js", "exports": { diff --git a/packages/react-server-dom-turbopack/package.json b/packages/react-server-dom-turbopack/package.json index fd489c6c23fc7..c31d5c5832027 100644 --- a/packages/react-server-dom-turbopack/package.json +++ b/packages/react-server-dom-turbopack/package.json @@ -24,7 +24,6 @@ "server.node.unbundled.js", "node-register.js", "cjs/", - "umd/", "esm/" ], "exports": { diff --git a/packages/react-server-dom-webpack/package.json b/packages/react-server-dom-webpack/package.json index 8516b3e2e1166..565b12bf79955 100644 --- a/packages/react-server-dom-webpack/package.json +++ b/packages/react-server-dom-webpack/package.json @@ -25,7 +25,6 @@ "server.node.unbundled.js", "node-register.js", "cjs/", - "umd/", "esm/" ], "exports": { diff --git a/packages/react-test-renderer/package.json b/packages/react-test-renderer/package.json index ed32ffef0c950..cdd5a499968a3 100644 --- a/packages/react-test-renderer/package.json +++ b/packages/react-test-renderer/package.json @@ -30,7 +30,6 @@ "README.md", "index.js", "shallow.js", - "cjs/", - "umd/" + "cjs/" ] } diff --git a/packages/react/package.json b/packages/react/package.json index f93bb209349f9..b7d511806cbbf 100644 --- a/packages/react/package.json +++ b/packages/react/package.json @@ -13,7 +13,6 @@ "README.md", "index.js", "cjs/", - "umd/", "jsx-runtime.js", "jsx-runtime.react-server.js", "jsx-dev-runtime.js", diff --git a/packages/react/src/forks/ReactSharedInternalsClient.umd.js b/packages/react/src/forks/ReactSharedInternalsClient.umd.js deleted file mode 100644 index cca7797a61f04..0000000000000 --- a/packages/react/src/forks/ReactSharedInternalsClient.umd.js +++ /dev/null @@ -1,101 +0,0 @@ -/** - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - * - * @flow - */ - -import type {Dispatcher} from 'react-reconciler/src/ReactInternalTypes'; -import type {CacheDispatcher} from 'react-reconciler/src/ReactInternalTypes'; -import type {BatchConfigTransition} from 'react-reconciler/src/ReactFiberTracingMarkerComponent'; -import type {Fiber} from 'react-reconciler/src/ReactInternalTypes'; - -import * as Scheduler from 'scheduler'; - -import {disableStringRefs} from 'shared/ReactFeatureFlags'; - -export type SharedStateClient = { - H: null | Dispatcher, // ReactCurrentDispatcher for Hooks - C: null | CacheDispatcher, // ReactCurrentCache for Cache - T: null | BatchConfigTransition, // ReactCurrentBatchConfig for Transitions - - // DEV-only-ish - owner?: null | Fiber, // ReactCurrentOwner is Fiber on the Client, null in Fizz. Flight uses SharedStateServer. - - // ReactCurrentActQueue - actQueue?: null | Array, - - // Used to reproduce behavior of `batchedUpdates` in legacy mode. - isBatchingLegacy?: boolean, - didScheduleLegacyUpdate?: boolean, - - // Tracks whether something called `use` during the current batch of work. - // Determines whether we should yield to microtasks to unwrap already resolved - // promises without suspending. - didUsePromise?: boolean, - - // Track first uncaught error within this act - thrownErrors?: Array, - - // ReactDebugCurrentFrame - setExtraStackFrame?: (stack: null | string) => void, - getCurrentStack?: null | (() => string), - getStackAddendum?: () => string, - - Scheduler: any, -}; - -export type RendererTask = boolean => RendererTask | null; - -const ReactSharedInternals: SharedStateClient = { - H: null, - C: null, - T: null, - - // Re-export the schedule API(s) for UMD bundles. - // This avoids introducing a dependency on a new UMD global in a minor update, - // Since that would be a breaking change (e.g. for all existing CodeSandboxes). - // This re-export is only required for UMD bundles; - // CJS bundles use the shared NPM package. - Scheduler, -}; - -if (__DEV__ || !disableStringRefs) { - ReactSharedInternals.owner = null; -} - -if (__DEV__) { - ReactSharedInternals.actQueue = null; - ReactSharedInternals.isBatchingLegacy = false; - ReactSharedInternals.didScheduleLegacyUpdate = false; - ReactSharedInternals.didUsePromise = false; - ReactSharedInternals.thrownErrors = []; - - let currentExtraStackFrame = (null: null | string); - ReactSharedInternals.setExtraStackFrame = function (stack: null | string) { - currentExtraStackFrame = stack; - }; - // Stack implementation injected by the current renderer. - ReactSharedInternals.getCurrentStack = (null: null | (() => string)); - - ReactSharedInternals.getStackAddendum = function (): string { - let stack = ''; - - // Add an extra top frame while an element is being validated - if (currentExtraStackFrame) { - stack += currentExtraStackFrame; - } - - // Delegate to the injected renderer-specific implementation - const impl = ReactSharedInternals.getCurrentStack; - if (impl) { - stack += impl() || ''; - } - - return stack; - }; -} - -export default ReactSharedInternals; diff --git a/packages/scheduler/package.json b/packages/scheduler/package.json index 5f1537424e8b2..653f57d533468 100644 --- a/packages/scheduler/package.json +++ b/packages/scheduler/package.json @@ -22,7 +22,6 @@ "index.native.js", "unstable_mock.js", "unstable_post_task.js", - "cjs/", - "umd/" + "cjs/" ] } diff --git a/packages/scheduler/src/__tests__/SchedulerUMDBundle-test.internal.js b/packages/scheduler/src/__tests__/SchedulerUMDBundle-test.internal.js deleted file mode 100644 index 8515c2da63000..0000000000000 --- a/packages/scheduler/src/__tests__/SchedulerUMDBundle-test.internal.js +++ /dev/null @@ -1,54 +0,0 @@ -/** - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - * - * @jest-environment node - */ -'use strict'; - -class MockMessageChannel { - constructor() { - this.port1 = jest.fn(); - this.port2 = jest.fn(); - } -} - -describe('Scheduling UMD bundle', () => { - beforeEach(() => { - // Fool SECRET_INTERNALS object into including UMD forwarding methods. - global.__UMD__ = true; - - jest.resetModules(); - jest.unmock('scheduler'); - - global.MessageChannel = MockMessageChannel; - }); - - afterEach(() => { - global.MessageChannel = undefined; - }); - - function validateForwardedAPIs(api, forwardedAPIs) { - const apiKeys = Object.keys(api).sort(); - forwardedAPIs.forEach(forwardedAPI => { - expect(Object.keys(forwardedAPI).sort()).toEqual(apiKeys); - }); - } - - it('should define the same scheduling API', () => { - const api = require('../../index'); - const umdAPIDev = require('../../npm/umd/scheduler.development'); - const umdAPIProd = require('../../npm/umd/scheduler.production.min'); - const umdAPIProfiling = require('../../npm/umd/scheduler.profiling.min'); - const secretAPI = - require('react/src/forks/ReactSharedInternalsClient.umd').default; - validateForwardedAPIs(api, [ - umdAPIDev, - umdAPIProd, - umdAPIProfiling, - secretAPI.Scheduler, - ]); - }); -}); diff --git a/packages/shared/forks/Scheduler.umd.js b/packages/shared/forks/Scheduler.umd.js deleted file mode 100644 index 9bcc8fa9db2f3..0000000000000 --- a/packages/shared/forks/Scheduler.umd.js +++ /dev/null @@ -1,63 +0,0 @@ -/** - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - * - * @flow - */ - -import * as React from 'react'; - -const ReactInternals = - React.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE; - -const { - unstable_cancelCallback, - unstable_now, - unstable_scheduleCallback, - unstable_shouldYield, - unstable_requestPaint, - unstable_getFirstCallbackNode, - unstable_runWithPriority, - unstable_next, - unstable_continueExecution, - unstable_pauseExecution, - unstable_getCurrentPriorityLevel, - unstable_ImmediatePriority, - unstable_UserBlockingPriority, - unstable_NormalPriority, - unstable_LowPriority, - unstable_IdlePriority, - unstable_forceFrameRate, - - // this doesn't actually exist on the scheduler, but it *does* - // on scheduler/unstable_mock, which we'll need inside act() - // and for internal testing - unstable_flushAllWithoutAsserting, - log, - unstable_setDisableYieldValue, -} = ((ReactInternals: any).Scheduler: any); - -export { - unstable_cancelCallback, - unstable_now, - unstable_scheduleCallback, - unstable_shouldYield, - unstable_requestPaint, - unstable_getFirstCallbackNode, - unstable_runWithPriority, - unstable_next, - unstable_continueExecution, - unstable_pauseExecution, - unstable_getCurrentPriorityLevel, - unstable_ImmediatePriority, - unstable_UserBlockingPriority, - unstable_NormalPriority, - unstable_LowPriority, - unstable_IdlePriority, - unstable_forceFrameRate, - unstable_flushAllWithoutAsserting, - log, - unstable_setDisableYieldValue, -}; diff --git a/scripts/flow/environment.js b/scripts/flow/environment.js index 0b6be17a1b1d7..88683e7ee86c5 100644 --- a/scripts/flow/environment.js +++ b/scripts/flow/environment.js @@ -10,7 +10,6 @@ /* eslint-disable */ declare const __PROFILE__: boolean; -declare const __UMD__: boolean; declare const __EXPERIMENTAL__: boolean; declare const __VARIANT__: boolean; diff --git a/scripts/jest/setupEnvironment.js b/scripts/jest/setupEnvironment.js index 2aca130cba190..3b9f004bc2b82 100644 --- a/scripts/jest/setupEnvironment.js +++ b/scripts/jest/setupEnvironment.js @@ -8,7 +8,6 @@ global.__DEV__ = NODE_ENV === 'development'; global.__EXTENSION__ = false; global.__TEST__ = NODE_ENV === 'test'; global.__PROFILE__ = NODE_ENV === 'development'; -global.__UMD__ = false; const RELEASE_CHANNEL = process.env.RELEASE_CHANNEL; diff --git a/scripts/rollup/build.js b/scripts/rollup/build.js index d6f4155194af3..6bfbb6ded6dca 100644 --- a/scripts/rollup/build.js +++ b/scripts/rollup/build.js @@ -3,7 +3,6 @@ const rollup = require('rollup'); const babel = require('@rollup/plugin-babel').babel; const closure = require('./plugins/closure-plugin'); -const commonjs = require('@rollup/plugin-commonjs'); const flowRemoveTypes = require('flow-remove-types'); const prettier = require('rollup-plugin-prettier'); const replace = require('@rollup/plugin-replace'); @@ -48,9 +47,6 @@ const { NODE_ES2015, ESM_DEV, ESM_PROD, - UMD_DEV, - UMD_PROD, - UMD_PROFILING, NODE_DEV, NODE_PROD, NODE_PROFILING, @@ -228,10 +224,6 @@ function getRollupOutputOptions( function getFormat(bundleType) { switch (bundleType) { - case UMD_DEV: - case UMD_PROD: - case UMD_PROFILING: - return `umd`; case NODE_ES2015: case NODE_DEV: case NODE_PROD: @@ -261,7 +253,6 @@ function isProductionBundleType(bundleType) { case NODE_ES2015: return true; case ESM_DEV: - case UMD_DEV: case NODE_DEV: case BUN_DEV: case FB_WWW_DEV: @@ -269,10 +260,8 @@ function isProductionBundleType(bundleType) { case RN_FB_DEV: return false; case ESM_PROD: - case UMD_PROD: case NODE_PROD: case BUN_PROD: - case UMD_PROFILING: case NODE_PROFILING: case FB_WWW_PROD: case FB_WWW_PROFILING: @@ -302,15 +291,12 @@ function isProfilingBundleType(bundleType) { case RN_OSS_PROD: case ESM_DEV: case ESM_PROD: - case UMD_DEV: - case UMD_PROD: case BROWSER_SCRIPT: return false; case FB_WWW_PROFILING: case NODE_PROFILING: case RN_FB_PROFILING: case RN_OSS_PROFILING: - case UMD_PROFILING: return true; default: throw new Error(`Unknown type: ${bundleType}`); @@ -318,10 +304,6 @@ function isProfilingBundleType(bundleType) { } function getBundleTypeFlags(bundleType) { - const isUMDBundle = - bundleType === UMD_DEV || - bundleType === UMD_PROD || - bundleType === UMD_PROFILING; const isFBWWWBundle = bundleType === FB_WWW_DEV || bundleType === FB_WWW_PROD || @@ -341,17 +323,10 @@ function getBundleTypeFlags(bundleType) { const shouldStayReadable = isFBWWWBundle || isRNBundle || forcePrettyOutput; - const shouldBundleDependencies = - bundleType === UMD_DEV || - bundleType === UMD_PROD || - bundleType === UMD_PROFILING; - return { - isUMDBundle, isFBWWWBundle, isRNBundle, isFBRNBundle, - shouldBundleDependencies, shouldStayReadable, }; } @@ -387,7 +362,7 @@ function getPlugins( const isProduction = isProductionBundleType(bundleType); const isProfiling = isProfilingBundleType(bundleType); - const {isUMDBundle, shouldStayReadable} = getBundleTypeFlags(bundleType); + const {shouldStayReadable} = getBundleTypeFlags(bundleType); const needsMinifiedByClosure = isProduction && bundleType !== ESM_PROD; @@ -403,14 +378,12 @@ function getPlugins( // Generate sourcemaps for true "production" build artifacts // that will be used by bundlers, such as `react-dom.production.min.js`. // Also include profiling builds as well. - // UMD builds are rarely used and not worth having sourcemaps. const needsSourcemaps = needsMinifiedByClosure && // This will only exclude `unstable_server-external-runtime.js` artifact // To start generating sourcemaps for it, we should stop manually copying it to `facebook-www` // and force `react-dom` to include .map files in npm-package at the root level bundleType !== BROWSER_SCRIPT && - !isUMDBundle && !sourcemapPackageExcludes.includes(entry) && !shouldStayReadable; @@ -463,17 +436,12 @@ function getPlugins( values: { __DEV__: isProduction ? 'false' : 'true', __PROFILE__: isProfiling || !isProduction ? 'true' : 'false', - __UMD__: isUMDBundle ? 'true' : 'false', 'process.env.NODE_ENV': isProduction ? "'production'" : "'development'", __EXPERIMENTAL__, }, }), - // The CommonJS plugin *only* exists to pull "art" into "react-art". - // I'm going to port "art" to ES modules to avoid this problem. - // Please don't enable this for anything else! - isUMDBundle && entry === 'react-art' && commonjs(), { name: 'top-level-definitions', renderChunk(source) { @@ -530,7 +498,7 @@ function getPlugins( // Don't let it create global variables in the browser. // https://github.com/facebook/react/issues/10909 - assume_function_wrapper: !isUMDBundle, + assume_function_wrapper: true, renaming: !shouldStayReadable, }, {needsSourcemaps} @@ -733,8 +701,7 @@ async function createBundle(bundle, bundleType) { const format = getFormat(bundleType); const packageName = Packaging.getPackageName(bundle.entry); - const {isFBWWWBundle, isFBRNBundle, shouldBundleDependencies} = - getBundleTypeFlags(bundleType); + const {isFBWWWBundle, isFBRNBundle} = getBundleTypeFlags(bundleType); let resolvedEntry = resolveEntryFork( require.resolve(bundle.entry), @@ -743,10 +710,9 @@ async function createBundle(bundle, bundleType) { const peerGlobals = Modules.getPeerGlobals(bundle.externals, bundleType); let externals = Object.keys(peerGlobals); - if (!shouldBundleDependencies) { - const deps = Modules.getDependencies(bundleType, bundle.entry); - externals = externals.concat(deps); - } + + const deps = Modules.getDependencies(bundleType, bundle.entry); + externals = externals.concat(deps); const importSideEffects = Modules.getImportSideEffects(); const pureExternalModules = Object.keys(importSideEffects).filter( @@ -763,7 +729,7 @@ async function createBundle(bundle, bundleType) { external(id) { const containsThisModule = pkg => id === pkg || id.startsWith(pkg + '/'); const isProvidedByDependency = externals.some(containsThisModule); - if (!shouldBundleDependencies && isProvidedByDependency) { + if (isProvidedByDependency) { if (id.indexOf('/src/') !== -1) { throw Error( 'You are trying to import ' + @@ -931,9 +897,6 @@ async function buildEverything() { [bundle, NODE_ES2015], [bundle, ESM_DEV], [bundle, ESM_PROD], - [bundle, UMD_DEV], - [bundle, UMD_PROD], - [bundle, UMD_PROFILING], [bundle, NODE_DEV], [bundle, NODE_PROD], [bundle, NODE_PROFILING], diff --git a/scripts/rollup/bundles.js b/scripts/rollup/bundles.js index 20af2f1fa1205..b5bea8af255c1 100644 --- a/scripts/rollup/bundles.js +++ b/scripts/rollup/bundles.js @@ -11,9 +11,6 @@ const bundleTypes = { NODE_ES2015: 'NODE_ES2015', ESM_DEV: 'ESM_DEV', ESM_PROD: 'ESM_PROD', - UMD_DEV: 'UMD_DEV', - UMD_PROD: 'UMD_PROD', - UMD_PROFILING: 'UMD_PROFILING', NODE_DEV: 'NODE_DEV', NODE_PROD: 'NODE_PROD', NODE_PROFILING: 'NODE_PROFILING', @@ -35,9 +32,6 @@ const { NODE_ES2015, ESM_DEV, ESM_PROD, - UMD_DEV, - UMD_PROD, - UMD_PROFILING, NODE_DEV, NODE_PROD, NODE_PROFILING, @@ -72,9 +66,6 @@ const bundles = [ /******* Isomorphic *******/ { bundleTypes: [ - UMD_DEV, - UMD_PROD, - UMD_PROFILING, NODE_DEV, NODE_PROD, FB_WWW_DEV, @@ -173,9 +164,6 @@ const bundles = [ /******* React DOM *******/ { bundleTypes: [ - UMD_DEV, - UMD_PROD, - UMD_PROFILING, NODE_DEV, NODE_PROD, NODE_PROFILING, @@ -207,7 +195,7 @@ const bundles = [ /******* Test Utils *******/ { moduleType: RENDERER_UTILS, - bundleTypes: [FB_WWW_DEV, NODE_DEV, NODE_PROD, UMD_DEV, UMD_PROD], + bundleTypes: [FB_WWW_DEV, NODE_DEV, NODE_PROD], entry: 'react-dom/test-utils', global: 'ReactTestUtils', minifyWithProdErrorCodes: false, @@ -230,14 +218,7 @@ const bundles = [ /******* React DOM Server *******/ { - bundleTypes: [ - UMD_DEV, - UMD_PROD, - NODE_DEV, - NODE_PROD, - FB_WWW_DEV, - FB_WWW_PROD, - ], + bundleTypes: [NODE_DEV, NODE_PROD, FB_WWW_DEV, FB_WWW_PROD], moduleType: RENDERER, entry: 'react-dom/src/server/ReactDOMLegacyServerBrowser.js', name: 'react-dom-server-legacy.browser', @@ -270,7 +251,7 @@ const bundles = [ /******* React DOM Fizz Server *******/ { - bundleTypes: [NODE_DEV, NODE_PROD, UMD_DEV, UMD_PROD], + bundleTypes: [NODE_DEV, NODE_PROD], moduleType: RENDERER, entry: 'react-dom/src/server/react-dom-server.browser.js', name: 'react-dom-server.browser', @@ -340,7 +321,7 @@ const bundles = [ /******* React DOM Server Render Stub *******/ { - bundleTypes: [NODE_DEV, NODE_PROD, UMD_DEV, UMD_PROD], + bundleTypes: [NODE_DEV, NODE_PROD], moduleType: RENDERER, entry: 'react-dom/server-rendering-stub', name: 'react-dom-server-rendering-stub', @@ -352,7 +333,7 @@ const bundles = [ /******* React Server DOM Webpack Server *******/ { - bundleTypes: [NODE_DEV, NODE_PROD, UMD_DEV, UMD_PROD], + bundleTypes: [NODE_DEV, NODE_PROD], moduleType: RENDERER, entry: 'react-server-dom-webpack/server.browser', condition: 'react-server', @@ -394,7 +375,7 @@ const bundles = [ /******* React Server DOM Webpack Client *******/ { - bundleTypes: [NODE_DEV, NODE_PROD, UMD_DEV, UMD_PROD], + bundleTypes: [NODE_DEV, NODE_PROD], moduleType: RENDERER, entry: 'react-server-dom-webpack/client.browser', global: 'ReactServerDOMClient', @@ -468,7 +449,7 @@ const bundles = [ /******* React Server DOM Turbopack Server *******/ { - bundleTypes: [NODE_DEV, NODE_PROD, UMD_DEV, UMD_PROD], + bundleTypes: [NODE_DEV, NODE_PROD], moduleType: RENDERER, entry: 'react-server-dom-turbopack/server.browser', condition: 'react-server', @@ -510,7 +491,7 @@ const bundles = [ /******* React Server DOM Turbopack Client *******/ { - bundleTypes: [NODE_DEV, NODE_PROD, UMD_DEV, UMD_PROD], + bundleTypes: [NODE_DEV, NODE_PROD], moduleType: RENDERER, entry: 'react-server-dom-turbopack/client.browser', global: 'ReactServerDOMClient', @@ -652,14 +633,7 @@ const bundles = [ /******* React ART *******/ { - bundleTypes: [ - UMD_DEV, - UMD_PROD, - NODE_DEV, - NODE_PROD, - FB_WWW_DEV, - FB_WWW_PROD, - ], + bundleTypes: [NODE_DEV, NODE_PROD, FB_WWW_DEV, FB_WWW_PROD], moduleType: RENDERER, entry: 'react-art', global: 'ReactART', @@ -753,8 +727,6 @@ const bundles = [ FB_WWW_DEV, NODE_DEV, NODE_PROD, - UMD_DEV, - UMD_PROD, RN_FB_DEV, RN_FB_PROD, RN_FB_PROFILING, @@ -918,8 +890,6 @@ const bundles = [ NODE_PROD, FB_WWW_DEV, FB_WWW_PROD, - UMD_DEV, - UMD_PROD, RN_FB_DEV, RN_FB_PROD, RN_FB_PROFILING, @@ -1045,8 +1015,6 @@ const bundles = [ /******* React Scheduler Mock (experimental) *******/ { bundleTypes: [ - UMD_DEV, - UMD_PROD, NODE_DEV, NODE_PROD, FB_WWW_DEV, @@ -1173,12 +1141,6 @@ function getFilename(bundle, bundleType) { return `${name}.development.js`; case ESM_PROD: return `${name}.production.min.js`; - case UMD_DEV: - return `${name}.development.js`; - case UMD_PROD: - return `${name}.production.min.js`; - case UMD_PROFILING: - return `${name}.profiling.min.js`; case NODE_DEV: return `${name}.development.js`; case NODE_PROD: diff --git a/scripts/rollup/forks.js b/scripts/rollup/forks.js index f12f36744b5c9..98449cf8f84b0 100644 --- a/scripts/rollup/forks.js +++ b/scripts/rollup/forks.js @@ -5,9 +5,6 @@ const {bundleTypes, moduleTypes} = require('./bundles'); const inlinedHostConfigs = require('../shared/inlinedHostConfigs'); const { - UMD_DEV, - UMD_PROD, - UMD_PROFILING, FB_WWW_DEV, FB_WWW_PROD, FB_WWW_PROFILING, @@ -188,25 +185,6 @@ const forks = Object.freeze({ return null; }, - './packages/scheduler/index.js': (bundleType, entry, dependencies) => { - switch (bundleType) { - case UMD_DEV: - case UMD_PROD: - case UMD_PROFILING: - if (dependencies.indexOf('react') === -1) { - // It's only safe to use this fork for modules that depend on React, - // because they read the re-exported API from the SECRET_INTERNALS object. - return null; - } - // Optimization: for UMDs, use the API that is already a part of the React - // package instead of requiring it to be loaded via a separate