diff --git a/CHANGELOG.md b/CHANGELOG.md index c39f2e54..caf87e3b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,10 @@ * Updated `@enact/template-limestone` dependency. +### serve, test + +* Added `react-is` dependency and changed jest config and webpack config files to use it. + ## 7.3.1 (May 4, 2026) * Fixed `postcss-preset-env` version to v10 temporarily. diff --git a/config/jest/jest.config.js b/config/jest/jest.config.js index b977d0a6..17c36671 100644 --- a/config/jest/jest.config.js +++ b/config/jest/jest.config.js @@ -91,6 +91,7 @@ module.exports = { '^@testing-library/react$': require.resolve('@testing-library/react'), '^@testing-library/user-event$': require.resolve('@testing-library/user-event'), '^react$': require.resolve('react'), + '^react-is$': require.resolve('react-is'), // Backward compatibility for new iLib location with old Enact '^ilib[/](.*)$': path.join(app.context, globals.ILIB_BASE_PATH, '$1'), // Backward compatibility for old iLib location with new Enact diff --git a/config/webpack.config.js b/config/webpack.config.js index 1714bc2a..54be65f8 100644 --- a/config/webpack.config.js +++ b/config/webpack.config.js @@ -360,9 +360,15 @@ module.exports = function ( symlinks: false, // Backward compatibility for apps using new ilib references with old Enact // and old apps referencing old iLib location with new Enact - alias: fs.existsSync(path.join(app.context, 'node_modules', '@enact', 'i18n', 'ilib')) ? - Object.assign({ilib: '@enact/i18n/ilib'}, app.alias) : - Object.assign({'@enact/i18n/ilib': 'ilib'}, app.alias), + alias: Object.assign( + { + 'react-is': path.dirname(require.resolve('react-is/package.json')) + }, + fs.existsSync(path.join(app.context, 'node_modules', '@enact', 'i18n', 'ilib')) ? + {ilib: '@enact/i18n/ilib'} : + {'@enact/i18n/ilib': 'ilib'}, + app.alias + ), // Optional configuration for redirecting module requests. fallback: app.resolveFallback }, diff --git a/npm-shrinkwrap.json b/npm-shrinkwrap.json index 2ed8636a..a303f10f 100644 --- a/npm-shrinkwrap.json +++ b/npm-shrinkwrap.json @@ -61,6 +61,7 @@ "react": "^19.2.4", "react-dev-utils": "^12.0.1", "react-dom": "^19.2.4", + "react-is": "^19.2.7", "react-refresh": "^0.18.0", "react-test-renderer": "^19.2.4", "resolution-independence": "^1.0.0", @@ -35290,6 +35291,13 @@ "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" } }, + "node_modules/pretty-format/node_modules/react-is": { + "version": "17.0.2", + "resolved": "https://registry.npmjs.org/react-is/-/react-is-17.0.2.tgz", + "integrity": "sha512-w2GsyukL62IJnlaff/nRegPQR94C/XXamvMWmSHRJ4y7Ts/4ocGRmTHvOs8PSE6pB3dWOrD/nueuU5sduBsQ4w==", + "license": "MIT", + "peer": true + }, "node_modules/process": { "version": "0.11.10", "resolved": "https://registry.npmjs.org/process/-/process-0.11.10.tgz", @@ -35793,11 +35801,10 @@ "license": "MIT" }, "node_modules/react-is": { - "version": "17.0.2", - "resolved": "https://registry.npmjs.org/react-is/-/react-is-17.0.2.tgz", - "integrity": "sha512-w2GsyukL62IJnlaff/nRegPQR94C/XXamvMWmSHRJ4y7Ts/4ocGRmTHvOs8PSE6pB3dWOrD/nueuU5sduBsQ4w==", - "license": "MIT", - "peer": true + "version": "19.2.7", + "resolved": "https://registry.npmjs.org/react-is/-/react-is-19.2.7.tgz", + "integrity": "sha512-kZFnouyVv7eP/Phmrlo9FK+zcAdriZJvzxXHF1Sl1P377WSGe2G/JxVolhTrB/jeV47lKImhNUsijjHAAbcl/A==", + "license": "MIT" }, "node_modules/react-refresh": { "version": "0.18.0", @@ -35821,12 +35828,6 @@ "react": "^19.2.4" } }, - "node_modules/react-test-renderer/node_modules/react-is": { - "version": "19.2.4", - "resolved": "https://registry.npmjs.org/react-is/-/react-is-19.2.4.tgz", - "integrity": "sha512-W+EWGn2v0ApPKgKKCy/7s7WHXkboGcsrXE+2joLyVxkbyVQfO3MUEaUQDHoSmb8TFFrSKYa9mw64WZHNHSDzYA==", - "license": "MIT" - }, "node_modules/read-installed": { "version": "4.0.3", "resolved": "https://registry.npmjs.org/read-installed/-/read-installed-4.0.3.tgz", diff --git a/package.json b/package.json index ac14c240..6636556b 100644 --- a/package.json +++ b/package.json @@ -95,6 +95,7 @@ "react": "^19.2.4", "react-dev-utils": "^12.0.1", "react-dom": "^19.2.4", + "react-is": "^19.2.7", "react-refresh": "^0.18.0", "react-test-renderer": "^19.2.4", "resolution-independence": "^1.0.0", @@ -131,4 +132,4 @@ "globals": "^17.4.0", "prettier": "^3.8.1" } -} +} \ No newline at end of file