From c8511eb7f2ffcc78916666d271cb70a1216f72a0 Mon Sep 17 00:00:00 2001 From: atishj99 Date: Fri, 10 Jul 2026 15:11:36 +0530 Subject: [PATCH 1/2] Move npm auth config to .npmrc with env vars Centralize npm registry authentication by configuring auth tokens in .npmrc using environment variable substitution instead of manually setting npm config in CI/CD workflows. This simplifies the build pipeline and removes hardcoded auth steps while maintaining security through secrets management. Also added .claude and .vscode to .gitignore. --- .github/workflows/ci.yml | 16 ++-------------- .github/workflows/release.yml | 4 +--- .gitignore | 2 ++ .npmrc | 3 ++- 4 files changed, 7 insertions(+), 18 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index dd05dd89..34012758 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -24,13 +24,7 @@ jobs: with: node-version: 22.11.0 registry-url: https://npm.echohq.com/ - - name: Configure echohq auth (both hosts) - env: - ECHO_LIBRARIES_ACCESS_KEY: ${{ secrets.ECHO_LIBRARIES_ACCESS_KEY }} - run: | - npm config set //npm.echohq.com/:_authToken "${ECHO_LIBRARIES_ACCESS_KEY}" - npm config set //packages.echohq.com/:_authToken "${ECHO_LIBRARIES_ACCESS_KEY}" - - run: npm ci --ignore-scripts + - run: npm ci --ignore-scripts --loglevel=http env: ECHO_LIBRARIES_ACCESS_KEY: ${{ secrets.ECHO_LIBRARIES_ACCESS_KEY }} - name: Run Unit Tests @@ -55,13 +49,7 @@ jobs: with: node-version: 22.11.0 registry-url: https://npm.echohq.com/ - - name: Configure echohq auth (both hosts) - env: - ECHO_LIBRARIES_ACCESS_KEY: ${{ secrets.ECHO_LIBRARIES_ACCESS_KEY }} - run: | - npm config set //npm.echohq.com/:_authToken "${ECHO_LIBRARIES_ACCESS_KEY}" - npm config set //packages.echohq.com/:_authToken "${ECHO_LIBRARIES_ACCESS_KEY}" - - run: npm ci --ignore-scripts + - run: npm ci --ignore-scripts --loglevel=http env: ECHO_LIBRARIES_ACCESS_KEY: ${{ secrets.ECHO_LIBRARIES_ACCESS_KEY }} - name: Code Linting diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index e8d63f37..4b153478 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -149,9 +149,7 @@ jobs: env: ECHO_LIBRARIES_ACCESS_KEY: ${{ secrets.ECHO_LIBRARIES_ACCESS_KEY }} run: | - npm config set //npm.echohq.com/:_authToken "${ECHO_LIBRARIES_ACCESS_KEY}" - npm config set //packages.echohq.com/:_authToken "${ECHO_LIBRARIES_ACCESS_KEY}" - npm ci --ignore-scripts + npm ci --ignore-scripts --loglevel=http npm run build - name: Create Pull Request diff --git a/.gitignore b/.gitignore index f5dd23d3..866d991c 100644 --- a/.gitignore +++ b/.gitignore @@ -5,3 +5,5 @@ dist .DS_Store .npmrc .idea +/.claude +/.vscode diff --git a/.npmrc b/.npmrc index 9605ea89..f42f0d40 100644 --- a/.npmrc +++ b/.npmrc @@ -1,5 +1,6 @@ # Default registry for most packages registry=https://npm.echohq.com/ -//packages.echohq.com/:_authToken= +//npm.echohq.com/:_authToken=${ECHO_LIBRARIES_ACCESS_KEY} +//packages.echohq.com/:_authToken=${ECHO_LIBRARIES_ACCESS_KEY} always-auth=true ignore-scripts=true From 9c3ecfb7f9bfa0a78828b838453fe9be1f727ec4 Mon Sep 17 00:00:00 2001 From: atishj99 Date: Fri, 10 Jul 2026 15:48:38 +0530 Subject: [PATCH 2/2] Downgrade uuid to v8.3.2 and simplify npm config Changed uuid dependency from v9.0.0 to v8.3.2 to match the version used by azure-pipelines-task-lib dependencies. Removed --loglevel=http flag from npm ci commands in CI workflows to use default logging. --- .github/workflows/ci.yml | 4 ++-- .github/workflows/release.yml | 2 +- package-lock.json | 34 ++++++++++++++++++++-------------- package.json | 2 +- 4 files changed, 24 insertions(+), 18 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 34012758..8dda3d86 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -24,7 +24,7 @@ jobs: with: node-version: 22.11.0 registry-url: https://npm.echohq.com/ - - run: npm ci --ignore-scripts --loglevel=http + - run: npm ci --ignore-scripts env: ECHO_LIBRARIES_ACCESS_KEY: ${{ secrets.ECHO_LIBRARIES_ACCESS_KEY }} - name: Run Unit Tests @@ -49,7 +49,7 @@ jobs: with: node-version: 22.11.0 registry-url: https://npm.echohq.com/ - - run: npm ci --ignore-scripts --loglevel=http + - run: npm ci --ignore-scripts env: ECHO_LIBRARIES_ACCESS_KEY: ${{ secrets.ECHO_LIBRARIES_ACCESS_KEY }} - name: Code Linting diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 4b153478..1d78b282 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -149,7 +149,7 @@ jobs: env: ECHO_LIBRARIES_ACCESS_KEY: ${{ secrets.ECHO_LIBRARIES_ACCESS_KEY }} run: | - npm ci --ignore-scripts --loglevel=http + npm ci --ignore-scripts npm run build - name: Create Pull Request diff --git a/package-lock.json b/package-lock.json index 6b320cfc..3b4e8af9 100644 --- a/package-lock.json +++ b/package-lock.json @@ -3084,6 +3084,16 @@ "semver": "bin/semver" } }, + "node_modules/azure-pipelines-task-lib/node_modules/uuid": { + "version": "8.3.2", + "resolved": "https://packages.echohq.com/artifactory/api/npm/npm/uuid/-/uuid-8.3.2.tgz", + "integrity": "sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg==", + "deprecated": "uuid@10 and below is no longer supported. For ESM codebases, update to uuid@latest. For CommonJS codebases, use uuid@11 (but be aware this version will likely be deprecated in 2028).", + "license": "MIT", + "bin": { + "uuid": "dist/bin/uuid" + } + }, "node_modules/azure-pipelines-tool-lib": { "version": "2.0.12", "resolved": "https://packages.echohq.com/artifactory/api/npm/npm/azure-pipelines-tool-lib/-/azure-pipelines-tool-lib-2.0.12.tgz", @@ -3114,6 +3124,16 @@ "semver": "bin/semver" } }, + "node_modules/azure-pipelines-tool-lib/node_modules/uuid": { + "version": "8.3.2", + "resolved": "https://packages.echohq.com/artifactory/api/npm/npm/uuid/-/uuid-8.3.2.tgz", + "integrity": "sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg==", + "deprecated": "uuid@10 and below is no longer supported. For ESM codebases, update to uuid@latest. For CommonJS codebases, use uuid@11 (but be aware this version will likely be deprecated in 2028).", + "license": "MIT", + "bin": { + "uuid": "dist/bin/uuid" + } + }, "node_modules/babel-jest": { "version": "29.7.0", "resolved": "https://packages.echohq.com/artifactory/api/npm/npm/babel-jest/-/babel-jest-29.7.0.tgz", @@ -7899,20 +7919,6 @@ "integrity": "sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==", "license": "MIT" }, - "node_modules/uuid": { - "version": "9.0.1", - "resolved": "https://packages.echohq.com/artifactory/api/npm/npm/uuid/-/uuid-9.0.1.tgz", - "integrity": "sha512-b+1eJOlsR9K8HJpow9Ok3fiWOWSIcIzXodvv0rQjVoOVNpWMpxf1wZNpt4y9h10odCNrqnYp1OBzRktckBe3sA==", - "deprecated": "uuid@10 and below is no longer supported. For ESM codebases, update to uuid@latest. For CommonJS codebases, use uuid@11 (but be aware this version will likely be deprecated in 2028).", - "funding": [ - "https://github.com/sponsors/broofa", - "https://github.com/sponsors/ctavan" - ], - "license": "MIT", - "bin": { - "uuid": "dist/bin/uuid" - } - }, "node_modules/v8-to-istanbul": { "version": "9.3.0", "resolved": "https://packages.echohq.com/artifactory/api/npm/npm/v8-to-istanbul/-/v8-to-istanbul-9.3.0.tgz", diff --git a/package.json b/package.json index 7edc51ab..0758f171 100644 --- a/package.json +++ b/package.json @@ -64,7 +64,7 @@ "underscore": "^1.13.8", "picomatch": "^2.3.2", "brace-expansion": "^2.1.2", - "uuid": "^9.0.0" + "uuid": "^8.3.2" }, "publishConfig": { "registry": "https://npm.pkg.github.com"