Skip to content

Commit e2b780e

Browse files
committed
Update project practices
1 parent c0d06aa commit e2b780e

File tree

7 files changed

+1485
-4616
lines changed

7 files changed

+1485
-4616
lines changed

.github/workflows/test.yml

Lines changed: 51 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,44 +1,80 @@
11
name: Test
2-
"on":
3-
push: null
4-
pull_request: null
2+
on:
3+
push:
4+
branches:
5+
- main
6+
pull_request:
57
jobs:
68
full:
7-
name: Node.js 16 Full
9+
name: Node.js Latest Full
810
runs-on: ubuntu-latest
911
steps:
1012
- name: Checkout the repository
11-
uses: actions/checkout@v2
13+
uses: actions/checkout@v3
14+
- name: Install pnpm
15+
uses: pnpm/action-setup@v2
16+
with:
17+
version: latest
1218
- name: Install Node.js
13-
uses: actions/setup-node@v2
19+
uses: actions/setup-node@v3
1420
with:
15-
node-version: 16
16-
cache: yarn
21+
node-version: 18
22+
cache: pnpm
1723
- name: Install dependencies
18-
run: yarn install --frozen-lockfile
24+
run: pnpm install --frozen-lockfile --ignore-scripts
1925
- name: Run tests
20-
run: yarn test
26+
run: pnpm test
2127
env:
2228
FORCE_COLOR: 2
2329
short:
2430
runs-on: ubuntu-latest
2531
strategy:
2632
matrix:
2733
node-version:
34+
- 16
2835
- 14
36+
name: Node.js ${{ matrix.node-version }} Quick
37+
steps:
38+
- name: Checkout the repository
39+
uses: actions/checkout@v3
40+
- name: Install pnpm
41+
uses: pnpm/action-setup@v2
42+
with:
43+
version: latest
44+
- name: Install Node.js ${{ matrix.node-version }}
45+
uses: actions/setup-node@v3
46+
with:
47+
node-version: ${{ matrix.node-version }}
48+
cache: pnpm
49+
- name: Install dependencies
50+
run: pnpm install --frozen-lockfile --ignore-scripts
51+
- name: Run unit tests
52+
run: pnpm unit
53+
env:
54+
FORCE_COLOR: 2
55+
old:
56+
runs-on: ubuntu-latest
57+
strategy:
58+
matrix:
59+
node-version:
2960
- 12
3061
name: Node.js ${{ matrix.node-version }} Quick
3162
steps:
3263
- name: Checkout the repository
33-
uses: actions/checkout@v2
64+
uses: actions/checkout@v3
65+
- name: Install pnpm
66+
uses: pnpm/action-setup@v1
67+
with:
68+
version: 3
69+
env:
70+
ACTIONS_ALLOW_UNSECURE_COMMANDS: true
3471
- name: Install Node.js ${{ matrix.node-version }}
35-
uses: actions/setup-node@v2
72+
uses: actions/setup-node@v3
3673
with:
3774
node-version: ${{ matrix.node-version }}
38-
cache: yarn
3975
- name: Install dependencies
40-
run: yarn install --frozen-lockfile
76+
run: pnpm install --frozen-lockfile --ignore-scripts
4177
- name: Run unit tests
42-
run: npx jest
78+
run: pnpm unit
4379
env:
4480
FORCE_COLOR: 2

.gitignore

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,2 @@
11
node_modules/
2-
yarn-error.log
3-
42
coverage/

.npmignore

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,2 @@
1-
yarn-error.log
2-
yarn.lock
3-
41
test/
52
coverage/
6-
.github/

package.json

Lines changed: 13 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,8 @@
1313
"license": "MIT",
1414
"repository": "postcss/postcss-safe-parser",
1515
"scripts": {
16-
"test": "jest --coverage && eslint . && ./test/integration.js"
16+
"unit": "uvu . '\\.test\\.js$'",
17+
"test": "pnpm unit && eslint . && ./test/integration.js"
1718
},
1819
"engines": {
1920
"node": ">=12.0"
@@ -27,27 +28,17 @@
2728
"postcss": "^8.3.3"
2829
},
2930
"devDependencies": {
30-
"@logux/eslint-config": "^46.0.0",
31-
"clean-publish": "^3.4.2",
32-
"eslint": "^8.0.1",
33-
"eslint-config-standard": "^16.0.3",
34-
"eslint-plugin-import": "^2.25.2",
35-
"eslint-plugin-jest": "^25.2.2",
36-
"eslint-plugin-node": "^11.1.0",
37-
"eslint-plugin-prefer-let": "^1.1.0",
38-
"eslint-plugin-promise": "^5.1.0",
39-
"eslint-plugin-security": "^1.4.0",
40-
"eslint-plugin-unicorn": "^37.0.1",
41-
"jest": "^27.3.1",
42-
"lint-staged": "^11.2.3",
43-
"postcss": "^8.3.9",
44-
"postcss-parser-tests": "^8.3.7",
45-
"postcss-sharec-config": "^0.5.1",
46-
"prettier": "^2.4.1",
47-
"simple-git-hooks": "^2.6.1"
48-
},
49-
"simple-git-hooks": {
50-
"pre-commit": "npx lint-staged"
31+
"@logux/eslint-config": "^47.2.0",
32+
"clean-publish": "^4.0.1",
33+
"eslint": "^8.19.0",
34+
"eslint-config-standard": "^17.0.0",
35+
"eslint-plugin-import": "^2.26.0",
36+
"eslint-plugin-n": "^15.2.4",
37+
"eslint-plugin-prefer-let": "^3.0.1",
38+
"eslint-plugin-promise": "^6.0.0",
39+
"postcss": "^8.4.14",
40+
"postcss-parser-tests": "^8.5.1",
41+
"uvu": "^0.5.6"
5142
},
5243
"prettier": {
5344
"arrowParens": "avoid",
@@ -57,12 +48,6 @@
5748
"singleQuote": true,
5849
"trailingComma": "none"
5950
},
60-
"lint-staged": {
61-
"*.js": [
62-
"prettier --write",
63-
"eslint --fix"
64-
]
65-
},
6651
"eslintConfig": {
6752
"extends": "@logux/eslint-config"
6853
},
@@ -74,10 +59,6 @@
7459
}
7560
}
7661
},
77-
"sharec": {
78-
"config": "postcss-sharec-config",
79-
"version": "0.5.1"
80-
},
8162
"clean-publish": {
8263
"cleanDocs": true
8364
}

0 commit comments

Comments
 (0)