Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(typescript): Implement Isolated Declaration #9086

Merged
merged 57 commits into from
Jun 21, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
57 commits
Select commit Hold shift + click to select a range
002e6e4
Copy!
kdy1 Jun 21, 2024
1fcc870
Remove async
kdy1 Jun 21, 2024
d79587b
Dep
kdy1 Jun 21, 2024
f1a8a23
cargo lockfile
kdy1 Jun 21, 2024
f06f4c5
API
kdy1 Jun 21, 2024
e35dfd1
wip
kdy1 Jun 21, 2024
d218568
export default decl
kdy1 Jun 21, 2024
2bb8f93
Doc
kdy1 Jun 21, 2024
75f251c
copy more
kdy1 Jun 21, 2024
b747217
more
kdy1 Jun 21, 2024
65d6fe1
expr_to_ts_type
kdy1 Jun 21, 2024
d255961
copy more
kdy1 Jun 21, 2024
5abc26c
Copy more
kdy1 Jun 21, 2024
54f036f
Copy!
kdy1 Jun 21, 2024
0bfef26
Import
kdy1 Jun 21, 2024
a8fa41c
CI
kdy1 Jun 21, 2024
c502106
Rename
kdy1 Jun 21, 2024
789089f
More
kdy1 Jun 21, 2024
fb57d02
fixup
kdy1 Jun 21, 2024
88be887
More work
kdy1 Jun 21, 2024
310a6c8
more
kdy1 Jun 21, 2024
9adfc85
gen_unique_name
kdy1 Jun 21, 2024
b133036
More work
kdy1 Jun 21, 2024
f036d33
box more
kdy1 Jun 21, 2024
e2223ca
Dep
kdy1 Jun 21, 2024
ae9ec99
cargo lockfile
kdy1 Jun 21, 2024
1fd58ec
`DtsIssue`
kdy1 Jun 21, 2024
b34f564
dts issue
kdy1 Jun 21, 2024
e30366f
Arc<FileName>
kdy1 Jun 21, 2024
c48eed0
more work
kdy1 Jun 21, 2024
54ba1d9
More work
kdy1 Jun 21, 2024
edde336
More work
kdy1 Jun 21, 2024
e352449
span
kdy1 Jun 21, 2024
567ff72
drop one
kdy1 Jun 21, 2024
2a73e2f
more work
kdy1 Jun 21, 2024
e8301dc
More &mut
kdy1 Jun 21, 2024
55f1c2f
& / &mut
kdy1 Jun 21, 2024
d2fbff1
&
kdy1 Jun 21, 2024
d8da1ea
more
kdy1 Jun 21, 2024
11730a4
take()
kdy1 Jun 21, 2024
e75b4ee
done?
kdy1 Jun 21, 2024
78401b9
License
kdy1 Jun 21, 2024
6710d3c
link
kdy1 Jun 21, 2024
f77c5ed
fast_dts
kdy1 Jun 21, 2024
b6f602e
clippy
kdy1 Jun 21, 2024
7fada64
Dep
kdy1 Jun 21, 2024
011a5fd
cargo lockfile
kdy1 Jun 21, 2024
f1855f0
doc
kdy1 Jun 21, 2024
3292712
test
kdy1 Jun 21, 2024
c1a13c0
Update `sourcemap`
kdy1 Jun 21, 2024
66d0c60
cargo lockfile
kdy1 Jun 21, 2024
2237cff
Test
kdy1 Jun 21, 2024
bcea749
print
kdy1 Jun 21, 2024
e03734a
Update test refs
kdy1 Jun 21, 2024
de110bc
Update test refs
kdy1 Jun 21, 2024
15a95e9
Merge branch 'main' into ts
swc-bot Jun 21, 2024
afd7f32
Update test refs
kdy1 Jun 21, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -587,7 +587,7 @@ jobs:
- crate: testing_macros
os: ubuntu-latest
runner: ubuntu-latest
- crate: xtask
- crate: swc_typescript
os: ubuntu-latest
runner: ubuntu-latest
steps:
Expand Down
13 changes: 11 additions & 2 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ resolver = "2"
siphasher = "0.3.9"
smallvec = "1.8.0"
smartstring = "1"
sourcemap = "8.0.0"
sourcemap = "8.0.1"
st-map = "0.2.0"
syn = "2"
tempfile = "3.6.0"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
"x",
"Error"
],
"rangeMappings": ";;;;;;;;;;;",
"sources": [
"../../input/index.ts"
],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
"names": [
"foo"
],
"rangeMappings": ";;;;;;;;;;",
"sources": [
"../../input/index.ts"
],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
"names": [
"foo"
],
"rangeMappings": ";;",
"sources": [
"../../input/index.js"
],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
"console",
"log"
],
"rangeMappings": ";;;;;;;",
"sources": [
"../../input/index.ts"
],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
"names": [
"a"
],
"rangeMappings": "",
"sources": [
"../../input/index.js"
],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
"names": [
"a"
],
"rangeMappings": "",
"sources": [
"../../input/index.js"
],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
"names": [
"a"
],
"rangeMappings": ";;;",
"sources": [
"../../input/index.js"
],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
"resolve",
"setTimeout"
],
"rangeMappings": ";;;;;;;;;;;;;;;;;;;;;;",
"sources": [
"../../input/index.ts"
],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
"customElements",
"define"
],
"rangeMappings": ";;;;;;;;;;;;;;;;;;;;;;",
"sources": [
"../../input/index.ts"
],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
"a",
"b"
],
"rangeMappings": "",
"sources": [
"../../input/index.js"
],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@ define([
});
});

