Skip to content

Commit 09e8c0a

Browse files
committed
Migrate to pnpm
1 parent 424861e commit 09e8c0a

File tree

12 files changed

+9241
-18452
lines changed

12 files changed

+9241
-18452
lines changed

.github/workflows/deploy.yaml

Lines changed: 7 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -16,23 +16,19 @@ jobs:
1616
steps:
1717
- name: Checkout
1818
uses: actions/checkout@v4
19+
- name: Install pnpm
20+
uses: pnpm/action-setup@v3
21+
with:
22+
version: 8
23+
run_install: false
1924
- name: Set-up Node
2025
uses: actions/setup-node@v4
2126
with:
2227
node-version: '18'
23-
cache: 'yarn'
24-
registry-url: 'https://registry.npmjs.org'
25-
- name: Get yarn cache directory path
26-
id: yarn-cache-dir-path
27-
run: echo "dir=$(yarn cache dir)" >> $GITHUB_OUTPUT
28-
- name: Cache dependencies
29-
uses: actions/cache@v4
30-
with:
31-
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
32-
key: dependencies-v1-${{ runner.os }}-${{ hashFiles('yarn.lock') }}
28+
cache: 'pnpm'
3329
- name: Publish
3430
run: |
35-
yarn install --frozen-lockfile --ignore-scripts --prefer-offline
31+
pnpm install --ignore-scripts --prefer-offline
3632
npm publish --provenance
3733
env:
3834
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

.github/workflows/test.yaml

Lines changed: 9 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -14,25 +14,22 @@ jobs:
1414
steps:
1515
- name: Checkout
1616
uses: actions/checkout@v4
17+
- name: Install pnpm
18+
uses: pnpm/action-setup@v3
19+
with:
20+
version: 8
21+
run_install: false
1722
- name: Set up Node.js
1823
uses: actions/setup-node@v4
1924
with:
2025
node-version: '18'
21-
cache: 'yarn'
22-
- name: Get yarn cache directory path
23-
id: yarn-cache-dir-path
24-
run: echo "dir=$(yarn cache dir)" >> $GITHUB_OUTPUT
25-
- name: Cache dependencies
26-
uses: actions/cache@v4
27-
with:
28-
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
29-
key: dependencies-v1-${{ runner.os }}-${{ hashFiles('yarn.lock') }}
26+
cache: 'pnpm'
3027
- name: Install
31-
run: yarn install --frozen-lockfile --ignore-scripts --prefer-offline
28+
run: pnpm install --ignore-scripts --prefer-offline
3229
- name: Linting files
33-
run: yarn lint
30+
run: pnpm lint
3431
- name: Make coverage
35-
run: yarn test --coverage
32+
run: pnpm test -- --coverage
3633
- name: Coveralls
3734
uses: coverallsapp/github-action@master
3835
with:

README.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,16 @@ npm install postcss-rtlcss --save-dev
3131
npm install postcss-rtlcss@legacy --save-dev
3232
```
3333

34+
#### pnpm
35+
36+
```bash
37+
## Latest version (postcss@^8.0.0)
38+
pnpm add -D postcss-rtlcss
39+
40+
## Latest legacy version (postcss@^7.0.0)
41+
pnpm add -D postcss-rtlcss@legacy
42+
```
43+
3444
#### yarn
3545

3646
```bash

package.json

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -51,9 +51,10 @@
5151
"clean": "./scripts/clean.sh",
5252
"copy": "./scripts/copy.sh",
5353
"modify-dts": "replace-in-file --configFile=config.replace.js",
54-
"build": "yarn clean && rollup --config rollup.config.js --bundleConfigAsCjs && yarn copy && yarn modify-dts",
55-
"prepare": "yarn build",
56-
"prepublishOnly": "npm run lint && npm run test",
54+
"build": "pnpm clean && rollup --config rollup.config.js --bundleConfigAsCjs && pnpm copy && pnpm modify-dts",
55+
"preinstall": "npx -y only-allow pnpm",
56+
"prepare": "pnpm build",
57+
"prepublishOnly": "pnpm lint && pnpm test",
5758
"version": "git add .",
5859
"postversion": "git push && git push --tags"
5960
},
@@ -68,6 +69,7 @@
6869
},
6970
"devDependencies": {
7071
"@rollup/plugin-json": "^6.1.0",
72+
"@rollup/plugin-terser": "^0.4.4",
7173
"@types/eslint": "^8.56.6",
7274
"@types/jest": "^29.5.12",
7375
"@types/node": "^20.11.30",
@@ -79,10 +81,11 @@
7981
"jest": "^29.7.0",
8082
"postcss": "^8.4.26",
8183
"replace-in-file": "^7.1.0",
84+
"rimraf": "^5.0.5",
8285
"rollup": "^4.13.0",
83-
"rollup-plugin-terser": "^7.0.2",
8486
"rollup-plugin-ts": "^3.4.5",
8587
"ts-jest": "^29.1.2",
88+
"tslib": "^2.6.2",
8689
"typescript": "^5.4.3"
8790
},
8891
"peerDependencies": {

playground/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,8 @@
1616
"scripts": {
1717
"generate-types": "typed-scss-modules src --aliasPrefixes.@constants src/constants",
1818
"generate-types:dev": "typed-scss-modules src --aliasPrefixes.@constants src/constants --watch",
19-
"start": "yarn generate-types:dev & webpack serve --open --config webpack.dev-config.js",
20-
"build": "yarn generate-types && webpack --config webpack.config.js"
19+
"start": "pnpm generate-types:dev & webpack serve --open --config webpack.dev-config.js",
20+
"build": "pnpm generate-types && webpack --config webpack.config.js"
2121
},
2222
"author": "ElChiniNet",
2323
"license": "Apache-2.0",

0 commit comments

Comments
 (0)