diff --git a/.github/workflows/ci_release.yml b/.github/workflows/ci_release.yml index 560c4af7..a2d26dcf 100644 --- a/.github/workflows/ci_release.yml +++ b/.github/workflows/ci_release.yml @@ -46,54 +46,3 @@ jobs: working-directory: 'projects/${{ inputs.package }}' dry-run: ${{ inputs.dry-run }} release: true - - ci_sync_peer_deps: - needs: ci_release - runs-on: 'ubuntu-latest' - steps: - - name: Checkout sources - uses: actions/checkout@v4 - with: - ref: ${{ github.ref_name }} # https://github.com/actions/checkout/issues/1327 - persist-credentials: false # https://github.com/semantic-release/semantic-release/issues/2636 - - - name: Synchronize peer dependencies - working-directory: 'scripts' - env: - GITHUB_TOKEN: ${{ secrets.DSI_HUG_BOT_GITHUB_TOKEN }} - run: | - git config user.name 'dsi-hug-bot' - git config user.email 'dsi-hug-bot@users.noreply.github.com' - git remote set-url origin https://x-access-token:${{ secrets.DSI_HUG_BOT_GITHUB_TOKEN }}@github.com/${{ github.repository }} - npm --prefix . i chalk - node ./sync-peer-deps.mjs - - # - # nx does not update package-lock file correctly. - # @see https://github.com/nrwl/nx/issues/26660 - # - # This results in the following error, next time deps are installed: - # “npm error `npm ci` can only install packages when your package.json and package-lock.json or - # npm-shrinkwrap.json are in sync. Please update your lock file with `npm install` before continuing." - # - ci_update_package_lock_file: - needs: ci_sync_peer_deps - runs-on: 'ubuntu-latest' - steps: - - name: Checkout sources - uses: actions/checkout@v4 - with: - ref: ${{ github.ref_name }} # https://github.com/actions/checkout/issues/1327 - persist-credentials: false # https://github.com/semantic-release/semantic-release/issues/2636 - - - name: Synchronize package.json and package-lock.json - env: - GITHUB_TOKEN: ${{ secrets.DSI_HUG_BOT_GITHUB_TOKEN }} - run: | - git config user.name 'dsi-hug-bot' - git config user.email 'dsi-hug-bot@users.noreply.github.com' - git remote set-url origin https://x-access-token:${{ secrets.DSI_HUG_BOT_GITHUB_TOKEN }}@github.com/${{ github.repository }} - npm install - git add package.json package-lock.json - git commit --message "chore: synchronize package.json and package-lock.json" - git push --follow-tags --no-verify --atomic diff --git a/nx.json b/nx.json index 67adef24..0e9e9393 100644 --- a/nx.json +++ b/nx.json @@ -5,21 +5,10 @@ "dependsOn": [ "^build:ng" ] - }, - "nx-release-publish": { - "dependsOn": [ - "build" - ], - "options": { - "packageRoot": "{workspaceRoot}/dist/{projectRoot}" - } } }, "release": { "projectsRelationship": "independent", - "git": { - "commitMessage": "chore({projectName}): release version {version} [skip ci]" - }, "version": { "conventionalCommits": true }, diff --git a/package-lock.json b/package-lock.json index 67b8c458..7e3934d8 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,5 +1,5 @@ { - "name": "ngx-components", + "name": "@hug/ngx-components", "lockfileVersion": 3, "requires": true, "packages": { @@ -3639,9 +3639,10 @@ }, "node_modules/@commitlint/load/node_modules/typescript": { "version": "5.5.3", - "resolved": "https://nxrm.hisaas.hcuge.ch/repository/npm-all/typescript/-/typescript-5.5.3.tgz", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.5.3.tgz", "integrity": "sha512-/hreyEujaB0w76zKo6717l3L0o/qEUtRgdvUBvlkhoWeOVMjMuHNHk0BRBzikzuGDqNmPQbg5ifMEqsHLiIUcQ==", "dev": true, + "license": "Apache-2.0", "peer": true, "bin": { "tsc": "bin/tsc", @@ -4245,9 +4246,10 @@ }, "node_modules/@eslint/eslintrc": { "version": "2.1.4", - "resolved": "https://nxrm.hisaas.hcuge.ch/repository/npm-all/@eslint/eslintrc/-/eslintrc-2.1.4.tgz", + "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-2.1.4.tgz", "integrity": "sha512-269Z39MS6wVJtsoUl10L60WdkhJVdPG24Q4eZTH3nnF6lpvSShEK3wQjDX9JRWAUPvPh7COouPpU9IrqaZFvtQ==", "dev": true, + "license": "MIT", "peer": true, "dependencies": { "ajv": "^6.12.4", @@ -4269,9 +4271,10 @@ }, "node_modules/@eslint/eslintrc/node_modules/ajv": { "version": "6.12.6", - "resolved": "https://nxrm.hisaas.hcuge.ch/repository/npm-all/ajv/-/ajv-6.12.6.tgz", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==", "dev": true, + "license": "MIT", "peer": true, "dependencies": { "fast-deep-equal": "^3.1.1", @@ -4286,16 +4289,18 @@ }, "node_modules/@eslint/eslintrc/node_modules/argparse": { "version": "2.0.1", - "resolved": "https://nxrm.hisaas.hcuge.ch/repository/npm-all/argparse/-/argparse-2.0.1.tgz", + "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==", "dev": true, + "license": "Python-2.0", "peer": true }, "node_modules/@eslint/eslintrc/node_modules/brace-expansion": { "version": "1.1.11", - "resolved": "https://nxrm.hisaas.hcuge.ch/repository/npm-all/brace-expansion/-/brace-expansion-1.1.11.tgz", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", "dev": true, + "license": "MIT", "peer": true, "dependencies": { "balanced-match": "^1.0.0", @@ -4304,9 +4309,10 @@ }, "node_modules/@eslint/eslintrc/node_modules/globals": { "version": "13.24.0", - "resolved": "https://nxrm.hisaas.hcuge.ch/repository/npm-all/globals/-/globals-13.24.0.tgz", + "resolved": "https://registry.npmjs.org/globals/-/globals-13.24.0.tgz", "integrity": "sha512-AhO5QUcj8llrbG09iWhPU2B204J1xnPeL8kQmVorSsy+Sjj1sk8gIyh6cUocGmH4L0UuhAJy+hJMRA4mgA4mFQ==", "dev": true, + "license": "MIT", "peer": true, "dependencies": { "type-fest": "^0.20.2" @@ -4320,9 +4326,10 @@ }, "node_modules/@eslint/eslintrc/node_modules/js-yaml": { "version": "4.1.0", - "resolved": "https://nxrm.hisaas.hcuge.ch/repository/npm-all/js-yaml/-/js-yaml-4.1.0.tgz", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz", "integrity": "sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==", "dev": true, + "license": "MIT", "peer": true, "dependencies": { "argparse": "^2.0.1" @@ -4333,16 +4340,18 @@ }, "node_modules/@eslint/eslintrc/node_modules/json-schema-traverse": { "version": "0.4.1", - "resolved": "https://nxrm.hisaas.hcuge.ch/repository/npm-all/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", + "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==", "dev": true, + "license": "MIT", "peer": true }, "node_modules/@eslint/eslintrc/node_modules/minimatch": { "version": "3.1.2", - "resolved": "https://nxrm.hisaas.hcuge.ch/repository/npm-all/minimatch/-/minimatch-3.1.2.tgz", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", "dev": true, + "license": "ISC", "peer": true, "dependencies": { "brace-expansion": "^1.1.7" @@ -4353,9 +4362,10 @@ }, "node_modules/@eslint/eslintrc/node_modules/type-fest": { "version": "0.20.2", - "resolved": "https://nxrm.hisaas.hcuge.ch/repository/npm-all/type-fest/-/type-fest-0.20.2.tgz", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.20.2.tgz", "integrity": "sha512-Ne+eE4r0/iWnpAxD852z3A+N0Bt5RN//NjJwRd2VFHEmrywxf5vsZlh4R6lixl6B+wz/8d+maTSAkN1FIkI3LQ==", "dev": true, + "license": "(MIT OR CC0-1.0)", "peer": true, "engines": { "node": ">=10" @@ -4366,9 +4376,10 @@ }, "node_modules/@eslint/js": { "version": "8.57.0", - "resolved": "https://nxrm.hisaas.hcuge.ch/repository/npm-all/@eslint/js/-/js-8.57.0.tgz", + "resolved": "https://registry.npmjs.org/@eslint/js/-/js-8.57.0.tgz", "integrity": "sha512-Ys+3g2TaW7gADOJzPt83SJtCDhMjndcDMFVQ/Tj9iA1BfJzFKD9mAUXT3OenpuPHbI6P/myECxRJrofUsDx/5g==", "dev": true, + "license": "MIT", "peer": true, "engines": { "node": "^12.22.0 || ^14.17.0 || >=16.0.0" @@ -4530,10 +4541,11 @@ }, "node_modules/@humanwhocodes/config-array": { "version": "0.11.14", - "resolved": "https://nxrm.hisaas.hcuge.ch/repository/npm-all/@humanwhocodes/config-array/-/config-array-0.11.14.tgz", + "resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.11.14.tgz", "integrity": "sha512-3T8LkOmg45BV5FICb15QQMsyUSWrQ8AygVfC7ZG32zOalnqrilm018ZVCw0eapXux8FtA33q8PSRSstjee3jSg==", "deprecated": "Use @eslint/config-array instead", "dev": true, + "license": "Apache-2.0", "peer": true, "dependencies": { "@humanwhocodes/object-schema": "^2.0.2", @@ -4546,9 +4558,10 @@ }, "node_modules/@humanwhocodes/config-array/node_modules/brace-expansion": { "version": "1.1.11", - "resolved": "https://nxrm.hisaas.hcuge.ch/repository/npm-all/brace-expansion/-/brace-expansion-1.1.11.tgz", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", "dev": true, + "license": "MIT", "peer": true, "dependencies": { "balanced-match": "^1.0.0", @@ -4557,9 +4570,10 @@ }, "node_modules/@humanwhocodes/config-array/node_modules/minimatch": { "version": "3.1.2", - "resolved": "https://nxrm.hisaas.hcuge.ch/repository/npm-all/minimatch/-/minimatch-3.1.2.tgz", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", "dev": true, + "license": "ISC", "peer": true, "dependencies": { "brace-expansion": "^1.1.7" @@ -4570,9 +4584,10 @@ }, "node_modules/@humanwhocodes/module-importer": { "version": "1.0.1", - "resolved": "https://nxrm.hisaas.hcuge.ch/repository/npm-all/@humanwhocodes/module-importer/-/module-importer-1.0.1.tgz", + "resolved": "https://registry.npmjs.org/@humanwhocodes/module-importer/-/module-importer-1.0.1.tgz", "integrity": "sha512-bxveV4V8v5Yb4ncFTT3rPSgZBOpCkjfK0y4oVVVJwIuDVBRMDXrPyXRL988i5ap9m9bnyEEjWfm5WkBmtffLfA==", "dev": true, + "license": "Apache-2.0", "peer": true, "engines": { "node": ">=12.22" @@ -4584,10 +4599,11 @@ }, "node_modules/@humanwhocodes/object-schema": { "version": "2.0.3", - "resolved": "https://nxrm.hisaas.hcuge.ch/repository/npm-all/@humanwhocodes/object-schema/-/object-schema-2.0.3.tgz", + "resolved": "https://registry.npmjs.org/@humanwhocodes/object-schema/-/object-schema-2.0.3.tgz", "integrity": "sha512-93zYdMES/c1D69yZiKDBj0V24vqNzB/koF26KPaagAfd3P/4gUlh3Dys5ogAK+Exi9QyzlD8x/08Zt7wIKcDcA==", "deprecated": "Use @eslint/object-schema instead", "dev": true, + "license": "BSD-3-Clause", "peer": true }, "node_modules/@istanbuljs/load-nyc-config": { @@ -7351,9 +7367,10 @@ }, "node_modules/@ungap/structured-clone": { "version": "1.2.0", - "resolved": "https://nxrm.hisaas.hcuge.ch/repository/npm-all/@ungap/structured-clone/-/structured-clone-1.2.0.tgz", + "resolved": "https://registry.npmjs.org/@ungap/structured-clone/-/structured-clone-1.2.0.tgz", "integrity": "sha512-zuVdFrMJiuCDQUMCzQaD6KL28MjnqqN8XnAqiEq9PNm/hCPTSGfrXCOfwj1ow4LFb/tNymJPwsNbVePc1xFqrQ==", "dev": true, + "license": "ISC", "peer": true }, "node_modules/@webassemblyjs/ast": { @@ -9958,9 +9975,10 @@ }, "node_modules/deep-is": { "version": "0.1.4", - "resolved": "https://nxrm.hisaas.hcuge.ch/repository/npm-all/deep-is/-/deep-is-0.1.4.tgz", + "resolved": "https://registry.npmjs.org/deep-is/-/deep-is-0.1.4.tgz", "integrity": "sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ==", "dev": true, + "license": "MIT", "peer": true }, "node_modules/deepmerge": { @@ -10193,9 +10211,10 @@ }, "node_modules/doctrine": { "version": "3.0.0", - "resolved": "https://nxrm.hisaas.hcuge.ch/repository/npm-all/doctrine/-/doctrine-3.0.0.tgz", + "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-3.0.0.tgz", "integrity": "sha512-yS+Q5i3hBf7GBkd4KG8a7eBNNWNGLTaEwwYWUijIYM7zrlYDM0BFXHjjPWlWZ1Rg7UaddZeIDmi9jF3HmqiQ2w==", "dev": true, + "license": "Apache-2.0", "peer": true, "dependencies": { "esutils": "^2.0.2" @@ -11101,9 +11120,10 @@ }, "node_modules/eslint": { "version": "8.57.0", - "resolved": "https://nxrm.hisaas.hcuge.ch/repository/npm-all/eslint/-/eslint-8.57.0.tgz", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.57.0.tgz", "integrity": "sha512-dZ6+mexnaTIbSBZWgou51U6OmzIhYM2VcNdtiTtI7qPNZm35Akpr0f6vtw3w1Kmn5PYo+tZVfh13WrhpS6oLqQ==", "dev": true, + "license": "MIT", "peer": true, "dependencies": { "@eslint-community/eslint-utils": "^4.2.0", @@ -11635,9 +11655,10 @@ }, "node_modules/eslint/node_modules/ajv": { "version": "6.12.6", - "resolved": "https://nxrm.hisaas.hcuge.ch/repository/npm-all/ajv/-/ajv-6.12.6.tgz", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==", "dev": true, + "license": "MIT", "peer": true, "dependencies": { "fast-deep-equal": "^3.1.1", @@ -11652,9 +11673,10 @@ }, "node_modules/eslint/node_modules/ansi-styles": { "version": "4.3.0", - "resolved": "https://nxrm.hisaas.hcuge.ch/repository/npm-all/ansi-styles/-/ansi-styles-4.3.0.tgz", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", "dev": true, + "license": "MIT", "peer": true, "dependencies": { "color-convert": "^2.0.1" @@ -11668,16 +11690,18 @@ }, "node_modules/eslint/node_modules/argparse": { "version": "2.0.1", - "resolved": "https://nxrm.hisaas.hcuge.ch/repository/npm-all/argparse/-/argparse-2.0.1.tgz", + "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==", "dev": true, + "license": "Python-2.0", "peer": true }, "node_modules/eslint/node_modules/brace-expansion": { "version": "1.1.11", - "resolved": "https://nxrm.hisaas.hcuge.ch/repository/npm-all/brace-expansion/-/brace-expansion-1.1.11.tgz", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", "dev": true, + "license": "MIT", "peer": true, "dependencies": { "balanced-match": "^1.0.0", @@ -11686,9 +11710,10 @@ }, "node_modules/eslint/node_modules/chalk": { "version": "4.1.2", - "resolved": "https://nxrm.hisaas.hcuge.ch/repository/npm-all/chalk/-/chalk-4.1.2.tgz", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", "dev": true, + "license": "MIT", "peer": true, "dependencies": { "ansi-styles": "^4.1.0", @@ -11703,9 +11728,10 @@ }, "node_modules/eslint/node_modules/color-convert": { "version": "2.0.1", - "resolved": "https://nxrm.hisaas.hcuge.ch/repository/npm-all/color-convert/-/color-convert-2.0.1.tgz", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", "dev": true, + "license": "MIT", "peer": true, "dependencies": { "color-name": "~1.1.4" @@ -11716,16 +11742,18 @@ }, "node_modules/eslint/node_modules/color-name": { "version": "1.1.4", - "resolved": "https://nxrm.hisaas.hcuge.ch/repository/npm-all/color-name/-/color-name-1.1.4.tgz", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", "dev": true, + "license": "MIT", "peer": true }, "node_modules/eslint/node_modules/escape-string-regexp": { "version": "4.0.0", - "resolved": "https://nxrm.hisaas.hcuge.ch/repository/npm-all/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz", "integrity": "sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==", "dev": true, + "license": "MIT", "peer": true, "engines": { "node": ">=10" @@ -11736,9 +11764,10 @@ }, "node_modules/eslint/node_modules/eslint-scope": { "version": "7.2.2", - "resolved": "https://nxrm.hisaas.hcuge.ch/repository/npm-all/eslint-scope/-/eslint-scope-7.2.2.tgz", + "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-7.2.2.tgz", "integrity": "sha512-dOt21O7lTMhDM+X9mB4GX+DZrZtCUJPL/wlcTqxyrx5IvO0IYtILdtrQGQp+8n5S0gwSVmOf9NQrjMOgfQZlIg==", "dev": true, + "license": "BSD-2-Clause", "peer": true, "dependencies": { "esrecurse": "^4.3.0", @@ -11753,9 +11782,10 @@ }, "node_modules/eslint/node_modules/glob-parent": { "version": "6.0.2", - "resolved": "https://nxrm.hisaas.hcuge.ch/repository/npm-all/glob-parent/-/glob-parent-6.0.2.tgz", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-6.0.2.tgz", "integrity": "sha512-XxwI8EOhVQgWp6iDL+3b0r86f4d6AX6zSU55HfB4ydCEuXLXc5FcYeOu+nnGftS4TEju/11rt4KJPTMgbfmv4A==", "dev": true, + "license": "ISC", "peer": true, "dependencies": { "is-glob": "^4.0.3" @@ -11766,9 +11796,10 @@ }, "node_modules/eslint/node_modules/globals": { "version": "13.24.0", - "resolved": "https://nxrm.hisaas.hcuge.ch/repository/npm-all/globals/-/globals-13.24.0.tgz", + "resolved": "https://registry.npmjs.org/globals/-/globals-13.24.0.tgz", "integrity": "sha512-AhO5QUcj8llrbG09iWhPU2B204J1xnPeL8kQmVorSsy+Sjj1sk8gIyh6cUocGmH4L0UuhAJy+hJMRA4mgA4mFQ==", "dev": true, + "license": "MIT", "peer": true, "dependencies": { "type-fest": "^0.20.2" @@ -11782,9 +11813,10 @@ }, "node_modules/eslint/node_modules/has-flag": { "version": "4.0.0", - "resolved": "https://nxrm.hisaas.hcuge.ch/repository/npm-all/has-flag/-/has-flag-4.0.0.tgz", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", "dev": true, + "license": "MIT", "peer": true, "engines": { "node": ">=8" @@ -11792,9 +11824,10 @@ }, "node_modules/eslint/node_modules/js-yaml": { "version": "4.1.0", - "resolved": "https://nxrm.hisaas.hcuge.ch/repository/npm-all/js-yaml/-/js-yaml-4.1.0.tgz", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz", "integrity": "sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==", "dev": true, + "license": "MIT", "peer": true, "dependencies": { "argparse": "^2.0.1" @@ -11805,16 +11838,18 @@ }, "node_modules/eslint/node_modules/json-schema-traverse": { "version": "0.4.1", - "resolved": "https://nxrm.hisaas.hcuge.ch/repository/npm-all/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", + "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==", "dev": true, + "license": "MIT", "peer": true }, "node_modules/eslint/node_modules/minimatch": { "version": "3.1.2", - "resolved": "https://nxrm.hisaas.hcuge.ch/repository/npm-all/minimatch/-/minimatch-3.1.2.tgz", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", "dev": true, + "license": "ISC", "peer": true, "dependencies": { "brace-expansion": "^1.1.7" @@ -11825,9 +11860,10 @@ }, "node_modules/eslint/node_modules/supports-color": { "version": "7.2.0", - "resolved": "https://nxrm.hisaas.hcuge.ch/repository/npm-all/supports-color/-/supports-color-7.2.0.tgz", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", "dev": true, + "license": "MIT", "peer": true, "dependencies": { "has-flag": "^4.0.0" @@ -11838,9 +11874,10 @@ }, "node_modules/eslint/node_modules/type-fest": { "version": "0.20.2", - "resolved": "https://nxrm.hisaas.hcuge.ch/repository/npm-all/type-fest/-/type-fest-0.20.2.tgz", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.20.2.tgz", "integrity": "sha512-Ne+eE4r0/iWnpAxD852z3A+N0Bt5RN//NjJwRd2VFHEmrywxf5vsZlh4R6lixl6B+wz/8d+maTSAkN1FIkI3LQ==", "dev": true, + "license": "(MIT OR CC0-1.0)", "peer": true, "engines": { "node": ">=10" @@ -12166,9 +12203,10 @@ }, "node_modules/fast-levenshtein": { "version": "2.0.6", - "resolved": "https://nxrm.hisaas.hcuge.ch/repository/npm-all/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz", + "resolved": "https://registry.npmjs.org/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz", "integrity": "sha512-DCXu6Ifhqcks7TZKY3Hxp3y6qphY5SJZmrWMDrKcERSOXWQdMhU9Ig/PYrzyw/ul9jOIyh0N4M0tbC5hodg8dw==", "dev": true, + "license": "MIT", "peer": true }, "node_modules/fastq": { @@ -12212,9 +12250,10 @@ }, "node_modules/file-entry-cache": { "version": "6.0.1", - "resolved": "https://nxrm.hisaas.hcuge.ch/repository/npm-all/file-entry-cache/-/file-entry-cache-6.0.1.tgz", + "resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-6.0.1.tgz", "integrity": "sha512-7Gps/XWymbLk2QLYK4NzpMOrYjMhdIxXuIvy2QBsLE6ljuodKvdkWs/cpyJJ3CVIVpH0Oi1Hvg1ovbMzLdFBBg==", "dev": true, + "license": "MIT", "peer": true, "dependencies": { "flat-cache": "^3.0.4" @@ -12352,9 +12391,10 @@ }, "node_modules/flat-cache": { "version": "3.2.0", - "resolved": "https://nxrm.hisaas.hcuge.ch/repository/npm-all/flat-cache/-/flat-cache-3.2.0.tgz", + "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-3.2.0.tgz", "integrity": "sha512-CYcENa+FtcUKLmhhqyctpclsq7QF38pKjZHsGNiSQF5r4FtoKDWabFDl3hzaEQMvT1LHEysw5twgLvpYYb4vbw==", "dev": true, + "license": "MIT", "peer": true, "dependencies": { "flatted": "^3.2.9", @@ -13929,9 +13969,10 @@ }, "node_modules/is-path-inside": { "version": "3.0.3", - "resolved": "https://nxrm.hisaas.hcuge.ch/repository/npm-all/is-path-inside/-/is-path-inside-3.0.3.tgz", + "resolved": "https://registry.npmjs.org/is-path-inside/-/is-path-inside-3.0.3.tgz", "integrity": "sha512-Fd4gABb+ycGAmKou8eMftCupSir5lRxqf4aD/vd0cD2qc4HL07OjCeuHMr8Ro4CoMaeCKDB0/ECBOVWjTwUvPQ==", "dev": true, + "license": "MIT", "peer": true, "engines": { "node": ">=8" @@ -14615,9 +14656,10 @@ }, "node_modules/json-buffer": { "version": "3.0.1", - "resolved": "https://nxrm.hisaas.hcuge.ch/repository/npm-all/json-buffer/-/json-buffer-3.0.1.tgz", + "resolved": "https://registry.npmjs.org/json-buffer/-/json-buffer-3.0.1.tgz", "integrity": "sha512-4bV5BfR2mqfQTJm+V5tPPdf+ZpuhiIvTuAB5g8kcrXOZpTT/QwwVRWBywX1ozr6lEuPdbHxwaJlm9G6mI2sfSQ==", "dev": true, + "license": "MIT", "peer": true }, "node_modules/json-parse-even-better-errors": { @@ -14655,9 +14697,10 @@ }, "node_modules/json-stable-stringify-without-jsonify": { "version": "1.0.1", - "resolved": "https://nxrm.hisaas.hcuge.ch/repository/npm-all/json-stable-stringify-without-jsonify/-/json-stable-stringify-without-jsonify-1.0.1.tgz", + "resolved": "https://registry.npmjs.org/json-stable-stringify-without-jsonify/-/json-stable-stringify-without-jsonify-1.0.1.tgz", "integrity": "sha512-Bdboy+l7tA3OGW6FjyFHWkP5LuByj1Tk33Ljyq0axyzdk9//JSi2u3fP1QSmd1KNwq6VOKYGlAu87CisVir6Pw==", "dev": true, + "license": "MIT", "peer": true }, "node_modules/json5": { @@ -15003,9 +15046,10 @@ }, "node_modules/keyv": { "version": "4.5.4", - "resolved": "https://nxrm.hisaas.hcuge.ch/repository/npm-all/keyv/-/keyv-4.5.4.tgz", + "resolved": "https://registry.npmjs.org/keyv/-/keyv-4.5.4.tgz", "integrity": "sha512-oxVHkHR/EJf2CNXnWxRLW6mg7JyCCUcG0DtEGmL2ctUo1PNTin1PUil+r/+4r5MpVgC/fn1kjsx7mjSujKqIpw==", "dev": true, + "license": "MIT", "peer": true, "dependencies": { "json-buffer": "3.0.1" @@ -15163,9 +15207,10 @@ }, "node_modules/levn": { "version": "0.4.1", - "resolved": "https://nxrm.hisaas.hcuge.ch/repository/npm-all/levn/-/levn-0.4.1.tgz", + "resolved": "https://registry.npmjs.org/levn/-/levn-0.4.1.tgz", "integrity": "sha512-+bT2uH4E5LGE7h/n3evcS/sQlJXCpIp6ym8OWJ5eV6+67Dsql/LaaT7qJBAt2rzfoa/5QBGBhxDix1dMt2kQKQ==", "dev": true, + "license": "MIT", "peer": true, "dependencies": { "prelude-ls": "^1.2.1", @@ -17324,9 +17369,10 @@ }, "node_modules/optionator": { "version": "0.9.4", - "resolved": "https://nxrm.hisaas.hcuge.ch/repository/npm-all/optionator/-/optionator-0.9.4.tgz", + "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.9.4.tgz", "integrity": "sha512-6IpQ7mKUxRcZNLIObR0hz7lxsapSSIYNZJwXPGeF0mTVqGKFIXj1DQcMoT22S3ROcLyY/rz0PWaWZ9ayWmad9g==", "dev": true, + "license": "MIT", "peer": true, "dependencies": { "deep-is": "^0.1.3", @@ -18890,9 +18936,10 @@ }, "node_modules/prelude-ls": { "version": "1.2.1", - "resolved": "https://nxrm.hisaas.hcuge.ch/repository/npm-all/prelude-ls/-/prelude-ls-1.2.1.tgz", + "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.2.1.tgz", "integrity": "sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g==", "dev": true, + "license": "MIT", "peer": true, "engines": { "node": ">= 0.8.0" @@ -21029,9 +21076,10 @@ }, "node_modules/strip-json-comments": { "version": "3.1.1", - "resolved": "https://nxrm.hisaas.hcuge.ch/repository/npm-all/strip-json-comments/-/strip-json-comments-3.1.1.tgz", + "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.1.1.tgz", "integrity": "sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==", "dev": true, + "license": "MIT", "peer": true, "engines": { "node": ">=8" @@ -21709,9 +21757,10 @@ }, "node_modules/type-check": { "version": "0.4.0", - "resolved": "https://nxrm.hisaas.hcuge.ch/repository/npm-all/type-check/-/type-check-0.4.0.tgz", + "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.4.0.tgz", "integrity": "sha512-XleUoc9uwGXqjWwXaUTZAmzMcFZ5858QA2vvx1Ur5xIcixXIP+8LnFDgRplU30us6teqdlskFfu+ae4K79Ooew==", "dev": true, + "license": "MIT", "peer": true, "dependencies": { "prelude-ls": "^1.2.1" @@ -22535,9 +22584,10 @@ }, "node_modules/word-wrap": { "version": "1.2.5", - "resolved": "https://nxrm.hisaas.hcuge.ch/repository/npm-all/word-wrap/-/word-wrap-1.2.5.tgz", + "resolved": "https://registry.npmjs.org/word-wrap/-/word-wrap-1.2.5.tgz", "integrity": "sha512-BN22B5eaMMI9UMtjrGd5g5eCYPpCPDUy0FJXbYsaT5zYxjFOckS53SQDE3pWkVoWpHXVb3BrYcEN4Twa55B5cA==", "dev": true, + "license": "MIT", "peer": true, "engines": { "node": ">=0.10.0" @@ -22941,7 +22991,7 @@ }, "projects/tooltip": { "name": "@hug/ngx-tooltip", - "version": "1.1.4", + "version": "1.1.2", "license": "GPL-3.0-only", "dependencies": { "tslib": "^2.6.3" @@ -22982,7 +23032,7 @@ "@angular/core": ">= 14", "@angular/material": ">= 14", "@hug/ngx-core": "1.1.6", - "@hug/ngx-tooltip": "1.1.4", + "@hug/ngx-tooltip": "1.1.2", "@hug/ngx-user-card": "1.1.1" } } diff --git a/package.json b/package.json index 727b7690..c2965601 100644 --- a/package.json +++ b/package.json @@ -5,9 +5,8 @@ "lint": "eslint . --fix", "prepare": "husky || true", "new-package": "ng g .:new-package", - "release:dry-run": "nx release --verbose --dry-run", - "postinstall": "patch-package", - "ng": "ng" + "release:dry-run": "node -r @swc-node/register ./scripts/release.ts --verbose --dry-run", + "postinstall": "patch-package" }, "workspaces": [ "projects/core", diff --git a/projects/core/package.json b/projects/core/package.json index 2a65f782..74327465 100644 --- a/projects/core/package.json +++ b/projects/core/package.json @@ -46,8 +46,8 @@ "test:ci": "ng test core --watch=false --browsers=ChromeHeadless", "build:ng": "ng build core -c=production", "build": "nx build:ng @hug/ngx-core --verbose", - "release": "nx release -p=@hug/ngx-core --yes --verbose", - "release:dry-run": "nx release -p=@hug/ngx-core --verbose --dry-run" + "release": "node -r @swc-node/register ../../scripts/release.ts --projects=@hug/ngx-core --verbose", + "release:dry-run": "npm run release -- --dry-run" }, "peerDependencies": { "@angular/common": ">= 14", diff --git a/projects/layout/package.json b/projects/layout/package.json index ddbd66a1..c699e17f 100644 --- a/projects/layout/package.json +++ b/projects/layout/package.json @@ -31,8 +31,8 @@ "test:ci": "ng test layout --watch=false --browsers=ChromeHeadless", "build:ng": "ng build layout -c=production", "build": "nx build:ng @hug/ngx-layout --verbose", - "release": "nx release -p=@hug/ngx-layout --yes --verbose", - "release:dry-run": "nx release -p=@hug/ngx-layout --verbose --dry-run" + "release": "node -r @swc-node/register ../../scripts/release.ts --projects=@hug/ngx-layout --verbose", + "release:dry-run": "npm run release -- --dry-run" }, "peerDependencies": { "@angular/common": ">= 14", diff --git a/projects/list-loader/package.json b/projects/list-loader/package.json index 1dd28eb6..f57b2bdc 100644 --- a/projects/list-loader/package.json +++ b/projects/list-loader/package.json @@ -31,8 +31,8 @@ "test:ci": "ng test list-loader --watch=false --browsers=ChromeHeadless", "build:ng": "ng build list-loader -c=production", "build": "nx build:ng @hug/ngx-list-loader --verbose", - "release": "nx release -p=@hug/ngx-list-loader --yes --verbose", - "release:dry-run": "nx release -p=@hug/ngx-list-loader --verbose --dry-run" + "release": "node -r @swc-node/register ../../scripts/release.ts --projects=@hug/ngx-list-loader --verbose", + "release:dry-run": "npm run release -- --dry-run" }, "peerDependencies": { "@angular/common": ">= 14", diff --git a/projects/message-box-dialog/package.json b/projects/message-box-dialog/package.json index 4d1f9b07..fbe8a554 100644 --- a/projects/message-box-dialog/package.json +++ b/projects/message-box-dialog/package.json @@ -31,8 +31,8 @@ "test:ci": "ng test message-box-dialog --watch=false --browsers=ChromeHeadless", "build:ng": "ng build message-box-dialog -c=production", "build": "nx build:ng @hug/ngx-message-box-dialog --verbose", - "release": "nx release -p=@hug/ngx-message-box-dialog --yes --verbose", - "release:dry-run": "nx release -p=@hug/ngx-message-box-dialog --verbose --dry-run" + "release": "node -r @swc-node/register ../../scripts/release.ts --projects=@hug/ngx-message-box-dialog --verbose", + "release:dry-run": "npm run release -- --dry-run" }, "peerDependencies": { "@angular/common": ">= 14", diff --git a/projects/message-box/package.json b/projects/message-box/package.json index 09857b44..aeb32b86 100644 --- a/projects/message-box/package.json +++ b/projects/message-box/package.json @@ -31,8 +31,8 @@ "test:ci": "ng test message-box --watch=false --browsers=ChromeHeadless", "build:ng": "ng build message-box -c=production", "build": "nx build:ng @hug/ngx-message-box --verbose", - "release": "nx release -p=@hug/ngx-message-box --yes --verbose", - "release:dry-run": "nx release -p=@hug/ngx-message-box --verbose --dry-run" + "release": "node -r @swc-node/register ../../scripts/release.ts --projects=@hug/ngx-message-box --verbose", + "release:dry-run": "npm run release -- --dry-run" }, "peerDependencies": { "@angular/common": ">= 14", diff --git a/projects/numeric-stepper/package.json b/projects/numeric-stepper/package.json index 1fed2400..9a1864cc 100644 --- a/projects/numeric-stepper/package.json +++ b/projects/numeric-stepper/package.json @@ -31,8 +31,8 @@ "test:ci": "ng test numeric-stepper --watch=false --browsers=ChromeHeadless", "build:ng": "ng build numeric-stepper -c=production", "build": "nx build:ng @hug/ngx-numeric-stepper --verbose", - "release": "nx release -p=@hug/ngx-numeric-stepper --yes --verbose", - "release:dry-run": "nx release -p=@hug/ngx-numeric-stepper --verbose --dry-run" + "release": "node -r @swc-node/register ../../scripts/release.ts --projects=@hug/ngx-numeric-stepper --verbose", + "release:dry-run": "npm run release -- --dry-run" }, "peerDependencies": { "@angular/common": ">= 14", diff --git a/projects/overlay/package.json b/projects/overlay/package.json index c319d89a..07486b10 100644 --- a/projects/overlay/package.json +++ b/projects/overlay/package.json @@ -26,8 +26,8 @@ "test:ci": "ng test overlay --watch=false --browsers=ChromeHeadless", "build:ng": "ng build overlay -c=production", "build": "nx build:ng @hug/ngx-overlay --verbose", - "release": "nx release -p=@hug/ngx-overlay --yes --verbose", - "release:dry-run": "nx release -p=@hug/ngx-overlay --verbose --dry-run" + "release": "node -r @swc-node/register ../../scripts/release.ts --projects=@hug/ngx-overlay --verbose", + "release:dry-run": "npm run release -- --dry-run" }, "peerDependencies": { "@angular/common": ">= 14", diff --git a/projects/search-container/package.json b/projects/search-container/package.json index b4921868..ffc78065 100644 --- a/projects/search-container/package.json +++ b/projects/search-container/package.json @@ -31,8 +31,8 @@ "test:ci": "ng test search-container --watch=false --browsers=ChromeHeadless", "build:ng": "ng build search-container -c=production", "build": "nx build:ng @hug/ngx-search-container --verbose", - "release": "nx release -p=@hug/ngx-search-container --yes --verbose", - "release:dry-run": "nx release -p=@hug/ngx-search-container --verbose --dry-run" + "release": "node -r @swc-node/register ../../scripts/release.ts --projects=@hug/ngx-search-container --verbose", + "release:dry-run": "npm run release -- --dry-run" }, "peerDependencies": { "@angular/common": ">= 14", diff --git a/projects/sidenav/package.json b/projects/sidenav/package.json index edcbea99..c348452e 100644 --- a/projects/sidenav/package.json +++ b/projects/sidenav/package.json @@ -31,8 +31,8 @@ "test:ci": "ng test sidenav --watch=false --browsers=ChromeHeadless", "build:ng": "ng build sidenav -c=production", "build": "nx build:ng @hug/ngx-sidenav --verbose", - "release": "nx release -p=@hug/ngx-sidenav --yes --verbose", - "release:dry-run": "nx release -p=@hug/ngx-sidenav --verbose --dry-run" + "release": "node -r @swc-node/register ../../scripts/release.ts --projects=@hug/ngx-sidenav --verbose", + "release:dry-run": "npm run release -- --dry-run" }, "peerDependencies": { "@angular/common": ">= 14", diff --git a/projects/snackbar/package.json b/projects/snackbar/package.json index ad45ca3e..cba433ab 100644 --- a/projects/snackbar/package.json +++ b/projects/snackbar/package.json @@ -26,8 +26,8 @@ "test:ci": "ng test snackbar --watch=false --browsers=ChromeHeadless", "build:ng": "ng build snackbar -c=production", "build": "nx build:ng @hug/ngx-snackbar --verbose", - "release": "nx release -p=@hug/ngx-snackbar --yes --verbose", - "release:dry-run": "nx release -p=@hug/ngx-snackbar --verbose --dry-run" + "release": "node -r @swc-node/register ../../scripts/release.ts --projects=@hug/ngx-snackbar --verbose", + "release:dry-run": "npm run release -- --dry-run" }, "peerDependencies": { "@angular/common": ">= 14", diff --git a/projects/splitter/package.json b/projects/splitter/package.json index b9f6dce0..165de1b5 100644 --- a/projects/splitter/package.json +++ b/projects/splitter/package.json @@ -31,8 +31,8 @@ "test:ci": "ng test splitter --watch=false --browsers=ChromeHeadless", "build:ng": "ng build splitter -c=production", "build": "nx build:ng @hug/ngx-splitter --verbose", - "release": "nx release -p=@hug/ngx-splitter --yes --verbose", - "release:dry-run": "nx release -p=@hug/ngx-splitter --verbose --dry-run" + "release": "node -r @swc-node/register ../../scripts/release.ts --projects=@hug/ngx-splitter --verbose", + "release:dry-run": "npm run release -- --dry-run" }, "peerDependencies": { "@angular/common": ">= 14", diff --git a/projects/status/package.json b/projects/status/package.json index f29845f2..80838a93 100644 --- a/projects/status/package.json +++ b/projects/status/package.json @@ -31,8 +31,8 @@ "test:ci": "ng test status --watch=false --browsers=ChromeHeadless", "build:ng": "ng build status -c=production", "build": "nx build:ng @hug/ngx-status --verbose", - "release": "nx release -p=@hug/ngx-status --yes --verbose", - "release:dry-run": "nx release -p=@hug/ngx-status --verbose --dry-run" + "release": "node -r @swc-node/register ../../scripts/release.ts --projects=@hug/ngx-status --verbose", + "release:dry-run": "npm run release -- --dry-run" }, "peerDependencies": { "@angular/common": ">= 14", diff --git a/projects/time-picker/package.json b/projects/time-picker/package.json index 3e195931..93c14ca2 100644 --- a/projects/time-picker/package.json +++ b/projects/time-picker/package.json @@ -26,8 +26,8 @@ "test:ci": "ng test time-picker --watch=false --browsers=ChromeHeadless", "build:ng": "ng build time-picker -c=production", "build": "nx build:ng @hug/ngx-time-picker --verbose", - "release": "nx release -p=@hug/ngx-time-picker --yes --verbose", - "release:dry-run": "nx release -p=@hug/ngx-time-picker --verbose --dry-run" + "release": "node -r @swc-node/register ../../scripts/release.ts --projects=@hug/ngx-time-picker --verbose", + "release:dry-run": "npm run release -- --dry-run" }, "peerDependencies": { "@angular/common": ">= 14", diff --git a/projects/tooltip/package.json b/projects/tooltip/package.json index 8815a561..bde9b13f 100644 --- a/projects/tooltip/package.json +++ b/projects/tooltip/package.json @@ -1,6 +1,6 @@ { "name": "@hug/ngx-tooltip", - "version": "1.1.4", + "version": "1.1.2", "description": "HUG Angular - tooltip component", "homepage": "https://github.com/dsi-hug/ngx-components", "license": "GPL-3.0-only", @@ -26,8 +26,8 @@ "test:ci": "ng test tooltip --watch=false --browsers=ChromeHeadless", "build:ng": "ng build tooltip -c=production", "build": "nx build:ng @hug/ngx-tooltip --verbose", - "release": "nx release -p=@hug/ngx-tooltip --yes --verbose", - "release:dry-run": "nx release -p=@hug/ngx-tooltip --verbose --dry-run" + "release": "node -r @swc-node/register ../../scripts/release.ts --projects=@hug/ngx-tooltip --verbose", + "release:dry-run": "npm run release -- --dry-run" }, "peerDependencies": { "@angular/common": ">= 14", diff --git a/projects/user-card/package.json b/projects/user-card/package.json index 227a74fe..bc503c99 100644 --- a/projects/user-card/package.json +++ b/projects/user-card/package.json @@ -31,8 +31,8 @@ "test:ci": "ng test user-card --watch=false --browsers=ChromeHeadless", "build:ng": "ng build user-card -c=production", "build": "nx build:ng @hug/ngx-user-card --verbose", - "release": "nx release -p=@hug/ngx-user-card --yes --verbose", - "release:dry-run": "nx release -p=@hug/ngx-user-card --verbose --dry-run" + "release": "node -r @swc-node/register ../../scripts/release.ts --projects=@hug/ngx-user-card --verbose", + "release:dry-run": "npm run release -- --dry-run" }, "peerDependencies": { "@angular/common": ">= 14", diff --git a/projects/user-tooltip/package.json b/projects/user-tooltip/package.json index e1a67ec7..76fc3121 100644 --- a/projects/user-tooltip/package.json +++ b/projects/user-tooltip/package.json @@ -26,15 +26,15 @@ "test:ci": "ng test user-tooltip --watch=false --browsers=ChromeHeadless", "build:ng": "ng build user-tooltip -c=production", "build": "nx build:ng @hug/ngx-user-tooltip --verbose", - "release": "nx release -p=@hug/ngx-user-tooltip --yes --verbose", - "release:dry-run": "nx release -p=@hug/ngx-user-tooltip --verbose --dry-run" + "release": "node -r @swc-node/register ../../scripts/release.ts --projects=@hug/ngx-user-tooltip --verbose", + "release:dry-run": "npm run release -- --dry-run" }, "peerDependencies": { "@angular/common": ">= 14", "@angular/core": ">= 14", "@angular/material": ">= 14", "@hug/ngx-core": "1.1.6", - "@hug/ngx-tooltip": "1.1.4", + "@hug/ngx-tooltip": "1.1.2", "@hug/ngx-user-card": "1.1.1" }, "dependencies": { diff --git a/scripts/release.ts b/scripts/release.ts new file mode 100644 index 00000000..00979c2d --- /dev/null +++ b/scripts/release.ts @@ -0,0 +1,237 @@ +/* eslint-disable @typescript-eslint/naming-convention, no-loops/no-loops, camelcase */ + +import chalk from 'chalk'; +import { execSync } from 'node:child_process'; +import { copyFileSync, readFileSync, writeFileSync } from 'node:fs'; +import { join } from 'node:path'; +import { releaseChangelog, releasePublish, releaseVersion } from 'nx/release'; +import { PublishOptions } from 'nx/src/command-line/release/command-object'; +import { createProjectGraphAsync, readProjectsConfigurationFromProjectGraph } from 'nx/src/project-graph/project-graph'; +import { PackageJson } from 'nx/src/utils/package-json'; +import { workspaceRoot } from 'nx/src/utils/workspace-root'; +import * as yargs from 'yargs'; + +const { yellow, blue, red, green, gray, white, bgBlue } = chalk; + +void (async (): Promise => { + const options = await yargs + .version(false) + .option('projects', { + description: 'Projects filter to use for the release script', + type: 'array', + string: true, + default: [] + }) + .option('dry-run', { + description: 'Whether or not to perform a dry-run of the release process, defaults to false', + type: 'boolean', + default: false + }) + .option('verbose', { + description: 'Whether or not to enable verbose logging, defaults to false', + type: 'boolean', + default: false + }) + .parseAsync(); + + /** + * 1. Resolve new project version + * 2. Update `projects//package.json` with new version + * 3. Update npm lock file + * 4. Stage changed files with git + */ + const { workspaceVersion, projectsVersionData } = await releaseVersion({ + projects: options.projects, + stageChanges: true, + gitCommit: false, + dryRun: options.dryRun, + verbose: options.verbose + }); + + /** + * 5. Determine affected projects and exit if none + */ + const projectsToRelease = Object.keys(projectsVersionData).filter(key => { + const { newVersion, currentVersion } = projectsVersionData[key]; + return (newVersion && (newVersion !== currentVersion)); + }); + if (projectsToRelease.length === 0) { + console.log('No affected projects found to be published'); + return process.exit(0); + } + + /** + * 6. Update `projects//CHANGELOG.md` + * 7. Stage changed files with git + * 8. Commit all previously staged files in git + * chore(release): publish [skip ci] + * - project: @hug/ngx-xyz 1.2.3 + * 9. Tag commit with git + * @hug/ngx-xyz@1.2.3 + * 10. Push to git remote + * 11. Create GitHub release + */ + await releaseChangelog({ + projects: options.projects, + version: workspaceVersion, + versionData: projectsVersionData, + stageChanges: true, + gitCommit: true, + gitCommitMessage: 'chore(release): publish [skip ci]', + gitTag: true, + dryRun: options.dryRun, + verbose: options.verbose + }); + + /** + * Ensures consistent versioning across interdependent packages in the monorepo. + * + * It reads the current version of each package and updates any other packages that reference + * it in their `peerDependencies` to maintain version synchronization. + * + * TODO: remove this script if one day this feature is supported by `nx release` directly + * @see https://github.com/nrwl/nx/issues/22776 + * @see https://github.com/nrwl/nx/discussions/23388 + * + * 12. Synchronize interdependencies + * - Update project's package.json file + * - Update npm lock file + * - Stage changed files with git + * - Commit all previously staged files in git + * deps(@hug/ngx-xyz): upgrade to v1.2.3 + * [skip ci] + * 13. Push to git remote + */ + const exec = (message: string, cmd: string): void => { + console.log(message); + if (options.verbose) { + console.log(cmd); + } + if (!options.dryRun) { + execSync(cmd, { cwd: workspaceRoot, stdio: 'inherit' }); + } + }; + const projectGraph = await createProjectGraphAsync({ exitOnError: true }); + const { projects } = readProjectsConfigurationFromProjectGraph(projectGraph); + const workspaces = Object.values(projects).map(project => ({ + packageJsonPath: join(project.root, 'package.json'), + packageJson: JSON.parse(readFileSync(join(workspaceRoot, project.root, 'package.json'), 'utf8')) as PackageJson + })); + let packageJsonFiles: string[] = []; + let changesDetected = false; + + console.log(`\n${bgBlue(' HUG ')} ${blue('Synchronizing peer interdependencies')}${options.dryRun ? yellow(' [dry-run]') : ''}`); + workspaces.forEach(workspace => { + workspaces.forEach(workspace2 => { + const peerDependencies = workspace2.packageJson.peerDependencies ?? {}; + if (Object.prototype.hasOwnProperty.call(peerDependencies, workspace.packageJson.name)) { + const version = peerDependencies[workspace.packageJson.name]; + if (!version.includes(workspace.packageJson.version)) { + changesDetected = true; + + const versionRange = version.match(/(^[^\d]*)\d.*/)?.[1] ?? ''; + const newVersion = `${versionRange}${workspace.packageJson.version}`; + + if (!packageJsonFiles.length) { + console.log(`\n- ${blue(workspace.packageJson.name)}`); + } + + console.log(`\n${white('UPDATE')} ${workspace2.packageJsonPath}${options.dryRun ? yellow(' [dry-run]') : ''}\n`); + console.log(gray(' "peerDependencies": {')); + console.log(red(`- "${workspace.packageJson.name}": "${version}"`)); + console.log(green(`+ "${workspace.packageJson.name}": "${newVersion}"`)); + console.log(gray(' }')); + if (!options.dryRun) { + peerDependencies[workspace.packageJson.name] = newVersion; + workspace2.packageJson.peerDependencies = peerDependencies; + writeFileSync(join(workspaceRoot, workspace2.packageJsonPath), JSON.stringify(workspace2.packageJson, null, 4), { encoding: 'utf8' }); + } + + packageJsonFiles.push(workspace2.packageJsonPath); + } + } + }); + + if (packageJsonFiles.length) { + exec( + `\n${bgBlue(' HUG ')} ${blue('Updating npm lock file')}${options.dryRun ? yellow(' [dry-run]') : ''}\n`, + 'npm install' + ); + exec( + `\n${bgBlue(' HUG ')} ${blue('Staging changed files with git')}${options.dryRun ? yellow(' [dry-run]') : ''}\n`, + `git add package-lock.json ${packageJsonFiles.join(' ')}` + ); + exec( + `\n${bgBlue(' HUG ')} ${blue('Comitting changes with git')}${options.dryRun ? yellow(' [dry-run]') : ''}\n`, + `git commit --message deps(${workspace.packageJson.name}): upgrade to v${workspace.packageJson.version} --message [skip ci]` + ); + packageJsonFiles = []; + } + }); + if (changesDetected) { + exec( + `\n${bgBlue(' HUG ')} ${blue('Pushing to git remote')}${options.dryRun ? yellow(' [dry-run]') : ''}\n`, + 'git push --follow-tags --no-verify --atomic' + ); + } else { + console.log('\nNo changes were needed, versions already in sync.'); + } + + /** + * Currently `nx release` publishes packages from their source directory by default. + * + * So we need to make sure `dist` are in sync and published instead. + * + * TODO: remove this script if one day this feature is supported by `nx release` directly + * @see https://github.com/nrwl/nx/issues/21855#issuecomment-1977360480 + * + * 14. Update project(s) `package.json` and `CHANGELOG.md` in dist + */ + console.log(`\n${bgBlue(' HUG ')} ${blue('Synchronizing dist packages')}${options.dryRun ? yellow(' [dry-run]') : ''}`); + projectsToRelease.forEach(project => { + const projectRoot = projects[project].root; + const projectName = projectRoot.substring('projects/'.length); + const projectNewVersion = projectsVersionData[project].newVersion ?? ''; + const distPackageJsonPath = join('dist', projectName, 'package.json'); + const distChangelogPath = join('dist', projectName, 'CHANGELOG.md'); + + console.log(`\n${blue(projects[project].name ?? '')} New version ${projectNewVersion} written to ${distPackageJsonPath}`); + if (!options.dryRun) { + const distPackageJson = JSON.parse(readFileSync(join(workspaceRoot, projectRoot, 'package.json'), 'utf8')) as PackageJson; + distPackageJson.name = projectNewVersion; + writeFileSync(join(workspaceRoot, distPackageJsonPath), JSON.stringify(distPackageJson, null, 4), { encoding: 'utf8' }); + } + + console.log(`${blue(projects[project].name ?? '')} Changelog updated in ${distChangelogPath}`); + if (!options.dryRun) { + copyFileSync(join(workspaceRoot, projectRoot, 'CHANGELOG.md'), join(workspaceRoot, distChangelogPath)); + } + }); + + /** + * Currently `nx release` does not allow to easily change the folder to be published. + * + * `nx.json#targetDefaults.nx-release-publish.options.packageRoot` could be used but can only interpolate: + * - {projectName}: which resolved to '@hug/ngx-xyz' (ie. package.json#name) + * - {projectRoot}: which resolved to 'projects/xyz' + * And what we need is actually `xyz` because Angular generates projects in `dist/xyz`. + * So to make it work, we use the hidden option (__overrides_unparsed__) and publish each project individually. + * + * 15. Publish to npm + */ + let processStatus = 0; + for (const project of projectsToRelease) { + const projectName = projects[project].root.substring('projects/'.length); + const publishStatus = await releasePublish({ + __overrides_unparsed__: `--packageRoot=./dist/${projectName}`, + projects: [project], + dryRun: options.dryRun, + verbose: options.verbose + } as PublishOptions); + if (publishStatus !== 0) { + processStatus = publishStatus; + } + } + + return process.exit(processStatus); +})(); diff --git a/scripts/sync-peer-deps.mjs b/scripts/sync-peer-deps.mjs deleted file mode 100644 index 5d34732c..00000000 --- a/scripts/sync-peer-deps.mjs +++ /dev/null @@ -1,110 +0,0 @@ -/** - * Automated script that ensures consistent versioning across interdependent packages in a monorepo. - * - * This script reads the current version of each package and updates any other packages that reference - * it in their `peerDependencies` to maintain version synchronization. - * - * @example: $ node ./sync-peer-deps.mjs [--dry-run] - * - * TODO: remove this script if one day this feature is supported by `nx release` directly - * @see https://github.com/nrwl/nx/issues/22776 - * @see https://github.com/nrwl/nx/discussions/23388 - */ - -import chalk from 'chalk'; -import { spawnSync } from 'node:child_process'; -import { readFileSync, writeFileSync } from 'node:fs'; -import { dirname, resolve } from 'node:path'; -import { fileURLToPath } from 'node:url'; - -const { yellow, blue, red, green, gray, white, bgBlue, bgWhite } = chalk; - -const __dirname = dirname(fileURLToPath(import.meta.url)); -const rootPath = resolve(__dirname, '..'); - -const dryRun = (process.argv[2] === '--dry-run'); - -const execCommand = (command, args) => { - console.log(`\n${command} ${args.join(' ')}`); - if (!dryRun) { - const result = spawnSync(command, args, { stdio: 'inherit' }); - if (result.error) { - throw result.error; - } - if (result.status !== 0) { - throw new Error(`Command failed with exit code ${result.status}`); - } - } -}; - -const getWorkspaces = () => { - const rootPackageJson = JSON.parse(readFileSync(resolve(rootPath, 'package.json'), 'utf8')); - if (!rootPackageJson.workspaces) { - console.error(red('No workspaces found in package.json')); - } - return (rootPackageJson.workspaces || []).map(workspace => ({ - packageJsonPath: resolve(rootPath, workspace, 'package.json'), - packageJson: JSON.parse(readFileSync(resolve(rootPath, workspace, 'package.json'), 'utf8')) - })); -}; - -(() => { - console.log(`\n${bgBlue(' > ')} Synchronizing peer dependencies`); - let changesDetected = false; - let packageJsonFiles = []; - const workspaces = getWorkspaces(); - workspaces.forEach(workspace => { - workspaces.forEach(workspace2 => { - const peerDependencies = workspace2.packageJson.peerDependencies || {}; - if (Object.hasOwn(peerDependencies, workspace.packageJson.name)) { - const version = peerDependencies[workspace.packageJson.name]; - if (!version.includes(workspace.packageJson.version)) { - changesDetected = true; - - const versionRange = version.match(/(^[^\d]*)\d.*/)[1]; - const newVersion = `${versionRange}${workspace.packageJson.version}`; - - if (!packageJsonFiles.length) { - console.log(`\n${blue(workspace.packageJson.name)}`); - } - - console.log(`\n${bgWhite(' > ')} ${white('UPDATE')} ${workspace2.packageJsonPath}${dryRun ? yellow(' [dry-run]') : ''}\n`); - console.log(gray(' "peerDependencies": {')); - console.log(red(`- "${workspace.packageJson.name}": "${version}"`)); - console.log(green(`+ "${workspace.packageJson.name}": "${newVersion}"`)); - console.log(gray(' }')); - if (!dryRun) { - workspace2.packageJson.peerDependencies[workspace.packageJson.name] = newVersion; - writeFileSync(workspace2.packageJsonPath, JSON.stringify(workspace2.packageJson, null, 4), { encoding: 'utf8' }); - } - - packageJsonFiles.push(workspace2.packageJsonPath); - } - } - }); - - if (packageJsonFiles.length) { - console.log(`\n${bgWhite(' > ')} Updating npm lock file${dryRun ? yellow(' [dry-run]') : ''}`); - execCommand('npm', ['install']); - - console.log(`\n${bgWhite(' > ')} Staging changed files with git${dryRun ? yellow(' [dry-run]') : ''}`); - execCommand('git', ['add', resolve(rootPath, 'package-lock.json'), ...packageJsonFiles]); - - console.log(`\n${bgWhite(' > ')} Committing changes with git${dryRun ? yellow(' [dry-run]') : ''}`); - execCommand('git', ['commit', '--message', `deps(${workspace.packageJson.name}): upgrade to v${workspace.packageJson.version} [skip ci]`]); - - packageJsonFiles = []; - } - }); - - if (changesDetected) { - console.log(`\n${bgWhite(' > ')} Pushing to git remote${dryRun ? yellow(' [dry-run]') : ''}`); - execCommand('git', ['push', '--follow-tags', '--no-verify', '--atomic']); - } else { - console.log('\nNo changes were needed, versions already in sync.'); - } - - if (dryRun) { - console.log(yellow('\nNOTE: The "--dry-run" flag means no changes were made.\n')); - } -})();