diff --git a/package.json b/package.json index 773eaff..63033c7 100644 --- a/package.json +++ b/package.json @@ -12,8 +12,8 @@ "workspaces": [ "packages/bridge", "packages/braze", - "packages/react-18", - "packages/react-dom-18", + "packages/react", + "packages/react-dom", "packages/trackjs", "packages/vue-3", "packages/lit", diff --git a/packages/react-dom-18/react-dom.server.browser.js b/packages/react-dom-18/react-dom.server.browser.js deleted file mode 100644 index ac203c2..0000000 --- a/packages/react-dom-18/react-dom.server.browser.js +++ /dev/null @@ -1,14 +0,0 @@ -import ReactDOM from "react-dom/server.browser"; - -export default ReactDOM; -export const { - version, - renderToString, - renderToStaticMarkup, - renderToStaticNodeStream, - renderToReadableStream, - renderToNodeStream, -} = ReactDOM; -// This file exists simply to apply __esModule: true to the module -export const __esModule = true; - diff --git a/packages/react-dom-18/react-dom.server.node.js b/packages/react-dom-18/react-dom.server.node.js deleted file mode 100644 index 64ff5be..0000000 --- a/packages/react-dom-18/react-dom.server.node.js +++ /dev/null @@ -1,13 +0,0 @@ -import ReactDOM from "react-dom/server.node"; - -export default ReactDOM; -export const { - version, - renderToString, - renderToStaticMarkup, - renderToStaticNodeStream, - renderToPipeableStream, - renderToNodeStream, -} = ReactDOM; -// This file exists simply to apply __esModule: true to the module -export const __esModule = true; diff --git a/packages/react-dom-18/package.json b/packages/react-dom/package.json similarity index 90% rename from packages/react-dom-18/package.json rename to packages/react-dom/package.json index 2541f18..59cbce2 100644 --- a/packages/react-dom-18/package.json +++ b/packages/react-dom/package.json @@ -12,10 +12,10 @@ "eik:publish": "eik publish", "eik:alias": "eik npm-alias", "postinstall": "npm run build", - "eik:publish:ci": "../../scripts/publish.js react-dom-18 react-dom" + "eik:publish:ci": "../../scripts/publish.js react-dom react-dom" }, "dependencies": { - "react-dom": "18.3.1" + "react-dom": "19.0.0" }, "devDependencies": { "@eik/rollup-plugin": "4.0.64", diff --git a/packages/react-dom-18/react-dom.client.js b/packages/react-dom/react-dom.client.js similarity index 72% rename from packages/react-dom-18/react-dom.client.js rename to packages/react-dom/react-dom.client.js index a9cc46b..4224531 100644 --- a/packages/react-dom-18/react-dom.client.js +++ b/packages/react-dom/react-dom.client.js @@ -1,6 +1,6 @@ import ReactDOM from "react-dom/client"; export default ReactDOM; -export const { createRoot, hydrateRoot } = ReactDOM; +export const { createRoot, hydrateRoot, version } = ReactDOM; // This file exists simply to apply __esModule: true to the module export const __esModule = true; diff --git a/packages/react-dom-18/react-dom.js b/packages/react-dom/react-dom.js similarity index 55% rename from packages/react-dom-18/react-dom.js rename to packages/react-dom/react-dom.js index f47ab4a..f62c93c 100644 --- a/packages/react-dom-18/react-dom.js +++ b/packages/react-dom/react-dom.js @@ -2,17 +2,19 @@ import ReactDOM from "react-dom"; export default ReactDOM; export const { - __SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED, + __DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, createPortal, - createRoot, - findDOMNode, flushSync, - hydrate, - hydrateRoot, - render, - unmountComponentAtNode, - unstable_renderSubtreeIntoContainer, + preconnect, + prefetchDNS, + preinit, + preinitModule, + preload, + preloadModule, + requestFormReset, unstable_batchedUpdates, + useFormState, + useFormStatus, version, } = ReactDOM; // This file exists simply to apply __esModule: true to the module diff --git a/packages/react-dom-18/rollup.config.js b/packages/react-dom/rollup.config.js similarity index 80% rename from packages/react-dom-18/rollup.config.js rename to packages/react-dom/rollup.config.js index 0edf33e..2ffa118 100644 --- a/packages/react-dom-18/rollup.config.js +++ b/packages/react-dom/rollup.config.js @@ -9,7 +9,7 @@ import swc from "@rollup/plugin-swc"; const env = process.env.NODE_ENV; -const reactPkg = new URL("../react-18/package.json", import.meta.url); +const reactPkg = new URL("../react/package.json", import.meta.url); const reactDomPkg = new URL("./package.json", import.meta.url); const { @@ -58,14 +58,4 @@ export default [ output: { format: "esm", sourcemap: true, file: `./dist/react-dom.client.${env}.js` }, plugins, }, - { - input: "./react-dom.server.browser.js", - output: { format: "esm", sourcemap: true, file: `./dist/react-dom.server.browser.${env}.js` }, - plugins, - }, - { - input: "./react-dom.server.node.js", - output: { format: "esm", sourcemap: true, file: `./dist/react-dom.server.node.${env}.js` }, - plugins, - }, ]; diff --git a/packages/react-18/development.js b/packages/react/development.js similarity index 78% rename from packages/react-18/development.js rename to packages/react/development.js index 4a9d0c3..1076a99 100644 --- a/packages/react-18/development.js +++ b/packages/react/development.js @@ -10,32 +10,36 @@ export const { Children, Component, PureComponent, - __SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED, + __CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, + act, + cache, cloneElement, createContext, createElement, - createFactory, createRef, forwardRef, isValidElement, lazy, memo, + startTransition, + unstable_useCacheRefresh, + use, + useActionState, useCallback, useContext, useDebugValue, + useDeferredValue, useEffect, + useId, useImperativeHandle, + useInsertionEffect, useLayoutEffect, useMemo, + useOptimistic, useReducer, useRef, useState, - version, - startTransition, - unstable_act, - useDeferredValue, - useId, - useInsertionEffect, useSyncExternalStore, useTransition, -} = React; \ No newline at end of file + version, +} = React; diff --git a/packages/react-18/package.json b/packages/react/package.json similarity index 90% rename from packages/react-18/package.json rename to packages/react/package.json index f4fd9ba..903ea21 100644 --- a/packages/react-18/package.json +++ b/packages/react/package.json @@ -9,11 +9,11 @@ "eik:login": "eik login", "eik:publish": "eik publish", "eik:alias": "eik npm-alias", - "eik:publish:ci": "../../scripts/publish.js react-18 react", + "eik:publish:ci": "../../scripts/publish.js react react", "postinstall": "npm run build" }, "dependencies": { - "react": "18.3.1" + "react": "19.0.0" }, "devDependencies": { "@eik/rollup-plugin": "4.0.64", diff --git a/packages/react-18/production.js b/packages/react/production.js similarity index 71% rename from packages/react-18/production.js rename to packages/react/production.js index 4e5c1f1..071fe1f 100644 --- a/packages/react-18/production.js +++ b/packages/react/production.js @@ -1,4 +1,4 @@ -import React from "react/cjs/react.production.min.js"; +import React from "react/cjs/react.production.js"; export default React; export const __esmModule = true; @@ -10,32 +10,36 @@ export const { Children, Component, PureComponent, - __SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED, + __CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, + act, + cache, cloneElement, createContext, createElement, - createFactory, createRef, forwardRef, isValidElement, lazy, memo, + startTransition, + unstable_useCacheRefresh, + use, + useActionState, useCallback, useContext, useDebugValue, + useDeferredValue, useEffect, + useId, useImperativeHandle, + useInsertionEffect, useLayoutEffect, useMemo, + useOptimistic, useReducer, useRef, useState, - version, - startTransition, - unstable_act, - useDeferredValue, - useId, - useInsertionEffect, useSyncExternalStore, useTransition, -} = React; \ No newline at end of file + version, +} = React; diff --git a/packages/react-18/rollup.config.js b/packages/react/rollup.config.js similarity index 95% rename from packages/react-18/rollup.config.js rename to packages/react/rollup.config.js index 581e453..95c61c6 100644 --- a/packages/react-18/rollup.config.js +++ b/packages/react/rollup.config.js @@ -13,8 +13,10 @@ const { resolve } = createRequire(import.meta.url); const reactPath = resolve("react"); const reactPackageJSONPath = join(dirname(reactPath), "package.json"); const reactPackageJSON = JSON.parse(readFileSync(reactPackageJSONPath, { encoding: "utf8" })); + reactPackageJSON.exports["./cjs/react.development.js"] = "./cjs/react.development.js"; -reactPackageJSON.exports["./cjs/react.production.min.js"] = "./cjs/react.production.min.js"; +reactPackageJSON.exports["./cjs/react.production.js"] = "./cjs/react.production.js"; + writeFileSync(reactPackageJSONPath, JSON.stringify(reactPackageJSON, null, 2)); const browserslistrc = new URL("../../.browserslistrc", import.meta.url);