-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
test(es/module): Add a test for a fixed issue (#8521)
**Related issue:** - Closes #8375
- Loading branch information
Showing
5 changed files
with
65 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
{ | ||
"jsc": { | ||
"keepClassNames": true, | ||
"output": { | ||
"preamble": "" | ||
}, | ||
"parser": { | ||
"syntax": "typescript" | ||
}, | ||
"baseUrl": ".", | ||
"paths": { | ||
"*": [ | ||
"src/*" | ||
] | ||
}, | ||
"preserveAllComments": true, | ||
"target": "es2022", | ||
"transform": { | ||
"decoratorMetadata": false, | ||
"legacyDecorator": false | ||
} | ||
}, | ||
"minify": false, | ||
"module": { | ||
"allowTopLevelThis": false, | ||
"ignoreDynamic": false, | ||
"lazy": false, | ||
"noInterop": false, | ||
"preserveImportMeta": false, | ||
"resolveFully": false, | ||
"strict": false, | ||
"strictMode": true, | ||
"type": "commonjs" | ||
} | ||
} |
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 @@ | ||
import { helloWorld } from "hello"; | ||
import * as Sentry from '@sentry/node'; | ||
|
||
Sentry; | ||
helloWorld("SWC"); |
3 changes: 3 additions & 0 deletions
3
crates/swc/tests/fixture/issues-8xxx/8375/1/input/src/hello/index.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,3 @@ | ||
export function helloWorld(name: string) { | ||
console.log(`Hello, ${name}`); | ||
} |
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,9 @@ | ||
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { | ||
value: true | ||
}); | ||
const _interop_require_wildcard = require("src/@swc/helpers/_/_interop_require_wildcard"); | ||
const _hello = require("./src/hello"); | ||
const _node = _interop_require_wildcard._(require("src/@sentry/node")); | ||
_node; | ||
(0, _hello.helloWorld)("SWC"); /*#__PURE__*/ |
13 changes: 13 additions & 0 deletions
13
crates/swc/tests/fixture/issues-8xxx/8375/1/output/src/hello/index.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,13 @@ | ||
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { | ||
value: true | ||
}); | ||
Object.defineProperty(exports, "helloWorld", { | ||
enumerable: true, | ||
get: function() { | ||
return helloWorld; | ||
} | ||
}); | ||
function helloWorld(name) { | ||
console.log(`Hello, ${name}`); | ||
} |