Commit Graph

26 Commits

Author SHA1 Message Date
Donny/강동윤
83a5a0c612
fix(es/compat): Handle private names from class properties pass (#8090)
**Related issue:**

 - Closes #7561
 - https://github.com/vercel/next.js/issues/56612
2023-11-02 22:18:17 +00:00
Donny/강동윤
0aafa75fef
feat(es/testing): Use __swc_snapshots__ for test! macro (#8191)
**Description:**

This implements something similar to `__snapshots__` of `jest`. Instead of storing the expected result as a string literal, we now store it in `$crate/tests/__swc_snapshots__/$path_to_test__$test_name.js`.

**Related issue:**

 - Closes #4509
2023-10-30 10:38:59 +09:00
magic-akari
e186b80ddc
feat(es/compat): Skip empty class static blocks (#8138)
**Description:**

And update the `static_block_private_id` generate rules to be consistent with Babel.

**Related issue:**

 - #8136
2023-10-18 17:58:02 +00:00
Alessandro Chitolina
9c029ef095
feat(es/compat): Implement decorator metadata proposal (#8097)
**Description:**

This PR implements the [decorator
metadata](https://github.com/tc39/proposal-decorator-metadata) proposal,
that is now at Stage 3.

As the decorator metadata proposal is a small extension of the decorator
proposal and is not possible to compile the metadata without transpiling
decorators, I opted to implement it into the existing decorator
transformer (and helper)

**Related issue:**

 - Closes #7957
2023-10-16 20:38:53 +00:00
magic-akari
bf523f5351
fix(es/compat): Handle export default decorator only if not empty (#8099)
**Related issue:**

 - Closes: #8098
2023-10-11 12:24:22 +00:00
Alessandro Chitolina
a751f1cfaf
fix(es/compat): Transform default-exported class decorators correctly (#8050)
**Description:**

Process decorators on the class expression on `export default` declaration and ensure to execute tests for the feature.

**Related issue:**

 - Closes #8049
2023-10-02 17:30:13 +00:00
Donny/강동윤
96a7a4d045
fix(es/compat): Fix scoping of explicit-resource-management (#8044)
**Related issue:**

 - Closes #8020
2023-10-02 06:16:08 +00:00
jrandolf
38bc71006e
fix(es/compat): Use return statements for method and setter decorator (#8017)
**Description:**

This aligns with other implementations such as TypeScript's and correctly implements the currently proposed behavior.

**Related issue:**

 - Closes #8015.
2023-09-27 23:27:57 +00:00
magic-akari
a80aec47ef
fix(es/compat): Handle single expression case in static block (#7944)
**Related issue:**

 - Closes #7922
2023-09-14 02:47:44 +00:00
Donny/강동윤
4d3fcb86e4
feat(es/ast): Support import attributes proposal (#7868)
**Related issue:**

 - Closes #7179
2023-08-28 00:29:45 +00:00
Donny/강동윤
bcd5a1d666
feat(es/compat): Implement transform for explicit resource management (#7376)
**Related issue:**

 - Closes #7316.
 - Closes #7369.
2023-06-29 14:13:43 +00:00
Donny/강동윤
cc4146c9d3
fix(es/compat): Make stage 3 decorator pass use correct state for inner classes (#7508)
**Related issue:**

 - Closes #7499.
2023-06-08 05:06:51 +00:00
Donny/강동윤
97d0f79142
fix(es/compat): Fix stage 3 decorator pass (#7392) 2023-05-23 06:24:05 +00:00
Donny/강동윤
cad18fae4b
feat(es/compat): Implement auto accessors fully (#7370)
**Related issue:**

 - Closes #7193.
2023-05-15 02:26:07 +00:00
Donny/강동윤
97ec259144
feat(es/compat): Partially support auto accessors (#7364)
**Description:**

I'll create a follow-up PR for a full support for auto accessors.

**Related issue:**

 - #7193.
2023-05-09 05:45:16 +00:00
Donny/강동윤
9c052db796
feat(es/compat): Support export class from stage 3 decorator pass (#7363)
**Related issue:**

 - Closes #7358.
2023-05-08 03:38:43 +00:00
Donny/강동윤
7a863ad18f
feat(es/compat): Implement stage 3 decorator, without auto accessor (#6950) 2023-04-03 08:13:12 +00:00
Donny/강동윤
0259a7465f
build(cargo): Update rustc to nightly-2023-03-20 (#7170)
**Description:**

This PR also updates `rkyv` to `=0.7.40`.

**Related issue:**

 - Closes https://github.com/swc-project/swc/issues/6807.
2023-03-30 08:06:02 +00:00
Donny/강동윤
12546c853a
build(cargo): Revert rustc upgrade (#7162)
**Description:**

The `rkyv` bug is not fixed.
2023-03-29 17:48:45 +09:00
Donny/강동윤
e445502072
build(cargo): Update rustc to nightly-2023-03-28 (#7154)
**Description:**

This PR also updates `rkyv` to `=0.7.40`.

**Related issue:**

 - Closes https://github.com/swc-project/swc/issues/6807.
2023-03-29 06:24:19 +00:00
magic-akari
2010409bac
fix(es/compat): Preserve orders of imports and exports (#5249) 2022-07-20 06:57:43 +00:00
magic-akari
ec9378370d
fix(es/parser): Fix parsing of export specifiers (#5190) 2022-07-13 10:55:55 +00:00
Andreu Botella
2f3ca22ecf
fix(es/parser): Support import assertions in specifier-less imports (#3134) 2021-12-28 14:00:00 +00:00
Andreu Botella
c9adf03338
fix(es): Handle import assertions correctly (#3113)
swc_ecma_codegen:
 - Implement codegen for static import assertions.

swc_ecma_transforms_proposal:
  - `import_assertions`: Support `export`s.

swc:
 - Add `jsc.experimental.keep_import_assertions`.

node-swc:
 - Fix typo.
2021-12-28 11:18:33 +00:00
Donny/강동윤
1ea965cecb
fix(es/parser): Drop outdated options (#2974)
swc_ecma_parser:
 - Drop flags in `EsConfig`.
 - Drop flags in `TsConfig`.
 - Drop unused variants from `SyntaxError`.
2021-12-05 17:33:34 +09:00
Donny/강동윤
2b2f6955f2
refactor: Flatten ecmascript (#2708) 2021-11-10 19:00:54 +09:00