I have a npm project that build with Azure DevOps Artifact feed. Consider the following case:
Our project has a dependency on @openapitools/openapi-generator-cli v2.13.3. This package has a dependency "axios": "^1.6.5". Now, I want to update @openapitools/openapi-generator-cli v2.13.3 to v2.13.4. @openapitools/openapi-generator-cli v2.13.4 also has the dependency "axios": "^1.6.5". The latest version of axios in the public registry is 1.7.4, however, in our private feed, the latest version of axios is 1.6.8.
when I install @openapitools/openapi-generator-cli v2.13.4 with private feed connected, axios v1.6.8 is used.
So, the question is How can I install it with the latest version from the upstream source instead? and what is the best practice?
I download the public package version @openapitools/openapi-generator-cli v2.13.4
, and from the package.json
of this package version, I can see below sets of "dependencies
".
{
. . .
"version": "2.13.4",
"name": "@openapitools/openapi-generator-cli",
. . .
"dependencies": {
"@nestjs/axios": "3.0.2",
"@nestjs/common": "10.3.0",
"@nestjs/core": "10.3.0",
"@nuxtjs/opencollective": "0.3.2",
"axios": "1.6.8",
"chalk": "4.1.2",
"commander": "8.3.0",
"compare-versions": "4.1.4",
"concurrently": "6.5.1",
"console.table": "0.10.0",
"fs-extra": "10.1.0",
"glob": "7.2.3",
"https-proxy-agent": "7.0.4",
"inquirer": "8.2.6",
"lodash": "4.17.21",
"reflect-metadata": "0.1.13",
"rxjs": "7.8.1",
"tslib": "2.6.2"
}
}
I noticed that it is "axios": "1.6.8"
instead of "axios": "^1.6.8"
. The set of "axios": "1.6.8"
will only match the package version axios v1.6.8
as the available dependency for @openapitools/openapi-generator-cli v2.13.4
.