diff options
| author | Bartek IwaĆczuk <biwanczuk@gmail.com> | 2022-11-16 20:41:27 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-11-16 20:41:27 +0100 |
| commit | 1416713cb3af8a952b1ae9952091706e2540341c (patch) | |
| tree | a57fd6dac796a0126eedff470c041d01f9c0bf31 /cli/tests/testdata/npm/registry | |
| parent | bd159b8bad34acefbd6e222781f3d7c6319c9bef (diff) | |
fix(npm): using types for packages with subpath (#16656)
For CommonJS packages we were not trying different extensions for files
specified as subpath of the package ([package_name]/[subpath]).
This commit fixes that.
Diffstat (limited to 'cli/tests/testdata/npm/registry')
5 files changed, 22 insertions, 0 deletions
diff --git a/cli/tests/testdata/npm/registry/@denotest/types/1.0.0/index.d.ts b/cli/tests/testdata/npm/registry/@denotest/types/1.0.0/index.d.ts new file mode 100644 index 000000000..afe876c4d --- /dev/null +++ b/cli/tests/testdata/npm/registry/@denotest/types/1.0.0/index.d.ts @@ -0,0 +1,4 @@ +export interface Fizzbuzz { + fizz: string; + buzz: string; +}
\ No newline at end of file diff --git a/cli/tests/testdata/npm/registry/@denotest/types/1.0.0/package.json b/cli/tests/testdata/npm/registry/@denotest/types/1.0.0/package.json new file mode 100644 index 000000000..ef927cbe3 --- /dev/null +++ b/cli/tests/testdata/npm/registry/@denotest/types/1.0.0/package.json @@ -0,0 +1,5 @@ +{ + "name": "@denotest/types-ambient", + "version": "1.0.0", + "types": "./index.d.ts" +} diff --git a/cli/tests/testdata/npm/registry/@denotest/types_imported/1.0.0/index.d.ts b/cli/tests/testdata/npm/registry/@denotest/types_imported/1.0.0/index.d.ts new file mode 100644 index 000000000..559cdb2ec --- /dev/null +++ b/cli/tests/testdata/npm/registry/@denotest/types_imported/1.0.0/index.d.ts @@ -0,0 +1,4 @@ +export interface SomeInterface { + prop: string; + prop2: number; +}
\ No newline at end of file diff --git a/cli/tests/testdata/npm/registry/@denotest/types_imported/1.0.0/package.json b/cli/tests/testdata/npm/registry/@denotest/types_imported/1.0.0/package.json new file mode 100644 index 000000000..ef927cbe3 --- /dev/null +++ b/cli/tests/testdata/npm/registry/@denotest/types_imported/1.0.0/package.json @@ -0,0 +1,5 @@ +{ + "name": "@denotest/types-ambient", + "version": "1.0.0", + "types": "./index.d.ts" +} diff --git a/cli/tests/testdata/npm/registry/@denotest/types_imported/1.0.0/subpath.d.ts b/cli/tests/testdata/npm/registry/@denotest/types_imported/1.0.0/subpath.d.ts new file mode 100644 index 000000000..883cf037a --- /dev/null +++ b/cli/tests/testdata/npm/registry/@denotest/types_imported/1.0.0/subpath.d.ts @@ -0,0 +1,4 @@ +export interface Foobar { + foo: string; + bar: string; +}
\ No newline at end of file |
