From 66500199350fd9e7a32e6fc10855654ffac01c49 Mon Sep 17 00:00:00 2001 From: David Sherret Date: Mon, 4 Mar 2024 11:10:39 -0500 Subject: fix(lsp): ignore code errors when type passes for non-`@deno-types` reolution (#22682) --- tests/testdata/npm/registry/@denotest/monaco-editor/1.0.0/main.js | 4 ++++ .../npm/registry/@denotest/monaco-editor/1.0.0/main.types.d.ts | 1 + .../npm/registry/@denotest/monaco-editor/1.0.0/package.json | 6 ++++++ 3 files changed, 11 insertions(+) create mode 100644 tests/testdata/npm/registry/@denotest/monaco-editor/1.0.0/main.js create mode 100644 tests/testdata/npm/registry/@denotest/monaco-editor/1.0.0/main.types.d.ts create mode 100644 tests/testdata/npm/registry/@denotest/monaco-editor/1.0.0/package.json (limited to 'tests/testdata') diff --git a/tests/testdata/npm/registry/@denotest/monaco-editor/1.0.0/main.js b/tests/testdata/npm/registry/@denotest/monaco-editor/1.0.0/main.js new file mode 100644 index 000000000..403806c6b --- /dev/null +++ b/tests/testdata/npm/registry/@denotest/monaco-editor/1.0.0/main.js @@ -0,0 +1,4 @@ +// The monaco-editor package uses an entry in the package.json +// where it has no "type": "module" and then only specifies a +// "module": "./main.js"-like entry that points at an ESM file. +export class Editor {} \ No newline at end of file diff --git a/tests/testdata/npm/registry/@denotest/monaco-editor/1.0.0/main.types.d.ts b/tests/testdata/npm/registry/@denotest/monaco-editor/1.0.0/main.types.d.ts new file mode 100644 index 000000000..d978fa159 --- /dev/null +++ b/tests/testdata/npm/registry/@denotest/monaco-editor/1.0.0/main.types.d.ts @@ -0,0 +1 @@ +export class Editor {} diff --git a/tests/testdata/npm/registry/@denotest/monaco-editor/1.0.0/package.json b/tests/testdata/npm/registry/@denotest/monaco-editor/1.0.0/package.json new file mode 100644 index 000000000..eb0428b49 --- /dev/null +++ b/tests/testdata/npm/registry/@denotest/monaco-editor/1.0.0/package.json @@ -0,0 +1,6 @@ +{ + "name": "@denotest/monaco-editor", + "version": "1.0.0", + "module": "./main.js", + "types": "./main.types.d.ts" +} -- cgit v1.2.3