From ecd4f900c62d3de1f3e08c5d1f34a5e6430aa413 Mon Sep 17 00:00:00 2001 From: David Sherret Date: Wed, 17 Jul 2024 23:06:30 -0400 Subject: fix(publish): surface syntax errors when using --no-check (#24620) --- tests/specs/npm/lifecycle_scripts/no_deno_json.out | 1 + tests/specs/publish/no_check_surfaces_syntax_error/__test__.jsonc | 5 +++++ tests/specs/publish/no_check_surfaces_syntax_error/deno.json | 5 +++++ tests/specs/publish/no_check_surfaces_syntax_error/mod.ts | 1 + tests/specs/publish/no_check_surfaces_syntax_error/publish.out | 8 ++++++++ 5 files changed, 20 insertions(+) create mode 100644 tests/specs/publish/no_check_surfaces_syntax_error/__test__.jsonc create mode 100644 tests/specs/publish/no_check_surfaces_syntax_error/deno.json create mode 100644 tests/specs/publish/no_check_surfaces_syntax_error/mod.ts create mode 100644 tests/specs/publish/no_check_surfaces_syntax_error/publish.out (limited to 'tests/specs') diff --git a/tests/specs/npm/lifecycle_scripts/no_deno_json.out b/tests/specs/npm/lifecycle_scripts/no_deno_json.out index 38a461449..aa9bc964a 100644 --- a/tests/specs/npm/lifecycle_scripts/no_deno_json.out +++ b/tests/specs/npm/lifecycle_scripts/no_deno_json.out @@ -1,6 +1,7 @@ [UNORDERED_START] Download http://localhost:4260/@denotest/lifecycle-scripts-cjs Download http://localhost:4260/@denotest/bin +[UNORDERED_START] Download http://localhost:4260/@denotest/lifecycle-scripts-cjs/1.0.0.tgz Download http://localhost:4260/@denotest/bin/1.0.0.tgz Initialize @denotest/lifecycle-scripts-cjs@1.0.0 diff --git a/tests/specs/publish/no_check_surfaces_syntax_error/__test__.jsonc b/tests/specs/publish/no_check_surfaces_syntax_error/__test__.jsonc new file mode 100644 index 000000000..028d3d16d --- /dev/null +++ b/tests/specs/publish/no_check_surfaces_syntax_error/__test__.jsonc @@ -0,0 +1,5 @@ +{ + "args": "publish --dry-run --no-check", + "output": "publish.out", + "exitCode": 1 +} diff --git a/tests/specs/publish/no_check_surfaces_syntax_error/deno.json b/tests/specs/publish/no_check_surfaces_syntax_error/deno.json new file mode 100644 index 000000000..fe4300ad6 --- /dev/null +++ b/tests/specs/publish/no_check_surfaces_syntax_error/deno.json @@ -0,0 +1,5 @@ +{ + "name": "@scope/pkg", + "version": "1.0.0", + "exports": "./mod.ts" +} diff --git a/tests/specs/publish/no_check_surfaces_syntax_error/mod.ts b/tests/specs/publish/no_check_surfaces_syntax_error/mod.ts new file mode 100644 index 000000000..fd3886163 --- /dev/null +++ b/tests/specs/publish/no_check_surfaces_syntax_error/mod.ts @@ -0,0 +1 @@ ++ diff --git a/tests/specs/publish/no_check_surfaces_syntax_error/publish.out b/tests/specs/publish/no_check_surfaces_syntax_error/publish.out new file mode 100644 index 000000000..57969aeb7 --- /dev/null +++ b/tests/specs/publish/no_check_surfaces_syntax_error/publish.out @@ -0,0 +1,8 @@ +Checking for slow types in the public API... +error[syntax-error]: Expression expected + --> [WILDLINE]mod.ts:1:1 + | +1 | + + | ^ + +error: Found 1 problem -- cgit v1.2.3