Repository navigation
@azure/core-rest-pipeline is used but not in the list of dependencies #215
Description
Activity
@azure/core-rest-pipelineis a nested dependency of@azure/app-configuration-provider. Have you seen any issues loading the package?zhiyuanliang-ms commented
on Aug 28, 2025 MemberMore actionsHey, Jimmy Thomson (@jimmythomson) As Junbo Wang (@juniwang) mentioned, it is a nested dependency.
@azure/app-configuration-provideris depend on@azure/app-configurationwhich has direct dependency on@azure/core-rest-pipeline.
I listed those nested dependency here.jimmythomson commented
on Aug 28, 2025 AuthorMore actionsHi Junbo Wang (@juniwang) Zhiyuan Liang (@zhiyuanliang-ms) - I've experienced problems with this when running unit tests. I guess that within the context of an Azure function, it's fine, as I assume the
@azure/core-rest-pipelinepackage will be automatically available. But of course when running a unit test, the environment won't include that package as an automatic dependency.Reacted by Zhiyuan Liangzhiyuanliang-ms commented
on Aug 28, 2025 MemberMore actionsHey, Jimmy Thomson (@jimmythomson) How did you setup your unit tests in Azure function? Did you use npm to install the dependencies?
jimmythomson commented
on Aug 28, 2025 AuthorMore actionsHi Zhiyuan Liang (@zhiyuanliang-ms) - I'm using vitest, and I actually mocked the function that ultimately uses
@azure/app-configuration-provider, however I suspect that some part of the vitest tooling suite still reads the code and checks the dependencies.jimmythomson commented
on Aug 28, 2025 AuthorMore actionsI should also mention that I'm using
pnpmrather thannpm.zhiyuanliang-ms commented
on Aug 28, 2025 MemberMore actionsIt seems like
pnpmhas some bug when resolving nested dependency. I found this issue. Could you try to usenpmor manually install@azure/core-rest-pipeline.BTW, do you think it is necessary to add it to the direct dependency of this package? Technically speaking, the only problem here is that we will need to take care of the dependency version of
@azure/core-rest-pipeline. If@azure/app-configurationand@azure/app-configuration-providerdepends on different versions of@azure/core-rest-pipeline, npm may fail to resolve it.jimmythomson commented
on Aug 28, 2025 AuthorMore actionsHi Zhiyuan Liang (@zhiyuanliang-ms) - for me, it's strange to use a dependency which isn't explicitly listed in the
dependenciesof thepackage.json file. The main reason being that if the dependency that you're relying on changes their code and removes the dependency, then your code will break. I appreciate it's a little bit more controlled in your scenario since it's another Azure package, but my inclination would still be to include it explicitly. Whenever you bump the version of@azure/app-configurationthat you use, you just need to ensure that you update the version of@azure/core-rest-pipelineif it's also been changed in@azure/app-configuration.Reacted by Zhiyuan Liangzhiyuanliang-ms commented
on Sep 1, 2025 MemberMore actionsHey, Jimmy Thomson (@jimmythomson) Added
@azure/core-rest-pipelineto direct dependency. #219Amazing! Thank you, Zhiyuan Liang (@zhiyuanliang-ms).
The
@azure/core-rest-pipelinepackage is used (https://github.com/Azure/AppConfiguration-JavaScriptProvider/blob/main/src/appConfigurationImpl.ts#L18) but is not included in the list ofdependenciesin thepackage.jsonfile.