8000 test: add additional attw test for built packages (#4322) · unocss/unocss@c2c512d · GitHub
[go: up one dir, main page]

Skip to content

Commit c2c512d

Browse files
userquinzyyv
andauthored
test: add additional attw test for built packages (#4322)
Co-authored-by: Chris <hizyyv@gmail.com>
1 parent aafa343 commit c2c512d

File tree

41 files changed

+288
-35
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

41 files changed

+288
-35
lines changed

.attw-esm-only.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{
2+
"ignoreRules": [
3+
"cjs-resolves-to-esm"
4+
]
5+
}

.github/workflows/ci.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,3 +59,6 @@ jobs:
5959

6060
- name: Typecheck
6161
run: nr typecheck
62+
63+
- name: Check types
64+
run: nr test:attw

package.json

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,11 +24,13 @@
2424
"test": "vitest",
2525
"test:update": "vitest -u",
2626
"test:integration": "pnpm -F svelte-scoped test:integration",
27-
"test:ci": "nr build && nr typecheck && nr lint && nr test && nr test:integration"
27+
"test:ci": &quo 10000 t;nr build && nr typecheck && nr lint && nr test && nr test:integration",
28+
"test:attw": "pnpm --filter=./packages/* --filter=!cli --filter=!reset --filter=!shared-* --filter=!vscode test:attw"
2829
},
2930
"devDependencies": {
3031
"@antfu/eslint-config": "catalog:",
3132
"@antfu/ni": "catalog:",
33+
"@arethetypeswrong/cli": "catalog:",
3234
"@codemirror/lang-css": "catalog:",
3335
"@codemirror/lang-html": "catalog:",
3436
"@codemirror/lang-javascript": "catalog:",
@@ -141,6 +143,9 @@
141143
"object.assign": "npm:@nolyfill/object.assign@^1.0.28",
142144
"side-channel": "npm:@nolyfill/side-channel@^1.0.29",
143145
"which-typed-array": "npm:@nolyfill/which-typed-array@^1.0.29"
146+
},
147+
"patchedDependencies": {
148+
"@arethetypeswrong/cli@0.17.1": "patches/@arethetypeswrong__cli@0.17.1.patch"
144149
}
145150
},
146151
"resolutions": {

packages/astro/package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,8 @@
3838
],
3939
"scripts": {
4040
"build": "unbuild",
41-
"stub": "unbuild --stub"
41+
"stub": "unbuild --stub",
42+
"test:attw": "attw --pack --config-path ../../.attw-esm-only.json"
4243
},
4344
"peerDependencies": {
4445
"vite": "^2.9.0 || ^3.0.0-0 || ^4.0.0 || ^5.0.0-0 || ^6.0.0-0"

packages/autocomplete/package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,8 @@
3434
],
3535
"scripts": {
3636
"build": "unbuild",
37-
"stub": "unbuild --stub"
37+
"stub": "unbuild --stub",
38+
"test:attw": "attw --pack --config-path ../../.attw-esm-only.json"
3839
},
3940
"dependencies": {
4041
"fzf": "catalog:",

packages/config/package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,8 @@
3434
},
3535
"scripts": {
3636
"build": "unbuild",
37-
"stub": "unbuild --stub"
37+
"stub": "unbuild --stub",
38+
"test:attw": "attw --pack --config-path ../../.attw-esm-only.json"
3839
},
3940
"dependencies": {
4041
"@unocss/core": "workspace:*",

packages/core/package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,8 @@
3838
],
3939
"scripts": {
4040
"build": "unbuild",
41-
"stub": "unbuild --stub"
41+
"stub": "unbuild --stub",
42+
"test:attw": "attw --pack --config-path ../../.attw-esm-only.json"
4243
},
4344
"devDependencies": {
4445
"magic-string": "catalog:",

packages/eslint-config/package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,8 @@
4949
},
5050
"scripts": {
5151
"build": "unbuild",
52-
"stub": "unbuild --stub"
52+
"stub": "unbuild --stub",
53+
"test:attw": "attw --pack"
5354
},
5455
"dependencies": {
5556
"@unocss/eslint-plugin": "workspace:*"

packages/eslint-plugin/package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,8 @@
3737
"scripts": {
3838
"build": "unbuild",
3939
"typecheck": "tsc --noEmit",
40-
"lint": "nr build && cd ./fixtures && eslint ./src"
40+
"lint": "nr build && cd ./fixtures && eslint ./src",
41+
"test:attw": "attw --pack"
4142
},
4243
"dependencies": {
4344
"@typescript-eslint/utils": "catalog:",

packages/extractor-arbitrary-variants/package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,8 @@
3434
],
3535
"scripts": {
3636
"build": "unbuild",
37-
"stub": "unbuild --stub"
37+
"stub": "unbuild --stub",
38+
"test:attw": "attw --pack --config-path ../../.attw-esm-only.json"
3839
},
3940
"dependencies": {
4041
"@unocss/core": "workspace:*"

0 commit comments

Comments
 (0)
0