From 5b00be9149788272b94034086a032851bbdfcd58 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gytis=20=C4=8Cepkauskas?= <98940208+GytisCepk@users.noreply.github.com> Date: Wed, 30 Oct 2024 16:43:05 +0200 Subject: [PATCH] Node 22 support (#7283) Co-authored-by: Gytis Cepkauskas Co-authored-by: Arun George <11051042+aruniverse@users.noreply.github.com> --- ...ytis-node-22-support_2024-10-21-13-56.json | 10 +++++ ...ytis-node-22-support_2024-10-21-13-56.json | 10 +++++ ...ytis-node-22-support_2024-10-21-13-56.json | 10 +++++ ...ytis-node-22-support_2024-10-21-13-56.json | 10 +++++ ...ytis-node-22-support_2024-10-21-13-56.json | 10 +++++ ...ytis-node-22-support_2024-10-21-13-56.json | 10 +++++ ...ytis-node-22-support_2024-10-21-13-56.json | 10 +++++ ...ytis-node-22-support_2024-10-21-13-56.json | 10 +++++ ...ytis-node-22-support_2024-10-21-13-56.json | 10 +++++ common/config/azure-pipelines/ci.yaml | 8 ++-- ...ation-client-regression-pr-validation.yaml | 4 +- .../integration-pr-validation.yaml | 5 +-- .../integration-validation.yaml | 13 ++++++- .../config/azure-pipelines/jobs/fast-ci.yaml | 10 ++--- .../jobs/regression-testing.yaml | 15 ++++++++ common/config/rush/pnpm-lock.yaml | 34 ++++++++--------- common/scripts/install-run-rush.js | 8 ++-- common/scripts/install-run.js | 38 +++++++++---------- core/backend/package.json | 4 +- core/electron/package.json | 2 +- core/express-server/package.json | 2 +- core/extension/codeGen/generate-exports.js | 3 +- core/mobile/package.json | 2 +- docs/changehistory/NextVersion.md | 5 +++ docs/learning/SupportedPlatforms.md | 1 + docs/learning/WriteAConnector.md | 14 +++---- .../tutorials/development-prerequisites.md | 2 +- domains/analytical/backend/package.json | 2 +- .../linear-referencing/backend/package.json | 2 +- .../physical-material/backend/package.json | 2 +- editor/backend/package.json | 2 +- example-code/snippets/package.json | 2 +- full-stack-tests/backend/package.json | 2 +- full-stack-tests/core/package.json | 2 +- rush.json | 4 +- .../display-performance-test-app/package.json | 2 +- test-apps/display-test-app/package.json | 2 +- 37 files changed, 201 insertions(+), 81 deletions(-) create mode 100644 common/changes/@itwin/analytical-backend/gytis-node-22-support_2024-10-21-13-56.json create mode 100644 common/changes/@itwin/core-backend/gytis-node-22-support_2024-10-21-13-56.json create mode 100644 common/changes/@itwin/core-electron/gytis-node-22-support_2024-10-21-13-56.json create mode 100644 common/changes/@itwin/core-extension/gytis-node-22-support_2024-10-21-13-56.json create mode 100644 common/changes/@itwin/core-mobile/gytis-node-22-support_2024-10-21-13-56.json create mode 100644 common/changes/@itwin/editor-backend/gytis-node-22-support_2024-10-21-13-56.json create mode 100644 common/changes/@itwin/express-server/gytis-node-22-support_2024-10-21-13-56.json create mode 100644 common/changes/@itwin/linear-referencing-backend/gytis-node-22-support_2024-10-21-13-56.json create mode 100644 common/changes/@itwin/physical-material-backend/gytis-node-22-support_2024-10-21-13-56.json diff --git a/common/changes/@itwin/analytical-backend/gytis-node-22-support_2024-10-21-13-56.json b/common/changes/@itwin/analytical-backend/gytis-node-22-support_2024-10-21-13-56.json new file mode 100644 index 000000000000..3e8936d96f2b --- /dev/null +++ b/common/changes/@itwin/analytical-backend/gytis-node-22-support_2024-10-21-13-56.json @@ -0,0 +1,10 @@ +{ + "changes": [ + { + "packageName": "@itwin/analytical-backend", + "comment": "Add support for Node 22", + "type": "none" + } + ], + "packageName": "@itwin/analytical-backend" +} \ No newline at end of file diff --git a/common/changes/@itwin/core-backend/gytis-node-22-support_2024-10-21-13-56.json b/common/changes/@itwin/core-backend/gytis-node-22-support_2024-10-21-13-56.json new file mode 100644 index 000000000000..12240c8f1fc7 --- /dev/null +++ b/common/changes/@itwin/core-backend/gytis-node-22-support_2024-10-21-13-56.json @@ -0,0 +1,10 @@ +{ + "changes": [ + { + "packageName": "@itwin/core-backend", + "comment": "Add support for Node 22", + "type": "none" + } + ], + "packageName": "@itwin/core-backend" +} \ No newline at end of file diff --git a/common/changes/@itwin/core-electron/gytis-node-22-support_2024-10-21-13-56.json b/common/changes/@itwin/core-electron/gytis-node-22-support_2024-10-21-13-56.json new file mode 100644 index 000000000000..f06beccf2b7b --- /dev/null +++ b/common/changes/@itwin/core-electron/gytis-node-22-support_2024-10-21-13-56.json @@ -0,0 +1,10 @@ +{ + "changes": [ + { + "packageName": "@itwin/core-electron", + "comment": "", + "type": "none" + } + ], + "packageName": "@itwin/core-electron" +} \ No newline at end of file diff --git a/common/changes/@itwin/core-extension/gytis-node-22-support_2024-10-21-13-56.json b/common/changes/@itwin/core-extension/gytis-node-22-support_2024-10-21-13-56.json new file mode 100644 index 000000000000..bc2b251519b3 --- /dev/null +++ b/common/changes/@itwin/core-extension/gytis-node-22-support_2024-10-21-13-56.json @@ -0,0 +1,10 @@ +{ + "changes": [ + { + "packageName": "@itwin/core-extension", + "comment": "Add support for Node 22", + "type": "none" + } + ], + "packageName": "@itwin/core-extension" +} \ No newline at end of file diff --git a/common/changes/@itwin/core-mobile/gytis-node-22-support_2024-10-21-13-56.json b/common/changes/@itwin/core-mobile/gytis-node-22-support_2024-10-21-13-56.json new file mode 100644 index 000000000000..55fa0784386a --- /dev/null +++ b/common/changes/@itwin/core-mobile/gytis-node-22-support_2024-10-21-13-56.json @@ -0,0 +1,10 @@ +{ + "changes": [ + { + "packageName": "@itwin/core-mobile", + "comment": "", + "type": "none" + } + ], + "packageName": "@itwin/core-mobile" +} \ No newline at end of file diff --git a/common/changes/@itwin/editor-backend/gytis-node-22-support_2024-10-21-13-56.json b/common/changes/@itwin/editor-backend/gytis-node-22-support_2024-10-21-13-56.json new file mode 100644 index 000000000000..b9a34f9f52bb --- /dev/null +++ b/common/changes/@itwin/editor-backend/gytis-node-22-support_2024-10-21-13-56.json @@ -0,0 +1,10 @@ +{ + "changes": [ + { + "packageName": "@itwin/editor-backend", + "comment": "Add support for Node 22", + "type": "none" + } + ], + "packageName": "@itwin/editor-backend" +} \ No newline at end of file diff --git a/common/changes/@itwin/express-server/gytis-node-22-support_2024-10-21-13-56.json b/common/changes/@itwin/express-server/gytis-node-22-support_2024-10-21-13-56.json new file mode 100644 index 000000000000..f306b86e5b24 --- /dev/null +++ b/common/changes/@itwin/express-server/gytis-node-22-support_2024-10-21-13-56.json @@ -0,0 +1,10 @@ +{ + "changes": [ + { + "packageName": "@itwin/express-server", + "comment": "Add support for Node 22", + "type": "none" + } + ], + "packageName": "@itwin/express-server" +} \ No newline at end of file diff --git a/common/changes/@itwin/linear-referencing-backend/gytis-node-22-support_2024-10-21-13-56.json b/common/changes/@itwin/linear-referencing-backend/gytis-node-22-support_2024-10-21-13-56.json new file mode 100644 index 000000000000..2cee35437362 --- /dev/null +++ b/common/changes/@itwin/linear-referencing-backend/gytis-node-22-support_2024-10-21-13-56.json @@ -0,0 +1,10 @@ +{ + "changes": [ + { + "packageName": "@itwin/linear-referencing-backend", + "comment": "Add support for Node 22", + "type": "none" + } + ], + "packageName": "@itwin/linear-referencing-backend" +} \ No newline at end of file diff --git a/common/changes/@itwin/physical-material-backend/gytis-node-22-support_2024-10-21-13-56.json b/common/changes/@itwin/physical-material-backend/gytis-node-22-support_2024-10-21-13-56.json new file mode 100644 index 000000000000..c326e14f6b31 --- /dev/null +++ b/common/changes/@itwin/physical-material-backend/gytis-node-22-support_2024-10-21-13-56.json @@ -0,0 +1,10 @@ +{ + "changes": [ + { + "packageName": "@itwin/physical-material-backend", + "comment": "Add support for Node 22", + "type": "none" + } + ], + "packageName": "@itwin/physical-material-backend" +} \ No newline at end of file diff --git a/common/config/azure-pipelines/ci.yaml b/common/config/azure-pipelines/ci.yaml index 7342df541f12..0175f0f51431 100644 --- a/common/config/azure-pipelines/ci.yaml +++ b/common/config/azure-pipelines/ci.yaml @@ -27,11 +27,11 @@ jobs: - job: strategy: matrix: - "Windows_Node_20": + "Windows_Node_22": OS: windows-latest - "Linux_Node_20": + "Linux_Node_22": OS: ubuntu-latest - "MacOS_Node_20": + "MacOS_Node_22": OS: macOS-latest pool: @@ -46,4 +46,4 @@ jobs: - checkout: self - template: ./templates/core-build.yaml parameters: - nodeVersion: 20.x + nodeVersion: 22.x diff --git a/common/config/azure-pipelines/integration-client-regression-pr-validation.yaml b/common/config/azure-pipelines/integration-client-regression-pr-validation.yaml index 06201471d5da..eee860e023a3 100644 --- a/common/config/azure-pipelines/integration-client-regression-pr-validation.yaml +++ b/common/config/azure-pipelines/integration-client-regression-pr-validation.yaml @@ -12,7 +12,7 @@ variables: - group: iModel.js Integration Test Users jobs: - - job: Node_20_x + - job: Node_22_x condition: succeeded() pool: vmImage: ubuntu-latest @@ -23,4 +23,4 @@ jobs: - template: templates/integration-test-steps.yaml parameters: - nodeVersion: 20.x + nodeVersion: 22.x diff --git a/common/config/azure-pipelines/integration-pr-validation.yaml b/common/config/azure-pipelines/integration-pr-validation.yaml index a35fb96ac667..736df622a227 100644 --- a/common/config/azure-pipelines/integration-pr-validation.yaml +++ b/common/config/azure-pipelines/integration-pr-validation.yaml @@ -1,6 +1,5 @@ # iTwin.js Core Integration PR Validation Build # -# This integration test job currently run on all supported Node Versions of iTwin.js. # To decrease build load, only the latest Node version is tested on pull requests. # All other versions are run on `master` and `release/*` branches. # @@ -30,7 +29,7 @@ variables: - group: iTwin.js Integration Test Users jobs: - - job: Node_20_x + - job: Node_22_x condition: succeeded() pool: vmImage: ubuntu-latest @@ -41,4 +40,4 @@ jobs: - template: templates/integration-test-steps.yaml parameters: - nodeVersion: 20.x + nodeVersion: 22.x diff --git a/common/config/azure-pipelines/integration-validation.yaml b/common/config/azure-pipelines/integration-validation.yaml index 431ee0cfa27a..d75be2c5c143 100644 --- a/common/config/azure-pipelines/integration-validation.yaml +++ b/common/config/azure-pipelines/integration-validation.yaml @@ -26,7 +26,7 @@ jobs: nodeVersion: 18.x Windows_node_18_x: imageName: windows-latest - nodeVersion: 18.16.1 + nodeVersion: 18.x MacOS_node_18_x: imageName: macos-latest nodeVersion: 18.x @@ -35,10 +35,19 @@ jobs: nodeVersion: 20.x Windows_node_20_x: imageName: windows-latest - nodeVersion: 20.12.1 + nodeVersion: 20.x MacOS_node_20_x: imageName: macos-latest nodeVersion: 20.x + Linux_node_22_x: + imageName: macos-latest + nodeVersion: 22.x + Windows_node_22_x: + imageName: macos-latest + nodeVersion: 22.x + MacOS_node_22_x: + imageName: macos-latest + nodeVersion: 22.x pool: vmImage: $(imageName) steps: diff --git a/common/config/azure-pipelines/jobs/fast-ci.yaml b/common/config/azure-pipelines/jobs/fast-ci.yaml index 6decdfb5b6fa..e0db29c44d8d 100644 --- a/common/config/azure-pipelines/jobs/fast-ci.yaml +++ b/common/config/azure-pipelines/jobs/fast-ci.yaml @@ -110,13 +110,13 @@ jobs: condition: succeeded() strategy: matrix: - "Windows_Node_20": + "Windows_Node_22": platform: Windows_NT name: $(win_pool) - "Linux_Node_20": + "Linux_Node_22": platform: Linux name: $(linux_pool) - "MacOS_Node_20": + "MacOS_Node_22": platform: Darwin name: $(mac_pool) @@ -135,12 +135,12 @@ jobs: clean: true - template: ../templates/core-build.yaml parameters: - nodeVersion: 20.x + nodeVersion: 22.x buildMobile: true # Will run if even there is a failure somewhere else in the pipeline. - template: ../templates/publish-test-results.yaml parameters: - nodeVersion: 20.x + nodeVersion: 22.x # The publish script identifies any new packages not previously published and tags the build - template: ../templates/publish.yaml diff --git a/common/config/azure-pipelines/jobs/regression-testing.yaml b/common/config/azure-pipelines/jobs/regression-testing.yaml index 35552831641e..a30402fd0951 100644 --- a/common/config/azure-pipelines/jobs/regression-testing.yaml +++ b/common/config/azure-pipelines/jobs/regression-testing.yaml @@ -28,6 +28,21 @@ jobs: strategy: matrix: + "Windows_Node_20_x": + OS: windows-latest + platform: Windows_NT + name: $(win_pool) + node_version: 20.x + "Linux_Node_20_x": + OS: ubuntu-latest + platform: Linux + name: $(linux_pool) + node_version: 20.x + "MacOS_Node_20_x": + OS: macOS-latest + platform: Darwin + name: $(mac_pool) + node_version: 20.x "Windows_Node_18_12_0": OS: windows-latest platform: Windows_NT diff --git a/common/config/rush/pnpm-lock.yaml b/common/config/rush/pnpm-lock.yaml index 10868910e46f..0cbb2554eb40 100644 --- a/common/config/rush/pnpm-lock.yaml +++ b/common/config/rush/pnpm-lock.yaml @@ -36,7 +36,7 @@ importers: dotenv: ^16.4.5 dotenv-expand: ^5.1.0 eslint: ^9.13.0 - form-data: ^2.5.1 + form-data: ^4.0.1 fs-extra: ^8.1.0 internal-tools: workspace:* inversify: ~6.0.1 @@ -62,7 +62,7 @@ importers: '@itwin/core-telemetry': link:../telemetry '@itwin/object-storage-azure': 2.2.5_scz6qrwecfbbxg4vskopkl3a7u '@itwin/object-storage-core': 2.2.5_scz6qrwecfbbxg4vskopkl3a7u - form-data: 2.5.1 + form-data: 4.0.1 fs-extra: 8.1.0 inversify: 6.0.1 json5: 2.2.3 @@ -1306,7 +1306,7 @@ importers: '@types/mocha': ^10.0.6 '@types/node': ~18.16.20 '@xmldom/xmldom': ~0.8.5 - azurite: ^3.31.0 + azurite: ^3.32.0 chai: ^4.3.10 chai-as-promised: ^7.1.1 cpx2: ^3.0.0 @@ -1332,7 +1332,7 @@ importers: '@itwin/itwins-client': 1.2.0 '@itwin/service-authorization': 1.0.0_67wltvhdskk2oee2c3z2o4tfly '@xmldom/xmldom': 0.8.5 - azurite: 3.31.0 + azurite: 3.32.0 fs-extra: 8.1.0 devDependencies: '@itwin/build-tools': link:../../tools/build @@ -1582,7 +1582,7 @@ importers: '@types/fs-extra': ^4.0.7 '@types/mocha': ^10.0.6 '@types/sinon': ^17.0.2 - azurite: ^3.31.0 + azurite: ^3.32.0 chai: ^4.3.10 chai-as-promised: ^7.1.1 cpx2: ^3.0.0 @@ -1627,7 +1627,7 @@ importers: '@itwin/itwins-client': 1.2.0 '@itwin/oidc-signin-tool': 4.3.7_67wltvhdskk2oee2c3z2o4tfly '@itwin/perf-tools': link:../../tools/perf-tools - azurite: 3.31.0 + azurite: 3.32.0 chai: 4.3.10 chai-as-promised: 7.1.1_chai@4.3.10 cpx2: 3.0.0 @@ -1692,7 +1692,7 @@ importers: '@types/sinon': ^17.0.2 '@types/sinon-chai': ^3.2.0 assert: ^2.0.0 - azurite: ^3.31.0 + azurite: ^3.32.0 babel-loader: ~8.2.5 babel-plugin-istanbul: ~6.1.1 browserify-zlib: ^0.2.0 @@ -1747,7 +1747,7 @@ importers: '@itwin/imodels-client-authoring': 5.8.1 '@itwin/imodels-client-management': 5.8.1 '@itwin/reality-data-client': 1.2.1_mdtbcqczpmeuv6yjzfaigjndwi - azurite: 3.31.0 + azurite: 3.32.0 chai: 4.3.10 chai-as-promised: 7.1.1_chai@4.3.10 electron: 33.0.0 @@ -4665,7 +4665,7 @@ packages: '@types/jquery': 3.5.30 base64-js: 1.5.1 follow-redirects: 1.15.6 - form-data: 4.0.0 + form-data: 4.0.1 opener: 1.5.2 transitivePeerDependencies: - debug @@ -6345,7 +6345,7 @@ packages: resolution: {integrity: sha512-t+yRIyySRTp/wua5xEr+z1q60QmLq8ABsS5O9Me1AsE5dfKqgnCFzwiCZZ/cGNd1lq4/7akDWMxdhVlucjmnOQ==} dependencies: follow-redirects: 1.15.6 - form-data: 4.0.0 + form-data: 4.0.1 transitivePeerDependencies: - debug dev: false @@ -6354,7 +6354,7 @@ packages: resolution: {integrity: sha512-DukmaFRnY6AzAALSH4J2M3k6PkaC+MfaAGdEERRWcC9q3/TWQwLpHR8ZRLKTdQ3aBDL64EdluRDjJqKw+BPZEw==} dependencies: follow-redirects: 1.15.6 - form-data: 4.0.0 + form-data: 4.0.1 proxy-from-env: 1.1.0 transitivePeerDependencies: - debug @@ -6363,8 +6363,8 @@ packages: resolution: {integrity: sha512-qIj0G9wZbMGNLjLmg1PT6v2mE9AH2zlnADJD/2tC6E00hgmhUOfEB6greHPAfLRSufHqROIUTkw6E+M3lH0PTQ==} engines: {node: '>= 0.4'} - /azurite/3.31.0: - resolution: {integrity: sha512-sH7y0/QBeNlu3Keyq6zXyRoobqgEl+jOIic3NiC9jXeXnKHDxjqdp1Qohi6Q1ES2Up85qx+2LNZZgz5LBSineA==} + /azurite/3.32.0: + resolution: {integrity: sha512-1qwJ8NQpv31V/sr4OIYqUd/DkOTzR6UjRoDv14youv764rnvq0/5/JbAcz/pFvxSDTRaU/hUe58VB2J3vpmaYA==} engines: {node: '>=10.0.0', vscode: ^1.39.0} hasBin: true dependencies: @@ -8701,8 +8701,8 @@ packages: mime-types: 2.1.35 dev: false - /form-data/4.0.0: - resolution: {integrity: sha512-ETEklSGi5t0QMZuiXoA/Q6vcnxcLQP5vdugSpuAyi6SVGi2clPPp+xgEhuMaHC+zGgn31Kd235W35f7Hykkaww==} + /form-data/4.0.1: + resolution: {integrity: sha512-tzN8e4TX8+kkxGPK8D5u0FNmjPUjw3lwC9lSLxxoB/+GtsJG91CO8bSWy73APlgAZzZbXEYZJuxjkHH2w+Ezhw==} engines: {node: '>= 6'} dependencies: asynckit: 0.4.0 @@ -9956,7 +9956,7 @@ packages: decimal.js: 10.4.3 domexception: 4.0.0 escodegen: 2.1.0 - form-data: 4.0.0 + form-data: 4.0.1 html-encoding-sniffer: 3.0.0 http-proxy-agent: 5.0.0 https-proxy-agent: 5.0.1 @@ -12779,7 +12779,7 @@ packages: cookiejar: 2.1.4 debug: 4.3.6 fast-safe-stringify: 2.1.1 - form-data: 4.0.0 + form-data: 4.0.1 formidable: 3.5.1 methods: 1.1.2 mime: 2.6.0 diff --git a/common/scripts/install-run-rush.js b/common/scripts/install-run-rush.js index 9676fc718f97..20f33d19262a 100644 --- a/common/scripts/install-run-rush.js +++ b/common/scripts/install-run-rush.js @@ -16,7 +16,7 @@ /******/ "use strict"; /******/ var __webpack_modules__ = ({ -/***/ 657147: +/***/ 179896: /*!*********************!*\ !*** external "fs" ***! \*********************/ @@ -26,7 +26,7 @@ module.exports = require("fs"); /***/ }), -/***/ 371017: +/***/ 16928: /*!***********************!*\ !*** external "path" ***! \***********************/ @@ -111,9 +111,9 @@ var __webpack_exports__ = {}; !*** ./lib-esnext/scripts/install-run-rush.js ***! \************************************************/ __webpack_require__.r(__webpack_exports__); -/* harmony import */ var path__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! path */ 371017); +/* harmony import */ var path__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! path */ 16928); /* harmony import */ var path__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(path__WEBPACK_IMPORTED_MODULE_0__); -/* harmony import */ var fs__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! fs */ 657147); +/* harmony import */ var fs__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! fs */ 179896); /* harmony import */ var fs__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(fs__WEBPACK_IMPORTED_MODULE_1__); // Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT license. // See LICENSE in the project root for license information. diff --git a/common/scripts/install-run.js b/common/scripts/install-run.js index 9283c445267d..b3e921300218 100644 --- a/common/scripts/install-run.js +++ b/common/scripts/install-run.js @@ -16,7 +16,7 @@ /******/ "use strict"; /******/ var __webpack_modules__ = ({ -/***/ 679877: +/***/ 832286: /*!************************************************!*\ !*** ./lib-esnext/utilities/npmrcUtilities.js ***! \************************************************/ @@ -24,12 +24,12 @@ __webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ "isVariableSetInNpmrcFile": () => (/* binding */ isVariableSetInNpmrcFile), -/* harmony export */ "syncNpmrc": () => (/* binding */ syncNpmrc) +/* harmony export */ isVariableSetInNpmrcFile: () => (/* binding */ isVariableSetInNpmrcFile), +/* harmony export */ syncNpmrc: () => (/* binding */ syncNpmrc) /* harmony export */ }); -/* harmony import */ var fs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! fs */ 657147); +/* harmony import */ var fs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! fs */ 179896); /* harmony import */ var fs__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(fs__WEBPACK_IMPORTED_MODULE_0__); -/* harmony import */ var path__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! path */ 371017); +/* harmony import */ var path__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! path */ 16928); /* harmony import */ var path__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(path__WEBPACK_IMPORTED_MODULE_1__); // Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT license. // See LICENSE in the project root for license information. @@ -164,7 +164,7 @@ function isVariableSetInNpmrcFile(sourceNpmrcFolder, variableKey) { /***/ }), -/***/ 532081: +/***/ 535317: /*!********************************!*\ !*** external "child_process" ***! \********************************/ @@ -174,7 +174,7 @@ module.exports = require("child_process"); /***/ }), -/***/ 657147: +/***/ 179896: /*!*********************!*\ !*** external "fs" ***! \*********************/ @@ -184,7 +184,7 @@ module.exports = require("fs"); /***/ }), -/***/ 822037: +/***/ 370857: /*!*********************!*\ !*** external "os" ***! \*********************/ @@ -194,7 +194,7 @@ module.exports = require("os"); /***/ }), -/***/ 371017: +/***/ 16928: /*!***********************!*\ !*** external "path" ***! \***********************/ @@ -280,21 +280,21 @@ var __webpack_exports__ = {}; \*******************************************/ __webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ "RUSH_JSON_FILENAME": () => (/* binding */ RUSH_JSON_FILENAME), -/* harmony export */ "findRushJsonFolder": () => (/* binding */ findRushJsonFolder), -/* harmony export */ "getNpmPath": () => (/* binding */ getNpmPath), -/* harmony export */ "installAndRun": () => (/* binding */ installAndRun), -/* harmony export */ "runWithErrorAndStatusCode": () => (/* binding */ runWithErrorAndStatusCode) +/* harmony export */ RUSH_JSON_FILENAME: () => (/* binding */ RUSH_JSON_FILENAME), +/* harmony export */ findRushJsonFolder: () => (/* binding */ findRushJsonFolder), +/* harmony export */ getNpmPath: () => (/* binding */ getNpmPath), +/* harmony export */ installAndRun: () => (/* binding */ installAndRun), +/* harmony export */ runWithErrorAndStatusCode: () => (/* binding */ runWithErrorAndStatusCode) /* harmony export */ }); -/* harmony import */ var child_process__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! child_process */ 532081); +/* harmony import */ var child_process__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! child_process */ 535317); /* harmony import */ var child_process__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(child_process__WEBPACK_IMPORTED_MODULE_0__); -/* harmony import */ var fs__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! fs */ 657147); +/* harmony import */ var fs__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! fs */ 179896); /* harmony import */ var fs__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(fs__WEBPACK_IMPORTED_MODULE_1__); -/* harmony import */ var os__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! os */ 822037); +/* harmony import */ var os__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! os */ 370857); /* harmony import */ var os__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(os__WEBPACK_IMPORTED_MODULE_2__); -/* harmony import */ var path__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! path */ 371017); +/* harmony import */ var path__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! path */ 16928); /* harmony import */ var path__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(path__WEBPACK_IMPORTED_MODULE_3__); -/* harmony import */ var _utilities_npmrcUtilities__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../utilities/npmrcUtilities */ 679877); +/* harmony import */ var _utilities_npmrcUtilities__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../utilities/npmrcUtilities */ 832286); // Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT license. // See LICENSE in the project root for license information. /* eslint-disable no-console */ diff --git a/core/backend/package.json b/core/backend/package.json index 406ffee190e3..884def240631 100644 --- a/core/backend/package.json +++ b/core/backend/package.json @@ -6,7 +6,7 @@ "typings": "lib/cjs/core-backend", "license": "MIT", "engines": { - "node": "^18.0.0 || ^20.0.0" + "node": "^18.0.0 || ^20.0.0 || ^22.0.0" }, "scripts": { "build": "npm run -s build:cjs && npm run -s copy:assets && npm run -s copy:test-assets", @@ -102,7 +102,7 @@ "@itwin/core-telemetry": "workspace:*", "@itwin/object-storage-azure": "^2.2.5", "@itwin/object-storage-core": "^2.2.5", - "form-data": "^2.5.1", + "form-data": "^4.0.1", "fs-extra": "^8.1.0", "inversify": "~6.0.1", "json5": "^2.2.3", diff --git a/core/electron/package.json b/core/electron/package.json index db78ffcb728f..54926382c0c3 100644 --- a/core/electron/package.json +++ b/core/electron/package.json @@ -4,7 +4,7 @@ "description": "iTwin.js ElectronHost and ElectronApp", "license": "MIT", "engines": { - "node": "^18.0.0 || ^20.0.0" + "node": "^18.0.0 || ^20.0.0 || ^22.0.0" }, "scripts": { "build": "npm run -s build:cjs && npm run -s webpack:test", diff --git a/core/express-server/package.json b/core/express-server/package.json index 816e09e51f23..74ee4b5bbe34 100644 --- a/core/express-server/package.json +++ b/core/express-server/package.json @@ -6,7 +6,7 @@ "typings": "lib/cjs/ExpressServer", "license": "MIT", "engines": { - "node": "^18.0.0 || ^20.0.0" + "node": "^18.0.0 || ^20.0.0 || ^22.0.0" }, "scripts": { "build": "npm run -s build:cjs", diff --git a/core/extension/codeGen/generate-exports.js b/core/extension/codeGen/generate-exports.js index 56dc54f0821b..1d5a39951638 100644 --- a/core/extension/codeGen/generate-exports.js +++ b/core/extension/codeGen/generate-exports.js @@ -6,7 +6,8 @@ import fs from "node:fs"; import { createRequire } from "node:module"; import path from "node:path"; -import pkgJson from "../package.json" assert { type: "json" }; +// `with` is available from Node 18.20. If you need to run this in older Node version, replace `with` with `assert` +import pkgJson from "../package.json" with { type: "json" }; const declarationFilePath = "index.d.ts"; const jsFilePath = "index.js"; diff --git a/core/mobile/package.json b/core/mobile/package.json index 341d951dee6c..291d9e103c6b 100644 --- a/core/mobile/package.json +++ b/core/mobile/package.json @@ -4,7 +4,7 @@ "description": "iTwin.js MobileHost and MobileApp", "license": "MIT", "engines": { - "node": "^18.0.0 || ^20.0.0" + "node": "^18.0.0 || ^20.0.0 || ^22.0.0" }, "scripts": { "build": "npm run -s build:cjs", diff --git a/docs/changehistory/NextVersion.md b/docs/changehistory/NextVersion.md index 945d44984cb9..d15e033dc704 100644 --- a/docs/changehistory/NextVersion.md +++ b/docs/changehistory/NextVersion.md @@ -17,6 +17,7 @@ Table of contents: - [Presentation](#presentation) - [Calculated properties specification enhancements](#calculated-properties-specification-enhancements) - [Quantity](#quantity) +- [Node 22 support](#node-22-support) - [Electron 33 support](#electron-33-support) - [API deprecations](#api-deprecations) - [@itwin/appui-abstract](#itwinappui-abstract) @@ -145,6 +146,10 @@ ratioFormat.fromJSON(unitsProvider, ratioFormatProps).catch(() => {}); - Change azimuth and bearing logic from working with east-based counterclockwise persisted values to working with north-based clockwise values. - The previous applies to azimuthBase as well, if provided. +## Node 22 support + +iTwin.js now officially supports Node 22 starting with LTS version of 22.11.0. Node 22 support is in addition to Node 18 and 20, not a replacement. + ## Electron 33 support In addition to [already supported Electron versions](../learning/SupportedPlatforms.md#electron), iTwin.js now supports [Electron 33](https://www.electronjs.org/blog/electron-33-0). diff --git a/docs/learning/SupportedPlatforms.md b/docs/learning/SupportedPlatforms.md index 97f3db7975b8..be55f0aebe3e 100644 --- a/docs/learning/SupportedPlatforms.md +++ b/docs/learning/SupportedPlatforms.md @@ -19,6 +19,7 @@ The following Node.js versions are officially supported by the iTwin.js backend | iTwin.js - Node Support | iTwin.js 1.x | iTwin.js 2.x | iTwin.js 3.x | iTwin.js 4.x | | ----------------------- | ------------ | ------------ | ------------ | ------------ | +| Node 22 (>=22.11) | ❌ | ❌ | ❌ | ✅ (>= 4.10) | | Node 20 (>=20.9) | ❌ | ❌ | ❌ | ✅ (>= 4.3) | | Node 18 (>=18.12) | ❌ | ❌ | ✅ (>= 3.5) | ✅ | | Node 16 (>=16.13) | ❌ | ❌ | ✅ | ❌ | diff --git a/docs/learning/WriteAConnector.md b/docs/learning/WriteAConnector.md index abfa17058f56..b3f7bba188ef 100644 --- a/docs/learning/WriteAConnector.md +++ b/docs/learning/WriteAConnector.md @@ -362,7 +362,7 @@ The framework will automatically detect and delete elements and models if the co ### Getting started -You'll need to install a supported version of Node.js, Node 20 LTS is suggested. Please refer to [development prerequisites](./tutorials/development-prerequisites.md) for more details. +You'll need to install a supported version of Node.js, Node 22 LTS is suggested. Please refer to [development prerequisites](./tutorials/development-prerequisites.md) for more details. The node packages you'll need can be installed using @@ -591,7 +591,7 @@ Job-subject scoping also prevents problems with locks and codes. The codes used ### Unmap -The Unmap mode allows removing all data from a given input source from the iModel. This is important because iModels contain data from many sources and users may need to selectively remove data (e.g. maybe it moved, maybe there's now a better Connector, or maybe it was added by mistake). **shouldUnmapSource** is a job argument (i.e. this.jobArgs.shouldUnmapSource) that can be passed to the ConnectorRunner and it will call the connector's **unmapSource** method. +The Unmap mode allows removing all data from a given input source from the iModel. This is important because iModels contain data from many sources and users may need to selectively remove data (e.g. maybe it moved, maybe there's now a better Connector, or maybe it was added by mistake). **shouldUnmapSource** is a job argument (i.e. this.jobArgs.shouldUnmapSource) that can be passed to the ConnectorRunner and it will call the connector's **unmapSource** method. ConnectorRunner calls the unmapSource method if argument is defined: @@ -609,7 +609,7 @@ unmapSource method in TestConnector: ### Shared Channels -New to iTwinjs 4.6 (connector-framework version 2.1) is the concept of shared channels. The connector framework is updated to work with either shared channels or with channels requiring a channel key. Shared channels will be the default. The BaseConnector's getChannelKey method returns the shared channel. Note: beginning in iTwinjs 5.0, this will likely reverse and the default will require a channel key and the connector will need to override this method to get the shared channel key. +New to iTwinjs 4.6 (connector-framework version 2.1) is the concept of shared channels. The connector framework is updated to work with either shared channels or with channels requiring a channel key. Shared channels will be the default. The BaseConnector's getChannelKey method returns the shared channel. Note: beginning in iTwinjs 5.0, this will likely reverse and the default will require a channel key and the connector will need to override this method to get the shared channel key. BaseConnector's getChannelKey method: @@ -629,11 +629,11 @@ For more information on channels see [Working with "Editing Channels" in iModels ### Deletion Detection -Deletion detection is simply the synchronizer's deleting of an existing element on subsequent connector runs based on the element's omission. For example, if a connector publishes elements a,b and c in the first run and then b,c and d in a subsequent run, a is determined to be deleted and the syncronizer will delete it along with any of a's children from the imodel. +Deletion detection is simply the synchronizer's deleting of an existing element on subsequent connector runs based on the element's omission. For example, if a connector publishes elements a,b and c in the first run and then b,c and d in a subsequent run, a is determined to be deleted and the syncronizer will delete it along with any of a's children from the imodel. ### Deletion Detection Params -When detectecting deletions, it is necessary to locate child elements of deleted elements to in turn delete the children and search for their children and so on. This location requires navigating from the top down through the hierarchy of elements. Unfortunately, earlier versions of the TestConnector, demonstrated external source aspects relating elements to partions rather than repository links which ultimately point back to files as the convention for model provinence requires. Some connector developers in turn, followed this example and similarly created the external source aspect relating to partitions rather than repository links. Therefore, it became necessary to support both 'channel based' (navigating from the JobSubject down) and 'file based' (navigating from a repository link down associated with an external source file). Thus, deletion detection params were introduced to allow a connector developer to steer the logic toward either file based (preferred) or channel based deletion detection. +When detectecting deletions, it is necessary to locate child elements of deleted elements to in turn delete the children and search for their children and so on. This location requires navigating from the top down through the hierarchy of elements. Unfortunately, earlier versions of the TestConnector, demonstrated external source aspects relating elements to partions rather than repository links which ultimately point back to files as the convention for model provinence requires. Some connector developers in turn, followed this example and similarly created the external source aspect relating to partitions rather than repository links. Therefore, it became necessary to support both 'channel based' (navigating from the JobSubject down) and 'file based' (navigating from a repository link down associated with an external source file). Thus, deletion detection params were introduced to allow a connector developer to steer the logic toward either file based (preferred) or channel based deletion detection. ```ts [[include:Syncronizer-DeletionDetectionParams.cf-code]] @@ -651,7 +651,7 @@ For an example of overriding getDeletionDetectionParams see: [[include:TestConnector-getDeletionDetectionParams.cf-code]] ``` -The above example checks an environment variable which is strictly intended for the test connector as it allows us to test BOTH file based AND legacy (channel based) deletion detection with the same connector. Any new connector author/developer should choose file-based. +The above example checks an environment variable which is strictly intended for the test connector as it allows us to test BOTH file based AND legacy (channel based) deletion detection with the same connector. Any new connector author/developer should choose file-based. The tests which run the test connector with file-based deletion detection is located at: @@ -667,7 +667,7 @@ Its channel based counterpart is located at: ### Changeset Groups -Each connector run will create approximately five changesets for a given run. Some find it preferable to see a single entry for the complete run rather than several granular, intermediate changes. Changeset Groups were introduced to wrap these smaller changes under a single description. +Each connector run will create approximately five changesets for a given run. Some find it preferable to see a single entry for the complete run rather than several granular, intermediate changes. Changeset Groups were introduced to wrap these smaller changes under a single description. It is easy to implement Changeset Groups in your connector, simply override the shouldCreateChangeSetGroup method to return true. diff --git a/docs/learning/tutorials/development-prerequisites.md b/docs/learning/tutorials/development-prerequisites.md index 02e3dce4b530..a002b9163055 100644 --- a/docs/learning/tutorials/development-prerequisites.md +++ b/docs/learning/tutorials/development-prerequisites.md @@ -2,7 +2,7 @@ Writing an iTwin.js application requires the following software: -- [Node.js](https://nodejs.org) (latest 20.x LTS version) +- [Node.js](https://nodejs.org) (latest 22.x LTS version) - This provides the backend JavaScript runtime. - The installation also includes the `npm` command line tool. - See [Supported Platforms](../SupportedPlatforms.md) for information on Node, OS and browser support. diff --git a/domains/analytical/backend/package.json b/domains/analytical/backend/package.json index 0670b0952f98..449f600dd92e 100644 --- a/domains/analytical/backend/package.json +++ b/domains/analytical/backend/package.json @@ -5,7 +5,7 @@ "typings": "lib/cjs/analytical-backend", "license": "MIT", "engines": { - "node": "^18.0.0 || ^20.0.0" + "node": "^18.0.0 || ^20.0.0 || ^22.0.0" }, "scripts": { "build": "tsc 1>&2 --outDir lib/cjs && npm run -s copy:test-assets", diff --git a/domains/linear-referencing/backend/package.json b/domains/linear-referencing/backend/package.json index 7da14a6c21a7..849a892f1bec 100644 --- a/domains/linear-referencing/backend/package.json +++ b/domains/linear-referencing/backend/package.json @@ -5,7 +5,7 @@ "typings": "lib/cjs/linear-referencing-backend", "license": "MIT", "engines": { - "node": "^18.0.0 || ^20.0.0" + "node": "^18.0.0 || ^20.0.0 || ^22.0.0" }, "scripts": { "build": "tsc 1>&2 --outDir lib/cjs && npm run -s copy:test-assets", diff --git a/domains/physical-material/backend/package.json b/domains/physical-material/backend/package.json index c64de75d9f21..022804489590 100644 --- a/domains/physical-material/backend/package.json +++ b/domains/physical-material/backend/package.json @@ -5,7 +5,7 @@ "typings": "lib/cjs/physical-material-backend", "license": "MIT", "engines": { - "node": "^18.0.0 || ^20.0.0" + "node": "^18.0.0 || ^20.0.0 || ^22.0.0" }, "scripts": { "build": "npm run -s build:cjs", diff --git a/editor/backend/package.json b/editor/backend/package.json index 44c5adf52284..c5654f95f35e 100644 --- a/editor/backend/package.json +++ b/editor/backend/package.json @@ -6,7 +6,7 @@ "typings": "lib/cjs/editor-backend", "license": "MIT", "engines": { - "node": "^18.0.0 || ^20.0.0" + "node": "^18.0.0 || ^20.0.0 || ^22.0.0" }, "scripts": { "build": "npm run -s build:cjs", diff --git a/example-code/snippets/package.json b/example-code/snippets/package.json index 69a4833115c8..87a435c04605 100644 --- a/example-code/snippets/package.json +++ b/example-code/snippets/package.json @@ -33,7 +33,7 @@ "@itwin/itwins-client": "^1.2.0", "@itwin/service-authorization": "^1.0.0", "@xmldom/xmldom": "~0.8.5", - "azurite": "^3.31.0", + "azurite": "^3.32.0", "fs-extra": "^8.1.0" }, "devDependencies": { diff --git a/full-stack-tests/backend/package.json b/full-stack-tests/backend/package.json index c2ce61e15a9a..eca4f801984a 100644 --- a/full-stack-tests/backend/package.json +++ b/full-stack-tests/backend/package.json @@ -55,7 +55,7 @@ "@itwin/itwins-client": "^1.2.0", "@itwin/oidc-signin-tool": "^4.3.7", "@itwin/perf-tools": "workspace:*", - "azurite": "^3.31.0", + "azurite": "^3.32.0", "chai": "^4.3.10", "chai-as-promised": "^7.1.1", "cpx2": "^3.0.0", diff --git a/full-stack-tests/core/package.json b/full-stack-tests/core/package.json index f2c9d4e64335..b3f856c89253 100644 --- a/full-stack-tests/core/package.json +++ b/full-stack-tests/core/package.json @@ -51,7 +51,7 @@ "@itwin/imodels-client-authoring": "^5.8.1", "@itwin/imodels-client-management": "^5.8.1", "@itwin/reality-data-client": "^1.2.1", - "azurite": "^3.31.0", + "azurite": "^3.32.0", "chai-as-promised": "^7.1.1", "chai": "^4.3.10", "electron": "^33.0.0", diff --git a/rush.json b/rush.json index b60ac8435c4a..78fe90a481ef 100644 --- a/rush.json +++ b/rush.json @@ -1,8 +1,8 @@ { "$schema": "https://developer.microsoft.com/json-schemas/rush/v5/rush.schema.json", - "rushVersion": "5.120.2", + "rushVersion": "5.139.0", "pnpmVersion": "7.32.2", - "nodeSupportedVersionRange": "^18.12.0 || ^20.9.0", + "nodeSupportedVersionRange": "^18.12.0 || ^20.9.0 || ^22.11.0", "projectFolderMinDepth": 2, "projectFolderMaxDepth": 3, "ensureConsistentVersions": true, diff --git a/test-apps/display-performance-test-app/package.json b/test-apps/display-performance-test-app/package.json index 80349c521875..37c8245ccb06 100644 --- a/test-apps/display-performance-test-app/package.json +++ b/test-apps/display-performance-test-app/package.json @@ -8,7 +8,7 @@ }, "version": "0.0.0", "engines": { - "node": "^18.0.0 || ^20.0.0" + "node": "^18.0.0 || ^20.0.0 || ^22.0.0" }, "private": true, "scripts": { diff --git a/test-apps/display-test-app/package.json b/test-apps/display-test-app/package.json index 712e51522dcc..b878a91a7487 100644 --- a/test-apps/display-test-app/package.json +++ b/test-apps/display-test-app/package.json @@ -8,7 +8,7 @@ }, "version": "1.8.0", "engines": { - "node": "^18.0.0 || ^20.0.0" + "node": "^18.0.0 || ^20.0.0 || ^22.0.0" }, "private": true, "scripts": {