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

docs: updated contributing instructions #3376

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

steven-pribilinskiy
Copy link

@steven-pribilinskiy steven-pribilinskiy commented Dec 18, 2024

Description

Updated development requirements and contributing guidelines:

  • Improved suggestion to make the soon-outdated Node.js 18 as the default version on the system
  • Add link to corepack
  • Add instruction to open a new terminal after enabling corepack
  • Removed reference to non-existing canary branch

Addresses #3375

Although it is possible to use both pnpm 8 and pnpm 9 with corepack, for node itself one should use nvm use in every new instance of the terminal (or swap the default)

Related Issue

N/A - Maintenance update

Types of changes

  • Docs change / refactoring / dependency upgrade
  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)

Checklist

  • I have updated the documentation.
  • All new and existing tests passed.
  • I have updated the documentation.

Copy link

changeset-bot bot commented Dec 18, 2024

⚠️ No Changeset found

Latest commit: ab65f90

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

Copy link

netlify bot commented Dec 18, 2024

Deploy Preview for module-federation-docs ready!

Name Link
🔨 Latest commit ab65f90
🔍 Latest deploy log https://app.netlify.com/sites/module-federation-docs/deploys/677bdabd8b85d9000842bb9c
😎 Deploy Preview https://deploy-preview-3376--module-federation-docs.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@steven-pribilinskiy steven-pribilinskiy changed the title chore: update package.json to support latest LTS version of Node.js (#3375) chore: update package.json to support latest LTS version of Node.js #3375 Dec 18, 2024
@steven-pribilinskiy steven-pribilinskiy changed the title chore: update package.json to support latest LTS version of Node.js #3375 chore: update package.json to support latest LTS version of Node.js Dec 18, 2024
@@ -6,7 +6,7 @@ Thank you for your interest in contributing to Module Federation! Before startin

1. [Fork](https://help.github.com/articles/fork-a-repo/) the Module Federation repository into your own GitHub account.
2. [Clone](https://help.github.com/articles/cloning-a-repository/) the repository to your local machine.
3. Checkout a new branch from `main` or `canary`.

Choose a reason for hiding this comment

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

There's no canary branch

pnpm-lock.yaml Outdated

Choose a reason for hiding this comment

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

Too many changes here, probably pnpm 9 lockfile is not compatible with v8

@zhoushaw zhoushaw requested a review from 2heal1 December 19, 2024 04:06
@zhoushaw
Copy link
Collaborator

@2heal1 You can take care of this

package.json Outdated
@@ -2,8 +2,8 @@
"name": "module-federation",
"version": "0.0.0",
"engines": {
"node": "^18",
"pnpm": "^8.11.0"
Copy link
Member

Choose a reason for hiding this comment

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

we use corepack, should us exact pnpm version otherwise this can cause issues

Copy link
Author

@steven-pribilinskiy steven-pribilinskiy Jan 6, 2025

Choose a reason for hiding this comment

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

Gotcha, how about node, is 18 mandatory?
I have multiple projects and some expect v20.

Should we containerize module-federation or is there a tool, similar to corepack, that can auto-swap node binaries based on engines section in package.json? Or is the idea to run nvm use 18 on every newly opened terminal (considering that the default version is pointed to the lts v20)

Also note that 18 will lose security updates in 3 months
image

Copy link
Author

@steven-pribilinskiy steven-pribilinskiy Jan 6, 2025

Choose a reason for hiding this comment

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

There are also troubles when using corepack (no wonder it is in Experimental stage)

> pnpm -v
9.13.0

> corepack cache clean
> corepack disable
> corepack enable

> corepack install
Adding [email protected] to the cache...

> pnpm -v
9.13.0

> corepack prepare [email protected] --activate
Preparing [email protected] for immediate activation...

> pnpm -v
9.13.0

That is on Ubuntu WSL

So I went with rm-ing all instances that were detected with whereis pnpm

> rm /home/stevenp/.nvm/versions/node/v18.20.5/bin/pnpm
> rm -rf /home/stevenp/.local/share/pnpm
> rm -rf ~/.pnpm-store
> corepack install

That worked, but if I would need a different pnpm version in another project, I might face with issues again

Copy link
Author

Choose a reason for hiding this comment

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

Nevertheless, please check the updated PR

@steven-pribilinskiy steven-pribilinskiy force-pushed the fix/node-pnpm-compatibility-3375 branch from 60a072d to 5f057bb Compare January 6, 2025 11:22
@@ -30,7 +30,6 @@ To install Node.js, use [nvm](https://github.com/nvm-sh/nvm) or [fnm](https://gi
```bash
# Install Node.js 18 LTS
nvm install 18 --lts
Copy link
Author

@steven-pribilinskiy steven-pribilinskiy Jan 6, 2025

Choose a reason for hiding this comment

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

Moved suggestion to use node as default version in a separate section

@steven-pribilinskiy steven-pribilinskiy force-pushed the fix/node-pnpm-compatibility-3375 branch 3 times, most recently from 88b820e to a5394f8 Compare January 6, 2025 11:53
@steven-pribilinskiy steven-pribilinskiy changed the title chore: update package.json to support latest LTS version of Node.js docs: update instructions for pnpm Jan 6, 2025
@steven-pribilinskiy steven-pribilinskiy force-pushed the fix/node-pnpm-compatibility-3375 branch from a5394f8 to db8ef71 Compare January 6, 2025 12:42
@steven-pribilinskiy steven-pribilinskiy force-pushed the fix/node-pnpm-compatibility-3375 branch from db8ef71 to ab65f90 Compare January 6, 2025 13:29
@steven-pribilinskiy steven-pribilinskiy changed the title docs: update instructions for pnpm docs: updated contributing instructions Jan 7, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants