magic-akari
83c8fe56f0
fix(es/lints): Ignore ambient context binding ( #8368 )
...
**Related issue:**
- Closes #8367
2023-12-03 00:43:00 +00:00
Donny/강동윤
14ea705f27
build(cargo): Update rustc to nightly-2023-11-04
( #8221 )
...
**Breaking Changes**:
- `Mark::default()` is now identical as `Mark::new()`.
**Description:**
I want to see if inlining is improved
2023-11-04 21:47:10 +00:00
Donny/강동윤
dd805e95a4
feat(es/minifier): Respect inline level and preserve native names ( #8205 )
...
**Description:**
Note: Preserving native names is a hack, but it's used by `terser` and it's the only way to preserve the name of `class AbortSignal` while mangling without `keep_classnames: true`. We can special case `AbortSignal`, but let's just follow `terser`.
**Related issue:**
- https://github.com/vercel/next.js/pull/57904
2023-11-02 08:59:59 +09:00
Donny/강동윤
84cec8766d
refactor(atoms): Remove usage of js_word!
to drop string-cache
( #7976 )
...
**Description:**
This PR is to prepare removal of `string-cache`. Actually, this PR does not remove it. Instead, this PR only removes direct usages of `js_word!`s, especially in patterns.
**Related issue:**
- #4946 .
2023-10-08 00:39:51 +00:00
magic-akari
f7b5e16aef
refactor(es/lint): Remove usage of box_patterns
( #7966 )
...
**Related issue:**
- Closes #7964
2023-09-18 14:39:53 +00:00
David Sherret
b43e38d3f9
refactor: Use ahash
from swc_common
in more places ( #7815 )
...
**Description:**
Uses ahash from swc_common in more places. This allows for more easily
swapping out ahash with rustc_hash.
2023-08-16 23:16:52 +09:00
Donny/강동윤
3958f1792c
refactor(es/ast): Remove unused fields ( #7518 )
...
**Related issue:**
- Closes #7347 .
- Closes #7487 .
2023-06-12 08:02:34 +00:00
Donny/강동윤
041b491466
feat(es/parser): Implement explicit resource management ( #7322 )
...
**Description:**
- Add `UsingDecl`.
- Add `UsingDecl` to `Decl`.
- Rename `VarDeclOrPat` to `ForHead`.
- Add `UsingDecl` to `ForHead`.
- Implement parser for using declarations.
**Related issue:**
- #7316 .
2023-05-10 04:16:44 +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
Donny/강동윤
085c6f35f1
fix(es/ast): Fix memory layout ( #7062 )
...
**Related issue:**
- Closes https://github.com/swc-project/swc/issues/7061 .
2023-03-12 04:50:28 +00:00
Donny/강동윤
a9fe1d2d22
perf(es/ast): Shrink size of Expr
( #7041 )
...
**Related issue:**
- Closes https://github.com/swc-project/swc/issues/7019 .
2023-03-09 13:34:11 +00:00
Donny/강동윤
ca20d94a74
fix(es/lints): Revert check for reassignment to classes ( #6472 )
...
**Related issue:**
- Closes https://github.com/swc-project/swc/issues/6471 .
2022-11-18 05:58:48 +00:00
Austaras
3793e83fbb
fix(es/lints): Disallow reassignment to a class ( #6362 )
2022-11-05 18:00:54 +00:00
Johan Holmerin
a27392a251
fix(es/lints): Fix const-assign
in function expressions ( #6294 )
2022-10-30 12:34:57 +00:00
Donny/강동윤
3c3529cb84
build(rustc): Update rustc ( #5943 )
...
**Description:**
This PR updates rustc, and fix some performance bugs of `swc_common`.
2022-09-24 03:33:47 +00:00
Donny/강동윤
1a182ef8d9
perf(es): Optimize memory layout of AST ( #5829 )
2022-09-20 12:47:21 +09:00
Donny/강동윤
3eb1f4b2b1
chore(ci): Fix lints ( #5462 )
2022-08-12 13:13:35 +00:00
magic-akari
daaa8b5c4a
fix(es/lints): Ignore TS module declare blocks ( #5363 )
2022-08-02 06:16:30 +00:00
Donny/강동윤
037a53d5d1
perf(es/ast): Use Atom
in some places ( #5271 )
2022-07-22 20:09:25 +09:00
Austaras
c68d484305
fix(es/lints): Disallow duplicate export functions ( #5234 )
2022-07-17 10:09:29 +00:00
magic-akari
04de455a9a
fix(es/lints: Handle ts export import equals ( #5225 )
2022-07-17 05:04:37 +00:00
Artur
d0356489cb
feat(es/lints): Support ignoreReadBeforeAssign
for prefer-const
( #4933 )
2022-07-17 04:07:05 +00:00
magic-akari
a0ec3705a4
fix(es/lints): Handle import-require duplicate bindings ( #5131 )
2022-07-07 04:06:37 +00:00
magic-akari
f952a6161c
feat(es/typescript): Follow TypeScript error report ( #5114 )
2022-07-05 22:08:55 +00:00
Austaras
bef8aebdea
fix(es/lints): Allow overload in typescript ( #5116 )
2022-07-06 01:33:58 +09:00
Austaras
9519e801ea
fix(es/resolver): Fix handling of block scoped functions ( #5092 )
2022-07-05 05:04:49 +00:00
magic-akari
f7d857c6b6
fix(es/lints): Cover more const-assign
cases ( #5098 )
2022-07-03 17:13:55 +00:00
magic-akari
376c4e11af
feat(es/lints): Report an error for reassignment to import binding ( #5033 )
2022-06-28 05:06:57 +00:00
Austaras
4a422a09a4
fix(es/lints): Allow duplicate function in non-top level ( #5011 )
2022-06-21 13:22:23 +00:00
LongYinan
db9f7a5ad4
chore(ci): Fix publish build on Windows ( #4970 )
2022-06-14 15:58:10 +00:00
Artur
6daeeb0652
feat(es/lints): Add constructor-super
rule ( #4912 )
2022-06-13 19:24:38 +00:00
Artur
286f265632
refactor(es/lints): Simplify no-empty-pattern
rule ( #4928 )
2022-06-11 06:22:26 +00:00
Artur
b041f2911f
feat(es/lints): Add no-await-in-loop
rule ( #4936 )
2022-06-11 05:00:32 +00:00
Artur
4fb932dd08
feat(es/lints): Add default-case-last
rule ( #4913 )
2022-06-10 05:23:15 +00:00
Artur
9b226a7026
feat(es/lints): Implement no-sparse-arrays
rule ( #4652 )
2022-05-14 06:10:49 +00:00
Artur
f45dd72033
feat(es/lints): Implement no-compare-neg-zero
rule ( #4643 )
2022-05-12 20:19:18 +00:00
Donny/강동윤
6a97c7bef8
fix(es/utils): Fix wrong apis ( #4604 )
...
# API Changes
## `swc_ecma_utils`
### Renames
- `find_ids` => `find_pat_ids`
- `prepend` => `prepend_stmt`
- `as_bool` => `cast_to_bool`
- `as_number` => `as_pure_number`
- `as_string` => `cast_to_string`
- (`as_pure_bool`, `cast_to_number` is not renamed)
- `UsageFinder` => `IdentUsageFinder`.
- `IdentFinder` => `IdentRefFinder`.
## Changes
- Re-export of `HANDLER` from `swc_common::errors` is removed. Use `swc_common::error::HANDLER` instead.
- Re-export of `Id` from `swc_ecma_ast` is removed. Use `swc_ecma_ast::Id` instead.
- `ExprCtx` is used for apis related to `Expr`.
- `preserve_effects` is now a method of `ExprCtx`. It was a top-level function.
- `extract_side_effects_to` is now a method of `ExprCtx`. It was a top-level function.
- `IdentUsageFinder` (previously `UsageFinder`) now takes `Id` instead of `Ident`.
- `IdentRefFinder` (previously `IdentFinder`) now takes `Id` instead of `Ident`.
- `ExprExt::is_ident_ref_to` is removed.
- `Expr::is_global_ref_to` is added.
- `:🆔 :id` is removed. Use `Ident::to_id()` instead.
2022-05-11 04:36:22 +00:00
Donny/강동윤
2c861bd9e5
feat(es/ast): Improve Id
APIs ( #4614 )
...
# API Changes
- `Ident` now has `to_id()`. This method is added to allow removing an import.
2022-05-11 12:02:14 +09:00
Artur
e65bf3d025
feat(es/lints): Implement prefer-const
rule without options ( #4584 )
2022-05-10 10:40:46 +00:00
Donny/강동윤
7fc9bbccd9
feat(config): Make all configuration overridable ( #4575 )
2022-05-09 05:38:27 +00:00
Artur
17f237d3ba
feat(es/lints): Implement no-var
( #4485 )
2022-04-30 07:25:35 +00:00
Artur
3a8cade209
feat(es/lints): Implement no-throw-literal
( #4477 )
2022-04-29 07:46:17 +00:00
Donny/강동윤
53610fdafc
feat(es/resolver): Use different syntax context for unresolved refs ( #4436 )
...
- We don't need a list of bindings to check if an identifier is unresolved.
- Checking if an identifier is unresolved is now one CPU instruction.
- Previously it was one hashmap operation.
- This PR also improves performance, by removing the hashmaps mentioned above.
2022-04-26 07:38:50 +00:00
那里好脏不可以
37a8c90750
chore(*): Typo + fomatting ( #4304 )
2022-04-11 18:45:58 +00:00
Austaras
e4a565c2d4
fix(es/lints): Check parameters in the duplicate binding rule ( #4288 )
2022-04-09 08:14:01 +00:00
Artur
a88d56ee08
feat(es/lints): Implement no-obj-calls
rule ( #4168 )
2022-03-28 08:50:32 +00:00
Artur
2a9cb2d12a
refactor(es/lints): Use util for parens ( #4167 )
2022-03-28 08:20:46 +00:00
Artur
10851ece98
feat(es/lints): Implement symbol-description
rule ( #4161 )
2022-03-26 06:49:57 +00:00