//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbXSwibmFtZXMiOltdLCJyYW5nZU1hcHBpbmdzIjoiIiwibWFwcGluZ3MiOiIifQ==
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IiJ9
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
"names": [
"test"
],
"rangeMappings": ";;;",
"sources": [
"../../input/index.js"
],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
"names": [
"test"
],
"rangeMappings": ";;;;",
"sources": [
"../../input/index.js"
],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
"console",
"log"
],
"rangeMappings": ";;;;;;;;",
"sources": [
"../../input/index.js"
],
Expand Down
1 change: 0 additions & 1 deletion crates/swc/tests/fixture/issues-5xxx/5272/1/output/a.map
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
"foo",
"Base"
],
"rangeMappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;",
"sources": [
"../../input/source/a/a.ts"
],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
"toBe",
"foo"
],
"rangeMappings": ";;;;;;;;;;",
"sources": [
"../../input/source/a/a.spec.ts"
],
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
{
"mappings": ";;;;;uBAAc;uBACA;uBACA;uBACA;uBACA;uBACA;uBACA;uBACA;uBACA;uBACA;uBACA;uBACA;uBACA;uBACA;uBACA;uBACA;uBACA;uBACA;uBACA;uBACA;uBACA;uBACA;uBACA",
"names": [],
"rangeMappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;",
"sources": [
"../../input/index.ts"
],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
"document",
"getElementById"
],
"rangeMappings": ";;;;",
"sources": [
"../../input/index.tsx"
],
Expand Down
2 changes: 1 addition & 1 deletion crates/swc/tests/fixture/issues-8xxx/8869/output/1.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
"expect",
"toContain"
],
"rangeMappings": ";;;;;;;;;;;;;;;;",
"sources": [
"../../input/index.ts"
],
Expand Down
1 change: 0 additions & 1 deletion crates/swc/tests/fixture/jest/issue-7506/output/util.map
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
"stack",
"split"
],
"rangeMappings": ";;;;;;;;;;;;;;;",
"sources": [
"../../input/util.ts"
],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,4 @@ const Button = (0, _linaria.css)`
color: red;
`;

