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.
What is the context of this PR?
ONSDESYS-646
Updated Node to V24.10.0
After upgrading,
yarn startstarted throwing module resolution errors for imports like /design-system/lib/render-page-list.Updated imports to use proper relative paths (e.g. ./render-page-list.js)
Updated
gulpandgulp-clito latest versions to resolve(node:14077) [DEP0180] DeprecationWarning: fs.Stats constructor is deprecated.Deprecation warning -
(node:17155) [DEP0060] DeprecationWarning: Theutil._extendAPI is deprecated. Please use Object.assign() instead.Found oututilis used byhttp_proxya transitive dependancy brought in bybrowser-syncThe issue is still open in that dependancy
Warning:
(node:8229) [MODULE_TYPELESS_PACKAGE_JSON] Warning: Module type of file:///design-system/lib/dev-server.js is not specified and it doesn't parse as CommonJS. Reparsing as ES module because module syntax was detected. This incurs a performance overhead. To eliminate this warning, add "type": "module" to /design-system/package.json.This warning occurs because our JavaScript files currently use CommonJS syntax (e.g., require('<package_name>')) and ESM (ECMAScript Module) syntax (e.g., import ... from '<package_name>'). Node.js needs to know which module system to use when loading files. Since it detects ESM syntax without explicit configuration, it reparses the file, which causes this warning and a slight performance overhead. To resolve this, we should standardize on a single module system — either CommonJS or ESM — and configure it accordingly (e.g., by adding "type": "module" to package.json if we choose ESM. If we add it we need to resolve this error shown during
yarn start-ReferenceError: require is not defined in ES module scope, you can use import instead This file is being treated as an ES module because it has a '.js' file extension and '/design-system/package.json' contains "type": "module". To treat it as a CommonJS script, rename it to use the '.cjs' file extension.)These warning show up in node version 22 as well.
How to review this PR
Run
nvm installand thennvm useto update node tov24.10.0and test DS withyarn start,yarn test,yarn test-visualand check that there are no deprecations or errorsChecklist
This needs to be completed by the person raising the PR.