-
Notifications
You must be signed in to change notification settings - Fork 12.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
moduleDetection: auto makes cjs files parse as modules, module: node …
…sets moduleDetection: force
- Loading branch information
Showing
15 changed files
with
75 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
13 changes: 13 additions & 0 deletions
13
...s/baselines/reference/nodeModulesAllowJsExportlessJsModuleDetectionAuto(module=node16).js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
//// [tests/cases/conformance/node/allowJs/nodeModulesAllowJsExportlessJsModuleDetectionAuto.ts] //// | ||
|
||
//// [foo.cjs] | ||
// this file is a module despite having no imports | ||
//// [bar.js] | ||
// however this file is _not_ a module | ||
|
||
//// [foo.cjs] | ||
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
// this file is a module despite having no imports | ||
//// [bar.js] | ||
// however this file is _not_ a module |
5 changes: 5 additions & 0 deletions
5
...elines/reference/nodeModulesAllowJsExportlessJsModuleDetectionAuto(module=node16).symbols
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
=== tests/cases/conformance/node/allowJs/foo.cjs === | ||
// this file is a module despite having no imports | ||
No type information for this code.=== tests/cases/conformance/node/allowJs/bar.js === | ||
// however this file is _not_ a module | ||
No type information for this code. |
5 changes: 5 additions & 0 deletions
5
...aselines/reference/nodeModulesAllowJsExportlessJsModuleDetectionAuto(module=node16).types
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
=== tests/cases/conformance/node/allowJs/foo.cjs === | ||
// this file is a module despite having no imports | ||
No type information for this code.=== tests/cases/conformance/node/allowJs/bar.js === | ||
// however this file is _not_ a module | ||
No type information for this code. |
13 changes: 13 additions & 0 deletions
13
...baselines/reference/nodeModulesAllowJsExportlessJsModuleDetectionAuto(module=nodenext).js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
//// [tests/cases/conformance/node/allowJs/nodeModulesAllowJsExportlessJsModuleDetectionAuto.ts] //// | ||
|
||
//// [foo.cjs] | ||
// this file is a module despite having no imports | ||
//// [bar.js] | ||
// however this file is _not_ a module | ||
|
||
//// [foo.cjs] | ||
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
// this file is a module despite having no imports | ||
//// [bar.js] | ||
// however this file is _not_ a module |
5 changes: 5 additions & 0 deletions
5
...ines/reference/nodeModulesAllowJsExportlessJsModuleDetectionAuto(module=nodenext).symbols
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
=== tests/cases/conformance/node/allowJs/foo.cjs === | ||
// this file is a module despite having no imports | ||
No type information for this code.=== tests/cases/conformance/node/allowJs/bar.js === | ||
// however this file is _not_ a module | ||
No type information for this code. |
5 changes: 5 additions & 0 deletions
5
...elines/reference/nodeModulesAllowJsExportlessJsModuleDetectionAuto(module=nodenext).types
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
=== tests/cases/conformance/node/allowJs/foo.cjs === | ||
// this file is a module despite having no imports | ||
No type information for this code.=== tests/cases/conformance/node/allowJs/bar.js === | ||
// however this file is _not_ a module | ||
No type information for this code. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
8 changes: 8 additions & 0 deletions
8
tests/cases/conformance/node/allowJs/nodeModulesAllowJsExportlessJsModuleDetectionAuto.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
// @module: node16,nodenext | ||
// @allowJs: true | ||
// @outDir: ./out | ||
// @moduleDetection: auto | ||
// @filename: foo.cjs | ||
// this file is a module despite having no imports | ||
// @filename: bar.js | ||
// however this file is _not_ a module |