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

Use npm over lerna #396

Draft
wants to merge 7 commits into
base: master
Choose a base branch
from

Conversation

Freezystem
Copy link
Contributor

@Freezystem Freezystem commented Aug 28, 2024

⚠️ This PR contains BREAKING CHANGES ⚠️

Replace old lerna commands with npm workspaces

TODO

Remove support of EOL NodeJS versions (10, 12 and 14) and add new LTS ones (18, 20 and 22)

Remove support of no longer maintained LTS versions of NodeJS.
Note that NodeJS 16 should also be added but we can wait a bit just in case some users are still using it.

Replace no longer maintained npm-check with npm-check-updates

npm-check seems to no longer be maintained:

  • lots of PRs pending review.
  • no updates since 07/2022.
  • owner is inactive.
  • no update on outadated packages with CVEs.

I propose to replace it with npm-check-updates which:

  • is actively maintained
  • works closely like npm-check with additional options like peer dependency checking.

New deps script will run: ncu -i --format group --install always --peer with:

  • -i: for interactive prompt in terminal
  • --format group: to group dependencies by level (path, minor, major)
  • --install always: to run npm install right after update selection
  • --peer: to check for peer constraint before updating a package

In addition, npm audit fix is automatically run after npm run deps as a post script: npm run postdeps

Improve readme to mention basic commands

Add readme notes that explain how to run npm script on whole repository or a specific package.

First pass to audit and upgrade old dependencies

Run basic npm audit on all packages to upgrade patch level dependencies

Improve mongoose tests

Add automated tests for mongoose 7 and 8. Requires #395 to be merged prior

Harmonize test commands

Update name of npm scripts related to tests to be the same across packages:

  • npm run test: to run all tests of a package
  • npm run test:coverage: to run all tests of a package with coverage
  • npm run test:watch: to run all tests of a package and watch for modification
  • npm run test:unit: to run all unit tests of a package
  • npm run test:integration: to run all integration tests of a package

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant