-
Notifications
You must be signed in to change notification settings - Fork 400
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: deconflicting for symbols of nested scopes (#188)
- Loading branch information
Showing
10 changed files
with
122 additions
and
24 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
const a = 'a.js' | ||
|
||
export { a } |
29 changes: 29 additions & 0 deletions
29
crates/rolldown/tests/fixtures/deconflict/basic_scoped/artifacts.snap
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,29 @@ | ||
--- | ||
source: crates/rolldown/tests/common/case.rs | ||
expression: content | ||
input_file: crates/rolldown/tests/fixtures/deconflict/basic_scoped | ||
--- | ||
# Assets | ||
|
||
## main.mjs | ||
|
||
```js | ||
import { default as assert_default } from "assert"; | ||
// a.js | ||
const a = 'a.js' | ||
// main.js | ||
const a$1 = 'main.js' | ||
function foo(a$1$1) { | ||
return [a$1$1, a$1, a] | ||
} | ||
assert_default.deepEqual(foo('foo'), ['foo', 'main.js', 'a.js']) | ||
``` |
10 changes: 10 additions & 0 deletions
10
crates/rolldown/tests/fixtures/deconflict/basic_scoped/main.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,10 @@ | ||
import assert from 'assert' | ||
import { a as aJs } from './a' | ||
const a = 'main.js' | ||
|
||
|
||
function foo(a$1) { | ||
return [a$1, a, aJs] | ||
} | ||
|
||
assert.deepEqual(foo('foo'), ['foo', 'main.js', 'a.js']) |
1 change: 1 addition & 0 deletions
1
crates/rolldown/tests/fixtures/deconflict/basic_scoped/test.config.json
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 @@ | ||
{} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,8 @@ | ||
{ | ||
"total": 901, | ||
"failed": 0, | ||
"skipFailed": 642, | ||
"skipFailed": 646, | ||
"ignored": 7, | ||
"skipped": 0, | ||
"passed": 252 | ||
"passed": 248 | ||
} |
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