From 09dcddb6e7e2232c73bad19137bfffef59c60499 Mon Sep 17 00:00:00 2001 From: Wanpeng Li Date: Thu, 19 Sep 2024 13:52:09 +0800 Subject: [PATCH] Remove ts-common/azure-js-dev-tools to solve security issue (#9009) * Fix high security issue * Add test --- tools/js-sdk-release-tools/package-lock.json | 2164 +++++------------ tools/js-sdk-release-tools/package.json | 3 +- .../src/common/npmUtils.ts | 9 + .../js-sdk-release-tools/src/common/utils.ts | 5 +- ...utomaticGenerateChangeLogAndBumpVersion.ts | 13 +- .../src/llc/utils/generateChangelog.ts | 7 +- .../src/llc/utils/utils.ts | 5 +- .../src/test/npm/npm.test.ts | 13 +- .../js-sdk-release-tools/src/utils/version.ts | 13 +- 9 files changed, 669 insertions(+), 1563 deletions(-) diff --git a/tools/js-sdk-release-tools/package-lock.json b/tools/js-sdk-release-tools/package-lock.json index b84ddbbd602..85e61f48941 100644 --- a/tools/js-sdk-release-tools/package-lock.json +++ b/tools/js-sdk-release-tools/package-lock.json @@ -1,17 +1,16 @@ { - "name": "js-sdk-release-tools", - "version": "2.7.21-beta", + "name": "@azure-tools/js-sdk-release-tools", + "version": "2.7.14", "lockfileVersion": 3, "requires": true, "packages": { "": { - "name": "js-sdk-release-tools", - "version": "2.7.21-beta", + "name": "@azure-tools/js-sdk-release-tools", + "version": "2.7.14", "license": "MIT", "dependencies": { "@azure-tools/openapi-tools-common": "^1.2.2", "@npmcli/package-json": "^5.2.0", - "@ts-common/azure-js-dev-tools": "^21.1.0", "colors": "1.4.0", "command-line-args": "^5.1.1", "comment-json": "^4.1.0", @@ -19,6 +18,7 @@ "fs-extra": "^11.2.0", "glob": "^11.0.0", "js-yaml": "^4.1.0", + "npm-registry-fetch": "^17.1.0", "parse-ts-to-ast": "^0.1.1", "semver": "^7.3.5", "shelljs": "^0.8.4", @@ -40,6 +40,7 @@ "devDependencies": { "@types/fs-extra": "^11.0.4", "@types/node": "^20.12.12", + "@types/npm-registry-fetch": "^8.0.7", "@types/npmcli__package-json": "^4.0.4", "@types/shelljs": "^0.8.15", "@types/unixify": "^1.0.2", @@ -98,81 +99,6 @@ "version": "2.6.3", "license": "0BSD" }, - "node_modules/@azure/abort-controller": { - "version": "2.1.2", - "license": "MIT", - "dependencies": { - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=18.0.0" - } - }, - "node_modules/@azure/abort-controller/node_modules/tslib": { - "version": "2.6.3", - "license": "0BSD" - }, - "node_modules/@azure/core-auth": { - "version": "1.7.2", - "license": "MIT", - "dependencies": { - "@azure/abort-controller": "^2.0.0", - "@azure/core-util": "^1.1.0", - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=18.0.0" - } - }, - "node_modules/@azure/core-auth/node_modules/tslib": { - "version": "2.6.3", - "license": "0BSD" - }, - "node_modules/@azure/core-util": { - "version": "1.9.2", - "license": "MIT", - "dependencies": { - "@azure/abort-controller": "^2.0.0", - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=18.0.0" - } - }, - "node_modules/@azure/core-util/node_modules/tslib": { - "version": "2.6.3", - "license": "0BSD" - }, - "node_modules/@azure/logger-js": { - "version": "1.3.2", - "license": "MIT", - "dependencies": { - "tslib": "^1.9.3" - } - }, - "node_modules/@azure/ms-rest-js": { - "version": "2.7.0", - "license": "MIT", - "dependencies": { - "@azure/core-auth": "^1.1.4", - "abort-controller": "^3.0.0", - "form-data": "^2.5.0", - "node-fetch": "^2.6.7", - "tslib": "^1.10.0", - "tunnel": "0.0.6", - "uuid": "^8.3.2", - "xml2js": "^0.5.0" - } - }, - "node_modules/@azure/storage-blob": { - "version": "10.5.0", - "license": "MIT", - "dependencies": { - "@azure/ms-rest-js": "^2.0.0", - "events": "^3.0.0", - "tslib": "^1.9.3" - } - }, "node_modules/@colors/colors": { "version": "1.6.0", "license": "MIT", @@ -454,6 +380,37 @@ "node": ">= 8" } }, + "node_modules/@npmcli/agent": { + "version": "2.2.2", + "resolved": "https://registry.npmjs.org/@npmcli/agent/-/agent-2.2.2.tgz", + "integrity": "sha512-OrcNPXdpSl9UX7qPVRWbmWMCSXrcDa2M9DvrbOTj7ao1S4PlqVFYv9/yLKMkrJKZ/V5A/kDBC690or307i26Og==", + "dependencies": { + "agent-base": "^7.1.0", + "http-proxy-agent": "^7.0.0", + "https-proxy-agent": "^7.0.1", + "lru-cache": "^10.0.1", + "socks-proxy-agent": "^8.0.3" + }, + "engines": { + "node": "^16.14.0 || >=18.0.0" + } + }, + "node_modules/@npmcli/agent/node_modules/lru-cache": { + "version": "10.4.3", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-10.4.3.tgz", + "integrity": "sha512-JNAzZcXrCt42VGLuYz0zfAzDfAvJWW6AfYlDBQyDV5DClI2m5sAmK+OIO7s59XfsRsWHp02jAJrRadPRGTt6SQ==" + }, + "node_modules/@npmcli/fs": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/@npmcli/fs/-/fs-3.1.1.tgz", + "integrity": "sha512-q9CRWjpHCMIh5sVyefoD1cA7PkvILqCZsnSOEUUivORLjxCO/Irmue2DprETiNgEqktDBZaM1Bi+jrarx1XdCg==", + "dependencies": { + "semver": "^7.3.5" + }, + "engines": { + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + } + }, "node_modules/@npmcli/git": { "version": "5.0.8", "resolved": "https://registry.npmjs.org/@npmcli/git/-/git-5.0.8.tgz", @@ -625,287 +582,12 @@ "node": "^16.13.0 || >=18.0.0" } }, - "node_modules/@octokit/auth-token": { - "version": "2.5.0", - "license": "MIT", - "dependencies": { - "@octokit/types": "^6.0.3" - } - }, - "node_modules/@octokit/core": { - "version": "6.1.2", - "license": "MIT", - "peer": true, - "dependencies": { - "@octokit/auth-token": "^5.0.0", - "@octokit/graphql": "^8.0.0", - "@octokit/request": "^9.0.0", - "@octokit/request-error": "^6.0.1", - "@octokit/types": "^13.0.0", - "before-after-hook": "^3.0.2", - "universal-user-agent": "^7.0.0" - }, - "engines": { - "node": ">= 18" - } - }, - "node_modules/@octokit/core/node_modules/@octokit/auth-token": { - "version": "5.1.1", - "license": "MIT", - "peer": true, - "engines": { - "node": ">= 18" - } - }, - "node_modules/@octokit/core/node_modules/@octokit/endpoint": { - "version": "10.1.1", - "license": "MIT", - "peer": true, - "dependencies": { - "@octokit/types": "^13.0.0", - "universal-user-agent": "^7.0.2" - }, - "engines": { - "node": ">= 18" - } - }, - "node_modules/@octokit/core/node_modules/@octokit/openapi-types": { - "version": "22.2.0", - "license": "MIT", - "peer": true - }, - "node_modules/@octokit/core/node_modules/@octokit/request": { - "version": "9.1.3", - "license": "MIT", - "peer": true, - "dependencies": { - "@octokit/endpoint": "^10.0.0", - "@octokit/request-error": "^6.0.1", - "@octokit/types": "^13.1.0", - "universal-user-agent": "^7.0.2" - }, - "engines": { - "node": ">= 18" - } - }, - "node_modules/@octokit/core/node_modules/@octokit/request-error": { - "version": "6.1.4", - "license": "MIT", - "peer": true, - "dependencies": { - "@octokit/types": "^13.0.0" - }, - "engines": { - "node": ">= 18" - } - }, - "node_modules/@octokit/core/node_modules/@octokit/types": { - "version": "13.5.0", - "license": "MIT", - "peer": true, - "dependencies": { - "@octokit/openapi-types": "^22.2.0" - } - }, - "node_modules/@octokit/core/node_modules/before-after-hook": { - "version": "3.0.2", - "license": "Apache-2.0", - "peer": true - }, - "node_modules/@octokit/core/node_modules/universal-user-agent": { - "version": "7.0.2", - "license": "ISC", - "peer": true - }, - "node_modules/@octokit/endpoint": { - "version": "6.0.12", - "license": "MIT", - "dependencies": { - "@octokit/types": "^6.0.3", - "is-plain-object": "^5.0.0", - "universal-user-agent": "^6.0.0" - } - }, - "node_modules/@octokit/endpoint/node_modules/universal-user-agent": { - "version": "6.0.1", - "license": "ISC" - }, - "node_modules/@octokit/graphql": { - "version": "8.1.1", - "license": "MIT", - "peer": true, - "dependencies": { - "@octokit/request": "^9.0.0", - "@octokit/types": "^13.0.0", - "universal-user-agent": "^7.0.0" - }, - "engines": { - "node": ">= 18" - } - }, - "node_modules/@octokit/graphql/node_modules/@octokit/endpoint": { - "version": "10.1.1", - "license": "MIT", - "peer": true, - "dependencies": { - "@octokit/types": "^13.0.0", - "universal-user-agent": "^7.0.2" - }, - "engines": { - "node": ">= 18" - } - }, - "node_modules/@octokit/graphql/node_modules/@octokit/openapi-types": { - "version": "22.2.0", - "license": "MIT", - "peer": true - }, - "node_modules/@octokit/graphql/node_modules/@octokit/request": { - "version": "9.1.3", - "license": "MIT", - "peer": true, - "dependencies": { - "@octokit/endpoint": "^10.0.0", - "@octokit/request-error": "^6.0.1", - "@octokit/types": "^13.1.0", - "universal-user-agent": "^7.0.2" - }, - "engines": { - "node": ">= 18" - } - }, - "node_modules/@octokit/graphql/node_modules/@octokit/request-error": { - "version": "6.1.4", - "license": "MIT", - "peer": true, - "dependencies": { - "@octokit/types": "^13.0.0" - }, + "node_modules/@npmcli/redact": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/@npmcli/redact/-/redact-2.0.1.tgz", + "integrity": "sha512-YgsR5jCQZhVmTJvjduTOIHph0L73pK8xwMVaDY0PatySqVM9AZj93jpoXYSJqfHFxFkN9dmqTw6OiqExsS3LPw==", "engines": { - "node": ">= 18" - } - }, - "node_modules/@octokit/graphql/node_modules/@octokit/types": { - "version": "13.5.0", - "license": "MIT", - "peer": true, - "dependencies": { - "@octokit/openapi-types": "^22.2.0" - } - }, - "node_modules/@octokit/graphql/node_modules/universal-user-agent": { - "version": "7.0.2", - "license": "ISC", - "peer": true - }, - "node_modules/@octokit/openapi-types": { - "version": "12.11.0", - "license": "MIT" - }, - "node_modules/@octokit/plugin-paginate-rest": { - "version": "1.1.2", - "license": "MIT", - "dependencies": { - "@octokit/types": "^2.0.1" - } - }, - "node_modules/@octokit/plugin-paginate-rest/node_modules/@octokit/types": { - "version": "2.16.2", - "license": "MIT", - "dependencies": { - "@types/node": ">= 8" - } - }, - "node_modules/@octokit/plugin-request-log": { - "version": "1.0.4", - "license": "MIT", - "peerDependencies": { - "@octokit/core": ">=3" - } - }, - "node_modules/@octokit/plugin-rest-endpoint-methods": { - "version": "2.4.0", - "license": "MIT", - "dependencies": { - "@octokit/types": "^2.0.1", - "deprecation": "^2.3.1" - } - }, - "node_modules/@octokit/plugin-rest-endpoint-methods/node_modules/@octokit/types": { - "version": "2.16.2", - "license": "MIT", - "dependencies": { - "@types/node": ">= 8" - } - }, - "node_modules/@octokit/request": { - "version": "5.6.3", - "license": "MIT", - "dependencies": { - "@octokit/endpoint": "^6.0.1", - "@octokit/request-error": "^2.1.0", - "@octokit/types": "^6.16.1", - "is-plain-object": "^5.0.0", - "node-fetch": "^2.6.7", - "universal-user-agent": "^6.0.0" - } - }, - "node_modules/@octokit/request-error": { - "version": "1.2.1", - "license": "MIT", - "dependencies": { - "@octokit/types": "^2.0.0", - "deprecation": "^2.0.0", - "once": "^1.4.0" - } - }, - "node_modules/@octokit/request-error/node_modules/@octokit/types": { - "version": "2.16.2", - "license": "MIT", - "dependencies": { - "@types/node": ">= 8" - } - }, - "node_modules/@octokit/request/node_modules/@octokit/request-error": { - "version": "2.1.0", - "license": "MIT", - "dependencies": { - "@octokit/types": "^6.0.3", - "deprecation": "^2.0.0", - "once": "^1.4.0" - } - }, - "node_modules/@octokit/request/node_modules/universal-user-agent": { - "version": "6.0.1", - "license": "ISC" - }, - "node_modules/@octokit/rest": { - "version": "16.43.2", - "license": "MIT", - "dependencies": { - "@octokit/auth-token": "^2.4.0", - "@octokit/plugin-paginate-rest": "^1.1.1", - "@octokit/plugin-request-log": "^1.0.0", - "@octokit/plugin-rest-endpoint-methods": "2.4.0", - "@octokit/request": "^5.2.0", - "@octokit/request-error": "^1.0.2", - "atob-lite": "^2.0.0", - "before-after-hook": "^2.0.0", - "btoa-lite": "^1.0.0", - "deprecation": "^2.0.0", - "lodash.get": "^4.4.2", - "lodash.set": "^4.3.2", - "lodash.uniq": "^4.5.0", - "octokit-pagination-methods": "^1.1.0", - "once": "^1.4.0", - "universal-user-agent": "^4.0.0" - } - }, - "node_modules/@octokit/types": { - "version": "6.41.0", - "license": "MIT", - "dependencies": { - "@octokit/openapi-types": "^12.11.0" + "node": "^16.14.0 || >=18.0.0" } }, "node_modules/@pkgjs/parseargs": { @@ -1108,41 +790,6 @@ "win32" ] }, - "node_modules/@ts-common/azure-js-dev-tools": { - "version": "21.4.0", - "license": "MIT", - "dependencies": { - "@azure/logger-js": "^1.3.2", - "@azure/storage-blob": "^10.3.0", - "@octokit/rest": "^16.28.2", - "@types/archiver": "^2.1.2", - "@types/commonmark": "^0.27.1", - "@types/js-yaml": "^3.12.0", - "archiver": "^3.0.0", - "commonmark": "^0.28.1", - "isomorphic-git": "^0.55.2", - "js-yaml": "^3.12.1", - "yargs": "^12.0.5" - } - }, - "node_modules/@ts-common/azure-js-dev-tools/node_modules/argparse": { - "version": "1.0.10", - "license": "MIT", - "dependencies": { - "sprintf-js": "~1.0.2" - } - }, - "node_modules/@ts-common/azure-js-dev-tools/node_modules/js-yaml": { - "version": "3.14.1", - "license": "MIT", - "dependencies": { - "argparse": "^1.0.7", - "esprima": "^4.0.0" - }, - "bin": { - "js-yaml": "bin/js-yaml.js" - } - }, "node_modules/@ts-morph/common": { "version": "0.24.0", "license": "MIT", @@ -1173,13 +820,6 @@ "url": "https://github.com/sponsors/isaacs" } }, - "node_modules/@types/archiver": { - "version": "2.1.3", - "license": "MIT", - "dependencies": { - "@types/glob": "*" - } - }, "node_modules/@types/async-retry": { "version": "1.4.8", "license": "MIT", @@ -1207,18 +847,6 @@ "@types/node": "*" } }, - "node_modules/@types/glob": { - "version": "8.1.0", - "license": "MIT", - "dependencies": { - "@types/minimatch": "^5.1.2", - "@types/node": "*" - } - }, - "node_modules/@types/js-yaml": { - "version": "3.12.10", - "license": "MIT" - }, "node_modules/@types/jsonfile": { "version": "6.1.4", "resolved": "https://registry.npmjs.org/@types/jsonfile/-/jsonfile-6.1.4.tgz", @@ -1230,6 +858,7 @@ }, "node_modules/@types/minimatch": { "version": "5.1.2", + "dev": true, "license": "MIT" }, "node_modules/@types/node": { @@ -1259,12 +888,40 @@ "node": ">= 6" } }, + "node_modules/@types/npm-package-arg": { + "version": "6.1.4", + "resolved": "https://registry.npmjs.org/@types/npm-package-arg/-/npm-package-arg-6.1.4.tgz", + "integrity": "sha512-vDgdbMy2QXHnAruzlv68pUtXCjmqUk3WrBAsRboRovsOmxbfn/WiYCjmecyKjGztnMps5dWp4Uq2prp+Ilo17Q==", + "dev": true + }, + "node_modules/@types/npm-registry-fetch": { + "version": "8.0.7", + "resolved": "https://registry.npmjs.org/@types/npm-registry-fetch/-/npm-registry-fetch-8.0.7.tgz", + "integrity": "sha512-db9iBh7kDDg4lRT4k4XZ6IiecTEgFCID4qk+VDVPbtzU855q3KZLCn08ATr4H27ntRJVhulQ7GWjl24H42x96w==", + "dev": true, + "dependencies": { + "@types/node": "*", + "@types/node-fetch": "*", + "@types/npm-package-arg": "*", + "@types/npmlog": "*", + "@types/ssri": "*" + } + }, "node_modules/@types/npmcli__package-json": { "version": "4.0.4", "resolved": "https://registry.npmjs.org/@types/npmcli__package-json/-/npmcli__package-json-4.0.4.tgz", "integrity": "sha512-6QjlFUSHBmZJWuC08bz1ZCx6tm4t+7+OJXAdvM6tL2pI7n6Bh5SIp/YxQvnOLFf8MzCXs2ijyFgrzaiu1UFBGA==", "dev": true }, + "node_modules/@types/npmlog": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/@types/npmlog/-/npmlog-7.0.0.tgz", + "integrity": "sha512-hJWbrKFvxKyWwSUXjZMYTINsSOY6IclhvGOZ97M8ac2tmR9hMwmTnYaMdpGhvju9ctWLTPhCS+eLfQNluiEjQQ==", + "dev": true, + "dependencies": { + "@types/node": "*" + } + }, "node_modules/@types/retry": { "version": "0.12.5", "license": "MIT" @@ -1287,6 +944,15 @@ "@types/node": "*" } }, + "node_modules/@types/ssri": { + "version": "7.1.5", + "resolved": "https://registry.npmjs.org/@types/ssri/-/ssri-7.1.5.tgz", + "integrity": "sha512-odD/56S3B51liILSk5aXJlnYt99S6Rt9EFDDqGtJM26rKHApHcwyU/UoYHrzKkdkHMAIquGWCuHtQTbes+FRQw==", + "dev": true, + "dependencies": { + "@types/node": "*" + } + }, "node_modules/@types/triple-beam": { "version": "1.3.5", "license": "MIT" @@ -1601,6 +1267,29 @@ "acorn": "^6.0.0 || ^7.0.0 || ^8.0.0" } }, + "node_modules/agent-base": { + "version": "7.1.1", + "resolved": "https://registry.npmjs.org/agent-base/-/agent-base-7.1.1.tgz", + "integrity": "sha512-H0TSyFNDMomMNJQBn8wFV5YC/2eJ+VXECwOadZJT554xP6cODZHPX3H9QMQECxvrgiSOP1pHjy1sMWQVYJOUOA==", + "dependencies": { + "debug": "^4.3.4" + }, + "engines": { + "node": ">= 14" + } + }, + "node_modules/aggregate-error": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/aggregate-error/-/aggregate-error-3.1.0.tgz", + "integrity": "sha512-4I7Td01quW/RpocfNayFdFVk1qSuoh0E7JrbRJ16nH01HhKFQ88INq9Sd+nd72zqRySlr9BmDA8xlEJ6vJMrYA==", + "dependencies": { + "clean-stack": "^2.0.0", + "indent-string": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, "node_modules/ajv": { "version": "6.12.6", "license": "MIT", @@ -1616,13 +1305,6 @@ "url": "https://github.com/sponsors/epoberezkin" } }, - "node_modules/ansi-regex": { - "version": "3.0.1", - "license": "MIT", - "engines": { - "node": ">=4" - } - }, "node_modules/ansi-styles": { "version": "4.3.0", "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", @@ -1653,105 +1335,6 @@ "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==" }, - "node_modules/archiver": { - "version": "3.1.1", - "license": "MIT", - "dependencies": { - "archiver-utils": "^2.1.0", - "async": "^2.6.3", - "buffer-crc32": "^0.2.1", - "glob": "^7.1.4", - "readable-stream": "^3.4.0", - "tar-stream": "^2.1.0", - "zip-stream": "^2.1.2" - }, - "engines": { - "node": ">= 6" - } - }, - "node_modules/archiver-utils": { - "version": "2.1.0", - "license": "MIT", - "dependencies": { - "glob": "^7.1.4", - "graceful-fs": "^4.2.0", - "lazystream": "^1.0.0", - "lodash.defaults": "^4.2.0", - "lodash.difference": "^4.5.0", - "lodash.flatten": "^4.4.0", - "lodash.isplainobject": "^4.0.6", - "lodash.union": "^4.6.0", - "normalize-path": "^3.0.0", - "readable-stream": "^2.0.0" - }, - "engines": { - "node": ">= 6" - } - }, - "node_modules/archiver-utils/node_modules/glob": { - "version": "7.2.3", - "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz", - "integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==", - "deprecated": "Glob versions prior to v9 are no longer supported", - "dependencies": { - "fs.realpath": "^1.0.0", - "inflight": "^1.0.4", - "inherits": "2", - "minimatch": "^3.1.1", - "once": "^1.3.0", - "path-is-absolute": "^1.0.0" - }, - "engines": { - "node": "*" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, - "node_modules/archiver-utils/node_modules/readable-stream": { - "version": "2.3.8", - "license": "MIT", - "dependencies": { - "core-util-is": "~1.0.0", - "inherits": "~2.0.3", - "isarray": "~1.0.0", - "process-nextick-args": "~2.0.0", - "safe-buffer": "~5.1.1", - "string_decoder": "~1.1.1", - "util-deprecate": "~1.0.1" - } - }, - "node_modules/archiver-utils/node_modules/safe-buffer": { - "version": "5.1.2", - "license": "MIT" - }, - "node_modules/archiver-utils/node_modules/string_decoder": { - "version": "1.1.1", - "license": "MIT", - "dependencies": { - "safe-buffer": "~5.1.0" - } - }, - "node_modules/archiver/node_modules/glob": { - "version": "7.2.3", - "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz", - "integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==", - "deprecated": "Glob versions prior to v9 are no longer supported", - "dependencies": { - "fs.realpath": "^1.0.0", - "inflight": "^1.0.4", - "inherits": "2", - "minimatch": "^3.1.1", - "once": "^1.3.0", - "path-is-absolute": "^1.0.0" - }, - "engines": { - "node": "*" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, "node_modules/argparse": { "version": "2.0.1", "license": "Python-2.0" @@ -1783,17 +1366,6 @@ "node": ">=12" } }, - "node_modules/async": { - "version": "2.6.4", - "license": "MIT", - "dependencies": { - "lodash": "^4.17.14" - } - }, - "node_modules/async-lock": { - "version": "1.4.1", - "license": "MIT" - }, "node_modules/async-retry": { "version": "1.3.3", "license": "MIT", @@ -1805,10 +1377,6 @@ "version": "0.4.0", "license": "MIT" }, - "node_modules/atob-lite": { - "version": "2.0.0", - "license": "MIT" - }, "node_modules/atomic-sleep": { "version": "1.0.0", "license": "MIT", @@ -1820,33 +1388,6 @@ "version": "1.0.2", "license": "MIT" }, - "node_modules/base64-js": { - "version": "0.0.2", - "engines": { - "node": ">= 0.4" - } - }, - "node_modules/before-after-hook": { - "version": "2.2.3", - "license": "Apache-2.0" - }, - "node_modules/bl": { - "version": "4.1.0", - "license": "MIT", - "dependencies": { - "buffer": "^5.5.0", - "inherits": "^2.0.4", - "readable-stream": "^3.4.0" - } - }, - "node_modules/bops": { - "version": "0.0.7", - "license": "MIT", - "dependencies": { - "base64-js": "0.0.2", - "to-utf8": "0.0.1" - } - }, "node_modules/brace-expansion": { "version": "1.1.11", "license": "MIT", @@ -1865,77 +1406,116 @@ "node": ">=8" } }, - "node_modules/btoa-lite": { - "version": "1.0.0", - "license": "MIT" + "node_modules/cac": { + "version": "6.7.14", + "resolved": "https://registry.npmjs.org/cac/-/cac-6.7.14.tgz", + "integrity": "sha512-b6Ilus+c3RrdDk+JhLKUAQfzzgLEPy6wcXqS7f/xe1EETvsDP6GORG7SFuOs6cID5YkqchW/LXZbX5bc8j7ZcQ==", + "dev": true, + "engines": { + "node": ">=8" + } }, - "node_modules/buffer": { - "version": "5.7.1", - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/feross" - }, - { - "type": "patreon", - "url": "https://www.patreon.com/feross" - }, - { - "type": "consulting", - "url": "https://feross.org/support" - } - ], - "license": "MIT", + "node_modules/cacache": { + "version": "18.0.4", + "resolved": "https://registry.npmjs.org/cacache/-/cacache-18.0.4.tgz", + "integrity": "sha512-B+L5iIa9mgcjLbliir2th36yEwPftrzteHYujzsx3dFP/31GCHcIeS8f5MGd80odLOjaOvSpU3EEAmRQptkxLQ==", "dependencies": { - "base64-js": "^1.3.1", - "ieee754": "^1.1.13" + "@npmcli/fs": "^3.1.0", + "fs-minipass": "^3.0.0", + "glob": "^10.2.2", + "lru-cache": "^10.0.1", + "minipass": "^7.0.3", + "minipass-collect": "^2.0.1", + "minipass-flush": "^1.0.5", + "minipass-pipeline": "^1.2.4", + "p-map": "^4.0.0", + "ssri": "^10.0.0", + "tar": "^6.1.11", + "unique-filename": "^3.0.0" + }, + "engines": { + "node": "^16.14.0 || >=18.0.0" } }, - "node_modules/buffer-crc32": { - "version": "0.2.13", - "license": "MIT", - "engines": { - "node": "*" + "node_modules/cacache/node_modules/brace-expansion": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", + "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", + "dependencies": { + "balanced-match": "^1.0.0" } }, - "node_modules/buffer/node_modules/base64-js": { - "version": "1.5.1", - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/feross" - }, - { - "type": "patreon", - "url": "https://www.patreon.com/feross" - }, - { - "type": "consulting", - "url": "https://feross.org/support" - } - ], - "license": "MIT" + "node_modules/cacache/node_modules/glob": { + "version": "10.4.5", + "resolved": "https://registry.npmjs.org/glob/-/glob-10.4.5.tgz", + "integrity": "sha512-7Bv8RF0k6xjo7d4A/PxYLbUCfb6c+Vpd2/mB2yRDlew7Jb5hEXiCD9ibfO7wpk8i4sevK6DFny9h7EYbM3/sHg==", + "dependencies": { + "foreground-child": "^3.1.0", + "jackspeak": "^3.1.2", + "minimatch": "^9.0.4", + "minipass": "^7.1.2", + "package-json-from-dist": "^1.0.0", + "path-scurry": "^1.11.1" + }, + "bin": { + "glob": "dist/esm/bin.mjs" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } }, - "node_modules/cac": { - "version": "6.7.14", - "resolved": "https://registry.npmjs.org/cac/-/cac-6.7.14.tgz", - "integrity": "sha512-b6Ilus+c3RrdDk+JhLKUAQfzzgLEPy6wcXqS7f/xe1EETvsDP6GORG7SFuOs6cID5YkqchW/LXZbX5bc8j7ZcQ==", - "dev": true, + "node_modules/cacache/node_modules/jackspeak": { + "version": "3.4.3", + "resolved": "https://registry.npmjs.org/jackspeak/-/jackspeak-3.4.3.tgz", + "integrity": "sha512-OGlZQpz2yfahA/Rd1Y8Cd9SIEsqvXkLVoSw/cgwhnhFMDbsQFeZYoJJ7bIZBS9BcamUW96asq/npPWugM+RQBw==", + "dependencies": { + "@isaacs/cliui": "^8.0.2" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + }, + "optionalDependencies": { + "@pkgjs/parseargs": "^0.11.0" + } + }, + "node_modules/cacache/node_modules/lru-cache": { + "version": "10.4.3", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-10.4.3.tgz", + "integrity": "sha512-JNAzZcXrCt42VGLuYz0zfAzDfAvJWW6AfYlDBQyDV5DClI2m5sAmK+OIO7s59XfsRsWHp02jAJrRadPRGTt6SQ==" + }, + "node_modules/cacache/node_modules/minimatch": { + "version": "9.0.5", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.5.tgz", + "integrity": "sha512-G6T0ZX48xgozx7587koeX9Ys2NYy6Gmv//P89sEte9V9whIapMNF4idKxnW2QtCcLiTWlb/wfCabAtAFWhhBow==", + "dependencies": { + "brace-expansion": "^2.0.1" + }, "engines": { - "node": ">=8" + "node": ">=16 || 14 >=14.17" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" } }, - "node_modules/callsites": { - "version": "3.1.0", - "license": "MIT", - "peer": true, + "node_modules/cacache/node_modules/path-scurry": { + "version": "1.11.1", + "resolved": "https://registry.npmjs.org/path-scurry/-/path-scurry-1.11.1.tgz", + "integrity": "sha512-Xa4Nw17FS9ApQFJ9umLiJS4orGjm7ZzwUrwamcGQuHSzDyth9boKDaycYdDcZDuqYATXw4HFXgaqWTctW/v1HA==", + "dependencies": { + "lru-cache": "^10.2.0", + "minipass": "^5.0.0 || ^6.0.2 || ^7.0.0" + }, "engines": { - "node": ">=6" + "node": ">=16 || 14 >=14.18" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" } }, - "node_modules/camelcase": { - "version": "5.3.1", + "node_modules/callsites": { + "version": "3.1.0", "license": "MIT", + "peer": true, "engines": { "node": ">=6" } @@ -1980,30 +1560,26 @@ "node": ">= 16" } }, - "node_modules/clean-git-ref": { - "version": "1.0.3", - "license": "Apache-2.0" + "node_modules/chownr": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/chownr/-/chownr-2.0.0.tgz", + "integrity": "sha512-bIomtDF5KGpdogkLd9VspvFzk9KfpyyGlS8YFVZl7TGPBHL5snIOnxeshwVgPteQ9b4Eydl+pVbIyE1DcvCWgQ==", + "engines": { + "node": ">=10" + } }, - "node_modules/cliui": { - "version": "4.1.0", - "license": "ISC", - "dependencies": { - "string-width": "^2.1.1", - "strip-ansi": "^4.0.0", - "wrap-ansi": "^2.0.0" + "node_modules/clean-stack": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/clean-stack/-/clean-stack-2.2.0.tgz", + "integrity": "sha512-4diC9HaTE+KRAMWhDhrGOECgWZxoevMc5TlkObMqNSsVU62PYzXZ/SMTjzyGAFF1YusgxGcSWTEXBhp0CPwQ1A==", + "engines": { + "node": ">=6" } }, "node_modules/code-block-writer": { "version": "13.0.2", "license": "MIT" }, - "node_modules/code-point-at": { - "version": "1.1.0", - "license": "MIT", - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/color": { "version": "3.2.1", "license": "MIT", @@ -2110,43 +1686,6 @@ "node": "*" } }, - "node_modules/compress-commons": { - "version": "2.1.1", - "license": "MIT", - "dependencies": { - "buffer-crc32": "^0.2.13", - "crc32-stream": "^3.0.1", - "normalize-path": "^3.0.0", - "readable-stream": "^2.3.6" - }, - "engines": { - "node": ">= 6" - } - }, - "node_modules/compress-commons/node_modules/readable-stream": { - "version": "2.3.8", - "license": "MIT", - "dependencies": { - "core-util-is": "~1.0.0", - "inherits": "~2.0.3", - "isarray": "~1.0.0", - "process-nextick-args": "~2.0.0", - "safe-buffer": "~5.1.1", - "string_decoder": "~1.1.1", - "util-deprecate": "~1.0.1" - } - }, - "node_modules/compress-commons/node_modules/safe-buffer": { - "version": "5.1.2", - "license": "MIT" - }, - "node_modules/compress-commons/node_modules/string_decoder": { - "version": "1.1.1", - "license": "MIT", - "dependencies": { - "safe-buffer": "~5.1.0" - } - }, "node_modules/concat-map": { "version": "0.0.1", "license": "MIT" @@ -2311,34 +1850,6 @@ "version": "1.0.3", "license": "MIT" }, - "node_modules/crc": { - "version": "3.8.0", - "license": "MIT", - "dependencies": { - "buffer": "^5.1.0" - } - }, - "node_modules/crc-32": { - "version": "1.2.2", - "license": "Apache-2.0", - "bin": { - "crc32": "bin/crc32.njs" - }, - "engines": { - "node": ">=0.8" - } - }, - "node_modules/crc32-stream": { - "version": "3.0.1", - "license": "MIT", - "dependencies": { - "crc": "^3.4.4", - "readable-stream": "^3.4.0" - }, - "engines": { - "node": ">= 6.9.0" - } - }, "node_modules/cross-spawn": { "version": "7.0.3", "license": "MIT", @@ -2373,23 +1884,6 @@ } } }, - "node_modules/decamelize": { - "version": "1.2.0", - "license": "MIT", - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/decompress-response": { - "version": "4.2.1", - "license": "MIT", - "dependencies": { - "mimic-response": "^2.0.0" - }, - "engines": { - "node": ">=8" - } - }, "node_modules/deep-eql": { "version": "5.0.2", "resolved": "https://registry.npmjs.org/deep-eql/-/deep-eql-5.0.2.tgz", @@ -2411,24 +1905,6 @@ "node": ">=0.4.0" } }, - "node_modules/deprecation": { - "version": "2.3.1", - "license": "ISC" - }, - "node_modules/diff": { - "version": "3.5.0", - "license": "BSD-3-Clause", - "engines": { - "node": ">=0.3.1" - } - }, - "node_modules/diff-lines": { - "version": "1.1.1", - "license": "MIT", - "dependencies": { - "diff": "^3.5.0" - } - }, "node_modules/dir-glob": { "version": "3.0.1", "license": "MIT", @@ -2462,6 +1938,15 @@ "version": "2.0.0", "license": "MIT" }, + "node_modules/encoding": { + "version": "0.1.13", + "resolved": "https://registry.npmjs.org/encoding/-/encoding-0.1.13.tgz", + "integrity": "sha512-ETBauow1T35Y/WZMkio9jiM0Z5xjHHmJ4XmjZOq1l/dXz3lr2sRn87nJy20RupqSh1F2m3HHPSp8ShIPQJrJ3A==", + "optional": true, + "dependencies": { + "iconv-lite": "^0.6.2" + } + }, "node_modules/end-of-stream": { "version": "1.4.4", "license": "MIT", @@ -2916,16 +2401,6 @@ "node": ">=4.0.0" } }, - "node_modules/find-up": { - "version": "3.0.0", - "license": "MIT", - "dependencies": { - "locate-path": "^3.0.0" - }, - "engines": { - "node": ">=6" - } - }, "node_modules/flat-cache": { "version": "3.2.0", "license": "MIT", @@ -2962,18 +2437,6 @@ "url": "https://github.com/sponsors/isaacs" } }, - "node_modules/form-data": { - "version": "2.5.1", - "license": "MIT", - "dependencies": { - "asynckit": "^0.4.0", - "combined-stream": "^1.0.6", - "mime-types": "^2.1.12" - }, - "engines": { - "node": ">= 0.12" - } - }, "node_modules/front-matter": { "version": "4.0.2", "license": "MIT", @@ -2999,10 +2462,6 @@ "js-yaml": "bin/js-yaml.js" } }, - "node_modules/fs-constants": { - "version": "1.0.0", - "license": "MIT" - }, "node_modules/fs-extra": { "version": "11.2.0", "license": "MIT", @@ -3015,6 +2474,17 @@ "node": ">=14.14" } }, + "node_modules/fs-minipass": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/fs-minipass/-/fs-minipass-3.0.3.tgz", + "integrity": "sha512-XUBA9XClHbnJWSfBzjkm6RvPsyg3sryZt06BEQoXcF7EK/xpGaQYJgQKDJSUH5SGZ76Y7pFx1QBnXz09rU5Fbw==", + "dependencies": { + "minipass": "^7.0.3" + }, + "engines": { + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + } + }, "node_modules/fs.realpath": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", @@ -3028,10 +2498,6 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/get-caller-file": { - "version": "1.0.3", - "license": "ISC" - }, "node_modules/get-func-name": { "version": "2.0.2", "resolved": "https://registry.npmjs.org/get-func-name/-/get-func-name-2.0.2.tgz", @@ -3063,14 +2529,6 @@ "url": "https://github.com/privatenumber/get-tsconfig?sponsor=1" } }, - "node_modules/git-apply-delta": { - "version": "0.0.7", - "license": "MIT", - "dependencies": { - "bops": "~0.0.6", - "varint": "0.0.3" - } - }, "node_modules/glob": { "version": "11.0.0", "resolved": "https://registry.npmjs.org/glob/-/glob-11.0.0.tgz", @@ -3139,10 +2597,6 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/globalyzer": { - "version": "0.1.4", - "license": "MIT" - }, "node_modules/globby": { "version": "11.1.0", "license": "MIT", @@ -3161,10 +2615,6 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/globrex": { - "version": "0.1.2", - "license": "MIT" - }, "node_modules/graceful-fs": { "version": "4.2.11", "license": "ISC" @@ -3218,6 +2668,35 @@ "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-10.4.3.tgz", "integrity": "sha512-JNAzZcXrCt42VGLuYz0zfAzDfAvJWW6AfYlDBQyDV5DClI2m5sAmK+OIO7s59XfsRsWHp02jAJrRadPRGTt6SQ==" }, + "node_modules/http-cache-semantics": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/http-cache-semantics/-/http-cache-semantics-4.1.1.tgz", + "integrity": "sha512-er295DKPVsV82j5kw1Gjt+ADA/XYHsajl82cGNQG2eyoPkvgUhX+nDIyelzhIWbbsXP39EHcI6l5tYs2FYqYXQ==" + }, + "node_modules/http-proxy-agent": { + "version": "7.0.2", + "resolved": "https://registry.npmjs.org/http-proxy-agent/-/http-proxy-agent-7.0.2.tgz", + "integrity": "sha512-T1gkAiYYDWYx3V5Bmyu7HcfcvL7mUrTWiM6yOfa3PIphViJ/gFPbvidQ+veqSOHci/PxBcDabeUNCzpOODJZig==", + "dependencies": { + "agent-base": "^7.1.0", + "debug": "^4.3.4" + }, + "engines": { + "node": ">= 14" + } + }, + "node_modules/https-proxy-agent": { + "version": "7.0.5", + "resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-7.0.5.tgz", + "integrity": "sha512-1e4Wqeblerz+tMKPIq2EMGiiWW1dIjZOksyHWSUm1rmuvw/how9hBHZ38lAGj5ID4Ik6EdkOw7NmWPy6LAwalw==", + "dependencies": { + "agent-base": "^7.0.2", + "debug": "4" + }, + "engines": { + "node": ">= 14" + } + }, "node_modules/human-signals": { "version": "5.0.0", "dev": true, @@ -3226,6 +2705,18 @@ "node": ">=16.17.0" } }, + "node_modules/iconv-lite": { + "version": "0.6.3", + "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.6.3.tgz", + "integrity": "sha512-4fCk79wshMdzMp2rH06qWrJE4iolqLhCUH+OiuIgU++RB0+94NlDL81atO7GX55uUKueo0txHNtvEyI6D7WdMw==", + "optional": true, + "dependencies": { + "safer-buffer": ">= 2.1.2 < 3.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, "node_modules/ieee754": { "version": "1.2.1", "funding": [ @@ -3269,11 +2760,18 @@ "node_modules/imurmurhash": { "version": "0.1.4", "license": "MIT", - "peer": true, "engines": { "node": ">=0.8.19" } }, + "node_modules/indent-string": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/indent-string/-/indent-string-4.0.0.tgz", + "integrity": "sha512-EdDDZu4A2OyIK7Lr/2zG+w5jmbuk1DVBnEwREQvBzspBJkCEbRa8GxU1lghYcaGJCnRWibjDXlq779X1/y5xwg==", + "engines": { + "node": ">=8" + } + }, "node_modules/inflight": { "version": "1.0.6", "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", @@ -3304,13 +2802,23 @@ "node": ">= 0.10" } }, - "node_modules/invert-kv": { - "version": "2.0.0", - "license": "MIT", + "node_modules/ip-address": { + "version": "9.0.5", + "resolved": "https://registry.npmjs.org/ip-address/-/ip-address-9.0.5.tgz", + "integrity": "sha512-zHtQzGojZXTwZTHQqra+ETKd4Sn3vgi7uBmlPoXVWZqYvuKmtI0l/VZTjqGmJY9x88GGOaZ9+G9ES8hC4T4X8g==", + "dependencies": { + "jsbn": "1.1.0", + "sprintf-js": "^1.1.3" + }, "engines": { - "node": ">=4" + "node": ">= 12" } }, + "node_modules/ip-address/node_modules/sprintf-js": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.1.3.tgz", + "integrity": "sha512-Oo+0REFV59/rz3gfJNKQiBlwfHaSESl1pcGyABQsnnIfWOFt6JNj5gCog2U6MLZ//IGYD+nA8nI+mTShREReaA==" + }, "node_modules/is-arrayish": { "version": "0.3.2", "license": "MIT" @@ -3335,13 +2843,6 @@ "node": ">=0.10.0" } }, - "node_modules/is-fullwidth-code-point": { - "version": "2.0.0", - "license": "MIT", - "engines": { - "node": ">=4" - } - }, "node_modules/is-glob": { "version": "4.0.3", "license": "MIT", @@ -3352,6 +2853,11 @@ "node": ">=0.10.0" } }, + "node_modules/is-lambda": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/is-lambda/-/is-lambda-1.0.1.tgz", + "integrity": "sha512-z7CMFGNrENq5iFB9Bqo64Xk6Y9sg+epq1myIcdHaGnbMTYOxvzsEtdYqQUylB7LxfkvgrrjP32T6Ywciio9UIQ==" + }, "node_modules/is-number": { "version": "7.0.0", "license": "MIT", @@ -3367,13 +2873,6 @@ "node": ">=8" } }, - "node_modules/is-plain-object": { - "version": "5.0.0", - "license": "MIT", - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/is-stream": { "version": "3.0.0", "dev": true, @@ -3393,33 +2892,6 @@ "version": "2.0.0", "license": "ISC" }, - "node_modules/isomorphic-git": { - "version": "0.55.6", - "license": "MIT", - "dependencies": { - "async-lock": "^1.1.0", - "clean-git-ref": "1.0.3", - "crc-32": "^1.2.0", - "diff-lines": "^1.1.1", - "git-apply-delta": "0.0.7", - "globalyzer": "^0.1.0", - "globrex": "^0.1.2", - "ignore": "^5.0.4", - "marky": "^1.2.1", - "minimisted": "^2.0.0", - "pako": "^1.0.10", - "pify": "^4.0.1", - "readable-stream": "^3.1.1", - "sha.js": "^2.4.9", - "simple-get": "^3.0.2" - }, - "bin": { - "isogit": "cli.js" - }, - "engines": { - "node": ">=7.6.0" - } - }, "node_modules/jackspeak": { "version": "4.0.1", "license": "BlueOak-1.0.0", @@ -3453,6 +2925,11 @@ "js-yaml": "bin/js-yaml.js" } }, + "node_modules/jsbn": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/jsbn/-/jsbn-1.1.0.tgz", + "integrity": "sha512-4bYVV3aAMtDTTu4+xsDYa6sy9GyJ69/amsu9sYF2zqjiEoZA5xJi3BrfX3uY+/IekIu7MwdObdbDWpoZdBv3/A==" + }, "node_modules/json-buffer": { "version": "3.0.1", "license": "MIT", @@ -3486,6 +2963,14 @@ "graceful-fs": "^4.1.6" } }, + "node_modules/jsonparse": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/jsonparse/-/jsonparse-1.3.1.tgz", + "integrity": "sha512-POQXvpdL69+CluYsillJ7SUhKvytYjW9vG/GKpnf+xP8UWgYEM/RaMzHHofbALDiKbbP1W8UEYmgGl39WkPZsg==", + "engines": [ + "node >= 0.2.0" + ] + }, "node_modules/keyv": { "version": "4.5.4", "license": "MIT", @@ -3498,50 +2983,6 @@ "version": "2.0.0", "license": "MIT" }, - "node_modules/lazystream": { - "version": "1.0.1", - "license": "MIT", - "dependencies": { - "readable-stream": "^2.0.5" - }, - "engines": { - "node": ">= 0.6.3" - } - }, - "node_modules/lazystream/node_modules/readable-stream": { - "version": "2.3.8", - "license": "MIT", - "dependencies": { - "core-util-is": "~1.0.0", - "inherits": "~2.0.3", - "isarray": "~1.0.0", - "process-nextick-args": "~2.0.0", - "safe-buffer": "~5.1.1", - "string_decoder": "~1.1.1", - "util-deprecate": "~1.0.1" - } - }, - "node_modules/lazystream/node_modules/safe-buffer": { - "version": "5.1.2", - "license": "MIT" - }, - "node_modules/lazystream/node_modules/string_decoder": { - "version": "1.1.1", - "license": "MIT", - "dependencies": { - "safe-buffer": "~5.1.0" - } - }, - "node_modules/lcid": { - "version": "2.0.0", - "license": "MIT", - "dependencies": { - "invert-kv": "^2.0.0" - }, - "engines": { - "node": ">=6" - } - }, "node_modules/levn": { "version": "0.4.1", "license": "MIT", @@ -3554,17 +2995,6 @@ "node": ">= 0.8.0" } }, - "node_modules/locate-path": { - "version": "3.0.0", - "license": "MIT", - "dependencies": { - "p-locate": "^3.0.0", - "path-exists": "^3.0.0" - }, - "engines": { - "node": ">=6" - } - }, "node_modules/lodash": { "version": "4.17.21", "license": "MIT" @@ -3577,43 +3007,11 @@ "version": "4.3.0", "license": "MIT" }, - "node_modules/lodash.defaults": { - "version": "4.2.0", - "license": "MIT" - }, - "node_modules/lodash.difference": { - "version": "4.5.0", - "license": "MIT" - }, - "node_modules/lodash.flatten": { - "version": "4.4.0", - "license": "MIT" - }, - "node_modules/lodash.get": { - "version": "4.4.2", - "license": "MIT" - }, - "node_modules/lodash.isplainobject": { - "version": "4.0.6", - "license": "MIT" - }, "node_modules/lodash.merge": { "version": "4.6.2", "license": "MIT", "peer": true }, - "node_modules/lodash.set": { - "version": "4.3.2", - "license": "MIT" - }, - "node_modules/lodash.union": { - "version": "4.6.0", - "license": "MIT" - }, - "node_modules/lodash.uniq": { - "version": "4.5.0", - "license": "MIT" - }, "node_modules/logform": { "version": "2.6.1", "license": "MIT", @@ -3645,16 +3043,6 @@ "node": "20 || >=22" } }, - "node_modules/macos-release": { - "version": "2.5.1", - "license": "MIT", - "engines": { - "node": ">=6" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, "node_modules/magic-string": { "version": "0.30.11", "resolved": "https://registry.npmjs.org/magic-string/-/magic-string-0.30.11.tgz", @@ -3664,14 +3052,26 @@ "@jridgewell/sourcemap-codec": "^1.5.0" } }, - "node_modules/map-age-cleaner": { - "version": "0.1.3", - "license": "MIT", - "dependencies": { - "p-defer": "^1.0.0" + "node_modules/make-fetch-happen": { + "version": "13.0.1", + "resolved": "https://registry.npmjs.org/make-fetch-happen/-/make-fetch-happen-13.0.1.tgz", + "integrity": "sha512-cKTUFc/rbKUd/9meOvgrpJ2WrNzymt6jfRDdwg5UCnVzv9dTpEj9JS5m3wtziXVCjluIXyL8pcaukYqezIzZQA==", + "dependencies": { + "@npmcli/agent": "^2.0.0", + "cacache": "^18.0.0", + "http-cache-semantics": "^4.1.1", + "is-lambda": "^1.0.1", + "minipass": "^7.0.2", + "minipass-fetch": "^3.0.0", + "minipass-flush": "^1.0.5", + "minipass-pipeline": "^1.2.4", + "negotiator": "^0.6.3", + "proc-log": "^4.2.0", + "promise-retry": "^2.0.1", + "ssri": "^10.0.0" }, "engines": { - "node": ">=6" + "node": "^16.14.0 || >=18.0.0" } }, "node_modules/marked": { @@ -3684,33 +3084,10 @@ "node": ">= 18" } }, - "node_modules/marky": { - "version": "1.2.5", - "license": "Apache-2.0" - }, "node_modules/mdurl": { "version": "1.0.1", "license": "MIT" }, - "node_modules/mem": { - "version": "4.3.0", - "license": "MIT", - "dependencies": { - "map-age-cleaner": "^0.1.1", - "mimic-fn": "^2.0.0", - "p-is-promise": "^2.0.0" - }, - "engines": { - "node": ">=6" - } - }, - "node_modules/mem/node_modules/mimic-fn": { - "version": "2.1.0", - "license": "MIT", - "engines": { - "node": ">=6" - } - }, "node_modules/merge-stream": { "version": "2.0.0", "dev": true, @@ -3738,69 +3115,168 @@ "version": "1.52.0", "license": "MIT", "engines": { - "node": ">= 0.6" + "node": ">= 0.6" + } + }, + "node_modules/mime-types": { + "version": "2.1.35", + "license": "MIT", + "dependencies": { + "mime-db": "1.52.0" + }, + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/mimic-fn": { + "version": "4.0.0", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/minimatch": { + "version": "3.1.2", + "license": "ISC", + "dependencies": { + "brace-expansion": "^1.1.7" + }, + "engines": { + "node": "*" + } + }, + "node_modules/minimist": { + "version": "1.2.8", + "license": "MIT", + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/minipass": { + "version": "7.1.2", + "license": "ISC", + "engines": { + "node": ">=16 || 14 >=14.17" + } + }, + "node_modules/minipass-collect": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/minipass-collect/-/minipass-collect-2.0.1.tgz", + "integrity": "sha512-D7V8PO9oaz7PWGLbCACuI1qEOsq7UKfLotx/C0Aet43fCUB/wfQ7DYeq2oR/svFJGYDHPr38SHATeaj/ZoKHKw==", + "dependencies": { + "minipass": "^7.0.3" + }, + "engines": { + "node": ">=16 || 14 >=14.17" + } + }, + "node_modules/minipass-fetch": { + "version": "3.0.5", + "resolved": "https://registry.npmjs.org/minipass-fetch/-/minipass-fetch-3.0.5.tgz", + "integrity": "sha512-2N8elDQAtSnFV0Dk7gt15KHsS0Fyz6CbYZ360h0WTYV1Ty46li3rAXVOQj1THMNLdmrD9Vt5pBPtWtVkpwGBqg==", + "dependencies": { + "minipass": "^7.0.3", + "minipass-sized": "^1.0.3", + "minizlib": "^2.1.2" + }, + "engines": { + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + }, + "optionalDependencies": { + "encoding": "^0.1.13" + } + }, + "node_modules/minipass-flush": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/minipass-flush/-/minipass-flush-1.0.5.tgz", + "integrity": "sha512-JmQSYYpPUqX5Jyn1mXaRwOda1uQ8HP5KAT/oDSLCzt1BYRhQU0/hDtsB1ufZfEEzMZ9aAVmsBw8+FWsIXlClWw==", + "dependencies": { + "minipass": "^3.0.0" + }, + "engines": { + "node": ">= 8" } }, - "node_modules/mime-types": { - "version": "2.1.35", - "license": "MIT", + "node_modules/minipass-flush/node_modules/minipass": { + "version": "3.3.6", + "resolved": "https://registry.npmjs.org/minipass/-/minipass-3.3.6.tgz", + "integrity": "sha512-DxiNidxSEK+tHG6zOIklvNOwm3hvCrbUrdtzY74U6HKTJxvIDfOUL5W5P2Ghd3DTkhhKPYGqeNUIh5qcM4YBfw==", "dependencies": { - "mime-db": "1.52.0" + "yallist": "^4.0.0" }, "engines": { - "node": ">= 0.6" + "node": ">=8" } }, - "node_modules/mimic-fn": { - "version": "4.0.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=12" + "node_modules/minipass-pipeline": { + "version": "1.2.4", + "resolved": "https://registry.npmjs.org/minipass-pipeline/-/minipass-pipeline-1.2.4.tgz", + "integrity": "sha512-xuIq7cIOt09RPRJ19gdi4b+RiNvDFYe5JH+ggNvBqGqpQXcru3PcRmOZuHBKWK1Txf9+cQ+HMVN4d6z46LZP7A==", + "dependencies": { + "minipass": "^3.0.0" }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" + "engines": { + "node": ">=8" } }, - "node_modules/mimic-response": { - "version": "2.1.0", - "license": "MIT", + "node_modules/minipass-pipeline/node_modules/minipass": { + "version": "3.3.6", + "resolved": "https://registry.npmjs.org/minipass/-/minipass-3.3.6.tgz", + "integrity": "sha512-DxiNidxSEK+tHG6zOIklvNOwm3hvCrbUrdtzY74U6HKTJxvIDfOUL5W5P2Ghd3DTkhhKPYGqeNUIh5qcM4YBfw==", + "dependencies": { + "yallist": "^4.0.0" + }, "engines": { "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/minimatch": { - "version": "3.1.2", - "license": "ISC", + "node_modules/minipass-sized": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/minipass-sized/-/minipass-sized-1.0.3.tgz", + "integrity": "sha512-MbkQQ2CTiBMlA2Dm/5cY+9SWFEN8pzzOXi6rlM5Xxq0Yqbda5ZQy9sU75a673FE9ZK0Zsbr6Y5iP6u9nktfg2g==", "dependencies": { - "brace-expansion": "^1.1.7" + "minipass": "^3.0.0" }, "engines": { - "node": "*" + "node": ">=8" } }, - "node_modules/minimist": { - "version": "1.2.8", - "license": "MIT", - "funding": { - "url": "https://github.com/sponsors/ljharb" + "node_modules/minipass-sized/node_modules/minipass": { + "version": "3.3.6", + "resolved": "https://registry.npmjs.org/minipass/-/minipass-3.3.6.tgz", + "integrity": "sha512-DxiNidxSEK+tHG6zOIklvNOwm3hvCrbUrdtzY74U6HKTJxvIDfOUL5W5P2Ghd3DTkhhKPYGqeNUIh5qcM4YBfw==", + "dependencies": { + "yallist": "^4.0.0" + }, + "engines": { + "node": ">=8" } }, - "node_modules/minimisted": { - "version": "2.0.1", - "license": "MIT", + "node_modules/minizlib": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/minizlib/-/minizlib-2.1.2.tgz", + "integrity": "sha512-bAxsR8BVfj60DWXHE3u30oHzfl4G7khkSuPW+qvpd7jFRHm7dLxOjUk1EHACJ/hxLY8phGJ0YhYHZo7jil7Qdg==", "dependencies": { - "minimist": "^1.2.5" + "minipass": "^3.0.0", + "yallist": "^4.0.0" + }, + "engines": { + "node": ">= 8" } }, - "node_modules/minipass": { - "version": "7.1.2", - "license": "ISC", + "node_modules/minizlib/node_modules/minipass": { + "version": "3.3.6", + "resolved": "https://registry.npmjs.org/minipass/-/minipass-3.3.6.tgz", + "integrity": "sha512-DxiNidxSEK+tHG6zOIklvNOwm3hvCrbUrdtzY74U6HKTJxvIDfOUL5W5P2Ghd3DTkhhKPYGqeNUIh5qcM4YBfw==", + "dependencies": { + "yallist": "^4.0.0" + }, "engines": { - "node": ">=16 || 14 >=14.17" + "node": ">=8" } }, "node_modules/mkdirp": { @@ -3842,9 +3318,13 @@ "version": "1.4.0", "license": "MIT" }, - "node_modules/nice-try": { - "version": "1.0.5", - "license": "MIT" + "node_modules/negotiator": { + "version": "0.6.3", + "resolved": "https://registry.npmjs.org/negotiator/-/negotiator-0.6.3.tgz", + "integrity": "sha512-+EUsqGPLsM+j/zdChZjsnX51g4XrHFOIXwfnCVPGlQk/k5giakcKsuxCObBRu6DSm9opw/O6slWbJdghQM4bBg==", + "engines": { + "node": ">= 0.6" + } }, "node_modules/node-fetch": { "version": "2.7.0", @@ -3907,13 +3387,6 @@ "node": "^16.14.0 || >=18.0.0" } }, - "node_modules/normalize-path": { - "version": "3.0.0", - "license": "MIT", - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/npm-install-checks": { "version": "6.3.0", "resolved": "https://registry.npmjs.org/npm-install-checks/-/npm-install-checks-6.3.0.tgz", @@ -3965,6 +3438,24 @@ "node": "^16.14.0 || >=18.0.0" } }, + "node_modules/npm-registry-fetch": { + "version": "17.1.0", + "resolved": "https://registry.npmjs.org/npm-registry-fetch/-/npm-registry-fetch-17.1.0.tgz", + "integrity": "sha512-5+bKQRH0J1xG1uZ1zMNvxW0VEyoNWgJpY9UDuluPFLKDfJ9u2JmmjmTJV1srBGQOROfdBMiVvnH2Zvpbm+xkVA==", + "dependencies": { + "@npmcli/redact": "^2.0.0", + "jsonparse": "^1.3.1", + "make-fetch-happen": "^13.0.0", + "minipass": "^7.0.2", + "minipass-fetch": "^3.0.0", + "minizlib": "^2.1.2", + "npm-package-arg": "^11.0.0", + "proc-log": "^4.0.0" + }, + "engines": { + "node": "^16.14.0 || >=18.0.0" + } + }, "node_modules/npm-run-path": { "version": "5.3.0", "dev": true, @@ -3990,17 +3481,6 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/number-is-nan": { - "version": "1.0.1", - "license": "MIT", - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/octokit-pagination-methods": { - "version": "1.1.0", - "license": "MIT" - }, "node_modules/on-exit-leak-free": { "version": "2.1.2", "license": "MIT", @@ -4052,190 +3532,24 @@ "node": ">= 0.8.0" } }, - "node_modules/os-locale": { - "version": "3.1.0", - "license": "MIT", - "dependencies": { - "execa": "^1.0.0", - "lcid": "^2.0.0", - "mem": "^4.0.0" - }, - "engines": { - "node": ">=6" - } - }, - "node_modules/os-locale/node_modules/cross-spawn": { - "version": "6.0.5", - "license": "MIT", - "dependencies": { - "nice-try": "^1.0.4", - "path-key": "^2.0.1", - "semver": "^5.5.0", - "shebang-command": "^1.2.0", - "which": "^1.2.9" - }, - "engines": { - "node": ">=4.8" - } - }, - "node_modules/os-locale/node_modules/execa": { - "version": "1.0.0", - "license": "MIT", - "dependencies": { - "cross-spawn": "^6.0.0", - "get-stream": "^4.0.0", - "is-stream": "^1.1.0", - "npm-run-path": "^2.0.0", - "p-finally": "^1.0.0", - "signal-exit": "^3.0.0", - "strip-eof": "^1.0.0" - }, - "engines": { - "node": ">=6" - } - }, - "node_modules/os-locale/node_modules/get-stream": { - "version": "4.1.0", - "license": "MIT", - "dependencies": { - "pump": "^3.0.0" - }, - "engines": { - "node": ">=6" - } - }, - "node_modules/os-locale/node_modules/is-stream": { - "version": "1.1.0", - "license": "MIT", - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/os-locale/node_modules/npm-run-path": { - "version": "2.0.2", - "license": "MIT", - "dependencies": { - "path-key": "^2.0.0" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/os-locale/node_modules/path-key": { - "version": "2.0.1", - "license": "MIT", - "engines": { - "node": ">=4" - } - }, - "node_modules/os-locale/node_modules/semver": { - "version": "5.7.2", - "license": "ISC", - "bin": { - "semver": "bin/semver" - } - }, - "node_modules/os-locale/node_modules/shebang-command": { - "version": "1.2.0", - "license": "MIT", - "dependencies": { - "shebang-regex": "^1.0.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/os-locale/node_modules/shebang-regex": { - "version": "1.0.0", - "license": "MIT", - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/os-locale/node_modules/signal-exit": { - "version": "3.0.7", - "license": "ISC" - }, - "node_modules/os-locale/node_modules/which": { - "version": "1.3.1", - "license": "ISC", - "dependencies": { - "isexe": "^2.0.0" - }, - "bin": { - "which": "bin/which" - } - }, - "node_modules/os-name": { - "version": "3.1.0", - "license": "MIT", - "dependencies": { - "macos-release": "^2.2.0", - "windows-release": "^3.1.0" - }, - "engines": { - "node": ">=6" - } - }, - "node_modules/p-defer": { - "version": "1.0.0", - "license": "MIT", - "engines": { - "node": ">=4" - } - }, - "node_modules/p-finally": { - "version": "1.0.0", - "license": "MIT", - "engines": { - "node": ">=4" - } - }, - "node_modules/p-is-promise": { - "version": "2.1.0", - "license": "MIT", - "engines": { - "node": ">=6" - } - }, - "node_modules/p-locate": { - "version": "3.0.0", - "license": "MIT", - "dependencies": { - "p-limit": "^2.0.0" - }, - "engines": { - "node": ">=6" - } - }, - "node_modules/p-locate/node_modules/p-limit": { - "version": "2.3.0", - "license": "MIT", + "node_modules/p-map": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/p-map/-/p-map-4.0.0.tgz", + "integrity": "sha512-/bjOqmgETBYB5BoEeGVea8dmvHb2m9GLy1E9W43yeyfP6QQCZGFNa+XRceJEuDB6zqr+gKpIAmlLebMpykw/MQ==", "dependencies": { - "p-try": "^2.0.0" + "aggregate-error": "^3.0.0" }, "engines": { - "node": ">=6" + "node": ">=10" }, "funding": { "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/p-try": { - "version": "2.2.0", - "license": "MIT", - "engines": { - "node": ">=6" - } - }, "node_modules/package-json-from-dist": { "version": "1.0.0", "license": "BlueOak-1.0.0" }, - "node_modules/pako": { - "version": "1.0.11", - "license": "(MIT AND Zlib)" - }, "node_modules/parent-module": { "version": "1.0.1", "license": "MIT", @@ -4272,13 +3586,6 @@ "version": "1.0.1", "license": "MIT" }, - "node_modules/path-exists": { - "version": "3.0.0", - "license": "MIT", - "engines": { - "node": ">=4" - } - }, "node_modules/path-is-absolute": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", @@ -4351,13 +3658,6 @@ "url": "https://github.com/sponsors/jonschlinkert" } }, - "node_modules/pify": { - "version": "4.0.1", - "license": "MIT", - "engines": { - "node": ">=6" - } - }, "node_modules/pino": { "version": "9.3.2", "license": "MIT", @@ -4691,10 +3991,6 @@ "node": ">=0.10.0" } }, - "node_modules/require-main-filename": { - "version": "1.0.1", - "license": "ISC" - }, "node_modules/resolve": { "version": "1.22.8", "license": "MIT", @@ -4855,9 +4151,11 @@ "node": ">=10" } }, - "node_modules/sax": { - "version": "1.4.1", - "license": "ISC" + "node_modules/safer-buffer": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", + "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==", + "optional": true }, "node_modules/secure-json-parse": { "version": "2.7.0", @@ -4873,21 +4171,6 @@ "node": ">=10" } }, - "node_modules/set-blocking": { - "version": "2.0.0", - "license": "ISC" - }, - "node_modules/sha.js": { - "version": "2.4.11", - "license": "(MIT AND BSD-3-Clause)", - "dependencies": { - "inherits": "^2.0.1", - "safe-buffer": "^5.0.1" - }, - "bin": { - "sha.js": "bin.js" - } - }, "node_modules/shebang-command": { "version": "2.0.0", "license": "MIT", @@ -4955,33 +4238,6 @@ "url": "https://github.com/sponsors/isaacs" } }, - "node_modules/simple-concat": { - "version": "1.0.1", - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/feross" - }, - { - "type": "patreon", - "url": "https://www.patreon.com/feross" - }, - { - "type": "consulting", - "url": "https://feross.org/support" - } - ], - "license": "MIT" - }, - "node_modules/simple-get": { - "version": "3.1.1", - "license": "MIT", - "dependencies": { - "decompress-response": "^4.2.0", - "once": "^1.3.1", - "simple-concat": "^1.0.0" - } - }, "node_modules/simple-git": { "version": "3.25.0", "license": "MIT", @@ -5009,6 +4265,41 @@ "node": ">=8" } }, + "node_modules/smart-buffer": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/smart-buffer/-/smart-buffer-4.2.0.tgz", + "integrity": "sha512-94hK0Hh8rPqQl2xXc3HsaBoOXKV20MToPkcXvwbISWLEs+64sBq5kFgn2kJDHb1Pry9yrP0dxrCI9RRci7RXKg==", + "engines": { + "node": ">= 6.0.0", + "npm": ">= 3.0.0" + } + }, + "node_modules/socks": { + "version": "2.8.3", + "resolved": "https://registry.npmjs.org/socks/-/socks-2.8.3.tgz", + "integrity": "sha512-l5x7VUUWbjVFbafGLxPWkYsHIhEvmF85tbIeFZWc8ZPtoMyybuEhL7Jye/ooC4/d48FgOjSJXgsF/AJPYCW8Zw==", + "dependencies": { + "ip-address": "^9.0.5", + "smart-buffer": "^4.2.0" + }, + "engines": { + "node": ">= 10.0.0", + "npm": ">= 3.0.0" + } + }, + "node_modules/socks-proxy-agent": { + "version": "8.0.4", + "resolved": "https://registry.npmjs.org/socks-proxy-agent/-/socks-proxy-agent-8.0.4.tgz", + "integrity": "sha512-GNAq/eg8Udq2x0eNiFkr9gRg5bA7PXEWagQdeRX4cPSG+X/8V38v637gim9bjFptMk1QWsCTr0ttrJEiXbNnRw==", + "dependencies": { + "agent-base": "^7.1.1", + "debug": "^4.3.4", + "socks": "^2.8.3" + }, + "engines": { + "node": ">= 14" + } + }, "node_modules/sonic-boom": { "version": "4.0.1", "license": "MIT", @@ -5064,6 +4355,17 @@ "version": "1.0.3", "license": "BSD-3-Clause" }, + "node_modules/ssri": { + "version": "10.0.6", + "resolved": "https://registry.npmjs.org/ssri/-/ssri-10.0.6.tgz", + "integrity": "sha512-MGrFH9Z4NP9Iyhqn16sDtBpRRNJ0Y2hNa6D65h736fVSaPCHr4DM4sWUNvVaSuC+0OBGhwsrydQwmgfg5LncqQ==", + "dependencies": { + "minipass": "^7.0.3" + }, + "engines": { + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + } + }, "node_modules/stack-trace": { "version": "0.0.10", "license": "MIT", @@ -5088,17 +4390,6 @@ "safe-buffer": "~5.2.0" } }, - "node_modules/string-width": { - "version": "2.1.1", - "license": "MIT", - "dependencies": { - "is-fullwidth-code-point": "^2.0.0", - "strip-ansi": "^4.0.0" - }, - "engines": { - "node": ">=4" - } - }, "node_modules/string-width-cjs": { "name": "string-width", "version": "4.2.3", @@ -5139,16 +4430,6 @@ "node_modules/string.prototype.repeat": { "version": "0.2.0" }, - "node_modules/strip-ansi": { - "version": "4.0.0", - "license": "MIT", - "dependencies": { - "ansi-regex": "^3.0.0" - }, - "engines": { - "node": ">=4" - } - }, "node_modules/strip-ansi-cjs": { "name": "strip-ansi", "version": "6.0.1", @@ -5167,13 +4448,6 @@ "node": ">=8" } }, - "node_modules/strip-eof": { - "version": "1.0.0", - "license": "MIT", - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/strip-final-newline": { "version": "3.0.0", "dev": true, @@ -5216,18 +4490,61 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/tar-stream": { - "version": "2.2.0", - "license": "MIT", + "node_modules/tar": { + "version": "6.2.1", + "resolved": "https://registry.npmjs.org/tar/-/tar-6.2.1.tgz", + "integrity": "sha512-DZ4yORTwrbTj/7MZYq2w+/ZFdI6OZ/f9SFHR+71gIVUZhOQPHzVCLpvRnPgyaMpfWxxk/4ONva3GQSyNIKRv6A==", "dependencies": { - "bl": "^4.0.3", - "end-of-stream": "^1.4.1", - "fs-constants": "^1.0.0", - "inherits": "^2.0.3", - "readable-stream": "^3.1.1" + "chownr": "^2.0.0", + "fs-minipass": "^2.0.0", + "minipass": "^5.0.0", + "minizlib": "^2.1.1", + "mkdirp": "^1.0.3", + "yallist": "^4.0.0" }, "engines": { - "node": ">=6" + "node": ">=10" + } + }, + "node_modules/tar/node_modules/fs-minipass": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/fs-minipass/-/fs-minipass-2.1.0.tgz", + "integrity": "sha512-V/JgOLFCS+R6Vcq0slCuaeWEdNC3ouDlJMNIsacH2VtALiu9mV4LPrHc5cDl8k5aw6J8jwgWWpiTo5RYhmIzvg==", + "dependencies": { + "minipass": "^3.0.0" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/tar/node_modules/fs-minipass/node_modules/minipass": { + "version": "3.3.6", + "resolved": "https://registry.npmjs.org/minipass/-/minipass-3.3.6.tgz", + "integrity": "sha512-DxiNidxSEK+tHG6zOIklvNOwm3hvCrbUrdtzY74U6HKTJxvIDfOUL5W5P2Ghd3DTkhhKPYGqeNUIh5qcM4YBfw==", + "dependencies": { + "yallist": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/tar/node_modules/minipass": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/minipass/-/minipass-5.0.0.tgz", + "integrity": "sha512-3FnjYuehv9k6ovOEbyOswadCDPX1piCfhV8ncmYtHOjuPwylVWsghTLo7rabjC3Rx5xD4HDx8Wm1xnMF7S5qFQ==", + "engines": { + "node": ">=8" + } + }, + "node_modules/tar/node_modules/mkdirp": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-1.0.4.tgz", + "integrity": "sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw==", + "bin": { + "mkdirp": "bin/cmd.js" + }, + "engines": { + "node": ">=10" } }, "node_modules/text-hex": { @@ -5324,10 +4641,6 @@ "node": ">=8.0" } }, - "node_modules/to-utf8": { - "version": "0.0.1", - "license": "MIT" - }, "node_modules/tr46": { "version": "0.0.3", "license": "MIT" @@ -5379,13 +4692,6 @@ "fsevents": "~2.3.3" } }, - "node_modules/tunnel": { - "version": "0.0.6", - "license": "MIT", - "engines": { - "node": ">=0.6.11 <=0.7.0 || >=0.7.3" - } - }, "node_modules/type-check": { "version": "0.4.0", "license": "MIT", @@ -5475,11 +4781,26 @@ "version": "5.26.5", "license": "MIT" }, - "node_modules/universal-user-agent": { - "version": "4.0.1", - "license": "ISC", + "node_modules/unique-filename": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/unique-filename/-/unique-filename-3.0.0.tgz", + "integrity": "sha512-afXhuC55wkAmZ0P18QsVE6kp8JaxrEokN2HGIoIVv2ijHQd419H0+6EigAFcIzXeMIkcIkNBpB3L/DXB3cTS/g==", + "dependencies": { + "unique-slug": "^4.0.0" + }, + "engines": { + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + } + }, + "node_modules/unique-slug": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/unique-slug/-/unique-slug-4.0.0.tgz", + "integrity": "sha512-WrcA6AyEfqDX5bWige/4NQfPZMtASNVxdmWR76WESYQVAACSgWcR6e9i0mofqqBxYFtL4oAxPIptY73/0YE1DQ==", "dependencies": { - "os-name": "^3.1.0" + "imurmurhash": "^0.1.4" + }, + "engines": { + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" } }, "node_modules/universalify": { @@ -5531,13 +4852,6 @@ "version": "1.0.2", "license": "MIT" }, - "node_modules/uuid": { - "version": "8.3.2", - "license": "MIT", - "bin": { - "uuid": "dist/bin/uuid" - } - }, "node_modules/validate-npm-package-license": { "version": "3.0.4", "resolved": "https://registry.npmjs.org/validate-npm-package-license/-/validate-npm-package-license-3.0.4.tgz", @@ -5555,10 +4869,6 @@ "node": "^14.17.0 || ^16.13.0 || >=18.0.0" } }, - "node_modules/varint": { - "version": "0.0.3", - "license": "MIT" - }, "node_modules/vite": { "version": "5.4.1", "resolved": "https://registry.npmjs.org/vite/-/vite-5.4.1.tgz", @@ -5783,10 +5093,6 @@ "node": ">= 8" } }, - "node_modules/which-module": { - "version": "2.0.1", - "license": "ISC" - }, "node_modules/why-is-node-running": { "version": "2.3.0", "dev": true, @@ -5802,121 +5108,6 @@ "node": ">=8" } }, - "node_modules/windows-release": { - "version": "3.3.3", - "license": "MIT", - "dependencies": { - "execa": "^1.0.0" - }, - "engines": { - "node": ">=6" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/windows-release/node_modules/cross-spawn": { - "version": "6.0.5", - "license": "MIT", - "dependencies": { - "nice-try": "^1.0.4", - "path-key": "^2.0.1", - "semver": "^5.5.0", - "shebang-command": "^1.2.0", - "which": "^1.2.9" - }, - "engines": { - "node": ">=4.8" - } - }, - "node_modules/windows-release/node_modules/execa": { - "version": "1.0.0", - "license": "MIT", - "dependencies": { - "cross-spawn": "^6.0.0", - "get-stream": "^4.0.0", - "is-stream": "^1.1.0", - "npm-run-path": "^2.0.0", - "p-finally": "^1.0.0", - "signal-exit": "^3.0.0", - "strip-eof": "^1.0.0" - }, - "engines": { - "node": ">=6" - } - }, - "node_modules/windows-release/node_modules/get-stream": { - "version": "4.1.0", - "license": "MIT", - "dependencies": { - "pump": "^3.0.0" - }, - "engines": { - "node": ">=6" - } - }, - "node_modules/windows-release/node_modules/is-stream": { - "version": "1.1.0", - "license": "MIT", - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/windows-release/node_modules/npm-run-path": { - "version": "2.0.2", - "license": "MIT", - "dependencies": { - "path-key": "^2.0.0" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/windows-release/node_modules/path-key": { - "version": "2.0.1", - "license": "MIT", - "engines": { - "node": ">=4" - } - }, - "node_modules/windows-release/node_modules/semver": { - "version": "5.7.2", - "license": "ISC", - "bin": { - "semver": "bin/semver" - } - }, - "node_modules/windows-release/node_modules/shebang-command": { - "version": "1.2.0", - "license": "MIT", - "dependencies": { - "shebang-regex": "^1.0.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/windows-release/node_modules/shebang-regex": { - "version": "1.0.0", - "license": "MIT", - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/windows-release/node_modules/signal-exit": { - "version": "3.0.7", - "license": "ISC" - }, - "node_modules/windows-release/node_modules/which": { - "version": "1.3.1", - "license": "ISC", - "dependencies": { - "isexe": "^2.0.0" - }, - "bin": { - "which": "bin/which" - } - }, "node_modules/winston": { "version": "3.14.2", "license": "MIT", @@ -5971,17 +5162,6 @@ "node": ">=0.10.0" } }, - "node_modules/wrap-ansi": { - "version": "2.1.0", - "license": "MIT", - "dependencies": { - "string-width": "^1.0.1", - "strip-ansi": "^3.0.1" - }, - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/wrap-ansi-cjs": { "name": "wrap-ansi", "version": "7.0.0", @@ -6044,67 +5224,10 @@ "node": ">=8" } }, - "node_modules/wrap-ansi/node_modules/ansi-regex": { - "version": "2.1.1", - "license": "MIT", - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/wrap-ansi/node_modules/is-fullwidth-code-point": { - "version": "1.0.0", - "license": "MIT", - "dependencies": { - "number-is-nan": "^1.0.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/wrap-ansi/node_modules/string-width": { - "version": "1.0.2", - "license": "MIT", - "dependencies": { - "code-point-at": "^1.0.0", - "is-fullwidth-code-point": "^1.0.0", - "strip-ansi": "^3.0.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/wrap-ansi/node_modules/strip-ansi": { - "version": "3.0.1", - "license": "MIT", - "dependencies": { - "ansi-regex": "^2.0.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/wrappy": { "version": "1.0.2", "license": "ISC" }, - "node_modules/xml2js": { - "version": "0.5.0", - "license": "MIT", - "dependencies": { - "sax": ">=0.6.0", - "xmlbuilder": "~11.0.0" - }, - "engines": { - "node": ">=4.0.0" - } - }, - "node_modules/xmlbuilder": { - "version": "11.0.1", - "license": "MIT", - "engines": { - "node": ">=4.0" - } - }, "node_modules/xtend": { "version": "4.0.2", "resolved": "https://registry.npmjs.org/xtend/-/xtend-4.0.2.tgz", @@ -6113,9 +5236,10 @@ "node": ">=0.4" } }, - "node_modules/y18n": { - "version": "4.0.3", - "license": "ISC" + "node_modules/yallist": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", + "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==" }, "node_modules/yaml": { "version": "1.10.2", @@ -6123,44 +5247,6 @@ "engines": { "node": ">= 6" } - }, - "node_modules/yargs": { - "version": "12.0.5", - "license": "MIT", - "dependencies": { - "cliui": "^4.0.0", - "decamelize": "^1.2.0", - "find-up": "^3.0.0", - "get-caller-file": "^1.0.1", - "os-locale": "^3.0.0", - "require-directory": "^2.1.1", - "require-main-filename": "^1.0.1", - "set-blocking": "^2.0.0", - "string-width": "^2.0.0", - "which-module": "^2.0.0", - "y18n": "^3.2.1 || ^4.0.0", - "yargs-parser": "^11.1.1" - } - }, - "node_modules/yargs-parser": { - "version": "11.1.1", - "license": "ISC", - "dependencies": { - "camelcase": "^5.0.0", - "decamelize": "^1.2.0" - } - }, - "node_modules/zip-stream": { - "version": "2.1.3", - "license": "MIT", - "dependencies": { - "archiver-utils": "^2.1.0", - "compress-commons": "^2.1.1", - "readable-stream": "^3.4.0" - }, - "engines": { - "node": ">= 6" - } } } } diff --git a/tools/js-sdk-release-tools/package.json b/tools/js-sdk-release-tools/package.json index 711ba7c7bd9..23e405e4ea9 100644 --- a/tools/js-sdk-release-tools/package.json +++ b/tools/js-sdk-release-tools/package.json @@ -27,7 +27,6 @@ "dependencies": { "@azure-tools/openapi-tools-common": "^1.2.2", "@npmcli/package-json": "^5.2.0", - "@ts-common/azure-js-dev-tools": "^21.1.0", "colors": "1.4.0", "command-line-args": "^5.1.1", "comment-json": "^4.1.0", @@ -35,6 +34,7 @@ "fs-extra": "^11.2.0", "glob": "^11.0.0", "js-yaml": "^4.1.0", + "npm-registry-fetch": "^17.1.0", "parse-ts-to-ast": "^0.1.1", "semver": "^7.3.5", "shelljs": "^0.8.4", @@ -49,6 +49,7 @@ "devDependencies": { "@types/fs-extra": "^11.0.4", "@types/node": "^20.12.12", + "@types/npm-registry-fetch": "^8.0.7", "@types/npmcli__package-json": "^4.0.4", "@types/shelljs": "^0.8.15", "@types/unixify": "^1.0.2", diff --git a/tools/js-sdk-release-tools/src/common/npmUtils.ts b/tools/js-sdk-release-tools/src/common/npmUtils.ts index 92f0c94c547..971913c09ce 100644 --- a/tools/js-sdk-release-tools/src/common/npmUtils.ts +++ b/tools/js-sdk-release-tools/src/common/npmUtils.ts @@ -1,5 +1,6 @@ import { load } from '@npmcli/package-json'; import { NpmPackageInfo } from './types'; +import * as fetch from 'npm-registry-fetch'; export async function getNpmPackageInfo(packageDirectory): Promise { const packageJson = await load(packageDirectory); @@ -29,3 +30,11 @@ export function getArtifactName(info: NpmPackageInfo) { const version = info.version; return `${name}-${version}.tgz`; } + +export async function tryGetNpmView(packageName: string): Promise<{[id: string]: any} | undefined> { + try { + return await fetch.json(`/${packageName}`); + } catch (err) { + return undefined; + } +} \ No newline at end of file diff --git a/tools/js-sdk-release-tools/src/common/utils.ts b/tools/js-sdk-release-tools/src/common/utils.ts index 4836986e5d7..2b6d7400fdb 100644 --- a/tools/js-sdk-release-tools/src/common/utils.ts +++ b/tools/js-sdk-release-tools/src/common/utils.ts @@ -4,7 +4,6 @@ import fs from 'fs'; import { SDKType } from './types'; import { logger } from '../utils/logger'; import { Project, ScriptTarget, SourceFile } from 'ts-morph'; -import { replaceAll } from '@ts-common/azure-js-dev-tools'; import { readFile } from 'fs/promises'; import { parse } from 'yaml'; import { access } from 'node:fs/promises'; @@ -27,6 +26,10 @@ function removeLastNewline(line: string): string { return line.replace(/\n$/, '') } +function replaceAll(original: string, from: string, to: string) { + return original.split(from).join(to); +} + function printErrorDetails( output: { stdout: string; stderr: string; code: number | null } | undefined, printDetails: boolean = false diff --git a/tools/js-sdk-release-tools/src/hlc/utils/automaticGenerateChangeLogAndBumpVersion.ts b/tools/js-sdk-release-tools/src/hlc/utils/automaticGenerateChangeLogAndBumpVersion.ts index 455a7ac75c5..4371a66bf38 100644 --- a/tools/js-sdk-release-tools/src/hlc/utils/automaticGenerateChangeLogAndBumpVersion.ts +++ b/tools/js-sdk-release-tools/src/hlc/utils/automaticGenerateChangeLogAndBumpVersion.ts @@ -4,7 +4,6 @@ import shell from 'shelljs'; import { extractExportAndGenerateChangelog } from "../../changelog/extractMetaData"; import { Changelog } from "../../changelog/changelogGenerator"; -import { NPMScope, NPMViewResult } from "@ts-common/azure-js-dev-tools"; import { makeChangesForFirstRelease, makeChangesForMigrateTrack1ToTrack2, makeChangesForPatchReleasingTrack2, @@ -23,6 +22,7 @@ import { getversionDate } from "../../utils/version"; import { ApiVersionType, SDKType } from "../../common/types" import { getApiVersionType } from '../../xlc/apiVersion/apiVersionTypeExtractor' import { fixChangelogFormat, getApiReviewPath, getNpmPackageName, getSDKType, tryReadNpmPackageChangelog } from '../../common/utils'; +import { tryGetNpmView } from '../../common/npmUtils'; export async function generateChangelogAndBumpVersion(packageFolderPath: string) { const jsSdkRepoPath = String(shell.pwd()); @@ -30,15 +30,14 @@ export async function generateChangelogAndBumpVersion(packageFolderPath: string) const ApiType = await getApiVersionType(packageFolderPath); const isStableRelease = ApiType != ApiVersionType.Preview; const packageName = getNpmPackageName(packageFolderPath); - const npm = new NPMScope({ executionFolderPath: packageFolderPath }); - const npmViewResult: NPMViewResult = await npm.view({ packageName }); - const stableVersion = getVersion(npmViewResult,"latest"); + const npmViewResult = await tryGetNpmView(packageName); + const stableVersion = getVersion(npmViewResult, "latest"); const nextVersion = getVersion(npmViewResult, "next"); - if (npmViewResult.exitCode !== 0 || (!!stableVersion && isBetaVersion(stableVersion) && isStableRelease)) { - logger.info(`Package ${packageName} is first ${npmViewResult.exitCode !== 0? ' ': ' stable'} release, start to generate changelogs and set version for first ${npmViewResult.exitCode !== 0? ' ': ' stable'} release.`); + if (!npmViewResult || (!!stableVersion && isBetaVersion(stableVersion) && isStableRelease)) { + logger.info(`Package ${packageName} is first ${!npmViewResult ? ' ': ' stable'} release, start to generate changelogs and set version for first ${!npmViewResult ? ' ': ' stable'} release.`); makeChangesForFirstRelease(packageFolderPath, isStableRelease); - logger.info(`Generated changelogs and setting version for first${npmViewResult.exitCode !== 0? ' ': ' stable'} release successfully`); + logger.info(`Generated changelogs and setting version for first${!npmViewResult ? ' ': ' stable'} release successfully`); } else { if (!stableVersion) { logger.error(`Invalid latest version ${stableVersion}`); diff --git a/tools/js-sdk-release-tools/src/llc/utils/generateChangelog.ts b/tools/js-sdk-release-tools/src/llc/utils/generateChangelog.ts index 95cc09537ed..1bd327045a9 100644 --- a/tools/js-sdk-release-tools/src/llc/utils/generateChangelog.ts +++ b/tools/js-sdk-release-tools/src/llc/utils/generateChangelog.ts @@ -1,10 +1,10 @@ import * as fs from "fs"; import * as path from "path"; -import { NPMScope } from "@ts-common/azure-js-dev-tools"; import { logger } from "../../utils/logger"; import { getLatestStableVersion } from "../../utils/version"; import { extractExportAndGenerateChangelog } from "../../changelog/extractMetaData"; import { fixChangelogFormat, getApiReviewPath, getSDKType, tryReadNpmPackageChangelog } from "../../common/utils"; +import { tryGetNpmView } from "../../common/npmUtils"; const shell = require('shelljs'); const todayDate = new Date(); @@ -38,9 +38,8 @@ export async function generateChangelog(packagePath) { const packageJson = JSON.parse(fs.readFileSync(path.join(packagePath, 'package.json'), {encoding: 'utf-8'})); const packageName = packageJson.name; const version = packageJson.version; - const npm = new NPMScope({executionFolderPath: packagePath}); - const npmViewResult = await npm.view({packageName}); - if (npmViewResult.exitCode !== 0) { + const npmViewResult = await tryGetNpmView(packageName); + if (!npmViewResult) { logger.info(`'${packageName}' is first release, start to generate changelog.`); generateChangelogForFirstRelease(packagePath, version); logger.info(`Generated changelog successfully.`); diff --git a/tools/js-sdk-release-tools/src/llc/utils/utils.ts b/tools/js-sdk-release-tools/src/llc/utils/utils.ts index 183a4cfa1a3..c047e02a64e 100644 --- a/tools/js-sdk-release-tools/src/llc/utils/utils.ts +++ b/tools/js-sdk-release-tools/src/llc/utils/utils.ts @@ -1,8 +1,8 @@ import * as fs from "fs"; import * as path from "path"; import {logger} from "../../utils/logger"; -import {NPMScope} from "@ts-common/azure-js-dev-tools"; import {getLatestStableVersion} from "../../utils/version"; +import { tryGetNpmView } from "../../common/npmUtils"; const readline = require('readline'); export function validPackageName(packageName) { @@ -55,8 +55,7 @@ export function getPackageFolderName(packageName) { } export async function getLatestCodegen(packagePath) { - const npm = new NPMScope({executionFolderPath: packagePath}); - const npmViewResult = await npm.view({packageName: '@autorest/typescript'}); + const npmViewResult = await tryGetNpmView('@autorest/typescript'); const stableVersion = getLatestStableVersion(npmViewResult); if (!stableVersion) return '6.0.0-beta.14'; diff --git a/tools/js-sdk-release-tools/src/test/npm/npm.test.ts b/tools/js-sdk-release-tools/src/test/npm/npm.test.ts index ea24f0d8184..3119c9fb666 100644 --- a/tools/js-sdk-release-tools/src/test/npm/npm.test.ts +++ b/tools/js-sdk-release-tools/src/test/npm/npm.test.ts @@ -2,6 +2,7 @@ import { describe, expect, test } from "vitest"; import { updatePackageVersion } from "../../mlc/clientGenerator/utils/typeSpecUtils"; import { join } from "path"; import { load } from '@npmcli/package-json'; +import { tryGetNpmView } from "../../common/npmUtils"; describe('Npm package json', () => { test('Replace package version', async () => { @@ -10,4 +11,14 @@ describe('Npm package json', () => { const packageJson = await load(packageDirectory); expect(packageJson.content.version).toBe('2.0.0'); }); -}); \ No newline at end of file +}); + +describe("Npm view", () => { + test("View package version", async () => { + const nonExistResult = await tryGetNpmView("non-exist"); + expect(nonExistResult).toBeUndefined(); + + const normalResult = await tryGetNpmView("connect"); + expect(normalResult!["name"]).toBe("connect"); + }); +}); diff --git a/tools/js-sdk-release-tools/src/utils/version.ts b/tools/js-sdk-release-tools/src/utils/version.ts index dd98d826bf7..9ff572fec3d 100644 --- a/tools/js-sdk-release-tools/src/utils/version.ts +++ b/tools/js-sdk-release-tools/src/utils/version.ts @@ -1,19 +1,18 @@ -import {NPMViewResult, StringMap, tr} from "@ts-common/azure-js-dev-tools"; import {logger} from "./logger"; const semverInc = require('semver/functions/inc') -export function getVersion(npmViewResult: NPMViewResult,tag: string) { - const distTags: StringMap | undefined = npmViewResult['dist-tags']; +export function getVersion(npmViewResult: Record | undefined, tag: string) { + const distTags: Record | undefined = npmViewResult?.['dist-tags']; return distTags && distTags[tag]; } -export function getversionDate(npmViewResult: NPMViewResult, version : string){ - const time: StringMap | undefined = npmViewResult['time']; +export function getversionDate(npmViewResult: Record, version : string){ + const time: Record | undefined = npmViewResult['time']; return time && time[version]; } -export function getLatestStableVersion(npmViewResult: NPMViewResult) { - const distTags: StringMap | undefined = npmViewResult['dist-tags']; +export function getLatestStableVersion(npmViewResult: Record | undefined) { + const distTags: Record | undefined = npmViewResult?.['dist-tags']; const stableVersion = distTags && distTags['latest']; return stableVersion; }