fix: Prevent multiple versions of axios from being bundled in consumer projects#201
Merged
Conversation
…r projects Signed-off-by: Roman Nikitenko <rnikiten@redhat.com>
Signed-off-by: Roman Nikitenko <rnikiten@redhat.com>
Contributor
Author
|
@olexii4 Thanks in advance! |
svor
approved these changes
Jul 3, 2025
Collaborator
svor
left a comment
There was a problem hiding this comment.
LGTM
Tested devworkspace generator locally to generate devworkspace from a devfile:
node lib/entrypoint.js \
--devfile-url:https://github.com/che-samples/java-spring-petclinic/tree/main \
--editor-url:https://raw.githubusercontent.com/eclipse-che/che-operator/refs/heads/main/editors-definitions/che-code-insiders.yaml \
--output-file:/tmp/devworkspace-che-code-latest.yaml \
--injectDefaultComponent:true \
--defaultComponentImage:registry.access.redhat.com/ubi8/openjdk-11:latest
Works as usual 🤹🏻♂️
Validating devfile
Devfile is valid with schema version 2.2.2
More than one dev container component has been potentially found, taking the first one of tools,mariadb
DevWorkspace che-code-spring-petclinic was generated
ibuziuk
approved these changes
Jul 3, 2025
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: ibuziuk, RomanNikitenko, svor The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
Collaborator
|
LGTM |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What does this PR do?
axioslibrary from being bundled in consumer projects.At the moment build of the
che-codefails with the errors: eclipse-che/che#23083 (comment)My understanding is:
che-codeproject passesaxiosinstance to thedevWorkspaceGeneratorche-codeanddevWorkspaceGeneratorhaveaxiosas a dependencytypescript"thinks" that there are two different instances of theaxiosand throws errors Align che-code typescript version with the upstream eclipse-che/che#23083 (comment)typescriptversion was updated - so more strict checks where appliedMy propose is - moving
axiosfromdependenciesto:peerDependenciessection: to declareaxiosas a required dependency provided by theconsumingproject (che-codeproject passesaxiosinstance to thedevWorkspaceGenerator)devDependencies: to allow internal use and local development/testing of this packageWhat issues does this PR fix or reference?
eclipse-che/che#23083 (comment)
Is it tested? How?
For testing:
devWorkspaceGeneratoras afiledependency directly to theche-code, please see hereche-code/devWorkspaceGenerator, please see hereche-codeplease see herePlease let me know if there is another way for testing - will do it!