summaryrefslogtreecommitdiff
path: root/tests/testdata/npm
diff options
context:
space:
mode:
authorDavid Sherret <dsherret@users.noreply.github.com>2024-04-15 17:50:52 -0400
committerGitHub <noreply@github.com>2024-04-15 17:50:52 -0400
commit6f278e5c40d101f0fb8e7b69e28d34b1c766a8fe (patch)
tree97d3edc0f0b527c3dc7f07ba71d5828cd2c77943 /tests/testdata/npm
parent7e4ee02e2e37db8adfaf4a05aba3819838904650 (diff)
fix(lsp): improved cjs tracking (#23374)
Our cjs tracking was a bit broken. It was marking stuff as esm that was actually cjs leading to type checking errors.
Diffstat (limited to 'tests/testdata/npm')
-rw-r--r--tests/testdata/npm/registry/@denotest/cjs-internal-types-default-export/1.0.0/add.d.ts3
-rw-r--r--tests/testdata/npm/registry/@denotest/cjs-internal-types-default-export/1.0.0/index.d.ts1
-rw-r--r--tests/testdata/npm/registry/@denotest/cjs-internal-types-default-export/1.0.0/index.js1
-rw-r--r--tests/testdata/npm/registry/@denotest/cjs-internal-types-default-export/1.0.0/package.json4
4 files changed, 9 insertions, 0 deletions
diff --git a/tests/testdata/npm/registry/@denotest/cjs-internal-types-default-export/1.0.0/add.d.ts b/tests/testdata/npm/registry/@denotest/cjs-internal-types-default-export/1.0.0/add.d.ts
new file mode 100644
index 000000000..0b38dc4fc
--- /dev/null
+++ b/tests/testdata/npm/registry/@denotest/cjs-internal-types-default-export/1.0.0/add.d.ts
@@ -0,0 +1,3 @@
+const _default: (a: number, b: number) => number;
+
+export default _default;
diff --git a/tests/testdata/npm/registry/@denotest/cjs-internal-types-default-export/1.0.0/index.d.ts b/tests/testdata/npm/registry/@denotest/cjs-internal-types-default-export/1.0.0/index.d.ts
new file mode 100644
index 000000000..bfde9725e
--- /dev/null
+++ b/tests/testdata/npm/registry/@denotest/cjs-internal-types-default-export/1.0.0/index.d.ts
@@ -0,0 +1 @@
+export { default as add } from './add'; \ No newline at end of file
diff --git a/tests/testdata/npm/registry/@denotest/cjs-internal-types-default-export/1.0.0/index.js b/tests/testdata/npm/registry/@denotest/cjs-internal-types-default-export/1.0.0/index.js
new file mode 100644
index 000000000..62c45aa26
--- /dev/null
+++ b/tests/testdata/npm/registry/@denotest/cjs-internal-types-default-export/1.0.0/index.js
@@ -0,0 +1 @@
+module.exports.add = (a, b) => a + b;
diff --git a/tests/testdata/npm/registry/@denotest/cjs-internal-types-default-export/1.0.0/package.json b/tests/testdata/npm/registry/@denotest/cjs-internal-types-default-export/1.0.0/package.json
new file mode 100644
index 000000000..57b3b9e4a
--- /dev/null
+++ b/tests/testdata/npm/registry/@denotest/cjs-internal-types-default-export/1.0.0/package.json
@@ -0,0 +1,4 @@
+{
+ "name": "@denotest/cjs-internal-types-default-export",
+ "version": "1.0.0"
+}