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

OSOE-1001: Fixing corepack install by updating PNPM to 8.15.9 #121

Merged
merged 7 commits into from
Feb 2, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
<ItemGroup>
<!-- Adding Node.js Extensions as a PackageReference will result in inclusion of its .props and .targets files
during Build. -->
<PackageReference Include="Lombiq.NodeJs.Extensions" Version="2.1.1" />
<PackageReference Include="Lombiq.NodeJs.Extensions" Version="2.1.2-alpha.1.osoe-1001" />
</ItemGroup>

</Project>
2 changes: 1 addition & 1 deletion Lombiq.NodeJs.Extensions/Docs/SetupLinux.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ Next we install NVM and Node.js in userspace.
1. Install NVM for your user: `curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.1/install.sh | bash`
2. Type `nvm`.
- If you get _nvm: command not found_ error, reload your shell profile first (`source ~/.bashrc`) and try again.
3. Install the latest Node.js with `nvm install node`.
3. Install the latest LTS version of Node.js with `nvm install --lts`.
- If you are going to use Gulp and you encounter problems with Node.js 16 or above, downgrade to Node.js 14 and make that the default: `nvm install 14 && nvm alias default 14.x.y` (replace `x` and `y` with the values from your shell output).

This is good enough for launching new apps, but e.g. MSBuild doesn't use a login shell. If you have a desktop environment (through a display manager), see if the following works on your system:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,14 @@

<!-- Try to enable pnpm via corepack, which is part of Node.js v16.9 and above. -->
<Target Name="EnablePnpm">
<!-- Enable the latest version of pnpm@8 using an explicit version number, to avoid any surprise updates. -->
<!-- Enable the latest version of pnpm included in the LTS version of Node.js using an explicit version number, to
avoid any surprise updates. -->
<!-- The hash for the PNPM version is only a workaround for https://github.com/nodejs/corepack/issues/612. It can be
retrieved with `npm view [email protected]`. -->
<!-- Retry to work around sporadic errors when this is run by multiple threads at the same time. -->
<MSBuild
Projects="$(RetryCommand)"
Properties="Command=corepack enable &amp;&amp; corepack prepare pnpm@8.14.3 --activate &amp;&amp; echo PNPM activated via corepack;NxVerbosity=$(NxVerbosity);WorkingDirectory=$(WorkingDirectory)" />
Properties="Command=corepack enable &amp;&amp; corepack prepare pnpm@8.15.9+sha1.aa4bc353b5f59fe1f1df5d802ce049ddf7f3c60e --activate &amp;&amp; echo PNPM activated via corepack;NxVerbosity=$(NxVerbosity);WorkingDirectory=$(WorkingDirectory)" />
</Target>

<!-- Adding Node.js Extensions as an npm package to the consuming project in order to be able to run the build, clean,
Expand Down
7 changes: 7 additions & 0 deletions Readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -134,3 +134,10 @@ The `lint` script calls respective linting scripts for SCSS, JavaScript and Mark
Bug reports, feature requests, comments, questions, code contributions and love letters are warmly welcome. You can send them to us via GitHub issues and pull requests. Please adhere to our [open-source guidelines](https://lombiq.com/open-source-guidelines) while doing so.

This project is developed by [Lombiq Technologies](https://lombiq.com/). Commercial-grade support is available through Lombiq.

### When a new Node.js LTS version is released

We always aim to support the latest LTS version of Node.js (what you can see [here](https://nodejs.org/en/about/previous-releases)). When a new LTS version is released, do the following:

- Update the PNPM version that `corepack` prepares to the one coming with the Node.js version in _NodeJsExtensionsNpmPackage.targets_ (look for `corepack prepare pnpm@`).
- If any of the installation instructions needs to change, update the [Linux setup guide](Lombiq.NodeJs.Extensions/Docs/SetupLinux.md) as well as the [Windows setup guide](Lombiq.NodeJs.Extensions/Docs/SetupWindows.md) (these already instruct to install the latest LTS version).
Loading