Unverified Commit 6dbaf95a authored by Janka Uryga's avatar Janka Uryga Committed by GitHub

fix: error build if fixture typechecking fails (#78839)

The type checking introduced in #75935 wasn't actually failing the
build, because `find ... -exec ...` seems to eat non-zero exit codes.
This is fixed by using `xargs` instead.

Also fixes some files that were failing typechecking but no one noticed
due to the above bug.
parent faa6e3d2
...@@ -49,3 +49,6 @@ declare module 'components' { ...@@ -49,3 +49,6 @@ declare module 'components' {
declare module 'navigation' { declare module 'navigation' {
export function redirect(href: string): void export function redirect(href: string): void
} }
// Some tests generate `data:text/javascript,...` imports
declare module 'data:text/*'
...@@ -29,6 +29,8 @@ ...@@ -29,6 +29,8 @@
"./server-graph/25/output.js", "./server-graph/25/output.js",
"./server-graph/28/output.js", "./server-graph/28/output.js",
"./server-graph/30/output.js", "./server-graph/30/output.js",
// FIXME: buggy renaming of anonymous functions
"./server-graph/51/output.js",
// Excluded because of weird TS behavior around `action.bind(...)` making args optional // Excluded because of weird TS behavior around `action.bind(...)` making args optional
// (but only if no JSDoc type annotations are present) // (but only if no JSDoc type annotations are present)
"./server-graph/24/output.js" "./server-graph/24/output.js"
......
...@@ -43,7 +43,7 @@ ...@@ -43,7 +43,7 @@
"lint-ast-grep": "ast-grep scan", "lint-ast-grep": "ast-grep scan",
"lint-no-typescript": "run-p prettier-check lint-eslint lint-language", "lint-no-typescript": "run-p prettier-check lint-eslint lint-language",
"types-and-precompiled": "run-p lint-typescript check-precompiled check-compiler-fixtures types:test-lib", "types-and-precompiled": "run-p lint-typescript check-precompiled check-compiler-fixtures types:test-lib",
"check-compiler-fixtures": "find crates/next-custom-transforms/tests/fixture -type f -name 'tsconfig.json' -exec /bin/sh -c 'echo \"project: $1\"; pnpm tsc --noEmit --project \"$1\"' -- {} \\;", "check-compiler-fixtures": "find crates/next-custom-transforms/tests/fixture -type f -name 'tsconfig.json' -print0 | xargs --null -n1 -I'{}' pnpm tsc --noEmit --project '{}'",
"validate-externals-doc": "node ./scripts/validate-externals-doc.js", "validate-externals-doc": "node ./scripts/validate-externals-doc.js",
"lint": "run-p test-types lint-typescript prettier-check lint-eslint lint-ast-grep lint-language", "lint": "run-p test-types lint-typescript prettier-check lint-eslint lint-ast-grep lint-language",
"lint-fix": "pnpm prettier-fix && pnpm lint-eslint --fix", "lint-fix": "pnpm prettier-fix && pnpm lint-eslint --fix",
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment