From 52c53b7c8d4ec94e5adf5ccec14d790df19d9c34 Mon Sep 17 00:00:00 2001 From: Renovate Bot Date: Thu, 25 Jan 2024 03:04:11 +0000 Subject: [PATCH 1/2] Update dependency husky to v9 --- package-lock.json | 36 ++++++++++++++++++------------------ package.json | 2 +- 2 files changed, 19 insertions(+), 19 deletions(-) diff --git a/package-lock.json b/package-lock.json index 70b113010..3062d02bd 100644 --- a/package-lock.json +++ b/package-lock.json @@ -8,22 +8,22 @@ "name": "gb3-frontend", "version": "0.0.0", "dependencies": { - "@angular-devkit/build-angular": "^17.1.0", + "@angular-devkit/build-angular": "^17.1.1", "@angular-eslint/schematics": "^17.0.0", "@angular-eslint/template-parser": "^17.0.0", - "@angular/animations": "^17.1.0", + "@angular/animations": "^17.1.1", "@angular/cdk": "^17.1.0", - "@angular/cli": "^17.1.0", - "@angular/common": "^17.1.0", - "@angular/compiler": "^17.1.0", - "@angular/compiler-cli": "^17.1.0", - "@angular/core": "^17.1.0", - "@angular/forms": "^17.1.0", - "@angular/localize": "^17.1.0", + "@angular/cli": "^17.1.1", + "@angular/common": "^17.1.1", + "@angular/compiler": "^17.1.1", + "@angular/compiler-cli": "^17.1.1", + "@angular/core": "^17.1.1", + "@angular/forms": "^17.1.1", + "@angular/localize": "^17.1.1", "@angular/material": "^17.1.0", - "@angular/platform-browser": "^17.1.0", - "@angular/platform-browser-dynamic": "^17.1.0", - "@angular/router": "^17.1.0", + "@angular/platform-browser": "^17.1.1", + "@angular/platform-browser-dynamic": "^17.1.1", + "@angular/router": "^17.1.1", "@arcgis/core": "~4.28.0", "@ngrx/effects": "^17.0.0", "@ngrx/entity": "^17.0.0", @@ -60,7 +60,7 @@ "eslint-plugin-prettier": "^5.0.0", "eslint-plugin-rxjs": "^5.0.2", "eslint-plugin-rxjs-angular": "^2.0.0", - "husky": "^8.0.1", + "husky": "^9.0.0", "jasmine-core": "~5.1.0", "karma": "~6.4.0", "karma-chrome-launcher": "~3.2.0", @@ -10383,15 +10383,15 @@ } }, "node_modules/husky": { - "version": "8.0.3", - "resolved": "https://registry.npmjs.org/husky/-/husky-8.0.3.tgz", - "integrity": "sha512-+dQSyqPh4x1hlO1swXBiNb2HzTDN1I2IGLQx1GrBuiqFJfoMrnZWwVmatvSiO+Iz8fBUnf+lekwNo4c2LlXItg==", + "version": "9.0.1", + "resolved": "https://registry.npmjs.org/husky/-/husky-9.0.1.tgz", + "integrity": "sha512-rXCT8yF2v3awSG03AG6IgICDhJ+m8o3jL1ROwsT4nQZ6urEyKSj0IWFDIh5YC2zgZeAxWksNMbN6rYY4BE1Zrw==", "dev": true, "bin": { - "husky": "lib/bin.js" + "husky": "bin.js" }, "engines": { - "node": ">=14" + "node": ">=18" }, "funding": { "url": "https://github.com/sponsors/typicode" diff --git a/package.json b/package.json index adc211573..caf027dc2 100644 --- a/package.json +++ b/package.json @@ -77,7 +77,7 @@ "eslint-plugin-prettier": "^5.0.0", "eslint-plugin-rxjs": "^5.0.2", "eslint-plugin-rxjs-angular": "^2.0.0", - "husky": "^8.0.1", + "husky": "^9.0.0", "jasmine-core": "~5.1.0", "karma": "~6.4.0", "karma-chrome-launcher": "~3.2.0", From 2ce22a301aa9790d0bb2b9a4943f12edfe3c1f34 Mon Sep 17 00:00:00 2001 From: Sebastian Wendland Date: Mon, 29 Jan 2024 09:26:55 +0100 Subject: [PATCH 2/2] Modified `prepare.js` by renaming it to `prepare.mjs` and upgrading the husky installation mechanic to use ESM import instead of the old CommonJS require. --- package.json | 2 +- prepare.js => prepare.mjs | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) rename prepare.js => prepare.mjs (72%) diff --git a/package.json b/package.json index caf027dc2..7fb1b975f 100644 --- a/package.json +++ b/package.json @@ -15,7 +15,7 @@ "watch": "ng build --configuration development", "test": "ng test", "test-ci": "ng test --no-watch --no-progress --code-coverage", - "prepare": "node ./prepare.js", + "prepare": "node ./prepare.mjs", "update-version": "node ./update-version.js", "format-all": "prettier --write ./src", "generate-gb3-api": "npx swagger-typescript-api -p https://maps.zh.ch/api-docs/gb3/v1/swagger.yaml -o ./src/app/shared/models -n gb3-api-generated.interfaces.ts --no-client --extract-response-body --extract-request-body --extract-request-body && node ./remove-generated-api-version-references.js ./src/app/shared/models/gb3-api-generated.interfaces.ts" diff --git a/prepare.js b/prepare.mjs similarity index 72% rename from prepare.js rename to prepare.mjs index 40c5c97a2..64b569407 100644 --- a/prepare.js +++ b/prepare.mjs @@ -7,9 +7,10 @@ * Install husky only if the npm was called without omitting 'dev' * Or in other words: install husky only in a development environment * - * For more information see: https://typicode.github.io/husky/#/?id=with-a-custom-script + * For more information see: https://typicode.github.io/husky/how-to.html#ci-server-and-docker */ const installHusky = process.env.npm_config_omit !== 'dev'; if (installHusky) { - require('husky').install(); + const husky = (await import('husky')).default; + console.log(husky()); }