Skip to content

Conversation

RomanNikitenko
Copy link
Contributor

@RomanNikitenko RomanNikitenko commented Jul 3, 2025

What does this PR do?

  • Prevent multiple versions of the axios library from being bundled in consumer projects.

At the moment build of the che-code fails with the errors: eclipse-che/che#23083 (comment)

My understanding is:

My propose is - moving axios from dependencies to:

  • peerDependencies section: to declare axios as a required dependency provided by the consuming project (che-code project passes axios instance to the devWorkspaceGenerator)
  • devDependencies: to allow internal use and local development/testing of this package

What issues does this PR fix or reference?

eclipse-che/che#23083 (comment)

Is it tested? How?

For testing:

  • I've added devWorkspaceGenerator as a file dependency directly to the che-code, please see here
  • applied current PR changes directly in the che-code/devWorkspaceGenerator, please see here
  • using those steps ^ I got successful build for the che-code please see here

Please let me know if there is another way for testing - will do it!

@RomanNikitenko
Copy link
Contributor Author

@olexii4
As far as I know devWorkspaceGenerator is used on the dashboard side as well
So - please take a look at the PR changes.

Thanks in advance!

@ibuziuk ibuziuk requested a review from olexii4 July 3, 2025 10:40
Copy link
Collaborator

@svor svor left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

@openshift-ci openshift-ci bot added the lgtm label Jul 3, 2025
Copy link

openshift-ci bot commented 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.

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@olexii4
Copy link
Collaborator

olexii4 commented Jul 3, 2025

LGTM

@svor svor merged commit a6fff71 into main Jul 3, 2025
6 of 7 checks passed
@svor svor deleted the move-axios-to-peerDependency branch July 3, 2025 14:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants