Repository navigation
Conversation
Upgrade 9 packages to new majors:
- chalk ^5.6.2 -> ^6.0.1
- dotenv ^17.4.2 -> ^18.0.9
- dotenv-expand ^13.0.0 -> ^1000.0.0
- validate-npm-package-name ^7.0.2 -> ^8.0.0
- @testing-library/jest-dom ^6.9.1 -> ^7.0.1
- jest-environment-jsdom 29.7.0 -> 30.5.2
- less-loader ^12.3.2 -> ^13.0.0
- sass-loader ^16.0.7 -> ^17.0.1
- postcss-preset-env ^10.6.1 -> ^11.6.1
Deferred (ecosystem/engine incompat): @babel/plugin-transform-modules-commonjs@8,
eslint@10 (requires Node >=20.19, config-enact compat), webpack-dev-server@6
(SockJS removal breaks react-refresh-webpack-plugin).
No source migration required: chalk uses dynamic import(), dotenv uses
config({processEnv:{}})+expand(), jest-dom via moduleNameMapper, loaders use
lessOptions/sassOptions (unchanged across majors).
- webpack-dev-server ^5.2.5 -> ^6.1.0 - @pmmmwh/react-refresh-webpack-plugin ^0.6.2 -> ^0.6.3 (adds WDS6 peer support) - engines.node: drop Node 20, require ^22.15.0 || >=24.0.0 (WDS6 needs >=22.15.0) WDS6 is ESM-only but loads via require(esm) on Node >=22.15. No serve.js code changes needed: WebpackDevServer/startCallback/stopCallback/setupMiddlewares APIs unchanged from v5. react-dev-utils uses native WebSocket (no SockJS), so SockJS removal in v6 has no impact. webpack 5.112.2 satisfies WDS6 peer ^5.101.0.
Three root causes surfaced by the dependency upgrades (all green on develop, failing on this branch) are addressed: 1. 'module.is is not a function' (isomorphic/screenshot/ui-tests framework bundle): the pre-existing webpack bump to 5.112.2 left @enact/dev-utils resolving its own nested webpack 5.109.2. EnactFrameworkPlugin requires webpack/lib/dll/DllModule, so the DLL runtime straddled two webpack copies and broke. Add overrides.webpack ^5.112.2 to dedupe to a single webpack. 2. LESS build failure (samples/theme-samples): less-loader 13 defaults lessLogAsWarnOrErr to true, emitting Less deprecations (mixin called without parentheses in @enact/ui) as webpack warnings; pack --production (CI=true) treats warnings as errors. Set lessLogAsWarnOrErr:false to restore pre-13 silent logging. 3. 'Property window is not declared configurable' (@enact/core specs under cli-testing): jest-environment-jsdom 30 pulls jsdom 26, where window.window is non-configurable, breaking jest.spyOn(window,'window','get'). This cannot be shimmed from a custom environment (the property is genuinely non-configurable). Revert jest-environment-jsdom to 29.7.0 (jsdom 20.0.3), which keeps window configurable. Verified the exact spy pattern passes. Other upgrades retained: chalk 6, dotenv 18, dotenv-expand 1000, validate-npm-package-name 8, @testing-library/jest-dom 7, less-loader 13, sass-loader 17, postcss-preset-env 11, webpack-dev-server 6, react-refresh-webpack-plugin 0.6.3.
Point @enact/dev-utils at enactjs/dev-utils#feature/NXT-20982, whose devDep webpack is aligned to ^5.112.2. This dedupes webpack to the single top-level copy naturally, so the temporary overrides.webpack ^5.112.2 workaround for the 'module.is is not a function' DLL failure (cause 1) is removed. Verified: webpack resolves to one 5.112.2 copy (no nested dev-utils webpack), and EnactFrameworkPlugin loads webpack/lib/dll/DllModule from the same single webpack instance the CLI compiles with.
Update the pinned @enact/dev-utils commit to include the public-API RuntimeGlobals change (enactjs/dev-utils@57b0a78), fixing the framework build failure 'Cannot find module webpack/lib/RuntimeGlobals' on webpack 5.112.
Pin @enact/dev-utils to enactjs/dev-utils@663a65f, which fixes the external framework build failure 'Cannot find module webpack/lib/dependencies/DelegatedSourceDependency' on webpack 5.112.
Pin @enact/dev-utils to enactjs/dev-utils@f4f3304.
jest-environment-jsdom is pinned back to 29.7.0, matching develop, so there is no net change to record.
3 of 5 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Checklist
Issue Resolved / Feature Added
Updates the Enact CLI's dependencies to their latest major versions and migrates
the code/configuration accordingly. The following packages are upgraded:
chalk5 → 6dotenv17 → 18,dotenv-expand13 → 1000validate-npm-package-name7 → 8@testing-library/jest-dom6 → 7less-loader12 → 13,sass-loader16 → 17,postcss-preset-env10 → 11webpack-dev-server5 → 6 (and@pmmmwh/react-refresh-webpack-plugin0.6.2 → 0.6.3)webpack-dev-server6 is ESM-only and requires Node.js >= 22.15, so thesupported Node engines are updated to
^22.15.0 || >=24.0.0.Resolution
No source migration was required for most packages (chalk already uses dynamic
import(), dotenv usesconfig({processEnv})+expand(), jest-dom is wired viamoduleNameMapper, the style loaders use the unchangedlessOptions/sassOptions).Regressions surfaced by the upgrades were fixed:
less-loader13 now defaultslessLogAsWarnOrErrtotrue, surfacing Lessdeprecations as webpack warnings that fail
pack --productionunder CI. SetlessLogAsWarnOrErr: falseto restore the previous silent behavior.jest-environment-jsdom30 pulls jsdom 26, where the globalwindowproperty is non-configurable and breaks
jest.spyOn(window, 'window', 'get')used by framework specs. This is not shimmable from a custom environment, so
jest-environment-jsdomis kept at 29.7.0 (jsdom 20) which pairs fine withjest core 30.
webpack5.112 relocated internal modules used by@enact/dev-utils’s DLLplugins. The CLI now consumes the matching
@enact/dev-utilschanges (see thecompanion dev-utils PR), so a single webpack copy is resolved and the framework
bundle builds cleanly (no more
module.is is not a functionorCannot find module 'webpack/lib/RuntimeGlobals').Deferred (ecosystem not ready):
@babel/plugin-transform-modules-commonjs8 andeslint10.Additional Considerations
Validated with the
enact-release-testing-related-clipipeline and thedownstream framework jobs (isomorphic / cli-testing / samples / screenshot /
theme-samples / ui-tests) on Node 22+. The
@enact/dev-utilsdependencycurrently points at the
feature/NXT-20982branch and should be moved back to apublished version range once the companion dev-utils PR is released.
Links
NXT-20982
Comments
Enact-DCO-1.0-Signed-off-by: Taeyoung Hong (taeyoung.hong@lge.com)