Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(nodejs): ✨ handle engine versions and package installs #617

Merged
merged 10 commits into from
Jul 2, 2024

Conversation

XaF
Copy link
Owner

@XaF XaF commented Jul 1, 2024

When using package.json, Node can define a number of engines and the relative versions that are needed for it. This was not directly supported while we were already looking at package.json to figure out the version of node to be installed.

This now adds support to ensure that npm, pnpm, yarn, electron and other engines are installed in the required versions for the current environment. This also creates an isolation path for node to run npm install -g and install tools only for the current work directory.

This also adds support for running npm install, pnpm install or yarn install automatically depending on the lock files that are present in the directory, as well as the engines listed in the package.json file.

Both those behaviors default to be enabled, but can be disabled by setting install_engines and install_packages to false when setting up the node operation.

Closes #293
Closes #294

@XaF XaF added the enhancement New feature or request label Jul 1, 2024
@XaF XaF added this to the v0.0.25 milestone Jul 1, 2024
@github-actions github-actions bot added dependencies Pull requests that update a dependency file rust Pull requests that update Rust code labels Jul 1, 2024
src/internal/config/up/nodejs.rs Fixed Show fixed Hide fixed
src/internal/config/up/nodejs.rs Fixed Show fixed Hide fixed
src/internal/config/up/nodejs.rs Fixed Show fixed Hide fixed
src/internal/config/up/nodejs.rs Fixed Show fixed Hide fixed
src/internal/config/up/nodejs.rs Fixed Show fixed Hide fixed
@github-actions github-actions bot added the javascript Pull requests that update Javascript code label Jul 2, 2024
src/internal/config/up/nodejs.rs Fixed Show fixed Hide fixed
src/internal/config/up/nodejs.rs Fixed Show fixed Hide fixed
src/internal/config/up/nodejs.rs Fixed Show fixed Hide fixed
@github-actions github-actions bot added the documentation Improvements or additions to documentation label Jul 2, 2024
@XaF XaF changed the title feat(nodejs): ✨ handle engine versions feat(nodejs): ✨ handle engine versions and package installs Jul 2, 2024
@XaF XaF enabled auto-merge (squash) July 2, 2024 14:07
@XaF XaF modified the milestones: v0.0.25, v0.0.26 Jul 2, 2024
@XaF XaF merged commit dbb7273 into main Jul 2, 2024
19 checks passed
@XaF XaF deleted the xaf/nodejs_handle_engine_versions branch July 2, 2024 14:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dependencies Pull requests that update a dependency file documentation Improvements or additions to documentation enhancement New feature or request javascript Pull requests that update Javascript code rust Pull requests that update Rust code
Projects
None yet
Development

Successfully merging this pull request may close these issues.

node operation: add subparameter for npm node operation: add subparameter for yarn
1 participant