diff options
| author | David Sherret <dsherret@users.noreply.github.com> | 2024-11-01 12:27:00 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-11-01 12:27:00 -0400 |
| commit | 826e42a5b5880c974ae019a7a21aade6a718062c (patch) | |
| tree | a46502ecc3c73e4f7fc3a4517d83c7b2f3d0c0d3 /tests/specs/run/cjs/main_module | |
| parent | 4774eab64d5176e997b6431f03f075782321b3d9 (diff) | |
fix: improved support for cjs and cts modules (#26558)
* cts support
* better cjs/cts type checking
* deno compile cjs/cts support
* More efficient detect cjs (going towards stabilization)
* Determination of whether .js, .ts, .jsx, or .tsx is cjs or esm is only
done after loading
* Support `import x = require(...);`
Co-authored-by: Bartek IwaĆczuk <biwanczuk@gmail.com>
Diffstat (limited to 'tests/specs/run/cjs/main_module')
| -rw-r--r-- | tests/specs/run/cjs/main_module/__test__.jsonc | 4 | ||||
| -rw-r--r-- | tests/specs/run/cjs/main_module/main.cjs | 1 | ||||
| -rw-r--r-- | tests/specs/run/cjs/main_module/main.out | 5 |
3 files changed, 10 insertions, 0 deletions
diff --git a/tests/specs/run/cjs/main_module/__test__.jsonc b/tests/specs/run/cjs/main_module/__test__.jsonc new file mode 100644 index 000000000..e756a6362 --- /dev/null +++ b/tests/specs/run/cjs/main_module/__test__.jsonc @@ -0,0 +1,4 @@ +{ + "args": "run --allow-read main.cjs", + "output": "main.out" +} diff --git a/tests/specs/run/cjs/main_module/main.cjs b/tests/specs/run/cjs/main_module/main.cjs new file mode 100644 index 000000000..2a4c57ab1 --- /dev/null +++ b/tests/specs/run/cjs/main_module/main.cjs @@ -0,0 +1 @@ +console.log(require.main); diff --git a/tests/specs/run/cjs/main_module/main.out b/tests/specs/run/cjs/main_module/main.out new file mode 100644 index 000000000..93b86d27e --- /dev/null +++ b/tests/specs/run/cjs/main_module/main.out @@ -0,0 +1,5 @@ +Module { + id: ".", + [WILDCARD] + filename: "[WILDCARD]main.cjs", +[WILDCARD]
\ No newline at end of file |
