Skip to content

Commit badc851

Browse files
committed
feat: move to pnpm
1 parent 34100df commit badc851

File tree

7 files changed

+10688
-9811
lines changed

7 files changed

+10688
-9811
lines changed

.github/workflows/ci.yml

+5-7
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,7 @@ jobs:
1515
- name: Use Node.js LTS
1616
uses: actions/setup-node@v4
1717
with:
18-
# alias support: https://github.com/actions/setup-node/issues/26
19-
node-version: '12'
18+
node-version: '20'
2019
- name: Cache NPM dependencies
2120
uses: actions/cache@v3
2221
with:
@@ -25,12 +24,11 @@ jobs:
2524
restore-keys: |
2625
${{ runner.OS }}-npm-cache-${{ matrix.os }}
2726
- name: Install Dependencies
28-
run: |
29-
npm install -g yarn
30-
yarn --frozen-lockfile --non-interactive
27+
run:
28+
pnpm --frozen-lockfile --non-interactive
3129
- name: Test
32-
run: yarn test
30+
run: pnpm test
3331
- name: Lint
34-
run: yarn lint
32+
run: pnpm lint
3533
env:
3634
CI: true

.github/workflows/release.yml

+10-12
Original file line numberDiff line numberDiff line change
@@ -11,24 +11,22 @@ jobs:
1111
steps:
1212
- uses: actions/checkout@v2
1313
- name: Use Node.js LTS
14-
uses: actions/setup-node@v1
14+
uses: actions/setup-node@v4
1515
with:
1616
# alias support: https://github.com/actions/setup-node/issues/26
17-
node-version: '14'
18-
- name: Get yarn cache directory path
19-
id: yarn-cache-dir-path
20-
run: echo "::set-output name=dir::$(yarn cache dir)"
21-
- uses: actions/cache@v2
22-
id: yarn-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`)
17+
node-version: '20'
18+
- uses: pnpm/action-setup@v2
19+
- uses: actions/cache@v3
20+
name: Setup pnpm cache
2321
with:
24-
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
25-
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
22+
path: ${{ env.STORE_PATH }}
23+
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
2624
restore-keys: |
27-
${{ runner.os }}-yarn-
25+
${{ runner.os }}-pnpm-store-
2826
- name: Install Dependencies
29-
run: yarn
27+
run: pnpm install --frozen-lockfile --non-interactive
3028
- name: Semantic Release
31-
run: npx semantic-release@15.13.30
29+
run: npx semantic-release
3230
env:
3331
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
3432
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}

README.md

+4-4
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ Seamless integration between [Rollup](https://github.com/rollup/rollup) and [Pos
1212
## Install
1313

1414
```bash
15-
yarn add postcss rollup-plugin-postcss --dev
15+
pnpm add postcss rollup-plugin-postcss --dev
1616
```
1717

1818
## Usage
@@ -90,9 +90,9 @@ postcss({
9090

9191
Install corresponding dependency:
9292

93-
- For `Sass` install `node-sass`: `yarn add node-sass --dev`
94-
- For `Stylus` Install `stylus`: `yarn add stylus --dev`
95-
- For `Less` Install `less`: `yarn add less --dev`
93+
- For `Sass` install `node-sass`: `pnpm add node-sass --dev`
94+
- For `Stylus` Install `stylus`: `pnpm add stylus --dev`
95+
- For `Less` Install `less`: `pnpm add less --dev`
9696

9797
That's it, you can now import `.styl` `.scss` `.sass` `.less` files in your library.
9898

package.json

+5-4
Original file line numberDiff line numberDiff line change
@@ -3,16 +3,17 @@
33
"version": "4.0.0",
44
"description": "Seamless integration between Rollup and PostCSS",
55
"main": "dist/index.js",
6+
"packageManager": "pnpm@8.12.1",
67
"files": [
78
"dist",
89
"types/index.d.ts"
910
],
1011
"scripts": {
11-
"test": "npm run lint && jest",
12-
"test:cov": "npm run lint && jest --coverage",
12+
"test": "pnpm run lint && jest",
13+
"test:cov": "pnpm run lint && jest --coverage",
1314
"build": "bili",
1415
"lint": "xo",
15-
"prepublishOnly": "npm run build"
16+
"prepublishOnly": "pnpm run build"
1617
},
1718
"repository": {
1819
"type": "git",
@@ -44,7 +45,7 @@
4445
"fs-extra": "^9.0.1",
4546
"jest": "^26.6.3",
4647
"less": "^3.12.2",
47-
"node-sass": "^5.0.0",
48+
"node-sass": "^9.0.0",
4849
"postcss": "^8.2.7",
4950
"rollup": "^2.34.2",
5051
"stylus": "^0.54.8",

0 commit comments

Comments
 (0)