//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uL2lucHV0L2luZGV4LnRzIl0sInNvdXJjZXNDb250ZW50IjpbImltcG9ydCB7IGNzcyB9IGZyb20gXCJsaW5hcmlhXCI7XG5cbmV4cG9ydCBjb25zdCBCdXR0b24gPSBjc3NgXG4gICAgY29sb3I6IHJlZDtcbmA7XG4iXSwibmFtZXMiOlsiQnV0dG9uIiwiY3NzIl0sInJhbmdlTWFwcGluZ3MiOiI7Ozs7Ozs7Ozs7Ozs7IiwibWFwcGluZ3MiOiI7Ozs7K0JBRWFBOzs7ZUFBQUE7Ozt5QkFGTztBQUViLE1BQU1BLFNBQVNDLElBQUFBLFlBQUcsQ0FBQSxDQUFDOztBQUUxQixDQUFDIn0=
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uL2lucHV0L2luZGV4LnRzIl0sInNvdXJjZXNDb250ZW50IjpbImltcG9ydCB7IGNzcyB9IGZyb20gXCJsaW5hcmlhXCI7XG5cbmV4cG9ydCBjb25zdCBCdXR0b24gPSBjc3NgXG4gICAgY29sb3I6IHJlZDtcbmA7XG4iXSwibmFtZXMiOlsiQnV0dG9uIiwiY3NzIl0sIm1hcHBpbmdzIjoiOzs7OytCQUVhQTs7O2VBQUFBOzs7eUJBRk87QUFFYixNQUFNQSxTQUFTQyxJQUFBQSxZQUFHLENBQUEsQ0FBQzs7QUFFMUIsQ0FBQyJ9
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,6 @@
"prop",
"get"
],
"rangeMappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;",
"sources": [
"../../input/box-model.ts"
],
Expand Down
1 change: 0 additions & 1 deletion crates/swc/tests/fixture/sourcemap/001/output/index.map
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
"foo",
"arr"
],
"rangeMappings": ";;;;;;;;;;;;",
"sources": [
"../../input/index.ts"
],
Expand Down
1 change: 0 additions & 1 deletion crates/swc/tests/fixture/sourcemap/002/output/index.map
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
"getStaticProps",
"props"
],
"rangeMappings": ";;;;;;;;;;;;;;;;;;;;;;;;",
"sources": [
"../../input/index.js"
],
Expand Down
1 change: 0 additions & 1 deletion crates/swc/tests/fixture/sourcemap/003/output/index.map
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
"getStaticProps",
"props"
],
"rangeMappings": "",
"sources": [
"../../input/index.js"
],
Expand Down
1 change: 0 additions & 1 deletion crates/swc/tests/fixture/sourcemap/004/output/index.map
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@
"s",
"_N_E"
],
"rangeMappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;",
"sources": [
"../../input/index.js"
],
Expand Down
1 change: 0 additions & 1 deletion crates/swc/tests/fixture/sourcemap/005/output/index.map
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@
"isSharp",
"toBeLessThan"
],
"rangeMappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;",
"sources": [
"../../input/index.js"
],
Expand Down
1 change: 0 additions & 1 deletion crates/swc/tests/fixture/sourcemap/006/output/index.map
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@
"isSharp",
"toBeLessThan"
],
"rangeMappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;",
"sources": [
"../../input/index.js"
],
Expand Down
1 change: 0 additions & 1 deletion crates/swc/tests/fixture/sourcemap/007/output/index.map
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
"console",
"log"
],
"rangeMappings": ";;;;;;;",
"sources": [
"../../input/index.js"
],
Expand Down
1 change: 0 additions & 1 deletion crates/swc/tests/fixture/sourcemap/008/output/index.map
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
"expect",
"toBe"
],
"rangeMappings": ";;;;;;;;;;;;;;;",
"sources": [
"../../input/index.js"
],
Expand Down
1 change: 0 additions & 1 deletion crates/swc/tests/fixture/sourcemap/009/output/index.map
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
"Error",
"stack"
],
"rangeMappings": ";;;;;",
"sources": [
"../../input/index.js"
],
Expand Down
1 change: 0 additions & 1 deletion crates/swc/tests/fixture/sourcemap/010/output/index.map
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
{
"mappings": "AAAA,cAAc,iBAAiB;AAC/B,cAAc,wBAAwB;AAEtC,cAAc,WAAW;AACzB,cAAc,eAAe",
"names": [],
"rangeMappings": ";;;",
"sources": [
"../../input/index.ts"
],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@
"deleteComment",
"delete"
],
"rangeMappings": ";;;;;;;;;;;;;;;;;;;;;;",
"sources": [
"../../input/CommentControlller.ts"
],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,6 @@
"$pull",
"name"
],
"rangeMappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;",
"sources": [
"../../input/CommentService.ts"
],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,6 @@
"createPostComment",
"createCommentDto"
],
"rangeMappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;",
"sources": [
"../../input/PistController.ts"
],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@
"user",
"id"
],
"rangeMappings": ";;;;;;;;;;;;;;;;;;;;;;;;;",
"sources": [
"../../input/UserController.ts"
],
Expand Down
1 change: 0 additions & 1 deletion crates/swc/tests/fixture/sourcemap/015/output/index.map
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
"expect",
"toBe"
],
"rangeMappings": ";;;;;;;;;;;;;;;",
"sources": [
"../../input/index.js"
],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
"toBe",
"str"
],
"rangeMappings": ";;;;;;;;;;;;;",
"sources": [
"../../input/index.js"
],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
"Symbol",
"for"
],
"rangeMappings": ";;",
"sources": [
"../../input/index.js"
],
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
{
"mappings": "AAAA,cAAc,iBAAiB;AAC/B,cAAc,wBAAwB;AACtC,cAAc,eAAe;AAC7B,cAAc,WAAW;AACzB,cAAc,eAAe",
"names": [],
"rangeMappings": ";;;;",
"sources": [
"../../input/index.ts"
],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
"names": [
"a"
],
"rangeMappings": "",
"sources": [
"../../input/index.js"
],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
"names": [
"a"
],
"rangeMappings": "",
"sources": [
"../../input/index.js"
],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,6 @@
"variant",
"constructor"
],
"rangeMappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;",
"sources": [
"../../input/index.ts"
],
Expand Down

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
"message",
"bbb"
],
"rangeMappings": "",
"sources": [
"unknown"
],
Expand Down
Loading
Loading