Skip to content

Commit

Permalink
Move to npm from yarn
Browse files Browse the repository at this point in the history
  • Loading branch information
ranisalt committed Aug 4, 2024
1 parent bbb6c4f commit c314a6b
Show file tree
Hide file tree
Showing 9 changed files with 1,690 additions and 917 deletions.
2 changes: 1 addition & 1 deletion .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

version: 2
updates:
- package-ecosystem: "yarn" # See documentation for possible values
- package-ecosystem: "npm" # See documentation for possible values
directory: "/" # Location of package manifests
schedule:
interval: "weekly"
23 changes: 10 additions & 13 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,10 @@ jobs:
submodules: true

- name: Install dependencies
run: yarn install --frozen-lockfile
run: npm ci

- name: Lint
run: yarn lint

- name: Audit
run: yarn audit
run: npm lint

test:
strategy:
Expand All @@ -40,14 +37,14 @@ jobs:
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
cache: yarn
cache: npm
node-version: ${{ matrix.node-version }}

- name: Install dependencies
run: yarn install --frozen-lockfile
run: npm ci

- name: Run tests
run: yarn test
run: npm test

test-alpine:
strategy:
Expand All @@ -70,10 +67,10 @@ jobs:
submodules: true

- name: Install dependencies
run: yarn install --frozen-lockfile
run: npm ci

- name: Run tests
run: yarn test
run: npm test

test-freebsd:
strategy:
Expand All @@ -92,8 +89,8 @@ jobs:
- uses: vmactions/freebsd-vm@v1
with:
prepare: |
pkg install -y gmake python3 yarn-node${{ matrix.node-version }}
pkg install -y gmake python3 npm-node${{ matrix.node-version }}
run: |
yarn install
yarn test
npm install
npm test
sync: sshfs
28 changes: 14 additions & 14 deletions .github/workflows/package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,14 +45,14 @@ jobs:
- name: Use Node.js 20
uses: actions/setup-node@v4
with:
cache: yarn
cache: npm
node-version: 20

- name: Install dependencies
run: yarn install --frozen-lockfile --ignore-scripts
run: npm ci

- name: Prebuild
run: yarn build
run: npm run build

- name: Upload artifacts
uses: actions/upload-artifact@v4
Expand All @@ -77,10 +77,10 @@ jobs:
submodules: true

- name: Install dependencies
run: yarn install --frozen-lockfile --ignore-scripts
run: npm ci

- name: Prebuild
run: yarn build
run: npm run build

- name: Upload artifacts
uses: actions/upload-artifact@v4
Expand All @@ -105,10 +105,10 @@ jobs:
submodules: true

- name: Install dependencies
run: yarn install --frozen-lockfile --ignore-scripts
run: npm ci

- name: Prebuild
run: yarn build
run: npm run build

- name: Upload artifacts
uses: actions/upload-artifact@v4
Expand All @@ -134,10 +134,10 @@ jobs:
dockerRunArgs: --volume "${PWD}:/repo" --workdir /repo
install: |
apk add --update make g++ python3
apk add --no-cache --repository https://dl-cdn.alpinelinux.org/alpine/v3.19/main/ nodejs~=20 yarn
apk add --no-cache --repository https://dl-cdn.alpinelinux.org/alpine/v3.19/main/ nodejs~=20 npm
run: |
yarn install --frozen-lockfile --ignore-scripts
yarn build
npm ci
npm run build
- name: Upload artifacts
uses: actions/upload-artifact@v4
Expand All @@ -159,10 +159,10 @@ jobs:
uses: vmactions/freebsd-vm@v1
with:
prepare: |
pkg install -y gmake python3 yarn-node20
pkg install -y gmake python3 npm-node20
run: |
yarn install --frozen-lockfile --ignore-scripts
yarn build
npm ci
npm run build
sync: sshfs

- name: Upload artifacts
Expand Down Expand Up @@ -195,7 +195,7 @@ jobs:
run: mkdir prebuilds && cp --recursive prebuild-*/* prebuilds/

- name: Pack package
run: yarn prepare && yarn pack
run: npm run prepare && npm pack

- name: Upload package artifact
uses: actions/upload-artifact@v4
Expand Down
28 changes: 14 additions & 14 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,14 +46,14 @@ jobs:
- name: Use Node.js 20
uses: actions/setup-node@v4
with:
cache: yarn
cache: npm
node-version: 20

- name: Install dependencies
run: yarn install --frozen-lockfile --ignore-scripts
run: npm ci

- name: Prebuild
run: yarn build
run: npm run build

- name: Upload artifacts
uses: actions/upload-artifact@v4
Expand All @@ -78,10 +78,10 @@ jobs:
submodules: true

- name: Install dependencies
run: yarn install --frozen-lockfile --ignore-scripts
run: npm ci

- name: Prebuild
run: yarn build
run: npm run build

- name: Upload artifacts
uses: actions/upload-artifact@v4
Expand All @@ -106,10 +106,10 @@ jobs:
submodules: true

- name: Install dependencies
run: yarn install --frozen-lockfile --ignore-scripts
run: npm ci

- name: Prebuild
run: yarn build
run: npm run build

- name: Upload artifacts
uses: actions/upload-artifact@v4
Expand All @@ -135,10 +135,10 @@ jobs:
dockerRunArgs: --volume "${PWD}:/repo" --workdir /repo
install: |
apk add --update make g++ python3
apk add --no-cache --repository https://dl-cdn.alpinelinux.org/alpine/v3.19/main/ nodejs~=20 yarn
apk add --no-cache --repository https://dl-cdn.alpinelinux.org/alpine/v3.19/main/ nodejs~=20 npm
run: |
yarn install --frozen-lockfile --ignore-scripts
yarn build
npm ci
npm run build
- name: Upload artifacts
uses: actions/upload-artifact@v4
Expand All @@ -160,10 +160,10 @@ jobs:
uses: vmactions/freebsd-vm@v1
with:
prepare: |
pkg install -y gmake python3 yarn-node20
pkg install -y gmake python3 npm-node20
run: |
yarn install --frozen-lockfile --ignore-scripts
yarn build
npm ci
npm run build
sync: sshfs

- name: Upload artifacts
Expand Down Expand Up @@ -199,7 +199,7 @@ jobs:
run: |
git config --global user.name 'github-actions[bot]'
git config --global user.email 'github-actions[bot]@users.noreply.github.com'
yarn publish --tag ${{ inputs.npm-tag }} --new-version $(echo $VERSION | sed 's/^v//')
npm publish --tag ${{ inputs.npm-tag }} --new-version $(echo $VERSION | sed 's/^v//')
if: ${{ !env.ACT }}
env:
NPM_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
Expand Down
2 changes: 0 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@
logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*

# Coverage directory used by tools like istanbul
coverage
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ you'll need to specify that in the command.
2. Ignore `node-argon2` install script and build manually.
```bash
$ npm install argon2 --ignore-scripts
$ npx @mapbox/node-pre-gyp rebuild -C ./node_modules/argon2
$ npx node-gyp rebuild -C ./node_modules/argon2
```
</details>

Expand Down
Loading

0 comments on commit c314a6b

Please sign in to comment.