Skip to content

@azure/core-rest-pipeline is used but not in the list of dependencies #215

Description

The @azure/core-rest-pipeline package is used (https://github.com/Azure/AppConfiguration-JavaScriptProvider/blob/main/src/appConfigurationImpl.ts#L18) but is not included in the list of dependencies in the package.json file.

Activity

  1. juniwang commented on Aug 28, 2025

    @juniwang
    Member

    @azure/core-rest-pipeline is a nested dependency of @azure/app-configuration-provider. Have you seen any issues loading the package?

  2. zhiyuanliang-ms commented on Aug 28, 2025

    @zhiyuanliang-ms
    Member

    Hey, Jimmy Thomson (@jimmythomson) As Junbo Wang (@juniwang) mentioned, it is a nested dependency. @azure/app-configuration-provider is depend on @azure/app-configuration which has direct dependency on @azure/core-rest-pipeline.
    I listed those nested dependency here.

  3. jimmythomson commented on Aug 28, 2025

    @jimmythomson
    Author

    Hi 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-pipeline package will be automatically available. But of course when running a unit test, the environment won't include that package as an automatic dependency.

  4. zhiyuanliang-ms commented on Aug 28, 2025

    @zhiyuanliang-ms
    Member

    Hey, Jimmy Thomson (@jimmythomson) How did you setup your unit tests in Azure function? Did you use npm to install the dependencies?

  5. jimmythomson commented on Aug 28, 2025

    @jimmythomson
    Author

    Hi 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.

  6. jimmythomson commented on Aug 28, 2025

    @jimmythomson
    Author

    I should also mention that I'm using pnpm rather than npm.

  7. zhiyuanliang-ms commented on Aug 28, 2025

    @zhiyuanliang-ms
    Member

    It seems like pnpm has some bug when resolving nested dependency. I found this issue. Could you try to use npm or 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-configuration and @azure/app-configuration-provider depends on different versions of @azure/core-rest-pipeline, npm may fail to resolve it.

  8. jimmythomson commented on Aug 28, 2025

    @jimmythomson
    Author

    Hi Zhiyuan Liang (@zhiyuanliang-ms) - for me, it's strange to use a dependency which isn't explicitly listed in the dependencies of the package.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-configuration that you use, you just need to ensure that you update the version of @azure/core-rest-pipeline if it's also been changed in @azure/app-configuration.

  9. zhiyuanliang-ms commented on Sep 1, 2025

    @zhiyuanliang-ms
    Member

    Hey, Jimmy Thomson (@jimmythomson) Added @azure/core-rest-pipeline to direct dependency. #219

  10. jimmythomson commented on Sep 1, 2025

    @jimmythomson
    Author
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions