Skip to content
This repository has been archived by the owner on Feb 26, 2024. It is now read-only.

Commit

Permalink
build: migrate from npm to Yarn 2 (Berry)
Browse files Browse the repository at this point in the history
  • Loading branch information
hckhanh committed Apr 3, 2021
1 parent 9e859da commit c590548
Show file tree
Hide file tree
Showing 687 changed files with 24,693 additions and 14,505 deletions.
6 changes: 5 additions & 1 deletion .eslintignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
# Generated files
cjs
es
types
tests

# Yarn
.yarn
.pnp.*
6 changes: 3 additions & 3 deletions .github/workflows/gpr-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@ jobs:
registry-url: https://npm.pkg.github.com/
- name: Build commonjs, es6, esnext and amd
run: |
npm run build:cjs
npm run build:es
npm run build:types
yarn build:cjs
yarn build:es
yarn build:types
- name: Publish to gpr
run: npm publish
env:
Expand Down
22 changes: 9 additions & 13 deletions .github/workflows/npm-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,16 +12,14 @@ jobs:
- uses: actions/setup-node@v2.1.4
with:
check-latest: true
- name: Dependency check
run: npm ci
- name: Dependency cruiser check
run: npm run test:deps
run: yarn test:deps
- name: Prettier check
run: npm run test:prettier
run: yarn test:prettier
- name: ESLint check
run: npm run test:eslint
run: yarn test:eslint
- name: Skypack check
run: npm run test:skypack
run: yarn test:skypack
test:
runs-on: ubuntu-latest
strategy:
Expand All @@ -34,7 +32,7 @@ jobs:
with:
node-version: ${{matrix.node}}
- name: Unit tests
run: npm cit
run: yarn test
publish-npm:
runs-on: ubuntu-latest
needs: [lint, test]
Expand All @@ -43,15 +41,13 @@ jobs:
- uses: actions/setup-node@v2.1.4
with:
check-latest: true
- name: Install dependencies
run: npm ci
- name: Build commonjs, es6, esnext and amd
run: |
npm run build:cjs
npm run build:es
npm run build:types
yarn build:cjs
yarn build:es
yarn build:types
- name: Publish to npm
run: npm run release
run: yarn release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
12 changes: 6 additions & 6 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,15 +14,15 @@ jobs:
with:
check-latest: true
- name: Dependency check
run: npm ci
run: yarn --immutable --immutable-cache --check-cache
- name: Dependency cruiser check
run: npm run test:deps
run: yarn test:deps
- name: Prettier check
run: npm run test:prettier
run: yarn test:prettier
- name: ESLint check
run: npm run test:eslint
run: yarn test:eslint
- name: Skypack check
run: npm run test:skypack
run: yarn test:skypack
test:
needs: check
runs-on: ubuntu-latest
Expand All @@ -36,4 +36,4 @@ jobs:
with:
node-version: ${{matrix.node}}
- name: Unit tests
run: npm cit
run: yarn test
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ coverage
# nyc test coverage
.nyc_output

# yarn 2 (Zero-Installs)
# Yarn 2 (Zero-Installs + Plug'n'Play)
.yarn/*
!.yarn/cache
!.yarn/patches
Expand Down
Loading

0 comments on commit c590548

Please sign in to comment.