Skip to content

Commit

Permalink
Chore: Add attw checks to pre-release and CI (#1370)
Browse files Browse the repository at this point in the history
  • Loading branch information
SBoudrias authored Mar 9, 2024
1 parent 85fba23 commit 1d26129
Show file tree
Hide file tree
Showing 37 changed files with 241 additions and 18 deletions.
13 changes: 13 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -64,3 +64,16 @@ jobs:
run: yarn turbo tsc
- name: Integration tests
run: yarn node --test integration/

Package:
name: Are the types wrong?
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- run: corepack enable
- uses: actions/setup-node@v4
with:
node-version: 20
cache: 'yarn'
- run: yarn install --immutable --immutable-cache
- run: yarn turbo attw
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@
"zsh"
],
"devDependencies": {
"@arethetypeswrong/cli": "^0.15.1",
"@sindresorhus/tsconfig": "^5.0.0",
"@types/node": "^20.11.25",
"@typescript-eslint/eslint-plugin": "^7.1.1",
Expand Down Expand Up @@ -78,7 +79,7 @@
"integration/*"
],
"scripts": {
"prepare": "husky && turbo tsc",
"prepare": "husky && turbo tsc attw",
"setup": "node ./tools/setup-packages.mjs",
"pretest": "eslint . && turbo tsc",
"test": "vitest --run packages && node --test integration/**/*.test.*"
Expand Down
3 changes: 2 additions & 1 deletion packages/checkbox/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,8 @@
"scripts": {
"tsc": "yarn run tsc:esm && yarn run tsc:cjs",
"tsc:esm": "rm -rf dist/esm && tsc -p ./tsconfig.json",
"tsc:cjs": "rm -rf dist/cjs && tsc -p ./tsconfig.cjs.json && node ../../tools/fix-ext.mjs"
"tsc:cjs": "rm -rf dist/cjs && tsc -p ./tsconfig.cjs.json && node ../../tools/fix-ext.mjs",
"attw": "attw --pack"
},
"publishConfig": {
"access": "public"
Expand Down
3 changes: 2 additions & 1 deletion packages/confirm/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,8 @@
"scripts": {
"tsc": "yarn run tsc:esm && yarn run tsc:cjs",
"tsc:esm": "rm -rf dist/esm && tsc -p ./tsconfig.json",
"tsc:cjs": "rm -rf dist/cjs && tsc -p ./tsconfig.cjs.json && node ../../tools/fix-ext.mjs"
"tsc:cjs": "rm -rf dist/cjs && tsc -p ./tsconfig.cjs.json && node ../../tools/fix-ext.mjs",
"attw": "attw --pack"
},
"publishConfig": {
"access": "public"
Expand Down
3 changes: 2 additions & 1 deletion packages/core/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,8 @@
"scripts": {
"tsc": "yarn run tsc:esm && yarn run tsc:cjs",
"tsc:esm": "rm -rf dist/esm && tsc -p ./tsconfig.json",
"tsc:cjs": "rm -rf dist/cjs && tsc -p ./tsconfig.cjs.json && node ../../tools/fix-ext.mjs"
"tsc:cjs": "rm -rf dist/cjs && tsc -p ./tsconfig.cjs.json && node ../../tools/fix-ext.mjs",
"attw": "attw --pack"
},
"publishConfig": {
"access": "public"
Expand Down
3 changes: 2 additions & 1 deletion packages/editor/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,8 @@
"scripts": {
"tsc": "yarn run tsc:esm && yarn run tsc:cjs",
"tsc:esm": "rm -rf dist/esm && tsc -p ./tsconfig.json",
"tsc:cjs": "rm -rf dist/cjs && tsc -p ./tsconfig.cjs.json && node ../../tools/fix-ext.mjs"
"tsc:cjs": "rm -rf dist/cjs && tsc -p ./tsconfig.cjs.json && node ../../tools/fix-ext.mjs",
"attw": "attw --pack"
},
"publishConfig": {
"access": "public"
Expand Down
3 changes: 2 additions & 1 deletion packages/expand/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,8 @@
"scripts": {
"tsc": "yarn run tsc:esm && yarn run tsc:cjs",
"tsc:esm": "rm -rf dist/esm && tsc -p ./tsconfig.json",
"tsc:cjs": "rm -rf dist/cjs && tsc -p ./tsconfig.cjs.json && node ../../tools/fix-ext.mjs"
"tsc:cjs": "rm -rf dist/cjs && tsc -p ./tsconfig.cjs.json && node ../../tools/fix-ext.mjs",
"attw": "attw --pack"
},
"publishConfig": {
"access": "public"
Expand Down
3 changes: 2 additions & 1 deletion packages/input/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,8 @@
"scripts": {
"tsc": "yarn run tsc:esm && yarn run tsc:cjs",
"tsc:esm": "rm -rf dist/esm && tsc -p ./tsconfig.json",
"tsc:cjs": "rm -rf dist/cjs && tsc -p ./tsconfig.cjs.json && node ../../tools/fix-ext.mjs"
"tsc:cjs": "rm -rf dist/cjs && tsc -p ./tsconfig.cjs.json && node ../../tools/fix-ext.mjs",
"attw": "attw --pack"
},
"publishConfig": {
"access": "public"
Expand Down
3 changes: 2 additions & 1 deletion packages/password/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,8 @@
"scripts": {
"tsc": "yarn run tsc:esm && yarn run tsc:cjs",
"tsc:esm": "rm -rf dist/esm && tsc -p ./tsconfig.json",
"tsc:cjs": "rm -rf dist/cjs && tsc -p ./tsconfig.cjs.json && node ../../tools/fix-ext.mjs"
"tsc:cjs": "rm -rf dist/cjs && tsc -p ./tsconfig.cjs.json && node ../../tools/fix-ext.mjs",
"attw": "attw --pack"
},
"publishConfig": {
"access": "public"
Expand Down
3 changes: 2 additions & 1 deletion packages/prompts/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,8 @@
"scripts": {
"tsc": "yarn run tsc:esm && yarn run tsc:cjs",
"tsc:esm": "rm -rf dist/esm && tsc -p ./tsconfig.json",
"tsc:cjs": "rm -rf dist/cjs && tsc -p ./tsconfig.cjs.json && node ../../tools/fix-ext.mjs"
"tsc:cjs": "rm -rf dist/cjs && tsc -p ./tsconfig.cjs.json && node ../../tools/fix-ext.mjs",
"attw": "attw --pack"
},
"engines": {
"node": ">=18"
Expand Down
3 changes: 2 additions & 1 deletion packages/rawlist/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,8 @@
"scripts": {
"tsc": "yarn run tsc:esm && yarn run tsc:cjs",
"tsc:esm": "rm -rf dist/esm && tsc -p ./tsconfig.json",
"tsc:cjs": "rm -rf dist/cjs && tsc -p ./tsconfig.cjs.json && node ../../tools/fix-ext.mjs"
"tsc:cjs": "rm -rf dist/cjs && tsc -p ./tsconfig.cjs.json && node ../../tools/fix-ext.mjs",
"attw": "attw --pack"
},
"publishConfig": {
"access": "public"
Expand Down
3 changes: 2 additions & 1 deletion packages/select/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,8 @@
"scripts": {
"tsc": "yarn run tsc:esm && yarn run tsc:cjs",
"tsc:esm": "rm -rf dist/esm && tsc -p ./tsconfig.json",
"tsc:cjs": "rm -rf dist/cjs && tsc -p ./tsconfig.cjs.json && node ../../tools/fix-ext.mjs"
"tsc:cjs": "rm -rf dist/cjs && tsc -p ./tsconfig.cjs.json && node ../../tools/fix-ext.mjs",
"attw": "attw --pack"
},
"publishConfig": {
"access": "public"
Expand Down
3 changes: 2 additions & 1 deletion packages/testing/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,8 @@
"scripts": {
"tsc": "yarn run tsc:esm && yarn run tsc:cjs",
"tsc:esm": "rm -rf dist/esm && tsc -p ./tsconfig.json",
"tsc:cjs": "rm -rf dist/cjs && tsc -p ./tsconfig.cjs.json && node ../../tools/fix-ext.mjs"
"tsc:cjs": "rm -rf dist/cjs && tsc -p ./tsconfig.cjs.json && node ../../tools/fix-ext.mjs",
"attw": "attw --pack"
},
"exports": {
".": {
Expand Down
3 changes: 2 additions & 1 deletion packages/type/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,8 @@
"scripts": {
"tsc": "yarn run tsc:esm && yarn run tsc:cjs",
"tsc:esm": "rm -rf dist/esm && tsc -p ./tsconfig.json",
"tsc:cjs": "rm -rf dist/cjs && tsc -p ./tsconfig.cjs.json && node ../../tools/fix-ext.mjs"
"tsc:cjs": "rm -rf dist/cjs && tsc -p ./tsconfig.cjs.json && node ../../tools/fix-ext.mjs",
"attw": "attw --pack"
},
"engines": {
"node": ">=18"
Expand Down
1 change: 1 addition & 0 deletions tools/setup-packages.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,7 @@ paths.forEach(async (pkgPath) => {
'tsc:esm': 'rm -rf dist/esm && tsc -p ./tsconfig.json',
'tsc:cjs':
'rm -rf dist/cjs && tsc -p ./tsconfig.cjs.json && node ../../tools/fix-ext.mjs',
attw: 'attw --pack',
};

// Set ESM tsconfig
Expand Down
8 changes: 6 additions & 2 deletions turbo.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,12 @@
"$schema": "https://turbo.build/schema.json",
"pipeline": {
"tsc": {
"outputs": ["dist/**"],
"dependsOn": ["^tsc"]
"dependsOn": ["^tsc"],
"outputs": ["dist/**"]
},
"attw": {
"dependsOn": ["tsc"],
"outputs": []
}
}
}
Loading

0 comments on commit 1d26129

Please sign in to comment.