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

Update dependencies #583

Merged
merged 8 commits into from
Jun 27, 2022
Merged
Show file tree
Hide file tree
Changes from 3 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
2 changes: 1 addition & 1 deletion .github/workflows/cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
with:
node-version: "16"

- run: npm install
- run: npm ci
Copy link
Member Author

Choose a reason for hiding this comment

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

npm ci will install the exact modules listed in the package-lock.json file. So you know that your published version will work exactly the same as it did for you locally. Without a lock file, or using npm install (which updates the lock file), you can end up with a sub-dependency at a different version which may cause unforeseen issues.

npm ci basically solves the "works on my machine" issue. Now it works on all machines.

- uses: JS-DevTools/npm-publish@v1
with:
token: ${{ secrets.NPM_TOKEN }}
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:
with:
node-version: ${{ matrix.node }}

- run: npm run install
- run: npm ci
Copy link
Member Author

@TheJaredWilcurt TheJaredWilcurt Jun 27, 2022

Choose a reason for hiding this comment

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

File Changes:

  • node => node-version, most repos name the node matrix this, don't know why, but just making it like the rest.
  • npm 8.5.0 - By default Node 14 comes with npm 6, which supports v1 lock files. But this PR includes a V2 lockfile. So we need to use npm 7 or above for that.
  • actions-setup-node => volta-cli/action, This lets us easily set the Node and npm versions in one go, so we can do Node 14, 16, or 18 all with npm 8.5.0
  • npm run install => npm ci, this makes sure we download the exact same dependency versions that were used during development

- run: npm run format
- run: npm run lint
- run: npm run test
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ build
cache

yarn.lock
package-lock.json

npm-debug.log
.pnpm-debug.log
Expand Down
17 changes: 6 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -362,17 +362,12 @@ This project was created by [Steffen Müller](https://github.com/steffenmllr) an

1. Pick and install a Node version manager
* Linux/OSX - [nvm](https://github.com/nvm-sh/nvm)
* Windows 8+ - [nvm-windows](https://github.com/coreybutler/nvm-windows)
* Windows 7 - [nodist](https://github.com/nullivex/nodist)
* Win/Lin/OSX - [volta](https://volta.sh)
1. Use your version manager to install Node 14.19, 16.9, 18.2 or above
1. Run `corepack enable`
1. `corepack prepare [email protected] --activate`
1. `pnpm install`
* If you haven't used `pnpm` before, [here is a cheatsheet](https://dev.to/equiman/npm-vs-yarn-vs-pnpm-commands-cheatsheet-3el8)
1. `pnpm demo` to test your changes at first glance
1. `pnpm test` to run unit tests
1. Don't forget to run `pnpm format && pnpm lint` before commiting your changes
* Win 7+/Linux/OSX - [volta](https://volta.sh)
1. Use your version manager to install Node 14.19 or above
1. Run `npm install`
1. `npm run demo` to test your changes at first glance
1. `npm t` to run unit tests
1. Don't forget to run `npm run format && npm run lint` before commiting your changes

### General Guidelines

Expand Down
2 changes: 1 addition & 1 deletion dist/index.cjs

Large diffs are not rendered by default.

Loading