-
Notifications
You must be signed in to change notification settings - Fork 737
Closed
oxc-project/oxc
#10356Description
Reproduction link or steps
Apply the patch below, and run cargo test --package rolldown --test integration_esbuild -- test_tests__esbuild__ts__export_declare__config_json --show-output
From b5241476c47799974ee7309438116ffae67b40de Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E4=B8=89=E5=92=B2=E6=99=BA=E5=AD=90=20Kevin=20Deng?=
<sxzz@sxzz.moe>
Date: Thu, 5 Dec 2024 12:36:13 +0800
Subject: [PATCH] test: `declare export`
---
.../tests/esbuild/ts/export_declare/_config.json | 11 +++++++++++
.../rolldown/tests/esbuild/ts/export_declare/entry.ts | 2 ++
2 files changed, 13 insertions(+)
create mode 100644 crates/rolldown/tests/esbuild/ts/export_declare/_config.json
create mode 100644 crates/rolldown/tests/esbuild/ts/export_declare/entry.ts
diff --git a/crates/rolldown/tests/esbuild/ts/export_declare/_config.json b/crates/rolldown/tests/esbuild/ts/export_declare/_config.json
new file mode 100644
index 000000000..11b2fb4b4
--- /dev/null
+++ b/crates/rolldown/tests/esbuild/ts/export_declare/_config.json
@@ -0,0 +1,11 @@
+{
+ "config": {
+ "input": [
+ {
+ "name": "entry",
+ "import": "entry.ts"
+ }
+ ]
+ },
+ "expectExecuted": false
+}
diff --git a/crates/rolldown/tests/esbuild/ts/export_declare/entry.ts b/crates/rolldown/tests/esbuild/ts/export_declare/entry.ts
new file mode 100644
index 000000000..391889e73
--- /dev/null
+++ b/crates/rolldown/tests/esbuild/ts/export_declare/entry.ts
@@ -0,0 +1,2 @@
+declare const num: number;
+export { num };
--
2.47.1
What is expected?
What is actually happening?
thread 'test_tests__esbuild__ts__export_declare__config_json' panicked at crates/rolldown_testing/src/integration_test.rs:167:11:
Expected the bundling to be success, but got diagnosable errors: BatchedBuildDiagnostic(
[
BuildDiagnostic {
inner: ExportUndefinedVariable {
filename: "/Users/kevin/Developer/open-source/rolldown/crates/rolldown/tests/esbuild/ts/export_declare/entry.ts",
source: "declare const num: number;\nexport { num };\n",
span: Span {
start: 36,
end: 39,
},
name: "num",
},
source: None,
severity: Error,
},
],
)
System Info
N/AAny additional comments?
No response
Reactions are currently unavailable
Metadata
Metadata
Assignees
Type
Fields
Give feedbackPriority
None yet