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: use generic package manager #1533

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

royalgarter
Copy link

@royalgarter royalgarter commented May 6, 2024

This change is Reviewable


- For better compatible with project using npm only
- Tested with node 18/20/22 (npm 10+)

Add support to package managers (not only yarn or npm):

  • yarn
  • npm
  • others (pnpm etc)

TODO:

  • Update README

Fix #1543

@rtritto rtritto changed the title Remove the hard dependency on yarn feat: use generic package manager Jun 6, 2024
@rtritto rtritto added the feature label Jun 6, 2024
Copy link
Contributor

Choose a reason for hiding this comment

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

Just a question. There will be no need to add a package-lock.json or a something similar to that to keep packages versions synced?

Copy link
Member

@rtritto rtritto Jun 7, 2024

Choose a reason for hiding this comment

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

I should use (prefer) yarn as main package manager because it use some fields in package.json and has some additional files.
To sync (freeze) dependencies we can use yarn.lock. Imo maintain the package-lock.json too isn't needed.
At install step, each package manager removes files of other package managers and creates files that it needs.

@rtritto
Copy link
Member

rtritto commented Jun 17, 2024

@BlackthornYugen what do you think about this changes?

@BlackthornYugen
Copy link
Member

I'm not familiar with the cross-env, but I would agree that package locks are required so that we can have reproducible builds.

@rtritto
Copy link
Member

rtritto commented Jun 17, 2024

So we must maintain and update both yarn.lock and package-lock.json files.
For instance, we can use a preinstall script, that use logics based on package manager used (imo we need to move the other (not related) lock files to a temporary folder).

We need some ideas 🤔

Imo this feature can be merged and the maintain lock files will be handled in another feature.

P.S.: next we can also add the pnpm support.

@rtritto
Copy link
Member

rtritto commented Jun 18, 2024

For the feature that update (handle) lock files, I created this WIP https://github.com/mongo-express/mongo-express/tree/update-lock-files

Can anyone review this PR?

worker-build-deploy and others added 2 commits June 28, 2024 00:39
- For better compatible with project using npm only
- Tested with node 18/20/22 (npm 10+)
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.

Installation issue on amazon linux 2023
4 participants