Skip to content

Commit

Permalink
feat: use pnpm as manager, yarn pnp is still supported
Browse files Browse the repository at this point in the history
  • Loading branch information
JounQin committed Jul 6, 2022
1 parent bb74fb4 commit a015a19
Show file tree
Hide file tree
Showing 17 changed files with 16,734 additions and 52,324 deletions.
3 changes: 0 additions & 3 deletions .eslintignore
@@ -1,7 +1,4 @@
!.*.cjs
.pnp.*
.yarn
.yarnrc.yml
dist
lib
CHANGELOG.md
1 change: 1 addition & 0 deletions .github/FUNDING.yml
Expand Up @@ -9,3 +9,4 @@ patreon: 1stG
custom:
- https://opencollective.com/1stG
- https://opencollective.com/rxts
- https://afdian.net/@JounQin
15 changes: 10 additions & 5 deletions .github/workflows/ci.yml
Expand Up @@ -20,17 +20,22 @@ jobs:
steps:
- uses: actions/checkout@v3

- uses: actions/setup-node@v3
- name: Setup pnpm
uses: pnpm/action-setup@v2
with:
version: latest

- name: Setup Node.js ${{ matrix.node }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node }}
cache: yarn
cache: pnpm

- name: Install Dependencies
run: yarn --frozen-lockfile
run: pnpm i --frozen-lockfile

- name: Build, Lint and Test
run: yarn run-s build lint test
# typecov
run: pnpm run-s build lint test typecov
env:
EFF_NO_LINK_RULES: true
PARSER_NO_WATCH: true
7 changes: 6 additions & 1 deletion .github/workflows/pkg-size.yml
Expand Up @@ -14,6 +14,11 @@ jobs:
- name: Checkout
uses: actions/checkout@v3

- name: Setup pnpm
uses: pnpm/action-setup@v2
with:
version: latest

- name: Setup Node.js
uses: actions/setup-node@v3
with:
Expand All @@ -22,6 +27,6 @@ jobs:
- name: Package Size Report
uses: pkg-size/action@v1
with:
build-command: yarn build
build-command: pnpm build
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
15 changes: 8 additions & 7 deletions .github/workflows/release.yml
Expand Up @@ -16,25 +16,26 @@ jobs:
# This makes Actions fetch all Git history so that Changesets can generate changelogs with the correct commits
fetch-depth: 0

- name: Setup pnpm
uses: pnpm/action-setup@v2
with:
version: latest

- name: Setup Node.js 16
uses: actions/setup-node@v3
with:
node-version: 16
cache: yarn
cache: pnpm

- name: Install Dependencies
run: yarn --immutable

- name: Prepare Git Hooks
run: yarn prepare
run: pnpm i --frozen-lockfile

- name: Create Release Pull Request or Publish to npm
id: changesets
uses: changesets/action@v1
with:
version: yarn changeset version
# This expects you to have a script called release which does a build for your packages and calls changeset publish
publish: yarn release
publish: pnpm release
commit: 'chore: release eslint-import-resolver-typescript'
title: 'chore: release eslint-import-resolver-typescript'
env:
Expand Down
8 changes: 1 addition & 7 deletions .gitignore
@@ -1,11 +1,5 @@
.*cache
.type-coverage
lib
node_modules
*.log
.eslintcache
!.pnp.*
.yarn
!.yarn/patches
!.yarn/plugins
!.yarn/releases
!.yarn/versions
13 changes: 12 additions & 1 deletion .npmrc
@@ -1 +1,12 @@
package-lock=false
; https://github.com/pkg-size/action/pull/45
; package-lock=false
public-hoist-pattern[]=@1stg/*
public-hoist-pattern[]=@pkgr/*
public-hoist-pattern[]=@commitlint/*
public-hoist-pattern[]=*eslint*
public-hoist-pattern[]=npm-run-all
public-hoist-pattern[]=lint-staged
public-hoist-pattern[]=json5
public-hoist-pattern[]=*prettier*
public-hoist-pattern[]=simple-git-hooks
strict-peer-dependencies=false

0 comments on commit a015a19

Please sign in to comment.