From a0e0e3652be7f2617542b6ed82808f0353f643c3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Matu=CC=81s=CC=8C=20Tomlein?= Date: Tue, 3 Sep 2024 07:39:01 +0200 Subject: [PATCH] Upgrade supported Node.JS versions in build to 18 - 20 and upgrade rush --- .github/workflows/build.yml | 4 +- .github/workflows/change_check.yml | 4 +- .github/workflows/publish.yml | 4 +- .github/workflows/publish_branch.yml | 4 +- .github/workflows/publish_prerelease.yml | 4 +- .github/workflows/snyk.yml | 4 +- .nvmrc | 2 +- README.md | 2 +- .../release-3.24.3_2024-09-03-05-39.json | 10 + .../release-3.24.3_2024-09-03-05-39.json | 10 + .../release-3.24.3_2024-09-03-05-39.json | 10 + .../release-3.24.3_2024-09-03-05-39.json | 10 + .../release-3.24.3_2024-09-03-05-39.json | 10 + .../release-3.24.3_2024-09-03-05-39.json | 10 + .../release-3.24.3_2024-09-03-05-39.json | 10 + .../release-3.24.3_2024-09-03-05-39.json | 10 + .../release-3.24.3_2024-09-03-05-39.json | 10 + .../release-3.24.3_2024-09-03-05-39.json | 10 + .../release-3.24.3_2024-09-03-05-39.json | 10 + .../release-3.24.3_2024-09-03-05-39.json | 10 + .../release-3.24.3_2024-09-03-05-39.json | 10 + .../release-3.24.3_2024-09-03-05-39.json | 10 + .../release-3.24.3_2024-09-03-05-39.json | 10 + .../release-3.24.3_2024-09-03-05-39.json | 10 + .../release-3.24.3_2024-09-03-05-39.json | 10 + .../release-3.24.3_2024-09-03-05-39.json | 10 + .../release-3.24.3_2024-09-03-05-39.json | 10 + .../release-3.24.3_2024-09-03-05-39.json | 10 + .../release-3.24.3_2024-09-03-05-39.json | 10 + .../release-3.24.3_2024-09-03-05-39.json | 10 + .../release-3.24.3_2024-09-03-05-39.json | 10 + .../release-3.24.3_2024-09-03-05-39.json | 10 + .../release-3.24.3_2024-09-03-05-39.json | 10 + .../release-3.24.3_2024-09-03-05-39.json | 10 + .../release-3.24.3_2024-09-03-05-39.json | 10 + .../release-3.24.3_2024-09-03-05-39.json | 10 + .../release-3.24.3_2024-09-03-05-39.json | 10 + .../release-3.24.3_2024-09-03-05-39.json | 10 + .../release-3.24.3_2024-09-03-05-39.json | 10 + .../release-3.24.3_2024-09-03-05-39.json | 10 + .../release-3.24.3_2024-09-03-05-39.json | 10 + .../release-3.24.3_2024-09-03-05-39.json | 10 + common/git-hooks/pre-commit | 0 common/scripts/install-run-rush-pnpm.js | 31 + common/scripts/install-run-rush.js | 189 ++++-- common/scripts/install-run-rushx.js | 23 +- common/scripts/install-run.js | 596 +++++++++++++----- libraries/browser-tracker-core/README.md | 2 +- libraries/tracker-core/README.md | 2 +- plugins/browser-plugin-ad-tracking/README.md | 2 +- .../browser-plugin-browser-features/README.md | 2 +- .../README.md | 2 +- plugins/browser-plugin-client-hints/README.md | 2 +- plugins/browser-plugin-consent/README.md | 2 +- plugins/browser-plugin-debugger/README.md | 2 +- plugins/browser-plugin-ecommerce/README.md | 2 +- .../browser-plugin-enhanced-consent/README.md | 2 +- .../README.md | 2 +- .../browser-plugin-error-tracking/README.md | 2 +- .../README.md | 2 +- plugins/browser-plugin-focalmeter/README.md | 2 +- .../browser-plugin-form-tracking/README.md | 2 +- plugins/browser-plugin-ga-cookies/README.md | 2 +- plugins/browser-plugin-geolocation/README.md | 2 +- .../README.md | 2 +- .../browser-plugin-media-tracking/README.md | 4 +- plugins/browser-plugin-media/README.md | 2 +- plugins/browser-plugin-optimizely-x/README.md | 2 +- plugins/browser-plugin-optimizely/README.md | 2 +- .../README.md | 2 +- .../README.md | 2 +- .../browser-plugin-privacy-sandbox/README.md | 2 +- .../browser-plugin-site-tracking/README.md | 2 +- .../README.md | 2 +- plugins/browser-plugin-timezone/README.md | 2 +- .../browser-plugin-vimeo-tracking/README.md | 2 +- plugins/browser-plugin-web-vitals/README.md | 2 +- .../browser-plugin-youtube-tracking/README.md | 4 +- rush.json | 4 +- trackers/browser-tracker/README.md | 2 +- trackers/javascript-tracker/README.md | 2 +- trackers/node-tracker/README.md | 2 +- 82 files changed, 1017 insertions(+), 266 deletions(-) create mode 100644 common/changes/@snowplow/browser-plugin-ad-tracking/release-3.24.3_2024-09-03-05-39.json create mode 100644 common/changes/@snowplow/browser-plugin-browser-features/release-3.24.3_2024-09-03-05-39.json create mode 100644 common/changes/@snowplow/browser-plugin-button-click-tracking/release-3.24.3_2024-09-03-05-39.json create mode 100644 common/changes/@snowplow/browser-plugin-client-hints/release-3.24.3_2024-09-03-05-39.json create mode 100644 common/changes/@snowplow/browser-plugin-consent/release-3.24.3_2024-09-03-05-39.json create mode 100644 common/changes/@snowplow/browser-plugin-debugger/release-3.24.3_2024-09-03-05-39.json create mode 100644 common/changes/@snowplow/browser-plugin-ecommerce/release-3.24.3_2024-09-03-05-39.json create mode 100644 common/changes/@snowplow/browser-plugin-enhanced-consent/release-3.24.3_2024-09-03-05-39.json create mode 100644 common/changes/@snowplow/browser-plugin-enhanced-ecommerce/release-3.24.3_2024-09-03-05-39.json create mode 100644 common/changes/@snowplow/browser-plugin-error-tracking/release-3.24.3_2024-09-03-05-39.json create mode 100644 common/changes/@snowplow/browser-plugin-event-specifications/release-3.24.3_2024-09-03-05-39.json create mode 100644 common/changes/@snowplow/browser-plugin-focalmeter/release-3.24.3_2024-09-03-05-39.json create mode 100644 common/changes/@snowplow/browser-plugin-form-tracking/release-3.24.3_2024-09-03-05-39.json create mode 100644 common/changes/@snowplow/browser-plugin-ga-cookies/release-3.24.3_2024-09-03-05-39.json create mode 100644 common/changes/@snowplow/browser-plugin-geolocation/release-3.24.3_2024-09-03-05-39.json create mode 100644 common/changes/@snowplow/browser-plugin-link-click-tracking/release-3.24.3_2024-09-03-05-39.json create mode 100644 common/changes/@snowplow/browser-plugin-media-tracking/release-3.24.3_2024-09-03-05-39.json create mode 100644 common/changes/@snowplow/browser-plugin-media/release-3.24.3_2024-09-03-05-39.json create mode 100644 common/changes/@snowplow/browser-plugin-optimizely-x/release-3.24.3_2024-09-03-05-39.json create mode 100644 common/changes/@snowplow/browser-plugin-optimizely/release-3.24.3_2024-09-03-05-39.json create mode 100644 common/changes/@snowplow/browser-plugin-performance-navigation-timing/release-3.24.3_2024-09-03-05-39.json create mode 100644 common/changes/@snowplow/browser-plugin-performance-timing/release-3.24.3_2024-09-03-05-39.json create mode 100644 common/changes/@snowplow/browser-plugin-privacy-sandbox/release-3.24.3_2024-09-03-05-39.json create mode 100644 common/changes/@snowplow/browser-plugin-site-tracking/release-3.24.3_2024-09-03-05-39.json create mode 100644 common/changes/@snowplow/browser-plugin-snowplow-ecommerce/release-3.24.3_2024-09-03-05-39.json create mode 100644 common/changes/@snowplow/browser-plugin-timezone/release-3.24.3_2024-09-03-05-39.json create mode 100644 common/changes/@snowplow/browser-plugin-vimeo-tracking/release-3.24.3_2024-09-03-05-39.json create mode 100644 common/changes/@snowplow/browser-plugin-web-vitals/release-3.24.3_2024-09-03-05-39.json create mode 100644 common/changes/@snowplow/browser-plugin-youtube-tracking/release-3.24.3_2024-09-03-05-39.json create mode 100644 common/changes/@snowplow/browser-tracker-core/release-3.24.3_2024-09-03-05-39.json create mode 100644 common/changes/@snowplow/browser-tracker/release-3.24.3_2024-09-03-05-39.json create mode 100644 common/changes/@snowplow/javascript-tracker/release-3.24.3_2024-09-03-05-39.json create mode 100644 common/changes/@snowplow/node-tracker/release-3.24.3_2024-09-03-05-39.json create mode 100644 common/changes/@snowplow/tracker-core/release-3.24.3_2024-09-03-05-39.json mode change 100644 => 100755 common/git-hooks/pre-commit create mode 100644 common/scripts/install-run-rush-pnpm.js diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 6c25a2c4f..cc062ed48 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -18,10 +18,10 @@ jobs: - name: Checkout uses: actions/checkout@v3 - - name: Use Node.js 16 + - name: Use Node.js 18 uses: actions/setup-node@v3 with: - node-version: 16.x + node-version: 18.x - name: pnpm cache uses: actions/cache@v3 diff --git a/.github/workflows/change_check.yml b/.github/workflows/change_check.yml index 6a4709570..30b6acb9d 100644 --- a/.github/workflows/change_check.yml +++ b/.github/workflows/change_check.yml @@ -15,10 +15,10 @@ jobs: with: fetch-depth: 0 - - name: Use Node.js 16 + - name: Use Node.js 18 uses: actions/setup-node@v3 with: - node-version: 16.x + node-version: 18.x - name: pnpm cache uses: actions/cache@v3 diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 5329c781e..7cf6259de 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -19,10 +19,10 @@ jobs: - name: Checkout uses: actions/checkout@v3 - - name: Use Node.js 16 + - name: Use Node.js 18 uses: actions/setup-node@v3 with: - node-version: 16 + node-version: 18 - name: pnpm cache uses: actions/cache@v3 diff --git a/.github/workflows/publish_branch.yml b/.github/workflows/publish_branch.yml index 39a859de6..ef758c568 100644 --- a/.github/workflows/publish_branch.yml +++ b/.github/workflows/publish_branch.yml @@ -14,10 +14,10 @@ jobs: - name: Checkout uses: actions/checkout@v3 - - name: Use Node.js 16 + - name: Use Node.js 18 uses: actions/setup-node@v3 with: - node-version: 16 + node-version: 18 - name: Get dist-tag from branch name env: diff --git a/.github/workflows/publish_prerelease.yml b/.github/workflows/publish_prerelease.yml index a4d07c49e..c6b53ec1c 100644 --- a/.github/workflows/publish_prerelease.yml +++ b/.github/workflows/publish_prerelease.yml @@ -19,10 +19,10 @@ jobs: - name: Checkout uses: actions/checkout@v3 - - name: Use Node.js 16 + - name: Use Node.js 18 uses: actions/setup-node@v3 with: - node-version: 16 + node-version: 18 - name: pnpm cache uses: actions/cache@v3 diff --git a/.github/workflows/snyk.yml b/.github/workflows/snyk.yml index a027d309b..e70899ee0 100644 --- a/.github/workflows/snyk.yml +++ b/.github/workflows/snyk.yml @@ -7,10 +7,10 @@ jobs: runs-on: ubuntu-20.04 steps: - uses: actions/checkout@v3 - - name: Use Node.js 16 + - name: Use Node.js 18 uses: actions/setup-node@v3 with: - node-version: 16 + node-version: 18 - name: pnpm cache uses: actions/cache@v3 diff --git a/.nvmrc b/.nvmrc index 19c7bdba7..3c032078a 100644 --- a/.nvmrc +++ b/.nvmrc @@ -1 +1 @@ -16 \ No newline at end of file +18 diff --git a/README.md b/README.md index e63024c0d..b9813e4ee 100644 --- a/README.md +++ b/README.md @@ -51,7 +51,7 @@ client-side and server-side tiers of your websites and web apps. ### Maintainer quick start -Assuming [git](https://git-scm.com/downloads), [Node.js 14 or 16](https://nodejs.org/en/download/releases/) are installed. +Assuming [git](https://git-scm.com/downloads), [Node.js 18 - 20](https://nodejs.org/en/download/releases/) are installed. #### Clone repository diff --git a/common/changes/@snowplow/browser-plugin-ad-tracking/release-3.24.3_2024-09-03-05-39.json b/common/changes/@snowplow/browser-plugin-ad-tracking/release-3.24.3_2024-09-03-05-39.json new file mode 100644 index 000000000..1e9cfb5e7 --- /dev/null +++ b/common/changes/@snowplow/browser-plugin-ad-tracking/release-3.24.3_2024-09-03-05-39.json @@ -0,0 +1,10 @@ +{ + "changes": [ + { + "packageName": "@snowplow/browser-plugin-ad-tracking", + "comment": "Upgrade supported Node.JS versions in build to 18 - 20 and upgrade rush", + "type": "none" + } + ], + "packageName": "@snowplow/browser-plugin-ad-tracking" +} \ No newline at end of file diff --git a/common/changes/@snowplow/browser-plugin-browser-features/release-3.24.3_2024-09-03-05-39.json b/common/changes/@snowplow/browser-plugin-browser-features/release-3.24.3_2024-09-03-05-39.json new file mode 100644 index 000000000..16f5ca224 --- /dev/null +++ b/common/changes/@snowplow/browser-plugin-browser-features/release-3.24.3_2024-09-03-05-39.json @@ -0,0 +1,10 @@ +{ + "changes": [ + { + "packageName": "@snowplow/browser-plugin-browser-features", + "comment": "Upgrade supported Node.JS versions in build to 18 - 20 and upgrade rush", + "type": "none" + } + ], + "packageName": "@snowplow/browser-plugin-browser-features" +} \ No newline at end of file diff --git a/common/changes/@snowplow/browser-plugin-button-click-tracking/release-3.24.3_2024-09-03-05-39.json b/common/changes/@snowplow/browser-plugin-button-click-tracking/release-3.24.3_2024-09-03-05-39.json new file mode 100644 index 000000000..939dc1d2e --- /dev/null +++ b/common/changes/@snowplow/browser-plugin-button-click-tracking/release-3.24.3_2024-09-03-05-39.json @@ -0,0 +1,10 @@ +{ + "changes": [ + { + "packageName": "@snowplow/browser-plugin-button-click-tracking", + "comment": "Upgrade supported Node.JS versions in build to 18 - 20 and upgrade rush", + "type": "none" + } + ], + "packageName": "@snowplow/browser-plugin-button-click-tracking" +} \ No newline at end of file diff --git a/common/changes/@snowplow/browser-plugin-client-hints/release-3.24.3_2024-09-03-05-39.json b/common/changes/@snowplow/browser-plugin-client-hints/release-3.24.3_2024-09-03-05-39.json new file mode 100644 index 000000000..795890cd0 --- /dev/null +++ b/common/changes/@snowplow/browser-plugin-client-hints/release-3.24.3_2024-09-03-05-39.json @@ -0,0 +1,10 @@ +{ + "changes": [ + { + "packageName": "@snowplow/browser-plugin-client-hints", + "comment": "Upgrade supported Node.JS versions in build to 18 - 20 and upgrade rush", + "type": "none" + } + ], + "packageName": "@snowplow/browser-plugin-client-hints" +} \ No newline at end of file diff --git a/common/changes/@snowplow/browser-plugin-consent/release-3.24.3_2024-09-03-05-39.json b/common/changes/@snowplow/browser-plugin-consent/release-3.24.3_2024-09-03-05-39.json new file mode 100644 index 000000000..ada8b1908 --- /dev/null +++ b/common/changes/@snowplow/browser-plugin-consent/release-3.24.3_2024-09-03-05-39.json @@ -0,0 +1,10 @@ +{ + "changes": [ + { + "packageName": "@snowplow/browser-plugin-consent", + "comment": "Upgrade supported Node.JS versions in build to 18 - 20 and upgrade rush", + "type": "none" + } + ], + "packageName": "@snowplow/browser-plugin-consent" +} \ No newline at end of file diff --git a/common/changes/@snowplow/browser-plugin-debugger/release-3.24.3_2024-09-03-05-39.json b/common/changes/@snowplow/browser-plugin-debugger/release-3.24.3_2024-09-03-05-39.json new file mode 100644 index 000000000..20218806a --- /dev/null +++ b/common/changes/@snowplow/browser-plugin-debugger/release-3.24.3_2024-09-03-05-39.json @@ -0,0 +1,10 @@ +{ + "changes": [ + { + "packageName": "@snowplow/browser-plugin-debugger", + "comment": "Upgrade supported Node.JS versions in build to 18 - 20 and upgrade rush", + "type": "none" + } + ], + "packageName": "@snowplow/browser-plugin-debugger" +} \ No newline at end of file diff --git a/common/changes/@snowplow/browser-plugin-ecommerce/release-3.24.3_2024-09-03-05-39.json b/common/changes/@snowplow/browser-plugin-ecommerce/release-3.24.3_2024-09-03-05-39.json new file mode 100644 index 000000000..382de6f93 --- /dev/null +++ b/common/changes/@snowplow/browser-plugin-ecommerce/release-3.24.3_2024-09-03-05-39.json @@ -0,0 +1,10 @@ +{ + "changes": [ + { + "packageName": "@snowplow/browser-plugin-ecommerce", + "comment": "Upgrade supported Node.JS versions in build to 18 - 20 and upgrade rush", + "type": "none" + } + ], + "packageName": "@snowplow/browser-plugin-ecommerce" +} \ No newline at end of file diff --git a/common/changes/@snowplow/browser-plugin-enhanced-consent/release-3.24.3_2024-09-03-05-39.json b/common/changes/@snowplow/browser-plugin-enhanced-consent/release-3.24.3_2024-09-03-05-39.json new file mode 100644 index 000000000..7241618fb --- /dev/null +++ b/common/changes/@snowplow/browser-plugin-enhanced-consent/release-3.24.3_2024-09-03-05-39.json @@ -0,0 +1,10 @@ +{ + "changes": [ + { + "packageName": "@snowplow/browser-plugin-enhanced-consent", + "comment": "Upgrade supported Node.JS versions in build to 18 - 20 and upgrade rush", + "type": "none" + } + ], + "packageName": "@snowplow/browser-plugin-enhanced-consent" +} \ No newline at end of file diff --git a/common/changes/@snowplow/browser-plugin-enhanced-ecommerce/release-3.24.3_2024-09-03-05-39.json b/common/changes/@snowplow/browser-plugin-enhanced-ecommerce/release-3.24.3_2024-09-03-05-39.json new file mode 100644 index 000000000..0c80c8ba2 --- /dev/null +++ b/common/changes/@snowplow/browser-plugin-enhanced-ecommerce/release-3.24.3_2024-09-03-05-39.json @@ -0,0 +1,10 @@ +{ + "changes": [ + { + "packageName": "@snowplow/browser-plugin-enhanced-ecommerce", + "comment": "Upgrade supported Node.JS versions in build to 18 - 20 and upgrade rush", + "type": "none" + } + ], + "packageName": "@snowplow/browser-plugin-enhanced-ecommerce" +} \ No newline at end of file diff --git a/common/changes/@snowplow/browser-plugin-error-tracking/release-3.24.3_2024-09-03-05-39.json b/common/changes/@snowplow/browser-plugin-error-tracking/release-3.24.3_2024-09-03-05-39.json new file mode 100644 index 000000000..96cfa0390 --- /dev/null +++ b/common/changes/@snowplow/browser-plugin-error-tracking/release-3.24.3_2024-09-03-05-39.json @@ -0,0 +1,10 @@ +{ + "changes": [ + { + "packageName": "@snowplow/browser-plugin-error-tracking", + "comment": "Upgrade supported Node.JS versions in build to 18 - 20 and upgrade rush", + "type": "none" + } + ], + "packageName": "@snowplow/browser-plugin-error-tracking" +} \ No newline at end of file diff --git a/common/changes/@snowplow/browser-plugin-event-specifications/release-3.24.3_2024-09-03-05-39.json b/common/changes/@snowplow/browser-plugin-event-specifications/release-3.24.3_2024-09-03-05-39.json new file mode 100644 index 000000000..9ffd460ef --- /dev/null +++ b/common/changes/@snowplow/browser-plugin-event-specifications/release-3.24.3_2024-09-03-05-39.json @@ -0,0 +1,10 @@ +{ + "changes": [ + { + "packageName": "@snowplow/browser-plugin-event-specifications", + "comment": "Upgrade supported Node.JS versions in build to 18 - 20 and upgrade rush", + "type": "none" + } + ], + "packageName": "@snowplow/browser-plugin-event-specifications" +} \ No newline at end of file diff --git a/common/changes/@snowplow/browser-plugin-focalmeter/release-3.24.3_2024-09-03-05-39.json b/common/changes/@snowplow/browser-plugin-focalmeter/release-3.24.3_2024-09-03-05-39.json new file mode 100644 index 000000000..296a22b5b --- /dev/null +++ b/common/changes/@snowplow/browser-plugin-focalmeter/release-3.24.3_2024-09-03-05-39.json @@ -0,0 +1,10 @@ +{ + "changes": [ + { + "packageName": "@snowplow/browser-plugin-focalmeter", + "comment": "Upgrade supported Node.JS versions in build to 18 - 20 and upgrade rush", + "type": "none" + } + ], + "packageName": "@snowplow/browser-plugin-focalmeter" +} \ No newline at end of file diff --git a/common/changes/@snowplow/browser-plugin-form-tracking/release-3.24.3_2024-09-03-05-39.json b/common/changes/@snowplow/browser-plugin-form-tracking/release-3.24.3_2024-09-03-05-39.json new file mode 100644 index 000000000..6a6be0543 --- /dev/null +++ b/common/changes/@snowplow/browser-plugin-form-tracking/release-3.24.3_2024-09-03-05-39.json @@ -0,0 +1,10 @@ +{ + "changes": [ + { + "packageName": "@snowplow/browser-plugin-form-tracking", + "comment": "Upgrade supported Node.JS versions in build to 18 - 20 and upgrade rush", + "type": "none" + } + ], + "packageName": "@snowplow/browser-plugin-form-tracking" +} \ No newline at end of file diff --git a/common/changes/@snowplow/browser-plugin-ga-cookies/release-3.24.3_2024-09-03-05-39.json b/common/changes/@snowplow/browser-plugin-ga-cookies/release-3.24.3_2024-09-03-05-39.json new file mode 100644 index 000000000..14c15d8a7 --- /dev/null +++ b/common/changes/@snowplow/browser-plugin-ga-cookies/release-3.24.3_2024-09-03-05-39.json @@ -0,0 +1,10 @@ +{ + "changes": [ + { + "packageName": "@snowplow/browser-plugin-ga-cookies", + "comment": "Upgrade supported Node.JS versions in build to 18 - 20 and upgrade rush", + "type": "none" + } + ], + "packageName": "@snowplow/browser-plugin-ga-cookies" +} \ No newline at end of file diff --git a/common/changes/@snowplow/browser-plugin-geolocation/release-3.24.3_2024-09-03-05-39.json b/common/changes/@snowplow/browser-plugin-geolocation/release-3.24.3_2024-09-03-05-39.json new file mode 100644 index 000000000..d74d8fc4b --- /dev/null +++ b/common/changes/@snowplow/browser-plugin-geolocation/release-3.24.3_2024-09-03-05-39.json @@ -0,0 +1,10 @@ +{ + "changes": [ + { + "packageName": "@snowplow/browser-plugin-geolocation", + "comment": "Upgrade supported Node.JS versions in build to 18 - 20 and upgrade rush", + "type": "none" + } + ], + "packageName": "@snowplow/browser-plugin-geolocation" +} \ No newline at end of file diff --git a/common/changes/@snowplow/browser-plugin-link-click-tracking/release-3.24.3_2024-09-03-05-39.json b/common/changes/@snowplow/browser-plugin-link-click-tracking/release-3.24.3_2024-09-03-05-39.json new file mode 100644 index 000000000..dbc167bb8 --- /dev/null +++ b/common/changes/@snowplow/browser-plugin-link-click-tracking/release-3.24.3_2024-09-03-05-39.json @@ -0,0 +1,10 @@ +{ + "changes": [ + { + "packageName": "@snowplow/browser-plugin-link-click-tracking", + "comment": "Upgrade supported Node.JS versions in build to 18 - 20 and upgrade rush", + "type": "none" + } + ], + "packageName": "@snowplow/browser-plugin-link-click-tracking" +} \ No newline at end of file diff --git a/common/changes/@snowplow/browser-plugin-media-tracking/release-3.24.3_2024-09-03-05-39.json b/common/changes/@snowplow/browser-plugin-media-tracking/release-3.24.3_2024-09-03-05-39.json new file mode 100644 index 000000000..216e835fd --- /dev/null +++ b/common/changes/@snowplow/browser-plugin-media-tracking/release-3.24.3_2024-09-03-05-39.json @@ -0,0 +1,10 @@ +{ + "changes": [ + { + "packageName": "@snowplow/browser-plugin-media-tracking", + "comment": "Upgrade supported Node.JS versions in build to 18 - 20 and upgrade rush", + "type": "none" + } + ], + "packageName": "@snowplow/browser-plugin-media-tracking" +} \ No newline at end of file diff --git a/common/changes/@snowplow/browser-plugin-media/release-3.24.3_2024-09-03-05-39.json b/common/changes/@snowplow/browser-plugin-media/release-3.24.3_2024-09-03-05-39.json new file mode 100644 index 000000000..4382a15ad --- /dev/null +++ b/common/changes/@snowplow/browser-plugin-media/release-3.24.3_2024-09-03-05-39.json @@ -0,0 +1,10 @@ +{ + "changes": [ + { + "packageName": "@snowplow/browser-plugin-media", + "comment": "Upgrade supported Node.JS versions in build to 18 - 20 and upgrade rush", + "type": "none" + } + ], + "packageName": "@snowplow/browser-plugin-media" +} \ No newline at end of file diff --git a/common/changes/@snowplow/browser-plugin-optimizely-x/release-3.24.3_2024-09-03-05-39.json b/common/changes/@snowplow/browser-plugin-optimizely-x/release-3.24.3_2024-09-03-05-39.json new file mode 100644 index 000000000..dce4583ff --- /dev/null +++ b/common/changes/@snowplow/browser-plugin-optimizely-x/release-3.24.3_2024-09-03-05-39.json @@ -0,0 +1,10 @@ +{ + "changes": [ + { + "packageName": "@snowplow/browser-plugin-optimizely-x", + "comment": "Upgrade supported Node.JS versions in build to 18 - 20 and upgrade rush", + "type": "none" + } + ], + "packageName": "@snowplow/browser-plugin-optimizely-x" +} \ No newline at end of file diff --git a/common/changes/@snowplow/browser-plugin-optimizely/release-3.24.3_2024-09-03-05-39.json b/common/changes/@snowplow/browser-plugin-optimizely/release-3.24.3_2024-09-03-05-39.json new file mode 100644 index 000000000..d83c18cba --- /dev/null +++ b/common/changes/@snowplow/browser-plugin-optimizely/release-3.24.3_2024-09-03-05-39.json @@ -0,0 +1,10 @@ +{ + "changes": [ + { + "packageName": "@snowplow/browser-plugin-optimizely", + "comment": "Upgrade supported Node.JS versions in build to 18 - 20 and upgrade rush", + "type": "none" + } + ], + "packageName": "@snowplow/browser-plugin-optimizely" +} \ No newline at end of file diff --git a/common/changes/@snowplow/browser-plugin-performance-navigation-timing/release-3.24.3_2024-09-03-05-39.json b/common/changes/@snowplow/browser-plugin-performance-navigation-timing/release-3.24.3_2024-09-03-05-39.json new file mode 100644 index 000000000..d30764eb6 --- /dev/null +++ b/common/changes/@snowplow/browser-plugin-performance-navigation-timing/release-3.24.3_2024-09-03-05-39.json @@ -0,0 +1,10 @@ +{ + "changes": [ + { + "packageName": "@snowplow/browser-plugin-performance-navigation-timing", + "comment": "Upgrade supported Node.JS versions in build to 18 - 20 and upgrade rush", + "type": "none" + } + ], + "packageName": "@snowplow/browser-plugin-performance-navigation-timing" +} \ No newline at end of file diff --git a/common/changes/@snowplow/browser-plugin-performance-timing/release-3.24.3_2024-09-03-05-39.json b/common/changes/@snowplow/browser-plugin-performance-timing/release-3.24.3_2024-09-03-05-39.json new file mode 100644 index 000000000..17b11f42c --- /dev/null +++ b/common/changes/@snowplow/browser-plugin-performance-timing/release-3.24.3_2024-09-03-05-39.json @@ -0,0 +1,10 @@ +{ + "changes": [ + { + "packageName": "@snowplow/browser-plugin-performance-timing", + "comment": "Upgrade supported Node.JS versions in build to 18 - 20 and upgrade rush", + "type": "none" + } + ], + "packageName": "@snowplow/browser-plugin-performance-timing" +} \ No newline at end of file diff --git a/common/changes/@snowplow/browser-plugin-privacy-sandbox/release-3.24.3_2024-09-03-05-39.json b/common/changes/@snowplow/browser-plugin-privacy-sandbox/release-3.24.3_2024-09-03-05-39.json new file mode 100644 index 000000000..d3fd190d8 --- /dev/null +++ b/common/changes/@snowplow/browser-plugin-privacy-sandbox/release-3.24.3_2024-09-03-05-39.json @@ -0,0 +1,10 @@ +{ + "changes": [ + { + "packageName": "@snowplow/browser-plugin-privacy-sandbox", + "comment": "Upgrade supported Node.JS versions in build to 18 - 20 and upgrade rush", + "type": "none" + } + ], + "packageName": "@snowplow/browser-plugin-privacy-sandbox" +} \ No newline at end of file diff --git a/common/changes/@snowplow/browser-plugin-site-tracking/release-3.24.3_2024-09-03-05-39.json b/common/changes/@snowplow/browser-plugin-site-tracking/release-3.24.3_2024-09-03-05-39.json new file mode 100644 index 000000000..60616413f --- /dev/null +++ b/common/changes/@snowplow/browser-plugin-site-tracking/release-3.24.3_2024-09-03-05-39.json @@ -0,0 +1,10 @@ +{ + "changes": [ + { + "packageName": "@snowplow/browser-plugin-site-tracking", + "comment": "Upgrade supported Node.JS versions in build to 18 - 20 and upgrade rush", + "type": "none" + } + ], + "packageName": "@snowplow/browser-plugin-site-tracking" +} \ No newline at end of file diff --git a/common/changes/@snowplow/browser-plugin-snowplow-ecommerce/release-3.24.3_2024-09-03-05-39.json b/common/changes/@snowplow/browser-plugin-snowplow-ecommerce/release-3.24.3_2024-09-03-05-39.json new file mode 100644 index 000000000..cd81ba31d --- /dev/null +++ b/common/changes/@snowplow/browser-plugin-snowplow-ecommerce/release-3.24.3_2024-09-03-05-39.json @@ -0,0 +1,10 @@ +{ + "changes": [ + { + "packageName": "@snowplow/browser-plugin-snowplow-ecommerce", + "comment": "Upgrade supported Node.JS versions in build to 18 - 20 and upgrade rush", + "type": "none" + } + ], + "packageName": "@snowplow/browser-plugin-snowplow-ecommerce" +} \ No newline at end of file diff --git a/common/changes/@snowplow/browser-plugin-timezone/release-3.24.3_2024-09-03-05-39.json b/common/changes/@snowplow/browser-plugin-timezone/release-3.24.3_2024-09-03-05-39.json new file mode 100644 index 000000000..134af12c8 --- /dev/null +++ b/common/changes/@snowplow/browser-plugin-timezone/release-3.24.3_2024-09-03-05-39.json @@ -0,0 +1,10 @@ +{ + "changes": [ + { + "packageName": "@snowplow/browser-plugin-timezone", + "comment": "Upgrade supported Node.JS versions in build to 18 - 20 and upgrade rush", + "type": "none" + } + ], + "packageName": "@snowplow/browser-plugin-timezone" +} \ No newline at end of file diff --git a/common/changes/@snowplow/browser-plugin-vimeo-tracking/release-3.24.3_2024-09-03-05-39.json b/common/changes/@snowplow/browser-plugin-vimeo-tracking/release-3.24.3_2024-09-03-05-39.json new file mode 100644 index 000000000..979ca0206 --- /dev/null +++ b/common/changes/@snowplow/browser-plugin-vimeo-tracking/release-3.24.3_2024-09-03-05-39.json @@ -0,0 +1,10 @@ +{ + "changes": [ + { + "packageName": "@snowplow/browser-plugin-vimeo-tracking", + "comment": "Upgrade supported Node.JS versions in build to 18 - 20 and upgrade rush", + "type": "none" + } + ], + "packageName": "@snowplow/browser-plugin-vimeo-tracking" +} \ No newline at end of file diff --git a/common/changes/@snowplow/browser-plugin-web-vitals/release-3.24.3_2024-09-03-05-39.json b/common/changes/@snowplow/browser-plugin-web-vitals/release-3.24.3_2024-09-03-05-39.json new file mode 100644 index 000000000..969299019 --- /dev/null +++ b/common/changes/@snowplow/browser-plugin-web-vitals/release-3.24.3_2024-09-03-05-39.json @@ -0,0 +1,10 @@ +{ + "changes": [ + { + "packageName": "@snowplow/browser-plugin-web-vitals", + "comment": "Upgrade supported Node.JS versions in build to 18 - 20 and upgrade rush", + "type": "none" + } + ], + "packageName": "@snowplow/browser-plugin-web-vitals" +} \ No newline at end of file diff --git a/common/changes/@snowplow/browser-plugin-youtube-tracking/release-3.24.3_2024-09-03-05-39.json b/common/changes/@snowplow/browser-plugin-youtube-tracking/release-3.24.3_2024-09-03-05-39.json new file mode 100644 index 000000000..fb908384a --- /dev/null +++ b/common/changes/@snowplow/browser-plugin-youtube-tracking/release-3.24.3_2024-09-03-05-39.json @@ -0,0 +1,10 @@ +{ + "changes": [ + { + "packageName": "@snowplow/browser-plugin-youtube-tracking", + "comment": "Upgrade supported Node.JS versions in build to 18 - 20 and upgrade rush", + "type": "none" + } + ], + "packageName": "@snowplow/browser-plugin-youtube-tracking" +} \ No newline at end of file diff --git a/common/changes/@snowplow/browser-tracker-core/release-3.24.3_2024-09-03-05-39.json b/common/changes/@snowplow/browser-tracker-core/release-3.24.3_2024-09-03-05-39.json new file mode 100644 index 000000000..984e409a1 --- /dev/null +++ b/common/changes/@snowplow/browser-tracker-core/release-3.24.3_2024-09-03-05-39.json @@ -0,0 +1,10 @@ +{ + "changes": [ + { + "packageName": "@snowplow/browser-tracker-core", + "comment": "Upgrade supported Node.JS versions in build to 18 - 20 and upgrade rush", + "type": "none" + } + ], + "packageName": "@snowplow/browser-tracker-core" +} \ No newline at end of file diff --git a/common/changes/@snowplow/browser-tracker/release-3.24.3_2024-09-03-05-39.json b/common/changes/@snowplow/browser-tracker/release-3.24.3_2024-09-03-05-39.json new file mode 100644 index 000000000..32795abab --- /dev/null +++ b/common/changes/@snowplow/browser-tracker/release-3.24.3_2024-09-03-05-39.json @@ -0,0 +1,10 @@ +{ + "changes": [ + { + "packageName": "@snowplow/browser-tracker", + "comment": "Upgrade supported Node.JS versions in build to 18 - 20 and upgrade rush", + "type": "none" + } + ], + "packageName": "@snowplow/browser-tracker" +} \ No newline at end of file diff --git a/common/changes/@snowplow/javascript-tracker/release-3.24.3_2024-09-03-05-39.json b/common/changes/@snowplow/javascript-tracker/release-3.24.3_2024-09-03-05-39.json new file mode 100644 index 000000000..9c7acb7e0 --- /dev/null +++ b/common/changes/@snowplow/javascript-tracker/release-3.24.3_2024-09-03-05-39.json @@ -0,0 +1,10 @@ +{ + "changes": [ + { + "packageName": "@snowplow/javascript-tracker", + "comment": "Upgrade supported Node.JS versions in build to 18 - 20 and upgrade rush", + "type": "none" + } + ], + "packageName": "@snowplow/javascript-tracker" +} \ No newline at end of file diff --git a/common/changes/@snowplow/node-tracker/release-3.24.3_2024-09-03-05-39.json b/common/changes/@snowplow/node-tracker/release-3.24.3_2024-09-03-05-39.json new file mode 100644 index 000000000..7e3c852e1 --- /dev/null +++ b/common/changes/@snowplow/node-tracker/release-3.24.3_2024-09-03-05-39.json @@ -0,0 +1,10 @@ +{ + "changes": [ + { + "packageName": "@snowplow/node-tracker", + "comment": "Upgrade supported Node.JS versions in build to 18 - 20 and upgrade rush", + "type": "none" + } + ], + "packageName": "@snowplow/node-tracker" +} \ No newline at end of file diff --git a/common/changes/@snowplow/tracker-core/release-3.24.3_2024-09-03-05-39.json b/common/changes/@snowplow/tracker-core/release-3.24.3_2024-09-03-05-39.json new file mode 100644 index 000000000..a825e0bd5 --- /dev/null +++ b/common/changes/@snowplow/tracker-core/release-3.24.3_2024-09-03-05-39.json @@ -0,0 +1,10 @@ +{ + "changes": [ + { + "packageName": "@snowplow/tracker-core", + "comment": "Upgrade supported Node.JS versions in build to 18 - 20 and upgrade rush", + "type": "none" + } + ], + "packageName": "@snowplow/tracker-core" +} \ No newline at end of file diff --git a/common/git-hooks/pre-commit b/common/git-hooks/pre-commit old mode 100644 new mode 100755 diff --git a/common/scripts/install-run-rush-pnpm.js b/common/scripts/install-run-rush-pnpm.js new file mode 100644 index 000000000..2356649f4 --- /dev/null +++ b/common/scripts/install-run-rush-pnpm.js @@ -0,0 +1,31 @@ +// THIS FILE WAS GENERATED BY A TOOL. ANY MANUAL MODIFICATIONS WILL GET OVERWRITTEN WHENEVER RUSH IS UPGRADED. +// +// This script is intended for usage in an automated build environment where the Rush command may not have +// been preinstalled, or may have an unpredictable version. This script will automatically install the version of Rush +// specified in the rush.json configuration file (if not already installed), and then pass a command-line to the +// rush-pnpm command. +// +// An example usage would be: +// +// node common/scripts/install-run-rush-pnpm.js pnpm-command +// +// For more information, see: https://rushjs.io/pages/maintainer/setup_new_repo/ +// +// Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT license. +// See the @microsoft/rush package's LICENSE file for details. + +/******/ (() => { // webpackBootstrap +/******/ "use strict"; +var __webpack_exports__ = {}; +/*!*****************************************************!*\ + !*** ./lib-esnext/scripts/install-run-rush-pnpm.js ***! + \*****************************************************/ + +// Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT license. +// See LICENSE in the project root for license information. +require('./install-run-rush'); +//# sourceMappingURL=install-run-rush-pnpm.js.map +module.exports = __webpack_exports__; +/******/ })() +; +//# sourceMappingURL=install-run-rush-pnpm.js.map \ No newline at end of file diff --git a/common/scripts/install-run-rush.js b/common/scripts/install-run-rush.js index ff569fa92..9676fc718 100644 --- a/common/scripts/install-run-rush.js +++ b/common/scripts/install-run-rush.js @@ -1,30 +1,3 @@ -"use strict"; -// Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT license. -// See the @microsoft/rush package's LICENSE file for license information. -var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - var desc = Object.getOwnPropertyDescriptor(m, k); - if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { - desc = { enumerable: true, get: function() { return m[k]; } }; - } - Object.defineProperty(o, k2, desc); -}) : (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - o[k2] = m[k]; -})); -var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { - Object.defineProperty(o, "default", { enumerable: true, value: v }); -}) : function(o, v) { - o["default"] = v; -}); -var __importStar = (this && this.__importStar) || function (mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); - __setModuleDefault(result, mod); - return result; -}; -Object.defineProperty(exports, "__esModule", { value: true }); // THIS FILE WAS GENERATED BY A TOOL. ANY MANUAL MODIFICATIONS WILL GET OVERWRITTEN WHENEVER RUSH IS UPGRADED. // // This script is intended for usage in an automated build environment where the Rush command may not have @@ -35,38 +8,159 @@ Object.defineProperty(exports, "__esModule", { value: true }); // node common/scripts/install-run-rush.js install // // For more information, see: https://rushjs.io/pages/maintainer/setup_new_repo/ -const path = __importStar(require("path")); -const fs = __importStar(require("fs")); -const install_run_1 = require("./install-run"); +// +// Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT license. +// See the @microsoft/rush package's LICENSE file for details. + +/******/ (() => { // webpackBootstrap +/******/ "use strict"; +/******/ var __webpack_modules__ = ({ + +/***/ 657147: +/*!*********************!*\ + !*** external "fs" ***! + \*********************/ +/***/ ((module) => { + +module.exports = require("fs"); + +/***/ }), + +/***/ 371017: +/*!***********************!*\ + !*** external "path" ***! + \***********************/ +/***/ ((module) => { + +module.exports = require("path"); + +/***/ }) + +/******/ }); +/************************************************************************/ +/******/ // The module cache +/******/ var __webpack_module_cache__ = {}; +/******/ +/******/ // The require function +/******/ function __webpack_require__(moduleId) { +/******/ // Check if module is in cache +/******/ var cachedModule = __webpack_module_cache__[moduleId]; +/******/ if (cachedModule !== undefined) { +/******/ return cachedModule.exports; +/******/ } +/******/ // Create a new module (and put it into the cache) +/******/ var module = __webpack_module_cache__[moduleId] = { +/******/ // no module.id needed +/******/ // no module.loaded needed +/******/ exports: {} +/******/ }; +/******/ +/******/ // Execute the module function +/******/ __webpack_modules__[moduleId](module, module.exports, __webpack_require__); +/******/ +/******/ // Return the exports of the module +/******/ return module.exports; +/******/ } +/******/ +/************************************************************************/ +/******/ /* webpack/runtime/compat get default export */ +/******/ (() => { +/******/ // getDefaultExport function for compatibility with non-harmony modules +/******/ __webpack_require__.n = (module) => { +/******/ var getter = module && module.__esModule ? +/******/ () => (module['default']) : +/******/ () => (module); +/******/ __webpack_require__.d(getter, { a: getter }); +/******/ return getter; +/******/ }; +/******/ })(); +/******/ +/******/ /* webpack/runtime/define property getters */ +/******/ (() => { +/******/ // define getter functions for harmony exports +/******/ __webpack_require__.d = (exports, definition) => { +/******/ for(var key in definition) { +/******/ if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) { +/******/ Object.defineProperty(exports, key, { enumerable: true, get: definition[key] }); +/******/ } +/******/ } +/******/ }; +/******/ })(); +/******/ +/******/ /* webpack/runtime/hasOwnProperty shorthand */ +/******/ (() => { +/******/ __webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop)) +/******/ })(); +/******/ +/******/ /* webpack/runtime/make namespace object */ +/******/ (() => { +/******/ // define __esModule on exports +/******/ __webpack_require__.r = (exports) => { +/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) { +/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' }); +/******/ } +/******/ Object.defineProperty(exports, '__esModule', { value: true }); +/******/ }; +/******/ })(); +/******/ +/************************************************************************/ +var __webpack_exports__ = {}; +// This entry need to be wrapped in an IIFE because it need to be isolated against other modules in the chunk. +(() => { +/*!************************************************!*\ + !*** ./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___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___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. +/* eslint-disable no-console */ + + +const { installAndRun, findRushJsonFolder, RUSH_JSON_FILENAME, runWithErrorAndStatusCode } = require('./install-run'); const PACKAGE_NAME = '@microsoft/rush'; const RUSH_PREVIEW_VERSION = 'RUSH_PREVIEW_VERSION'; +const INSTALL_RUN_RUSH_LOCKFILE_PATH_VARIABLE = 'INSTALL_RUN_RUSH_LOCKFILE_PATH'; function _getRushVersion(logger) { const rushPreviewVersion = process.env[RUSH_PREVIEW_VERSION]; if (rushPreviewVersion !== undefined) { logger.info(`Using Rush version from environment variable ${RUSH_PREVIEW_VERSION}=${rushPreviewVersion}`); return rushPreviewVersion; } - const rushJsonFolder = (0, install_run_1.findRushJsonFolder)(); - const rushJsonPath = path.join(rushJsonFolder, install_run_1.RUSH_JSON_FILENAME); + const rushJsonFolder = findRushJsonFolder(); + const rushJsonPath = path__WEBPACK_IMPORTED_MODULE_0__.join(rushJsonFolder, RUSH_JSON_FILENAME); try { - const rushJsonContents = fs.readFileSync(rushJsonPath, 'utf-8'); + const rushJsonContents = fs__WEBPACK_IMPORTED_MODULE_1__.readFileSync(rushJsonPath, 'utf-8'); // Use a regular expression to parse out the rushVersion value because rush.json supports comments, // but JSON.parse does not and we don't want to pull in more dependencies than we need to in this script. const rushJsonMatches = rushJsonContents.match(/\"rushVersion\"\s*\:\s*\"([0-9a-zA-Z.+\-]+)\"/); return rushJsonMatches[1]; } catch (e) { - throw new Error(`Unable to determine the required version of Rush from rush.json (${rushJsonFolder}). ` + - "The 'rushVersion' field is either not assigned in rush.json or was specified " + + throw new Error(`Unable to determine the required version of Rush from ${RUSH_JSON_FILENAME} (${rushJsonFolder}). ` + + `The 'rushVersion' field is either not assigned in ${RUSH_JSON_FILENAME} or was specified ` + 'using an unexpected syntax.'); } } +function _getBin(scriptName) { + switch (scriptName.toLowerCase()) { + case 'install-run-rush-pnpm.js': + return 'rush-pnpm'; + case 'install-run-rushx.js': + return 'rushx'; + default: + return 'rush'; + } +} function _run() { const [nodePath /* Ex: /bin/node */, scriptPath /* /repo/common/scripts/install-run-rush.js */, ...packageBinArgs /* [build, --to, myproject] */] = process.argv; // Detect if this script was directly invoked, or if the install-run-rushx script was invokved to select the // appropriate binary inside the rush package to run - const scriptName = path.basename(scriptPath); - const bin = scriptName.toLowerCase() === 'install-run-rushx.js' ? 'rushx' : 'rush'; + const scriptName = path__WEBPACK_IMPORTED_MODULE_0__.basename(scriptPath); + const bin = _getBin(scriptName); if (!nodePath || !scriptPath) { throw new Error('Unexpected exception: could not detect node path or script path'); } @@ -93,7 +187,10 @@ function _run() { } if (!commandFound) { console.log(`Usage: ${scriptName} [args...]`); - if (scriptName === 'install-run-rush.js') { + if (scriptName === 'install-run-rush-pnpm.js') { + console.log(`Example: ${scriptName} pnpm-command`); + } + else if (scriptName === 'install-run-rush.js') { console.log(`Example: ${scriptName} build --to myproject`); } else { @@ -101,11 +198,21 @@ function _run() { } process.exit(1); } - (0, install_run_1.runWithErrorAndStatusCode)(logger, () => { + runWithErrorAndStatusCode(logger, () => { const version = _getRushVersion(logger); - logger.info(`The rush.json configuration requests Rush version ${version}`); - return (0, install_run_1.installAndRun)(logger, PACKAGE_NAME, version, bin, packageBinArgs); + logger.info(`The ${RUSH_JSON_FILENAME} configuration requests Rush version ${version}`); + const lockFilePath = process.env[INSTALL_RUN_RUSH_LOCKFILE_PATH_VARIABLE]; + if (lockFilePath) { + logger.info(`Found ${INSTALL_RUN_RUSH_LOCKFILE_PATH_VARIABLE}="${lockFilePath}", installing with lockfile.`); + } + return installAndRun(logger, PACKAGE_NAME, version, bin, packageBinArgs, lockFilePath); }); } _run(); +//# sourceMappingURL=install-run-rush.js.map +})(); + +module.exports = __webpack_exports__; +/******/ })() +; //# sourceMappingURL=install-run-rush.js.map \ No newline at end of file diff --git a/common/scripts/install-run-rushx.js b/common/scripts/install-run-rushx.js index bf26eb5e5..6581521f3 100644 --- a/common/scripts/install-run-rushx.js +++ b/common/scripts/install-run-rushx.js @@ -1,7 +1,3 @@ -"use strict"; -// Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT license. -// See the @microsoft/rush package's LICENSE file for license information. -Object.defineProperty(exports, "__esModule", { value: true }); // THIS FILE WAS GENERATED BY A TOOL. ANY MANUAL MODIFICATIONS WILL GET OVERWRITTEN WHENEVER RUSH IS UPGRADED. // // This script is intended for usage in an automated build environment where the Rush command may not have @@ -14,5 +10,22 @@ Object.defineProperty(exports, "__esModule", { value: true }); // node common/scripts/install-run-rushx.js custom-command // // For more information, see: https://rushjs.io/pages/maintainer/setup_new_repo/ -require("./install-run-rush"); +// +// Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT license. +// See the @microsoft/rush package's LICENSE file for details. + +/******/ (() => { // webpackBootstrap +/******/ "use strict"; +var __webpack_exports__ = {}; +/*!*************************************************!*\ + !*** ./lib-esnext/scripts/install-run-rushx.js ***! + \*************************************************/ + +// Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT license. +// See LICENSE in the project root for license information. +require('./install-run-rush'); +//# sourceMappingURL=install-run-rushx.js.map +module.exports = __webpack_exports__; +/******/ })() +; //# sourceMappingURL=install-run-rushx.js.map \ No newline at end of file diff --git a/common/scripts/install-run.js b/common/scripts/install-run.js index 208b99c83..9283c4452 100644 --- a/common/scripts/install-run.js +++ b/common/scripts/install-run.js @@ -1,31 +1,3 @@ -"use strict"; -// Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT license. -// See the @microsoft/rush package's LICENSE file for license information. -var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - var desc = Object.getOwnPropertyDescriptor(m, k); - if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { - desc = { enumerable: true, get: function() { return m[k]; } }; - } - Object.defineProperty(o, k2, desc); -}) : (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - o[k2] = m[k]; -})); -var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { - Object.defineProperty(o, "default", { enumerable: true, value: v }); -}) : function(o, v) { - o["default"] = v; -}); -var __importStar = (this && this.__importStar) || function (mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); - __setModuleDefault(result, mod); - return result; -}; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.runWithErrorAndStatusCode = exports.installAndRun = exports.findRushJsonFolder = exports.getNpmPath = exports.RUSH_JSON_FILENAME = void 0; // THIS FILE WAS GENERATED BY A TOOL. ANY MANUAL MODIFICATIONS WILL GET OVERWRITTEN WHENEVER RUSH IS UPGRADED. // // This script is intended for usage in an automated build environment where a Node tool may not have @@ -36,57 +8,59 @@ exports.runWithErrorAndStatusCode = exports.installAndRun = exports.findRushJson // node common/scripts/install-run.js qrcode@1.2.2 qrcode https://rushjs.io // // For more information, see: https://rushjs.io/pages/maintainer/setup_new_repo/ -const childProcess = __importStar(require("child_process")); -const fs = __importStar(require("fs")); -const os = __importStar(require("os")); -const path = __importStar(require("path")); -exports.RUSH_JSON_FILENAME = 'rush.json'; -const RUSH_TEMP_FOLDER_ENV_VARIABLE_NAME = 'RUSH_TEMP_FOLDER'; -const INSTALLED_FLAG_FILENAME = 'installed.flag'; -const NODE_MODULES_FOLDER_NAME = 'node_modules'; -const PACKAGE_JSON_FILENAME = 'package.json'; +// +// Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT license. +// See the @microsoft/rush package's LICENSE file for details. + +/******/ (() => { // webpackBootstrap +/******/ "use strict"; +/******/ var __webpack_modules__ = ({ + +/***/ 679877: +/*!************************************************!*\ + !*** ./lib-esnext/utilities/npmrcUtilities.js ***! + \************************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* 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___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___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. +// IMPORTANT - do not use any non-built-in libraries in this file + + /** - * Parse a package specifier (in the form of name\@version) into name and version parts. + * This function reads the content for given .npmrc file path, and also trims + * unusable lines from the .npmrc file. + * + * @returns + * The text of the the .npmrc. */ -function _parsePackageSpecifier(rawPackageSpecifier) { - rawPackageSpecifier = (rawPackageSpecifier || '').trim(); - const separatorIndex = rawPackageSpecifier.lastIndexOf('@'); - let name; - let version = undefined; - if (separatorIndex === 0) { - // The specifier starts with a scope and doesn't have a version specified - name = rawPackageSpecifier; +// create a global _combinedNpmrc for cache purpose +const _combinedNpmrcMap = new Map(); +function _trimNpmrcFile(options) { + const { sourceNpmrcPath, linesToPrepend, linesToAppend } = options; + const combinedNpmrcFromCache = _combinedNpmrcMap.get(sourceNpmrcPath); + if (combinedNpmrcFromCache !== undefined) { + return combinedNpmrcFromCache; } - else if (separatorIndex === -1) { - // The specifier doesn't have a version - name = rawPackageSpecifier; + let npmrcFileLines = []; + if (linesToPrepend) { + npmrcFileLines.push(...linesToPrepend); } - else { - name = rawPackageSpecifier.substring(0, separatorIndex); - version = rawPackageSpecifier.substring(separatorIndex + 1); + if (fs__WEBPACK_IMPORTED_MODULE_0__.existsSync(sourceNpmrcPath)) { + npmrcFileLines.push(...fs__WEBPACK_IMPORTED_MODULE_0__.readFileSync(sourceNpmrcPath).toString().split('\n')); } - if (!name) { - throw new Error(`Invalid package specifier: ${rawPackageSpecifier}`); + if (linesToAppend) { + npmrcFileLines.push(...linesToAppend); } - return { name, version }; -} -/** - * As a workaround, copyAndTrimNpmrcFile() copies the .npmrc file to the target folder, and also trims - * unusable lines from the .npmrc file. - * - * Why are we trimming the .npmrc lines? NPM allows environment variables to be specified in - * the .npmrc file to provide different authentication tokens for different registry. - * However, if the environment variable is undefined, it expands to an empty string, which - * produces a valid-looking mapping with an invalid URL that causes an error. Instead, - * we'd prefer to skip that line and continue looking in other places such as the user's - * home directory. - * - * IMPORTANT: THIS CODE SHOULD BE KEPT UP TO DATE WITH Utilities.copyAndTrimNpmrcFile() - */ -function _copyAndTrimNpmrcFile(logger, sourceNpmrcPath, targetNpmrcPath) { - logger.info(`Transforming ${sourceNpmrcPath}`); // Verbose - logger.info(` --> "${targetNpmrcPath}"`); - let npmrcFileLines = fs.readFileSync(sourceNpmrcPath).toString().split('\n'); npmrcFileLines = npmrcFileLines.map((line) => (line || '').trim()); const resultLines = []; // This finds environment variable tokens that look like "${VAR_NAME}" @@ -94,8 +68,13 @@ function _copyAndTrimNpmrcFile(logger, sourceNpmrcPath, targetNpmrcPath) { // Comment lines start with "#" or ";" const commentRegExp = /^\s*[#;]/; // Trim out lines that reference environment variables that aren't defined - for (const line of npmrcFileLines) { + for (let line of npmrcFileLines) { let lineShouldBeTrimmed = false; + //remove spaces before or after key and value + line = line + .split('=') + .map((lineToTrim) => lineToTrim.trim()) + .join('='); // Ignore comment lines if (!commentRegExp.test(line)) { const environmentVariables = line.match(expansionRegExp); @@ -121,31 +100,240 @@ function _copyAndTrimNpmrcFile(logger, sourceNpmrcPath, targetNpmrcPath) { resultLines.push(line); } } - fs.writeFileSync(targetNpmrcPath, resultLines.join(os.EOL)); + const combinedNpmrc = resultLines.join('\n'); + //save the cache + _combinedNpmrcMap.set(sourceNpmrcPath, combinedNpmrc); + return combinedNpmrc; } -/** - * syncNpmrc() copies the .npmrc file to the target folder, and also trims unusable lines from the .npmrc file. - * If the source .npmrc file not exist, then syncNpmrc() will delete an .npmrc that is found in the target folder. - * - * IMPORTANT: THIS CODE SHOULD BE KEPT UP TO DATE WITH Utilities._syncNpmrc() - */ -function _syncNpmrc(logger, sourceNpmrcFolder, targetNpmrcFolder, useNpmrcPublish) { - const sourceNpmrcPath = path.join(sourceNpmrcFolder, !useNpmrcPublish ? '.npmrc' : '.npmrc-publish'); - const targetNpmrcPath = path.join(targetNpmrcFolder, '.npmrc'); +function _copyAndTrimNpmrcFile(options) { + const { logger, sourceNpmrcPath, targetNpmrcPath, linesToPrepend, linesToAppend } = options; + logger.info(`Transforming ${sourceNpmrcPath}`); // Verbose + logger.info(` --> "${targetNpmrcPath}"`); + const combinedNpmrc = _trimNpmrcFile({ + sourceNpmrcPath, + linesToPrepend, + linesToAppend + }); + fs__WEBPACK_IMPORTED_MODULE_0__.writeFileSync(targetNpmrcPath, combinedNpmrc); + return combinedNpmrc; +} +function syncNpmrc(options) { + const { sourceNpmrcFolder, targetNpmrcFolder, useNpmrcPublish, logger = { + // eslint-disable-next-line no-console + info: console.log, + // eslint-disable-next-line no-console + error: console.error + }, createIfMissing = false, linesToAppend, linesToPrepend } = options; + const sourceNpmrcPath = path__WEBPACK_IMPORTED_MODULE_1__.join(sourceNpmrcFolder, !useNpmrcPublish ? '.npmrc' : '.npmrc-publish'); + const targetNpmrcPath = path__WEBPACK_IMPORTED_MODULE_1__.join(targetNpmrcFolder, '.npmrc'); try { - if (fs.existsSync(sourceNpmrcPath)) { - _copyAndTrimNpmrcFile(logger, sourceNpmrcPath, targetNpmrcPath); + if (fs__WEBPACK_IMPORTED_MODULE_0__.existsSync(sourceNpmrcPath) || createIfMissing) { + // Ensure the target folder exists + if (!fs__WEBPACK_IMPORTED_MODULE_0__.existsSync(targetNpmrcFolder)) { + fs__WEBPACK_IMPORTED_MODULE_0__.mkdirSync(targetNpmrcFolder, { recursive: true }); + } + return _copyAndTrimNpmrcFile({ + sourceNpmrcPath, + targetNpmrcPath, + logger, + linesToAppend, + linesToPrepend + }); } - else if (fs.existsSync(targetNpmrcPath)) { + else if (fs__WEBPACK_IMPORTED_MODULE_0__.existsSync(targetNpmrcPath)) { // If the source .npmrc doesn't exist and there is one in the target, delete the one in the target logger.info(`Deleting ${targetNpmrcPath}`); // Verbose - fs.unlinkSync(targetNpmrcPath); + fs__WEBPACK_IMPORTED_MODULE_0__.unlinkSync(targetNpmrcPath); } } catch (e) { throw new Error(`Error syncing .npmrc file: ${e}`); } } +function isVariableSetInNpmrcFile(sourceNpmrcFolder, variableKey) { + const sourceNpmrcPath = `${sourceNpmrcFolder}/.npmrc`; + //if .npmrc file does not exist, return false directly + if (!fs__WEBPACK_IMPORTED_MODULE_0__.existsSync(sourceNpmrcPath)) { + return false; + } + const trimmedNpmrcFile = _trimNpmrcFile({ sourceNpmrcPath }); + const variableKeyRegExp = new RegExp(`^${variableKey}=`, 'm'); + return trimmedNpmrcFile.match(variableKeyRegExp) !== null; +} +//# sourceMappingURL=npmrcUtilities.js.map + +/***/ }), + +/***/ 532081: +/*!********************************!*\ + !*** external "child_process" ***! + \********************************/ +/***/ ((module) => { + +module.exports = require("child_process"); + +/***/ }), + +/***/ 657147: +/*!*********************!*\ + !*** external "fs" ***! + \*********************/ +/***/ ((module) => { + +module.exports = require("fs"); + +/***/ }), + +/***/ 822037: +/*!*********************!*\ + !*** external "os" ***! + \*********************/ +/***/ ((module) => { + +module.exports = require("os"); + +/***/ }), + +/***/ 371017: +/*!***********************!*\ + !*** external "path" ***! + \***********************/ +/***/ ((module) => { + +module.exports = require("path"); + +/***/ }) + +/******/ }); +/************************************************************************/ +/******/ // The module cache +/******/ var __webpack_module_cache__ = {}; +/******/ +/******/ // The require function +/******/ function __webpack_require__(moduleId) { +/******/ // Check if module is in cache +/******/ var cachedModule = __webpack_module_cache__[moduleId]; +/******/ if (cachedModule !== undefined) { +/******/ return cachedModule.exports; +/******/ } +/******/ // Create a new module (and put it into the cache) +/******/ var module = __webpack_module_cache__[moduleId] = { +/******/ // no module.id needed +/******/ // no module.loaded needed +/******/ exports: {} +/******/ }; +/******/ +/******/ // Execute the module function +/******/ __webpack_modules__[moduleId](module, module.exports, __webpack_require__); +/******/ +/******/ // Return the exports of the module +/******/ return module.exports; +/******/ } +/******/ +/************************************************************************/ +/******/ /* webpack/runtime/compat get default export */ +/******/ (() => { +/******/ // getDefaultExport function for compatibility with non-harmony modules +/******/ __webpack_require__.n = (module) => { +/******/ var getter = module && module.__esModule ? +/******/ () => (module['default']) : +/******/ () => (module); +/******/ __webpack_require__.d(getter, { a: getter }); +/******/ return getter; +/******/ }; +/******/ })(); +/******/ +/******/ /* webpack/runtime/define property getters */ +/******/ (() => { +/******/ // define getter functions for harmony exports +/******/ __webpack_require__.d = (exports, definition) => { +/******/ for(var key in definition) { +/******/ if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) { +/******/ Object.defineProperty(exports, key, { enumerable: true, get: definition[key] }); +/******/ } +/******/ } +/******/ }; +/******/ })(); +/******/ +/******/ /* webpack/runtime/hasOwnProperty shorthand */ +/******/ (() => { +/******/ __webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop)) +/******/ })(); +/******/ +/******/ /* webpack/runtime/make namespace object */ +/******/ (() => { +/******/ // define __esModule on exports +/******/ __webpack_require__.r = (exports) => { +/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) { +/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' }); +/******/ } +/******/ Object.defineProperty(exports, '__esModule', { value: true }); +/******/ }; +/******/ })(); +/******/ +/************************************************************************/ +var __webpack_exports__ = {}; +// This entry need to be wrapped in an IIFE because it need to be isolated against other modules in the chunk. +(() => { +/*!*******************************************!*\ + !*** ./lib-esnext/scripts/install-run.js ***! + \*******************************************/ +__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 */ }); +/* harmony import */ var child_process__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! child_process */ 532081); +/* 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___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___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___default = /*#__PURE__*/__webpack_require__.n(path__WEBPACK_IMPORTED_MODULE_3__); +/* harmony import */ var _utilities_npmrcUtilities__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../utilities/npmrcUtilities */ 679877); +// 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 */ + + + + + +const RUSH_JSON_FILENAME = 'rush.json'; +const RUSH_TEMP_FOLDER_ENV_VARIABLE_NAME = 'RUSH_TEMP_FOLDER'; +const INSTALL_RUN_LOCKFILE_PATH_VARIABLE = 'INSTALL_RUN_LOCKFILE_PATH'; +const INSTALLED_FLAG_FILENAME = 'installed.flag'; +const NODE_MODULES_FOLDER_NAME = 'node_modules'; +const PACKAGE_JSON_FILENAME = 'package.json'; +/** + * Parse a package specifier (in the form of name\@version) into name and version parts. + */ +function _parsePackageSpecifier(rawPackageSpecifier) { + rawPackageSpecifier = (rawPackageSpecifier || '').trim(); + const separatorIndex = rawPackageSpecifier.lastIndexOf('@'); + let name; + let version = undefined; + if (separatorIndex === 0) { + // The specifier starts with a scope and doesn't have a version specified + name = rawPackageSpecifier; + } + else if (separatorIndex === -1) { + // The specifier doesn't have a version + name = rawPackageSpecifier; + } + else { + name = rawPackageSpecifier.substring(0, separatorIndex); + version = rawPackageSpecifier.substring(separatorIndex + 1); + } + if (!name) { + throw new Error(`Invalid package specifier: ${rawPackageSpecifier}`); + } + return { name, version }; +} let _npmPath = undefined; /** * Get the absolute path to the npm executable @@ -153,35 +341,34 @@ let _npmPath = undefined; function getNpmPath() { if (!_npmPath) { try { - if (os.platform() === 'win32') { + if (_isWindows()) { // We're on Windows - const whereOutput = childProcess.execSync('where npm', { stdio: [] }).toString(); - const lines = whereOutput.split(os.EOL).filter((line) => !!line); + const whereOutput = child_process__WEBPACK_IMPORTED_MODULE_0__.execSync('where npm', { stdio: [] }).toString(); + const lines = whereOutput.split(os__WEBPACK_IMPORTED_MODULE_2__.EOL).filter((line) => !!line); // take the last result, we are looking for a .cmd command // see https://github.com/microsoft/rushstack/issues/759 _npmPath = lines[lines.length - 1]; } else { // We aren't on Windows - assume we're on *NIX or Darwin - _npmPath = childProcess.execSync('command -v npm', { stdio: [] }).toString(); + _npmPath = child_process__WEBPACK_IMPORTED_MODULE_0__.execSync('command -v npm', { stdio: [] }).toString(); } } catch (e) { throw new Error(`Unable to determine the path to the NPM tool: ${e}`); } _npmPath = _npmPath.trim(); - if (!fs.existsSync(_npmPath)) { + if (!fs__WEBPACK_IMPORTED_MODULE_1__.existsSync(_npmPath)) { throw new Error('The NPM executable does not exist'); } } return _npmPath; } -exports.getNpmPath = getNpmPath; function _ensureFolder(folderPath) { - if (!fs.existsSync(folderPath)) { - const parentDir = path.dirname(folderPath); + if (!fs__WEBPACK_IMPORTED_MODULE_1__.existsSync(folderPath)) { + const parentDir = path__WEBPACK_IMPORTED_MODULE_3__.dirname(folderPath); _ensureFolder(parentDir); - fs.mkdirSync(folderPath); + fs__WEBPACK_IMPORTED_MODULE_1__.mkdirSync(folderPath); } } /** @@ -195,14 +382,14 @@ function _ensureAndJoinPath(baseFolder, ...pathSegments) { try { for (let pathSegment of pathSegments) { pathSegment = pathSegment.replace(/[\\\/]/g, '+'); - joinedPath = path.join(joinedPath, pathSegment); - if (!fs.existsSync(joinedPath)) { - fs.mkdirSync(joinedPath); + joinedPath = path__WEBPACK_IMPORTED_MODULE_3__.join(joinedPath, pathSegment); + if (!fs__WEBPACK_IMPORTED_MODULE_1__.existsSync(joinedPath)) { + fs__WEBPACK_IMPORTED_MODULE_1__.mkdirSync(joinedPath); } } } catch (e) { - throw new Error(`Error building local installation folder (${path.join(baseFolder, ...pathSegments)}): ${e}`); + throw new Error(`Error building local installation folder (${path__WEBPACK_IMPORTED_MODULE_3__.join(baseFolder, ...pathSegments)}): ${e}`); } return joinedPath; } @@ -216,6 +403,23 @@ function _getRushTempFolder(rushCommonFolder) { return _ensureAndJoinPath(rushCommonFolder, 'temp'); } } +/** + * Compare version strings according to semantic versioning. + * Returns a positive integer if "a" is a later version than "b", + * a negative integer if "b" is later than "a", + * and 0 otherwise. + */ +function _compareVersionStrings(a, b) { + const aParts = a.split(/[.-]/); + const bParts = b.split(/[.-]/); + const numberOfParts = Math.max(aParts.length, bParts.length); + for (let i = 0; i < numberOfParts; i++) { + if (aParts[i] !== bParts[i]) { + return (Number(aParts[i]) || 0) - (Number(bParts[i]) || 0); + } + } + return 0; +} /** * Resolve a package specifier to a static version */ @@ -232,33 +436,56 @@ function _resolvePackageVersion(logger, rushCommonFolder, { name, version }) { // version resolves to try { const rushTempFolder = _getRushTempFolder(rushCommonFolder); - const sourceNpmrcFolder = path.join(rushCommonFolder, 'config', 'rush'); - _syncNpmrc(logger, sourceNpmrcFolder, rushTempFolder); + const sourceNpmrcFolder = path__WEBPACK_IMPORTED_MODULE_3__.join(rushCommonFolder, 'config', 'rush'); + (0,_utilities_npmrcUtilities__WEBPACK_IMPORTED_MODULE_4__.syncNpmrc)({ + sourceNpmrcFolder, + targetNpmrcFolder: rushTempFolder, + logger + }); const npmPath = getNpmPath(); // This returns something that looks like: - // @microsoft/rush@3.0.0 '3.0.0' - // @microsoft/rush@3.0.1 '3.0.1' - // ... - // @microsoft/rush@3.0.20 '3.0.20' - // - const npmVersionSpawnResult = childProcess.spawnSync(npmPath, ['view', `${name}@${version}`, 'version', '--no-update-notifier'], { + // ``` + // [ + // "3.0.0", + // "3.0.1", + // ... + // "3.0.20" + // ] + // ``` + // + // if multiple versions match the selector, or + // + // ``` + // "3.0.0" + // ``` + // + // if only a single version matches. + const spawnSyncOptions = { cwd: rushTempFolder, - stdio: [] - }); + stdio: [], + shell: _isWindows() + }; + const platformNpmPath = _getPlatformPath(npmPath); + const npmVersionSpawnResult = child_process__WEBPACK_IMPORTED_MODULE_0__.spawnSync(platformNpmPath, ['view', `${name}@${version}`, 'version', '--no-update-notifier', '--json'], spawnSyncOptions); if (npmVersionSpawnResult.status !== 0) { throw new Error(`"npm view" returned error code ${npmVersionSpawnResult.status}`); } const npmViewVersionOutput = npmVersionSpawnResult.stdout.toString(); - const versionLines = npmViewVersionOutput.split('\n').filter((line) => !!line); - const latestVersion = versionLines[versionLines.length - 1]; + const parsedVersionOutput = JSON.parse(npmViewVersionOutput); + const versions = Array.isArray(parsedVersionOutput) + ? parsedVersionOutput + : [parsedVersionOutput]; + let latestVersion = versions[0]; + for (let i = 1; i < versions.length; i++) { + const latestVersionCandidate = versions[i]; + if (_compareVersionStrings(latestVersionCandidate, latestVersion) > 0) { + latestVersion = latestVersionCandidate; + } + } if (!latestVersion) { throw new Error('No versions found for the specified version range.'); } - const versionMatches = latestVersion.match(/^.+\s\'(.+)\'$/); - if (!versionMatches) { - throw new Error(`Invalid npm output ${latestVersion}`); - } - return versionMatches[1]; + return latestVersion; } catch (e) { throw new Error(`Unable to resolve version ${version} of package ${name}: ${e}`); @@ -274,58 +501,72 @@ function findRushJsonFolder() { let basePath = __dirname; let tempPath = __dirname; do { - const testRushJsonPath = path.join(basePath, exports.RUSH_JSON_FILENAME); - if (fs.existsSync(testRushJsonPath)) { + const testRushJsonPath = path__WEBPACK_IMPORTED_MODULE_3__.join(basePath, RUSH_JSON_FILENAME); + if (fs__WEBPACK_IMPORTED_MODULE_1__.existsSync(testRushJsonPath)) { _rushJsonFolder = basePath; break; } else { basePath = tempPath; } - } while (basePath !== (tempPath = path.dirname(basePath))); // Exit the loop when we hit the disk root + } while (basePath !== (tempPath = path__WEBPACK_IMPORTED_MODULE_3__.dirname(basePath))); // Exit the loop when we hit the disk root if (!_rushJsonFolder) { - throw new Error('Unable to find rush.json.'); + throw new Error(`Unable to find ${RUSH_JSON_FILENAME}.`); } } return _rushJsonFolder; } -exports.findRushJsonFolder = findRushJsonFolder; /** * Detects if the package in the specified directory is installed */ function _isPackageAlreadyInstalled(packageInstallFolder) { try { - const flagFilePath = path.join(packageInstallFolder, INSTALLED_FLAG_FILENAME); - if (!fs.existsSync(flagFilePath)) { + const flagFilePath = path__WEBPACK_IMPORTED_MODULE_3__.join(packageInstallFolder, INSTALLED_FLAG_FILENAME); + if (!fs__WEBPACK_IMPORTED_MODULE_1__.existsSync(flagFilePath)) { return false; } - const fileContents = fs.readFileSync(flagFilePath).toString(); + const fileContents = fs__WEBPACK_IMPORTED_MODULE_1__.readFileSync(flagFilePath).toString(); return fileContents.trim() === process.version; } catch (e) { return false; } } +/** + * Delete a file. Fail silently if it does not exist. + */ +function _deleteFile(file) { + try { + fs__WEBPACK_IMPORTED_MODULE_1__.unlinkSync(file); + } + catch (err) { + if (err.code !== 'ENOENT' && err.code !== 'ENOTDIR') { + throw err; + } + } +} /** * Removes the following files and directories under the specified folder path: * - installed.flag * - * - node_modules */ -function _cleanInstallFolder(rushTempFolder, packageInstallFolder) { +function _cleanInstallFolder(rushTempFolder, packageInstallFolder, lockFilePath) { try { - const flagFile = path.resolve(packageInstallFolder, INSTALLED_FLAG_FILENAME); - if (fs.existsSync(flagFile)) { - fs.unlinkSync(flagFile); + const flagFile = path__WEBPACK_IMPORTED_MODULE_3__.resolve(packageInstallFolder, INSTALLED_FLAG_FILENAME); + _deleteFile(flagFile); + const packageLockFile = path__WEBPACK_IMPORTED_MODULE_3__.resolve(packageInstallFolder, 'package-lock.json'); + if (lockFilePath) { + fs__WEBPACK_IMPORTED_MODULE_1__.copyFileSync(lockFilePath, packageLockFile); } - const packageLockFile = path.resolve(packageInstallFolder, 'package-lock.json'); - if (fs.existsSync(packageLockFile)) { - fs.unlinkSync(packageLockFile); - } - const nodeModulesFolder = path.resolve(packageInstallFolder, NODE_MODULES_FOLDER_NAME); - if (fs.existsSync(nodeModulesFolder)) { - const rushRecyclerFolder = _ensureAndJoinPath(rushTempFolder, 'rush-recycler'); - fs.renameSync(nodeModulesFolder, path.join(rushRecyclerFolder, `install-run-${Date.now().toString()}`)); + else { + // Not running `npm ci`, so need to cleanup + _deleteFile(packageLockFile); + const nodeModulesFolder = path__WEBPACK_IMPORTED_MODULE_3__.resolve(packageInstallFolder, NODE_MODULES_FOLDER_NAME); + if (fs__WEBPACK_IMPORTED_MODULE_1__.existsSync(nodeModulesFolder)) { + const rushRecyclerFolder = _ensureAndJoinPath(rushTempFolder, 'rush-recycler'); + fs__WEBPACK_IMPORTED_MODULE_1__.renameSync(nodeModulesFolder, path__WEBPACK_IMPORTED_MODULE_3__.join(rushRecyclerFolder, `install-run-${Date.now().toString()}`)); + } } } catch (e) { @@ -344,8 +585,8 @@ function _createPackageJson(packageInstallFolder, name, version) { repository: "DON'T WARN", license: 'MIT' }; - const packageJsonPath = path.join(packageInstallFolder, PACKAGE_JSON_FILENAME); - fs.writeFileSync(packageJsonPath, JSON.stringify(packageJsonContents, undefined, 2)); + const packageJsonPath = path__WEBPACK_IMPORTED_MODULE_3__.join(packageInstallFolder, PACKAGE_JSON_FILENAME); + fs__WEBPACK_IMPORTED_MODULE_1__.writeFileSync(packageJsonPath, JSON.stringify(packageJsonContents, undefined, 2)); } catch (e) { throw new Error(`Unable to create package.json: ${e}`); @@ -354,17 +595,19 @@ function _createPackageJson(packageInstallFolder, name, version) { /** * Run "npm install" in the package install folder. */ -function _installPackage(logger, packageInstallFolder, name, version) { +function _installPackage(logger, packageInstallFolder, name, version, command) { try { logger.info(`Installing ${name}...`); const npmPath = getNpmPath(); - const result = childProcess.spawnSync(npmPath, ['install'], { + const platformNpmPath = _getPlatformPath(npmPath); + const result = child_process__WEBPACK_IMPORTED_MODULE_0__.spawnSync(platformNpmPath, [command], { stdio: 'inherit', cwd: packageInstallFolder, - env: process.env + env: process.env, + shell: _isWindows() }); if (result.status !== 0) { - throw new Error('"npm install" encountered an error'); + throw new Error(`"npm ${command}" encountered an error`); } logger.info(`Successfully installed ${name}@${version}`); } @@ -376,55 +619,68 @@ function _installPackage(logger, packageInstallFolder, name, version) { * Get the ".bin" path for the package. */ function _getBinPath(packageInstallFolder, binName) { - const binFolderPath = path.resolve(packageInstallFolder, NODE_MODULES_FOLDER_NAME, '.bin'); - const resolvedBinName = os.platform() === 'win32' ? `${binName}.cmd` : binName; - return path.resolve(binFolderPath, resolvedBinName); + const binFolderPath = path__WEBPACK_IMPORTED_MODULE_3__.resolve(packageInstallFolder, NODE_MODULES_FOLDER_NAME, '.bin'); + const resolvedBinName = _isWindows() ? `${binName}.cmd` : binName; + return path__WEBPACK_IMPORTED_MODULE_3__.resolve(binFolderPath, resolvedBinName); +} +/** + * Returns a cross-platform path - windows must enclose any path containing spaces within double quotes. + */ +function _getPlatformPath(platformPath) { + return _isWindows() && platformPath.includes(' ') ? `"${platformPath}"` : platformPath; +} +function _isWindows() { + return os__WEBPACK_IMPORTED_MODULE_2__.platform() === 'win32'; } /** * Write a flag file to the package's install directory, signifying that the install was successful. */ function _writeFlagFile(packageInstallFolder) { try { - const flagFilePath = path.join(packageInstallFolder, INSTALLED_FLAG_FILENAME); - fs.writeFileSync(flagFilePath, process.version); + const flagFilePath = path__WEBPACK_IMPORTED_MODULE_3__.join(packageInstallFolder, INSTALLED_FLAG_FILENAME); + fs__WEBPACK_IMPORTED_MODULE_1__.writeFileSync(flagFilePath, process.version); } catch (e) { throw new Error(`Unable to create installed.flag file in ${packageInstallFolder}`); } } -function installAndRun(logger, packageName, packageVersion, packageBinName, packageBinArgs) { +function installAndRun(logger, packageName, packageVersion, packageBinName, packageBinArgs, lockFilePath = process.env[INSTALL_RUN_LOCKFILE_PATH_VARIABLE]) { const rushJsonFolder = findRushJsonFolder(); - const rushCommonFolder = path.join(rushJsonFolder, 'common'); + const rushCommonFolder = path__WEBPACK_IMPORTED_MODULE_3__.join(rushJsonFolder, 'common'); const rushTempFolder = _getRushTempFolder(rushCommonFolder); const packageInstallFolder = _ensureAndJoinPath(rushTempFolder, 'install-run', `${packageName}@${packageVersion}`); if (!_isPackageAlreadyInstalled(packageInstallFolder)) { // The package isn't already installed - _cleanInstallFolder(rushTempFolder, packageInstallFolder); - const sourceNpmrcFolder = path.join(rushCommonFolder, 'config', 'rush'); - _syncNpmrc(logger, sourceNpmrcFolder, packageInstallFolder); + _cleanInstallFolder(rushTempFolder, packageInstallFolder, lockFilePath); + const sourceNpmrcFolder = path__WEBPACK_IMPORTED_MODULE_3__.join(rushCommonFolder, 'config', 'rush'); + (0,_utilities_npmrcUtilities__WEBPACK_IMPORTED_MODULE_4__.syncNpmrc)({ + sourceNpmrcFolder, + targetNpmrcFolder: packageInstallFolder, + logger + }); _createPackageJson(packageInstallFolder, packageName, packageVersion); - _installPackage(logger, packageInstallFolder, packageName, packageVersion); + const command = lockFilePath ? 'ci' : 'install'; + _installPackage(logger, packageInstallFolder, packageName, packageVersion, command); _writeFlagFile(packageInstallFolder); } const statusMessage = `Invoking "${packageBinName} ${packageBinArgs.join(' ')}"`; const statusMessageLine = new Array(statusMessage.length + 1).join('-'); - logger.info(os.EOL + statusMessage + os.EOL + statusMessageLine + os.EOL); + logger.info('\n' + statusMessage + '\n' + statusMessageLine + '\n'); const binPath = _getBinPath(packageInstallFolder, packageBinName); - const binFolderPath = path.resolve(packageInstallFolder, NODE_MODULES_FOLDER_NAME, '.bin'); + const binFolderPath = path__WEBPACK_IMPORTED_MODULE_3__.resolve(packageInstallFolder, NODE_MODULES_FOLDER_NAME, '.bin'); // Windows environment variables are case-insensitive. Instead of using SpawnSyncOptions.env, we need to // assign via the process.env proxy to ensure that we append to the right PATH key. const originalEnvPath = process.env.PATH || ''; let result; try { - // Node.js on Windows can not spawn a file when the path has a space on it - // unless the path gets wrapped in a cmd friendly way and shell mode is used - const shouldUseShell = binPath.includes(' ') && os.platform() === 'win32'; - const platformBinPath = shouldUseShell ? `"${binPath}"` : binPath; - process.env.PATH = [binFolderPath, originalEnvPath].join(path.delimiter); - result = childProcess.spawnSync(platformBinPath, packageBinArgs, { + // `npm` bin stubs on Windows are `.cmd` files + // Node.js will not directly invoke a `.cmd` file unless `shell` is set to `true` + const platformBinPath = _getPlatformPath(binPath); + process.env.PATH = [binFolderPath, originalEnvPath].join(path__WEBPACK_IMPORTED_MODULE_3__.delimiter); + result = child_process__WEBPACK_IMPORTED_MODULE_0__.spawnSync(platformBinPath, packageBinArgs, { stdio: 'inherit', windowsVerbatimArguments: false, - shell: shouldUseShell, + shell: _isWindows(), cwd: process.cwd(), env: process.env }); @@ -439,7 +695,6 @@ function installAndRun(logger, packageName, packageVersion, packageBinName, pack throw result.error || new Error('An unknown error occurred.'); } } -exports.installAndRun = installAndRun; function runWithErrorAndStatusCode(logger, fn) { process.exitCode = 1; try { @@ -447,16 +702,15 @@ function runWithErrorAndStatusCode(logger, fn) { process.exitCode = exitCode; } catch (e) { - logger.error(os.EOL + os.EOL + e.toString() + os.EOL + os.EOL); + logger.error('\n\n' + e.toString() + '\n\n'); } } -exports.runWithErrorAndStatusCode = runWithErrorAndStatusCode; function _run() { const [nodePath /* Ex: /bin/node */, scriptPath /* /repo/common/scripts/install-run-rush.js */, rawPackageSpecifier /* qrcode@^1.2.0 */, packageBinName /* qrcode */, ...packageBinArgs /* [-f, myproject/lib] */] = process.argv; if (!nodePath) { throw new Error('Unexpected exception: could not detect node path'); } - if (path.basename(scriptPath).toLowerCase() !== 'install-run.js') { + if (path__WEBPACK_IMPORTED_MODULE_3__.basename(scriptPath).toLowerCase() !== 'install-run.js') { // If install-run.js wasn't directly invoked, don't execute the rest of this function. Return control // to the script that (presumably) imported this file return; @@ -480,4 +734,10 @@ function _run() { }); } _run(); +//# sourceMappingURL=install-run.js.map +})(); + +module.exports = __webpack_exports__; +/******/ })() +; //# sourceMappingURL=install-run.js.map \ No newline at end of file diff --git a/libraries/browser-tracker-core/README.md b/libraries/browser-tracker-core/README.md index 66d5fcc1c..59f6e0cd9 100644 --- a/libraries/browser-tracker-core/README.md +++ b/libraries/browser-tracker-core/README.md @@ -10,7 +10,7 @@ It should rarely be used alone, you probably want `@snowplow/browser-tracker`. ## Maintainer quick start Part of the Snowplow JavaScript Tracker monorepo. -Build with [Node.js](https://nodejs.org/en/) (14 or 16) and [Rush](https://rushjs.io/). +Build with [Node.js](https://nodejs.org/en/) (18 - 20) and [Rush](https://rushjs.io/). ### Setup repository diff --git a/libraries/tracker-core/README.md b/libraries/tracker-core/README.md index ab6b70363..962810fff 100644 --- a/libraries/tracker-core/README.md +++ b/libraries/tracker-core/README.md @@ -8,7 +8,7 @@ Core module to be used by Snowplow JavaScript based trackers. ## Maintainer quick start Part of the Snowplow JavaScript Tracker monorepo. -Build with [Node.js](https://nodejs.org/en/) (14 or 16) and [Rush](https://rushjs.io/). +Build with [Node.js](https://nodejs.org/en/) (18 - 20) and [Rush](https://rushjs.io/). ### Setup repository diff --git a/plugins/browser-plugin-ad-tracking/README.md b/plugins/browser-plugin-ad-tracking/README.md index 7a168734b..fc1c115e1 100644 --- a/plugins/browser-plugin-ad-tracking/README.md +++ b/plugins/browser-plugin-ad-tracking/README.md @@ -10,7 +10,7 @@ Adds advertising based events to your Snowplow tracking. ## Maintainer quick start Part of the Snowplow JavaScript Tracker monorepo. -Build with [Node.js](https://nodejs.org/en/) (14 or 16) and [Rush](https://rushjs.io/). +Build with [Node.js](https://nodejs.org/en/) (18 - 20) and [Rush](https://rushjs.io/). ### Setup repository diff --git a/plugins/browser-plugin-browser-features/README.md b/plugins/browser-plugin-browser-features/README.md index 5bc33afd2..ecac879e2 100644 --- a/plugins/browser-plugin-browser-features/README.md +++ b/plugins/browser-plugin-browser-features/README.md @@ -10,7 +10,7 @@ Adds Browser Features to your Snowplow tracking. Identifies available MIME Types ## Maintainer quick start Part of the Snowplow JavaScript Tracker monorepo. -Build with [Node.js](https://nodejs.org/en/) (14 or 16) and [Rush](https://rushjs.io/). +Build with [Node.js](https://nodejs.org/en/) (18 - 20) and [Rush](https://rushjs.io/). ### Setup repository diff --git a/plugins/browser-plugin-button-click-tracking/README.md b/plugins/browser-plugin-button-click-tracking/README.md index 4890728bd..1517ac2fa 100644 --- a/plugins/browser-plugin-button-click-tracking/README.md +++ b/plugins/browser-plugin-button-click-tracking/README.md @@ -10,7 +10,7 @@ Adds button click tracking events to your Snowplow tracking. ## Maintainer quick start Part of the Snowplow JavaScript Tracker monorepo. -Build with [Node.js](https://nodejs.org/en/) (14 or 16) and [Rush](https://rushjs.io/). +Build with [Node.js](https://nodejs.org/en/) (18 - 20) and [Rush](https://rushjs.io/). ### Setup repository diff --git a/plugins/browser-plugin-client-hints/README.md b/plugins/browser-plugin-client-hints/README.md index 9dec4d51d..851fbe898 100644 --- a/plugins/browser-plugin-client-hints/README.md +++ b/plugins/browser-plugin-client-hints/README.md @@ -10,7 +10,7 @@ Adds Client Hints to your Snowplow tracking. Captures Navigator Client Hint data ## Maintainer quick start Part of the Snowplow JavaScript Tracker monorepo. -Build with [Node.js](https://nodejs.org/en/) (14 or 16) and [Rush](https://rushjs.io/). +Build with [Node.js](https://nodejs.org/en/) (18 - 20) and [Rush](https://rushjs.io/). ### Setup repository diff --git a/plugins/browser-plugin-consent/README.md b/plugins/browser-plugin-consent/README.md index b23d32dbc..7afde7448 100644 --- a/plugins/browser-plugin-consent/README.md +++ b/plugins/browser-plugin-consent/README.md @@ -10,7 +10,7 @@ Adds consent information to your Snowplow tracking. ## Maintainer quick start Part of the Snowplow JavaScript Tracker monorepo. -Build with [Node.js](https://nodejs.org/en/) (14 or 16) and [Rush](https://rushjs.io/). +Build with [Node.js](https://nodejs.org/en/) (18 - 20) and [Rush](https://rushjs.io/). ### Setup repository diff --git a/plugins/browser-plugin-debugger/README.md b/plugins/browser-plugin-debugger/README.md index e541d5712..ee1901ab3 100644 --- a/plugins/browser-plugin-debugger/README.md +++ b/plugins/browser-plugin-debugger/README.md @@ -10,7 +10,7 @@ Adds debugging to your Snowplow tracking. ## Maintainer quick start Part of the Snowplow JavaScript Tracker monorepo. -Build with [Node.js](https://nodejs.org/en/) (14 or 16) and [Rush](https://rushjs.io/). +Build with [Node.js](https://nodejs.org/en/) (18 - 20) and [Rush](https://rushjs.io/). ### Setup repository diff --git a/plugins/browser-plugin-ecommerce/README.md b/plugins/browser-plugin-ecommerce/README.md index 05e8140df..f69c4da84 100644 --- a/plugins/browser-plugin-ecommerce/README.md +++ b/plugins/browser-plugin-ecommerce/README.md @@ -10,7 +10,7 @@ Adds ecommerce events to your Snowplow tracking. ## Maintainer quick start Part of the Snowplow JavaScript Tracker monorepo. -Build with [Node.js](https://nodejs.org/en/) (14 or 16) and [Rush](https://rushjs.io/). +Build with [Node.js](https://nodejs.org/en/) (18 - 20) and [Rush](https://rushjs.io/). ### Setup repository diff --git a/plugins/browser-plugin-enhanced-consent/README.md b/plugins/browser-plugin-enhanced-consent/README.md index 5b0d3ae26..5965453b2 100644 --- a/plugins/browser-plugin-enhanced-consent/README.md +++ b/plugins/browser-plugin-enhanced-consent/README.md @@ -10,7 +10,7 @@ This plugin is the recommended way to track marketing consent events on your web ## Maintainer quick start Part of the Snowplow JavaScript Tracker monorepo. -Build with [Node.js](https://nodejs.org/en/) (14 or 16) and [Rush](https://rushjs.io/). +Build with [Node.js](https://nodejs.org/en/) (18 - 20) and [Rush](https://rushjs.io/). ### Setup repository diff --git a/plugins/browser-plugin-enhanced-ecommerce/README.md b/plugins/browser-plugin-enhanced-ecommerce/README.md index a15874f58..a46477128 100644 --- a/plugins/browser-plugin-enhanced-ecommerce/README.md +++ b/plugins/browser-plugin-enhanced-ecommerce/README.md @@ -10,7 +10,7 @@ Adds enhanced ecommerce events to your Snowplow tracking. ## Maintainer quick start Part of the Snowplow JavaScript Tracker monorepo. -Build with [Node.js](https://nodejs.org/en/) (14 or 16) and [Rush](https://rushjs.io/). +Build with [Node.js](https://nodejs.org/en/) (18 - 20) and [Rush](https://rushjs.io/). ### Setup repository diff --git a/plugins/browser-plugin-error-tracking/README.md b/plugins/browser-plugin-error-tracking/README.md index 66b4e9de0..de3d0e460 100644 --- a/plugins/browser-plugin-error-tracking/README.md +++ b/plugins/browser-plugin-error-tracking/README.md @@ -10,7 +10,7 @@ Adds error tracking events to your Snowplow tracking. ## Maintainer quick start Part of the Snowplow JavaScript Tracker monorepo. -Build with [Node.js](https://nodejs.org/en/) (14 or 16) and [Rush](https://rushjs.io/). +Build with [Node.js](https://nodejs.org/en/) (18 - 20) and [Rush](https://rushjs.io/). ### Setup repository diff --git a/plugins/browser-plugin-event-specifications/README.md b/plugins/browser-plugin-event-specifications/README.md index c31599550..8f428c430 100644 --- a/plugins/browser-plugin-event-specifications/README.md +++ b/plugins/browser-plugin-event-specifications/README.md @@ -10,7 +10,7 @@ The plugin allows you to integrate with Event Specifications for a selected set ## Maintainer quick start Part of the Snowplow JavaScript Tracker monorepo. -Build with [Node.js](https://nodejs.org/en/) (14 or 16) and [Rush](https://rushjs.io/). +Build with [Node.js](https://nodejs.org/en/) (18 - 20) and [Rush](https://rushjs.io/). ### Setup repository diff --git a/plugins/browser-plugin-focalmeter/README.md b/plugins/browser-plugin-focalmeter/README.md index c3ef91f10..b3a9a6c01 100644 --- a/plugins/browser-plugin-focalmeter/README.md +++ b/plugins/browser-plugin-focalmeter/README.md @@ -12,7 +12,7 @@ A request is made when the first event with a new user ID is tracked. ## Maintainer quick start Part of the Snowplow JavaScript Tracker monorepo. -Build with [Node.js](https://nodejs.org/en/) (14 or 16) and [Rush](https://rushjs.io/). +Build with [Node.js](https://nodejs.org/en/) (18 - 20) and [Rush](https://rushjs.io/). ### Setup repository diff --git a/plugins/browser-plugin-form-tracking/README.md b/plugins/browser-plugin-form-tracking/README.md index fb9376ae1..d8d045856 100644 --- a/plugins/browser-plugin-form-tracking/README.md +++ b/plugins/browser-plugin-form-tracking/README.md @@ -10,7 +10,7 @@ Adds form tracking events to your Snowplow tracking. ## Maintainer quick start Part of the Snowplow JavaScript Tracker monorepo. -Build with [Node.js](https://nodejs.org/en/) (14 or 16) and [Rush](https://rushjs.io/). +Build with [Node.js](https://nodejs.org/en/) (18 - 20) and [Rush](https://rushjs.io/). ### Setup repository diff --git a/plugins/browser-plugin-ga-cookies/README.md b/plugins/browser-plugin-ga-cookies/README.md index 0d8775d62..423b14fbf 100644 --- a/plugins/browser-plugin-ga-cookies/README.md +++ b/plugins/browser-plugin-ga-cookies/README.md @@ -10,7 +10,7 @@ Adds Universal Analytics and Google Analytics 4 cookies to your Snowplow trackin ## Maintainer quick start Part of the Snowplow JavaScript Tracker monorepo. -Build with [Node.js](https://nodejs.org/en/) (14 or 16) and [Rush](https://rushjs.io/). +Build with [Node.js](https://nodejs.org/en/) (18 - 20) and [Rush](https://rushjs.io/). ### Setup repository diff --git a/plugins/browser-plugin-geolocation/README.md b/plugins/browser-plugin-geolocation/README.md index fb741901d..1e76b587d 100644 --- a/plugins/browser-plugin-geolocation/README.md +++ b/plugins/browser-plugin-geolocation/README.md @@ -10,7 +10,7 @@ Adds Geolocation to your Snowplow tracking. ## Maintainer quick start Part of the Snowplow JavaScript Tracker monorepo. -Build with [Node.js](https://nodejs.org/en/) (14 or 16) and [Rush](https://rushjs.io/). +Build with [Node.js](https://nodejs.org/en/) (18 - 20) and [Rush](https://rushjs.io/). ### Setup repository diff --git a/plugins/browser-plugin-link-click-tracking/README.md b/plugins/browser-plugin-link-click-tracking/README.md index 96b797198..2de3feb81 100644 --- a/plugins/browser-plugin-link-click-tracking/README.md +++ b/plugins/browser-plugin-link-click-tracking/README.md @@ -10,7 +10,7 @@ Adds link click tracking events to your Snowplow tracking. ## Maintainer quick start Part of the Snowplow JavaScript Tracker monorepo. -Build with [Node.js](https://nodejs.org/en/) ( 14 or 16) and [Rush](https://rushjs.io/). +Build with [Node.js](https://nodejs.org/en/) ( 18 - 20) and [Rush](https://rushjs.io/). ### Setup repository diff --git a/plugins/browser-plugin-media-tracking/README.md b/plugins/browser-plugin-media-tracking/README.md index 8b91949d1..3aeaa63b2 100644 --- a/plugins/browser-plugin-media-tracking/README.md +++ b/plugins/browser-plugin-media-tracking/README.md @@ -10,7 +10,7 @@ Adds HTML5 Video and Audio tracking events to your Snowplow tracking. ## Maintainer quick start Part of the Snowplow JavaScript Tracker monorepo. -Build with [Node.js](https://nodejs.org/en/) (14 or 16) and [Rush](https://rushjs.io/). +Build with [Node.js](https://nodejs.org/en/) (18 - 20) and [Rush](https://rushjs.io/). ### Setup repository @@ -89,4 +89,4 @@ All rights reserved. [npm-image]: https://img.shields.io/npm/v/@snowplow/browser-plugin-form-tracking [docs]: https://docs.snowplowanalytics.com/docs/collecting-data/collecting-from-own-applications/javascript-tracker/ [osi]: https://opensource.org/licenses/BSD-3-Clause -[license-image]: https://img.shields.io/npm/l/@snowplow/browser-plugin-form-tracking \ No newline at end of file +[license-image]: https://img.shields.io/npm/l/@snowplow/browser-plugin-form-tracking diff --git a/plugins/browser-plugin-media/README.md b/plugins/browser-plugin-media/README.md index 9d0a7251d..434e1e376 100644 --- a/plugins/browser-plugin-media/README.md +++ b/plugins/browser-plugin-media/README.md @@ -10,7 +10,7 @@ This plugin is the recommended way to track media events on your website. ## Maintainer quick start Part of the Snowplow JavaScript Tracker monorepo. -Build with [Node.js](https://nodejs.org/en/) (14 or 16) and [Rush](https://rushjs.io/). +Build with [Node.js](https://nodejs.org/en/) (18 - 20) and [Rush](https://rushjs.io/). ### Setup repository diff --git a/plugins/browser-plugin-optimizely-x/README.md b/plugins/browser-plugin-optimizely-x/README.md index d274e6ee6..656adcc00 100644 --- a/plugins/browser-plugin-optimizely-x/README.md +++ b/plugins/browser-plugin-optimizely-x/README.md @@ -10,7 +10,7 @@ Adds Optimizely X contexts to your Snowplow tracking. ## Maintainer quick start Part of the Snowplow JavaScript Tracker monorepo. -Build with [Node.js](https://nodejs.org/en/) (14 or 16) and [Rush](https://rushjs.io/). +Build with [Node.js](https://nodejs.org/en/) (18 - 20) and [Rush](https://rushjs.io/). ### Setup repository diff --git a/plugins/browser-plugin-optimizely/README.md b/plugins/browser-plugin-optimizely/README.md index 5a3b8128f..beb5f438f 100644 --- a/plugins/browser-plugin-optimizely/README.md +++ b/plugins/browser-plugin-optimizely/README.md @@ -10,7 +10,7 @@ Adds Optimizely Classic contexts to your Snowplow tracking. ## Maintainer quick start Part of the Snowplow JavaScript Tracker monorepo. -Build with [Node.js](https://nodejs.org/en/) (14 or 16) and [Rush](https://rushjs.io/). +Build with [Node.js](https://nodejs.org/en/) (18 - 20) and [Rush](https://rushjs.io/). ### Setup repository diff --git a/plugins/browser-plugin-performance-navigation-timing/README.md b/plugins/browser-plugin-performance-navigation-timing/README.md index f2d03ea9f..bfbda6ca9 100644 --- a/plugins/browser-plugin-performance-navigation-timing/README.md +++ b/plugins/browser-plugin-performance-navigation-timing/README.md @@ -17,7 +17,7 @@ The following diagram shows the ResourceTiming and PerformanceNavigationTiming p ## Maintainer quick start Part of the Snowplow JavaScript Tracker monorepo. -Build with [Node.js](https://nodejs.org/en/) (14 or 16) and [Rush](https://rushjs.io/). +Build with [Node.js](https://nodejs.org/en/) (18 - 20) and [Rush](https://rushjs.io/). ### Setup repository diff --git a/plugins/browser-plugin-performance-timing/README.md b/plugins/browser-plugin-performance-timing/README.md index ceb3e12e7..8e34a7b15 100644 --- a/plugins/browser-plugin-performance-timing/README.md +++ b/plugins/browser-plugin-performance-timing/README.md @@ -10,7 +10,7 @@ Adds Performance Timing contexts to your Snowplow tracking. ## Maintainer quick start Part of the Snowplow JavaScript Tracker monorepo. -Build with [Node.js](https://nodejs.org/en/) (14 or 16) and [Rush](https://rushjs.io/). +Build with [Node.js](https://nodejs.org/en/) (18 - 20) and [Rush](https://rushjs.io/). ### Setup repository diff --git a/plugins/browser-plugin-privacy-sandbox/README.md b/plugins/browser-plugin-privacy-sandbox/README.md index ec680e6e4..49f25b03c 100644 --- a/plugins/browser-plugin-privacy-sandbox/README.md +++ b/plugins/browser-plugin-privacy-sandbox/README.md @@ -16,7 +16,7 @@ __Note:__ Some of the APIs and data will not be available by default in all user ## Maintainer quick start Part of the Snowplow JavaScript Tracker monorepo. -Build with [Node.js](https://nodejs.org/en/) (14 or 16) and [Rush](https://rushjs.io/). +Build with [Node.js](https://nodejs.org/en/) (18 - 20) and [Rush](https://rushjs.io/). ### Setup repository diff --git a/plugins/browser-plugin-site-tracking/README.md b/plugins/browser-plugin-site-tracking/README.md index 6824a94c1..ad272e346 100644 --- a/plugins/browser-plugin-site-tracking/README.md +++ b/plugins/browser-plugin-site-tracking/README.md @@ -10,7 +10,7 @@ Adds site tracking based events to your Snowplow tracking. ## Maintainer quick start Part of the Snowplow JavaScript Tracker monorepo. -Build with [Node.js](https://nodejs.org/en/) (14 or 16) and [Rush](https://rushjs.io/). +Build with [Node.js](https://nodejs.org/en/) (18 - 20) and [Rush](https://rushjs.io/). ### Setup repository diff --git a/plugins/browser-plugin-snowplow-ecommerce/README.md b/plugins/browser-plugin-snowplow-ecommerce/README.md index ccd084dd8..78479bb03 100644 --- a/plugins/browser-plugin-snowplow-ecommerce/README.md +++ b/plugins/browser-plugin-snowplow-ecommerce/README.md @@ -10,7 +10,7 @@ This plugin is the recommended way to track ecommerce events on your store. Func ## Maintainer quick start Part of the Snowplow JavaScript Tracker monorepo. -Build with [Node.js](https://nodejs.org/en/) (14 or 16) and [Rush](https://rushjs.io/). +Build with [Node.js](https://nodejs.org/en/) (18 - 20) and [Rush](https://rushjs.io/). ### Setup repository diff --git a/plugins/browser-plugin-timezone/README.md b/plugins/browser-plugin-timezone/README.md index f64c2f959..bc50bd85d 100644 --- a/plugins/browser-plugin-timezone/README.md +++ b/plugins/browser-plugin-timezone/README.md @@ -10,7 +10,7 @@ Adds Timezone information to your Snowplow tracking. ## Maintainer quick start Part of the Snowplow JavaScript Tracker monorepo. -Build with [Node.js](https://nodejs.org/en/) (14 or 16) and [Rush](https://rushjs.io/). +Build with [Node.js](https://nodejs.org/en/) (18 - 20) and [Rush](https://rushjs.io/). ### Setup repository diff --git a/plugins/browser-plugin-vimeo-tracking/README.md b/plugins/browser-plugin-vimeo-tracking/README.md index e89392e6f..c6cff05a8 100644 --- a/plugins/browser-plugin-vimeo-tracking/README.md +++ b/plugins/browser-plugin-vimeo-tracking/README.md @@ -10,7 +10,7 @@ This plugin enables automatic tracking of Vimeo videos, utilizing the [Snowplow ## Maintainer quick start Part of the Snowplow JavaScript Tracker monorepo. -Build with [Node.js](https://nodejs.org/en/) (14 or 16) and [Rush](https://rushjs.io/). +Build with [Node.js](https://nodejs.org/en/) (18 - 20) and [Rush](https://rushjs.io/). ### Setup repository diff --git a/plugins/browser-plugin-web-vitals/README.md b/plugins/browser-plugin-web-vitals/README.md index 492c4d7c1..94917f7e5 100644 --- a/plugins/browser-plugin-web-vitals/README.md +++ b/plugins/browser-plugin-web-vitals/README.md @@ -10,7 +10,7 @@ The plugin adds the capability to track web performance metrics categorized as [ ## Maintainer quick start Part of the Snowplow JavaScript Tracker monorepo. -Build with [Node.js](https://nodejs.org/en/) (14 or 16) and [Rush](https://rushjs.io/). +Build with [Node.js](https://nodejs.org/en/) (18 - 20) and [Rush](https://rushjs.io/). ### Setup repository diff --git a/plugins/browser-plugin-youtube-tracking/README.md b/plugins/browser-plugin-youtube-tracking/README.md index 9b5e672ca..fee1ba843 100644 --- a/plugins/browser-plugin-youtube-tracking/README.md +++ b/plugins/browser-plugin-youtube-tracking/README.md @@ -10,7 +10,7 @@ Adds YouTube Video and Audio tracking events to your Snowplow tracking. ## Maintainer quick start Part of the Snowplow JavaScript Tracker monorepo. -Build with [Node.js](https://nodejs.org/en/) (14 or 16) and [Rush](https://rushjs.io/). +Build with [Node.js](https://nodejs.org/en/) (18 - 20) and [Rush](https://rushjs.io/). ### Setup repository @@ -88,4 +88,4 @@ All rights reserved. [npm-image]: https://img.shields.io/npm/v/@snowplow/browser-plugin-form-tracking [docs]: https://docs.snowplowanalytics.com/docs/collecting-data/collecting-from-own-applications/javascript-tracker/ [osi]: https://opensource.org/licenses/BSD-3-Clause -[license-image]: https://img.shields.io/npm/l/@snowplow/browser-plugin-form-tracking \ No newline at end of file +[license-image]: https://img.shields.io/npm/l/@snowplow/browser-plugin-form-tracking diff --git a/rush.json b/rush.json index d9ee7428d..488c0fcc3 100644 --- a/rush.json +++ b/rush.json @@ -16,7 +16,7 @@ * path segment in the "$schema" field for all your Rush config files. This will ensure * correct error-underlining and tab-completion for editors such as VS Code. */ - "rushVersion": "5.76.1", + "rushVersion": "5.133.3", /** * The next field selects which package manager should be installed and determines its version. @@ -118,7 +118,7 @@ * Specify a SemVer range to ensure developers use a Node.js version that is appropriate * for your repo. */ - "nodeSupportedVersionRange": ">=14.15.0 <15.0.0 || >=16.16.0 <17.0.0", + "nodeSupportedVersionRange": ">=18.0.0 <21.0.0", /** * Odd-numbered major versions of Node.js are experimental. Even-numbered releases diff --git a/trackers/browser-tracker/README.md b/trackers/browser-tracker/README.md index ac203e757..3156a6394 100644 --- a/trackers/browser-tracker/README.md +++ b/trackers/browser-tracker/README.md @@ -8,7 +8,7 @@ Add Snowplow Tracking to your Web Application with `@snowplow/browser-tracker`. ## Maintainer quick start Part of the Snowplow JavaScript Tracker monorepo. -Build with [Node.js](https://nodejs.org/en/) (14 or 16) and [Rush](https://rushjs.io/). +Build with [Node.js](https://nodejs.org/en/) (18 - 20) and [Rush](https://rushjs.io/). ### Setup repository diff --git a/trackers/javascript-tracker/README.md b/trackers/javascript-tracker/README.md index ad82eebc6..c79e75ead 100644 --- a/trackers/javascript-tracker/README.md +++ b/trackers/javascript-tracker/README.md @@ -8,7 +8,7 @@ Add Snowplow Tracking to your website via a tag solution. ## Maintainer quick start Part of the Snowplow JavaScript Tracker monorepo. -Build with [Node.js](https://nodejs.org/en/) (14 or 16) and [Rush](https://rushjs.io/). +Build with [Node.js](https://nodejs.org/en/) (18 - 20) and [Rush](https://rushjs.io/). ### Setup repository diff --git a/trackers/node-tracker/README.md b/trackers/node-tracker/README.md index 80b0280ab..1fab0a5ab 100644 --- a/trackers/node-tracker/README.md +++ b/trackers/node-tracker/README.md @@ -8,7 +8,7 @@ Add Snowplow Tracking to your Node.js Application with `@snowplow/node-tracker`. ## Maintainer quick start Part of the Snowplow JavaScript Tracker monorepo. -Build with [Node.js](https://nodejs.org/en/) (14 or 16) and [Rush](https://rushjs.io/). +Build with [Node.js](https://nodejs.org/en/) (18 - 20) and [Rush](https://rushjs.io/). ### Setup repository