oxc-bot
00a7372eaf
release(crates): v0.38.0 ( #7490 )
2024-11-26 14:38:47 +08:00
Boshen
3169bc61d1
ci: clean up wasm type check ( #7466 )
...
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2024-11-25 17:56:17 +08:00
oxc-bot
88d17b96e3
release(oxlint): v0.13.1 ( #7441 )
...
## [0.13.1] - 2024-11-23
### Features
- 4ad26b9 linter: Add `no-promise-in-callback` (#7307 ) (no-yan)
- 9558087 oxlint: Auto detect config file in CLI (#7348 ) (Alexander S.)
### Bug Fixes
- 8507464 linter: Hanging when source has syntax/is flow (#7432 )
(Cameron)
- e88cf1b linter: Make `overrides` globs relative to config path (#7407 )
(camchenry)
- 9002e97 linter: Add proper support for findIndex and findLastIndex for
`unicorn/prefer-array-some` (#7405 ) (Dmitry Zakharov)
### Documentation
- 6730e3e linter: Add more examples for `unicorn/prefer-array-some`
(#7411 ) (Dmitry Zakharov)
### Refactor
- 6c0d31b linter: Remove useless `const` declaration (#7430 ) (Song Gao)
- c8adc46 linter/no-unused-vars: Improve implementation to remove using
SymbolFlags::Export (#7412 ) (Dunqing)
- c90537f linter/only-used-in-recursion: Improve implementation to
remove using SymbolFlags::Export (#7413 ) (Dunqing)
### Testing
- 779f479 editor: Check if workspace configuration is updated (#7403 )
(Alexander S.)
Co-authored-by: Boshen <1430279+Boshen@users.noreply.github.com>
2024-11-23 23:46:16 +08:00
oxc-bot
0918e520cf
release(crates): v0.37.0 ( #7399 )
2024-11-21 22:27:55 +08:00
oxc-bot
4b5a176630
release(oxlint): v0.13.0 ( #7398 )
...
## [0.13.0] - 2024-11-21
- 7bf970a linter: [**BREAKING**] Remove tree_shaking plugin (#7372 )
(Boshen)
- 7f8747d linter: Implement `react/no-array-index-key` (#6960 )
(BitterGourd)
### Features
- be152c0 linter: Add `typescript/no-require-imports` rule (#7315 )
(Dmitry Zakharov)
- 849489e linter: Add suggestion for no-console (#4312 ) (DonIsaac)
- 8cebdc8 linter: Allow appending plugins in override (#7379 )
(camchenry)
- 8cfea3c oxc_cfg: Add implicit return instruction (#5568 )
(IWANABETHATGUY)
- e6922df parser: Fix incorrect AST for `x?.f<T>()` (#7387 ) (Boshen)
### Bug Fixes
- e91c287 linter: Fix panic in react/no-array-index-key (#7395 ) (Boshen)
- a32f5a7 linter/no-array-index-key: Compile error due to it uses a
renamed API (#7391 ) (Dunqing)
- 666b6c1 parser: Add missing `ChainExpression` in optional
`TSInstantiationExpression` (#7371 ) (Boshen)
### Documentation
- df143ca linter: Add docs for config settings (#4827 ) (DonIsaac)
- ad44cfa linter: Import/first options (#7381 ) (Zak)
### Refactor
- c34d649 linter: Use `scope_id` etc methods (#7394 ) (overlookmotel)
- 466f395 vscode: Split `ConfigService` and `Config` (#7376 ) (Alexander
S.)
Co-authored-by: Boshen <1430279+Boshen@users.noreply.github.com>
2024-11-21 22:21:32 +08:00
DonIsaac
df143ca7bb
docs(linter): add docs for config settings ( #4827 )
2024-11-21 08:08:30 +00:00
Boshen
f059b0e655
fix(ast)!: add missing ChainExpression from TSNonNullExpression ( #7377 )
...
closes #7375
* `foo?.bar!`
* `foo?.[bar]!`
`TSNonNullExpression` was not wrapped inside `ChainExpression`.
2024-11-20 15:54:28 +00:00
oxc-bot
b6d5c0f33e
release(oxlint): v0.12.0 ( #7366 )
...
## [0.12.0] - 2024-11-20
- 20d9080 linter: [**BREAKING**] Override plugins array when passed in
config file (#7303 ) (camchenry)
### Features
- 1d9f528 linter: Implement `unicorn/prefer-string-raw` lint rule
(#7335 ) (Ryan Walker)
- d445e0f linter: Implement `unicorn/consistent-existence-index-check`
(#7262 ) (Ryan Walker)
- 01ddf37 linter: Add `allowReject` option to
`no-useless-promise-resolve-reject` (#7274 ) (no-yan)
- 755a31b linter: Support bind function case for compatibility with
`promise/no-return-wrap` (#7232 ) (no-yan)
- 428770e linter: Add `import/no-namespace` rule (#7229 ) (Dmitry
Zakharov)
- 9c91151 linter: Implement typescript/no-empty-object-type (#6977 )
(Orenbek)
- 2268a0e linter: Support `overrides` config field (#6974 ) (DonIsaac)
- 3dcac1a linter: React/exhaustive-deps (#7151 ) (camc314)
- d3a0119 oxlint: Add `cwd` property to `LintRunner` (#7352 ) (Alexander
S.)
### Bug Fixes
- ba0b2ff editor: Reload workspace configuration after change (#7302 )
(Alexander S.)
- bc0e72c linter: Handle user variables correctly for import/no_commonjs
(#7316 ) (Dmitry Zakharov)
- bf839c1 linter: False positive in `jest/expect-expect` (#7341 )
(dalaoshu)
- ff2a1d4 linter: Move `exhaustive-deps` to `react` (#7251 ) (camc314)
- df5c535 linter: Revert unmatched rule error (#7257 ) (Cameron A
McHenry)
- c4ed230 linter: Fix false positive in eslint/no-cond-assign (#7241 )
(camc314)
- ef847da linter: False positive in `jsx-a11y/iframe-has-title` (#7253 )
(dalaoshu)
- 62b6327 linter: React/exhaustive-deps update span for unknown deps
diagnostic (#7249 ) (camc314)
### Documentation
- 4c124a8 editor/vscode: Update VS Code readme with installation
instructions and available features (#7306 ) (Nicholas Rayburn)
### Refactor
- c6a4868 linter: Temporarily remove unknown rules checking (#7260 )
(camchenry)
### Testing
- 5190b7f editor: Add test setup (#7361 ) (Alexander S.)
Co-authored-by: Boshen <1430279+Boshen@users.noreply.github.com>
2024-11-20 15:45:24 +08:00
overlookmotel
c335f92ada
perf(syntax): reorder operator enum variants ( #7351 )
...
Re-order enum variants of `AssignmentOperator`, `BinaryOperator` and `UnaryOperator`.
* `Exponential` moved to after `Remainder` (so with the rest of the arithmetic operators).
* `Shift*` operators follow arithmetic operators.
* `AssignmentOperator::Bitwise*` ops moved to before `Logical*` ops (so all ops which correspond to `BinaryOperator`s are together).
* `*Or` always before `*And`.
* Plus/Addition always before Minus/Subtraction.
The purpose is to make the various methods on these types maximally efficient:
1. Group together variants so that `AssignmentOperator::is_*` methods can be executed with the minimum number of operations (essentially `variant - min <= max`).
2. Align the variants of `AssignmentOperator` and `BinaryOperator` so that conversion methods added in #7350 become very cheap too (essentially `if variant - min <= max { Some(variant + offset) } else { None }`).
2024-11-19 01:23:28 +00:00
Song Gao
cf3415b0e4
chore(doc): replace main/master to tag/commit to make the url always accessible ( #7298 )
2024-11-16 21:00:30 +08:00
ottomated
897d3b1567
feat(ast): serialize StringLiterals to ESTree without raw ( #7263 )
...
#7211 alternative. Makes the `raw` field on estree literals optional.
2024-11-13 15:37:30 +00:00
overlookmotel
de472ca7c0
refactor(ast): move StringLiteral definition higher up ( #7270 )
...
Pure refactor. `StringLiteral` definition was sandwiched in the middle of RegExp-related code. Move it higher up in `literal.rs`.
All the rest of the diff is just re-ordering generated code.
2024-11-13 13:37:37 +00:00
DonIsaac
2268a0ef90
feat(linter): support overrides config field ( #6974 )
...
Part of #5653
2024-11-13 05:40:59 +00:00
oxc-bot
de107246c8
release(crates): v0.36.0 ( #7227 )
...
## [0.36.0] - 2024-11-09
- b11ed2c ast: [**BREAKING**] Remove useless `ObjectProperty::init`
field (#7220 ) (Boshen)
- 0e4adc1 ast: [**BREAKING**] Remove invalid expressions from
`TSEnumMemberName` (#7219 ) (Boshen)
- 846711c transformer: [**BREAKING**] Change API to take a
`&TransformOptions` instead of `TransformOptions` (#7213 ) (Boshen)
- 092de67 types: [**BREAKING**] Append `rest` field into `elements` for
objects and arrays to align with estree (#7212 ) (ottomated)
- d1d1874 ast: [**BREAKING**] Change `comment.span` to real position
that contain `//` and `/*` (#7154 ) (Boshen)
- 843bce4 ast: [**BREAKING**] `IdentifierReference::reference_id` return
`ReferenceId` (#7126 ) (overlookmotel)
### Features
- cc8a191 ast: Methods on AST nodes to get `scope_id` etc (#7127 )
(overlookmotel)
- dc0215c ast_tools: Add #[estree(append_to)], remove some custom
serialization code (#7149 ) (ottomated)
- 9d6cc9d estree: ESTree compatibility for all literals (#7152 )
(ottomated)
- b74686c isolated-declarations: Support transform TSExportAssignment
declaration (#7204 ) (Dunqing)
- ad3a2f5 tasks/compat_data: Generate our own compat table (#7176 )
(Boshen)
- b4258ee transformer: Add defaulted `Module::Preserve` option (#7225 )
(Boshen)
- 324c3fe transformer: Add `TransformOptions::module` option (#7188 )
(Boshen)
- a166a4a transformer: Add esbuild comma separated target API
`--target=es2020,chrome58` (#7210 ) (Boshen)
- 3a20b90 transformer: Add es target to `engineTargets` (#7193 ) (Boshen)
- 22898c8 transformer: Warn BigInt when targeting < ES2020 (#7184 )
(Boshen)
- a579011 transformer: Add features `ES2018NamedCapturingGroupsRegex`
and `ES2018LookbehindRegex` (#7182 ) (Boshen)
- 8573f79 transformer: Turn on async_to_generator and
async_generator_functions plugins in enable_all (#7135 ) (Dunqing)
- df77241 transformer: Enable `ArrowFunctionConverter` in
`async-to-generator` and `async-generator-functions` plugins (#7113 )
(Dunqing)
- b6a5750 transformer/arrow-function-converter: Move scope to changed
scope for `this_var` if scope have changed (#7125 ) (Dunqing)
- 1910227 transformer/async-to-generator: Support inferring the function
name from the ObjectPropertyValue's key (#7201 ) (Dunqing)
- ffa8604 transformer/async-to-generator: Do not transform await
expression if is not inside async function (#7138 ) (Dunqing)
- e536d47 transformer/babel: Add support for trying to get the `Module`
from `BabelPlugins` (#7218 ) (Dunqing)
- 5cfdc05 transformer/typescript: Support transform `export =` and
`import = require(...)` when module is commonjs (#7206 ) (Dunqing)
### Bug Fixes
- c82b273 transformer/async-generator-functions: Only transform object
method in exit_function (#7200 ) (Dunqing)
- b2a888d transformer/async-generator-functions: Incorrect
transformation for `for await` if it's not placed in a block (#7148 )
(Dunqing)
- 19892ed transformer/async-generator-functions: Transform incorrectly
for `for await` if it's in LabeledStatement (#7147 ) (Dunqing)
- ede10dc transformer/async-to-generator: Incorrect transform when super
expression is inside async method (#7171 ) (Dunqing)
- 293d072 transformer/async-to-generator: Only transform object method
in exit_function (#7199 ) (Dunqing)
- ae692d7 transformer/async_to_generator: Fix checking if function is
class method (#7117 ) (overlookmotel)
- eea4ab8 transformer/helper-loader: Incorrect `SymbolFlags` for default
import when `SourceType` is script (#7226 ) (Dunqing)
### Refactor
- d27e14f ast: `AstKind::as_*` methods take `self` (#5546 )
(overlookmotel)
- fac5042 ast: Use `scope_id` etc methods (#7130 ) (overlookmotel)
- a297765 minifier: Use `map` and `and_then` instead of let else (#7178 )
(7086cmd)
- fc86703 napi/transform: Change test files to TypeScript (#7221 )
(Boshen)
- c5485ae semantic: Add `ancestor_kinds` iterator function (#7217 )
(camchenry)
- abf1602 semantic: Rename `iter_parents` to `ancestors` (#7216 )
(camchenry)
- 42171eb semantic: Rename `ancestors` to `ancestor_ids` (#7215 )
(camchenry)
- de56083 transformer: Add `impl TryFrom<EngineTargets> for EnvOptions`
(#7191 ) (Boshen)
- 0a43c64 transformer: Move `ESTarget` to its own file (#7189 ) (Boshen)
- 0e1f12c transformer: Remove unimplemented `EnvOptions::bugfixes`
(#7162 ) (Boshen)
- a981caf transformer: Add `Engine` enum for `EngineTargets` (#7161 )
(Boshen)
- 8340243 transformer: Rename `Query` to `BrowserslistQuery` (#7143 )
(Boshen)
- 481f7e6 transformer: Change `Targets` to `EngineTargets` (#7142 )
(Boshen)
- 55e6989 transformer: Deserialize engine target strings to specific
keys (#7139 ) (Boshen)
- fdfd9a4 transformer: Use `scope_id` etc methods (#7128 )
(overlookmotel)
- ff8bd50 transformer: Move implementation of ArrowFunction to
common/ArrowFunctionConverter (#7107 ) (Dunqing)
- 4a515be transformer/arrow-function-coverter: Rename function name and
add some comments to explain confusing parts. (#7203 ) (Dunqing)
- c307e1b transformer/arrow-functions: Pass `ArenaBox` as function param
(#7169 ) (overlookmotel)
- 217d433 transformer/arrow-functions: Remove unused `&mut self`
function param (#7165 ) (overlookmotel)
- 426df71 transformer/arrow-functions: Use `scope_id` method (#7164 )
(overlookmotel)
- 11c5e12 transformer/arrow-functions: Correct comments (#7163 )
(overlookmotel)
- 1238506 transformer/async-generator-function: Remove inactive
`#[allow(clippy::unused_self)]` attrs (#7167 ) (overlookmotel)
- 84ee581 transformer/async-generator-functions: Simplify identifying
whether within an async generator function (#7170 ) (overlookmotel)
- 1b12328 transformer/async-generator-functions: Use `clone` not
`clone_in` on `LabelIdentifier` (#7172 ) (overlookmotel)
- cd1006f transformer/async-generator-functions: Do not transform yield
expression where inside generator function (#7134 ) (Dunqing)
- 2c5734d transformer/async-generator-functions: Do not transform await
expression where inside ArrowFunctionExpression (#7132 ) (Dunqing)
- 5ce83bd transformer/async-generator-functions: Remove dead code for
handle await expression (#7131 ) (Dunqing)
- e04ee97 transformer/async-generator-functions: Move handling of
`MethodDefinition`'s value to `exit_function` (#7106 ) (Dunqing)
- b57d5a5 transformer/async-to-generator: Remove unused `&self` function
param (#7166 ) (overlookmotel)
- f80085c transformer/async-to-generator: Move handling of
`MethodDefinition`'s value to `exit_function` (#7105 ) (Dunqing)
- e2241e6 transformer/jsx-self: Remove unused `&self` function params
(#7159 ) (overlookmotel)
- 1dfd241 transformer/optional-catch-binding: Remove inactive
`#[allow(clippy::unused_self)]` attr (#7158 ) (overlookmotel)
- fd9b44c transformer/typescript: Remove inactive
`#[allow(clippy::unused_self)]` attr (#7160 ) (overlookmotel)
- cacfb9b traverse: Use `symbol_id` etc methods (#7129 ) (overlookmotel)
### Styling
- 38a6df6 transformer/arrow-functions: Semicolon after return statements
(#7168 ) (overlookmotel)
- 64b7e3a transformer/async-generator-functions: Import
`oxc_allocator::Vec` as `ArenaVec` (#7173 ) (overlookmotel)
### Testing
- be819dd napi/transform: Add test for not default es transform (Boshen)
Co-authored-by: Boshen <1430279+Boshen@users.noreply.github.com>
2024-11-10 00:31:14 +08:00
oxc-bot
68dc899887
release(oxlint): v0.11.1 ( #7224 )
...
## [0.11.1] - 2024-11-09
### Features
- 4dd9b60 editor/vscode: Replace existing output channel and trace
output channel with a single LogOutputChannel (#7196 ) (Nicholas Rayburn)
- 1fcd709 linter: Add jsx support for only-used-in-recursion (#7120 )
(no-yan)
- 4d577cf linter: Add `import/first` rule (#7180 ) (Dmitry Zakharov)
- 9b8973f linter: Add `import/unambiguous` rule (#7187 ) (Dmitry
Zakharov)
- 5ab1ff6 linter: Implement @typescript-eslint/no-unsafe-function-type
(#6989 ) (Orenbek)
### Bug Fixes
- eea8879 editor/vscode: Update language client id to fix the resolution
of the oxc.trace.server setting (#7181 ) (Nicholas Rayburn)
- b73cfd9 linter: Fix `is_method_call` with parentheses and chain
expression (#7095 ) (tbashiyy)
### Refactor
- 8c0a362 linter: Use `ctx.source_range(comment.content_span())` API
(#7155 ) (Boshen)
- c5485ae semantic: Add `ancestor_kinds` iterator function (#7217 )
(camchenry)
- abf1602 semantic: Rename `iter_parents` to `ancestors` (#7216 )
(camchenry)
- 42171eb semantic: Rename `ancestors` to `ancestor_ids` (#7215 )
(camchenry)
Co-authored-by: Boshen <1430279+Boshen@users.noreply.github.com>
2024-11-09 19:57:08 +08:00
Boshen
b11ed2cf7b
refactor(ast)!: remove useless ObjectProperty::init field ( #7220 )
...
closes https://github.com/oxc-project/backlog/issues/143
2024-11-09 09:00:29 +00:00
Boshen
0e4adc15dd
feat(ast)!: remove invalid expressions from TSEnumMemberName ( #7219 )
2024-11-09 08:48:14 +00:00
ottomated
092de67c47
fix(types)!: append rest field into elements for objects and arrays to align with estree ( #7212 )
...
Fixes https://github.com/oxc-project/oxc/pull/7149#discussion_r1831677446 and removes the need for some manual typescript.
2024-11-09 05:23:53 +00:00
ottomated
9d6cc9d3af
feat(estree): ESTree compatibility for all literals ( #7152 )
...
Adds some new estree macro directives:
- `#[estree(via = foo::Foo)`: Uses From to convert this struct to foo::Foo before serialization
- `#[estree(add_ts = "foo: string")]`: Adds additional fields to the typescript definitions
Used these to make all different literals estree-compatible.
2024-11-06 21:25:41 +00:00
ottomated
dc0215c906
feat(ast_tools): Add #[estree(append_to)], remove some custom serialization code ( #7149 )
...
Removed custom logic for ObjectPattern, ArrayPattern, etc. in favor of a custom attribute macro `#[estree(append_to = "foo")]` as part of #6347
2024-11-06 21:09:45 +00:00
oxc-bot
12a6952782
release(crates): v0.35.0 ( #7110 )
...
## [0.35.0] - 2024-11-04
- f543a8d ast: [**BREAKING**] Remove `AstBuilder::*_from_*` methods
(#7073 ) (overlookmotel)
- b8daab3 transformer: [**BREAKING**] API to `TryFrom<&EnvOptions> for
TransformOptions` and `TryFrom<&BabelOptions> TransformOptions` (#7020 )
(Boshen)
- 9a6a2f9 semantic: [**BREAKING**] Remove
`SymbolTable::get_symbol_id_from_span` API (#6955 ) (Boshen)
### Features
- 854870e ast: Label AST fields with #[ts] (#6987 ) (ottomated)
- ce5b609 ast: Remove explicit untagged marker on enums (#6915 )
(ottomated)
- 9725e3c ast_tools: Add #[estree(always_flatten)] to Span (#6935 )
(ottomated)
- fbc297e ast_tools: Move tsify custom types to estree attribute macro
(#6934 ) (ottomated)
- 169fa22 ast_tools: Default enums to rename_all = "camelCase" (#6933 )
(ottomated)
- caa4b1f codegen: Improve printing of comments (#7108 ) (Boshen)
- 001058a codegen: Always print legal comments on its own line (#7089 )
(Boshen)
- 413973d codegen: Print linked and external legal comment (#7059 )
(Boshen)
- ee27b92 codegen: Print eof legal comments (#7058 ) (Boshen)
- 6516f9e codegen: Print inline legal comments (#7054 ) (Boshen)
- 1e2f012 linter: Add `oxc/no-map-spread` (#6751 ) (DonIsaac)
- 6d97af4 rust: Use `oxc-miette` (#6938 ) (Boshen)
- bfdbcf1 transformer: Add `EnvOptions::from_browerslist_query` API
(#7098 ) (Boshen)
- 21b8e49 transformer: Add `ESTarget` (#7091 ) (Boshen)
- fcaba4a transformer: Add `TransformerOptions::env` with `EnvOptions`
(#7037 ) (Boshen)
- 1d906c6 transformer: Class properties transform skeleton (#7038 )
(overlookmotel)
- 934cb5e transformer: Add `async_generator_functions` plugin (#6573 )
(Dunqing)
### Bug Fixes
- 0601271 ast: Fix `StaticMemberExpression.get_first_object` (#6969 )
(tomoya yanagibashi)
- da199c7 ecmascript: Allow getting PropName for object methods (#6967 )
(camchenry)
- f5a7134 linter/no-unused-vars: False positive for discarded reads
within sequences (#6907 ) (DonIsaac)
- 9ed9501 module_lexer: Add missing `export * from 'foo';` case (#7103 )
(Boshen)
- d15e408 napi/transform: Fix 'typescript.declaration' option not
working (#7012 ) (Boshen)
- dcdb9ea napi/transform: Fix test (Boshen)
- caaf00e parser: Fix incorrect parsed `TSIndexSignature` (#7016 )
(Boshen)
- b188b4a transformer: Fix typescript globals being recognized as
globals (#7100 ) (Boshen)
- a2244ff transformer/async-to-generator: Output is incorrect when arrow
function without params (#7052 ) (Dunqing)
- 7d12669 types: Move @oxc-project/types to dependencies (#6909 )
(ottomated)
### Performance
- 6ca01b9 ast: Reduce size of `Comment` (#6921 ) (overlookmotel)
- c58ec89 data_structures: Optimize `NonEmptyStack::pop` (#7021 )
(overlookmotel)
- fa9a4ec parser: Check `.` before `[` in `parse_member_expression_rest`
(#6979 ) (Boshen)
### Refactor
- b0211a1 ast: `StaticMemberExpression::get_first_object` use loop
instead of recursion (#7065 ) (overlookmotel)
- fc07458 ast: Move custom types `.d.ts` file (#6931 ) (overlookmotel)
- c41c013 ast: Rename lifetime (#6922 ) (overlookmotel)
- 335eb38 ast_tools: Faster formatting Rust code (#6972 ) (overlookmotel)
- 4cf0085 ast_tools: Reorder imports in generated code (#6926 )
(overlookmotel)
- dd79c1b codegen: Replace `daachorse` with string match for annotation
comment (#7064 ) (Boshen)
- 0bb1aa4 codegen: Move options to its own file (#7053 ) (Boshen)
- b021147 data_structures: Make all methods of `NonNull` shim
`#[inline(always)]` (#7024 ) (overlookmotel)
- fb1710a data_structures: Add `#[repr(transparent)]` to `NonNull` shim
(#7023 ) (overlookmotel)
- f1fc8db data_structures: Add `read` method to `NonNull` shim (#7022 )
(overlookmotel)
- cea0e6b isolated_declarations: Do not use `AstBuilder::*_from_*`
methods (#7071 ) (overlookmotel)
- 97caae1 minifier: Do not use `AstBuilder::*_from_*` methods (#7072 )
(overlookmotel)
- 2c7ac29 minifier: Remove `Tri`, use `Option<bool>` instead (#6912 )
(Boshen)
- 9926990 napi: Move custom types to bottom of file (#6930 )
(overlookmotel)
- 23157bd napi: Types file in root of types package (#6929 )
(overlookmotel)
- 953b051 parser: Remove `oxc_ecmascript` crate (#7109 ) (Boshen)
- fdd480d parser: Do not use `AstBuilder::*_from_*` methods (#7068 )
(overlookmotel)
- 9e85b10 parser: Add `ParserImpl::alloc` method (#7063 ) (overlookmotel)
- 17a938e parser: Use function `parse_type_member_semicolon` (#7018 )
(Boshen)
- aa1b29c parser: Remove `parse_ts_index_signature_member` function
(#7017 ) (Boshen)
- 7f1d1fe transform: Deserialize `BabelPreests::env` directly (#7051 )
(Boshen)
- 76947e2 transform: Refactor Babel Targets (#7026 ) (Boshen)
- d03e622 transformer: Do not use `AstBuilder::*_from_*` methods (#7070 )
(overlookmotel)
- 9d384ad transformer: Use `identifier_reference_with_reference_id`
builder method (#7056 ) (overlookmotel)
- 4688a06 transformer: Use `*_with_scope_id` builder methods where
possible (#7055 ) (overlookmotel)
- 7122e00 transformer: Use `ctx.alloc` over `ctx.ast.alloc` where
possible (#7066 ) (overlookmotel)
- a3b68b4 transformer: Flatten dir structure of options/babel/env
(#7049 ) (Boshen)
- 6d92f36 transformer: Deserialize `BabelOptions::compiler_assumptions`
(#7048 ) (Boshen)
- f83a760 transformer: Deserialize `BabelOptions::presets` (#7047 )
(Boshen)
- 52c20d6 transformer: Deserialize `BabelOptions::plugins` (#7045 )
(Boshen)
- e921df6 transformer: Rename `EnvOptions` to `BabelEnvOptions` (#7036 )
(Boshen)
- af5140f transformer: Isolate babel options logic (#7034 ) (Boshen)
- 12aa910 transformer: Clean up `env/targets/query.rs` (#7033 ) (Boshen)
- 3d174bb transformer: Clean up `BabelOptions` (#7029 ) (Boshen)
- 6284f84 transformer: Use `Browserslist::Version` (#7028 ) (Boshen)
- 5b11cdf transformer: Clean up TransformerOptions (#7005 ) (Boshen)
- f0c87d4 transformer: Mark all EnvOptions as not implemented (#7004 )
(Boshen)
- d9edef6 transformer: Combine ObjectRestSpread into a single file
(#7002 ) (Boshen)
- c945fe7 transformer: Import `oxc_allocator::Box` as `ArenaBox` (#6999 )
(overlookmotel)
- fc1af2e transformer: Import `oxc_allocator::Vec` as `ArenaVec` (#6998 )
(overlookmotel)
- 63e8bfe transformer: Rename `AString` to `ArenaString` (#6997 )
(overlookmotel)
- 562bb9a transformer/async-to-generator: Move transform methods to
`AsyncGeneratorExecutor` and make it public (#6992 ) (Dunqing)
- e23f7e6 transformer/common: `VarDeclarations` insert either `var` or
`let` statements (#7043 ) (overlookmotel)
- e5ecbb9 transformer/jsx: Return `&mut T` not `&mut ArenaBox<T>`
(#7001 ) (overlookmotel)
- 9e66c29 transformer/react-refresh: Small refactor (#6973 )
(overlookmotel)
- 1ca8cd2 transformer/react-refresh: Avoid panic for `init` of
`VariableDeclarator` isn't a `BindingIdentifier` (#6937 ) (Dunqing)
- 5f153ac transformer/react-refresh: Use `VarDeclarations` to insert
declarators (#6884 ) (Dunqing)
- df3b089 transformer/react-refresh: Use `StatementInjector` to insert
statements (#6881 ) (Dunqing)
- ae22671 transformer/typescript: Pass `&mut T` not `&mut ArenaBox<T>`
(#7000 ) (overlookmotel)
- 938ee87 traverse: Do not use `AstBuilder::*_from_*` methods (#7069 )
(overlookmotel)
### Styling
- 86ab091 transformer/common: Split up `StatementInjectorStore` methods
into blocks (#7042 ) (overlookmotel)
### Testing
- 64e2499 module_lexer: Use a single integration test for faster
compilation (#7097 ) (Boshen)
- 6133a50 transformer: Use a single integration test for faster
compilation (#7099 ) (Boshen)
---------
Co-authored-by: Boshen <1430279+Boshen@users.noreply.github.com>
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2024-11-04 17:40:05 +08:00
oxc-bot
2d40b073cb
release(oxlint): v0.11.0 ( #7094 )
...
## [0.11.0] - 2024-11-03
- 9fd9f4f linter: [**BREAKING**] Sync sindresorhus/globals; removed
Object.prototype properties from builtin and es* globals (#6991 )
(Boshen)
### Features
- 6b619da editor: Listen to config file changes and trigger a
didChangeConfiguration update (#6964 ) (Nicholas Rayburn)
- 7872927 editor/vscode: Support window/showMessage event (#7085 )
(Nicholas Rayburn)
- 2184588 linter: Do not bail for unmatched rules yet (#7093 ) (Boshen)
- a6fcd81 linter: Add `import/no-commonjs` rule (#6978 ) (Dmitry
Zakharov)
- 1691cab linter: Support user-configurable secrets for
`oxc-security/api-keys` (#5938 ) (DonIsaac)
- 610621c linter: Implement `react/style-prop-object` (#6342 ) (Albert
Kaaman)
- 1e2f012 linter: Add `oxc/no-map-spread` (#6751 ) (DonIsaac)
- 1c66473 linter: Implement `eslint/prefer-object-has-own` (#6905 )
(tomoya yanagibashi)
### Bug Fixes
- ebf3753 editor: Fix onConfigChange to send the correct config for
didChangeConfiguration notification (#6962 ) (Nicholas Rayburn)
- 79bf74a linter: Check is_reference_to_global_variable in
`no-array-constructor` (#7067 ) (Naoya Yoshizawa)
- 38d1f78 linter: Remove confusing help text for now (#7081 ) (Cam
McHenry)
- 147e2e4 linter: Allow replacing rule when none are enabled yet (#7014 )
(camchenry)
- 7aa496a linter: Remove unsafe fixer of `no-useless-spread` (#6655 )
(dalaoshu)
- f5a7134 linter/no-unused-vars: False positive for discarded reads
within sequences (#6907 ) (DonIsaac)
### Documentation
- 4551baa linter: Document `rules` (#6983 ) (Boshen)
### Refactor
- a8dc75d linter: Remove unused CLI result types (#7088 ) (camchenry)
- 8f1460e linter: Move `LintPlugins` from `LintOptions` to `LintConfig`
(#6932 ) (DonIsaac)
### Testing
- c35d3f2 linter: Improve test failure output (#6975 ) (camchenry)
---------
Co-authored-by: Boshen <1430279+Boshen@users.noreply.github.com>
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2024-11-03 11:27:30 +08:00
Boshen
caaf00e081
fix(parser): fix incorrect parsed TSIndexSignature ( #7016 )
...
closes #6985
2024-10-30 07:34:22 +00:00
Boshen
4551baaf4a
docs(linter): document rules ( #6983 )
...
closes #6370
2024-10-28 14:49:16 +00:00
ottomated
9725e3c2ec
feat(ast_tools): Add #[estree(always_flatten)] to Span ( #6935 )
...
Part of #6347
Other changes:
- added #[estree(skip)] to thisSpan in TSThisParameter
- Flattened the span in BoundaryAssertion (regex)
2024-10-28 02:13:24 +00:00
overlookmotel
992699012f
refactor(napi): move custom types to bottom of file ( #6930 )
...
Pure refactor. Doesn't matter much but I think it's preferable for the file not to start with the most random weird types.
2024-10-26 17:10:33 +00:00
overlookmotel
23157bde6f
refactor(napi): types file in root of types package ( #6929 )
...
Move `types.d.ts` file to root of `@oxc-project/types` package. I think this is cleaner.
2024-10-26 17:10:31 +00:00
Boshen
eba417aa24
fix(npm): check in npm/parser-wasm ( #6917 )
...
closes #6914
2024-10-26 18:03:31 +08:00
oxc-bot
1ea0be1b6a
release(oxlint): v0.10.3 ( #6911 )
...
## [0.10.3] - 2024-10-26
- 90c786c regular_expression: [**BREAKING**] Support ES2025 Duplicated
named capture groups (#6847 ) (leaysgur)
- 8032813 regular_expression: [**BREAKING**] Migrate to new regexp
parser API (#6741 ) (leaysgur)
### Features
- a73c5af linter: Add fixer for `jsx-a11y/no-access-key` rule (#6781 )
(Tapan Prakash)
- 2aa763c linter: Warn unmatched rule names (#6782 ) (Tapan Prakash)
- 0acca58 linter: Support `--print-config all` to print config file for
project (#6579 ) (mysteryven)
### Bug Fixes
- f49b3e2 linter: `react/iframe-missing-sandbox` ignores vanilla JS APIs
(#6872 ) (DonIsaac)
- 54a5032 linter: Correct false positive in `no-duplicates` (#6748 )
(dalaoshu)
- a47c70e minifier: Fix remaining runtime bugs (#6855 ) (Boshen)
### Documentation
- 3923e63 linter: Add schema to config examples (#6838 ) (Dmitry
Zakharov)
### Refactor
- a148023 linter: Dereference IDs as soon as possible (#6821 )
(overlookmotel)
- 423d54c rust: Remove the annoying `clippy::wildcard_imports` (#6860 )
(Boshen)
---------
Co-authored-by: Boshen <1430279+Boshen@users.noreply.github.com>
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2024-10-26 17:13:06 +08:00
ottomated
7d12669d68
fix(types): move @oxc-project/types to dependencies ( #6909 )
...
Hotfix. NPM doesn't install devDependencies automatically, so types were
missing.
2024-10-26 10:26:54 +08:00
oxc-bot
238e0866cb
release(crates): v0.34.0 ( #6908 )
...
## [0.34.0] - 2024-10-26
- 4618aa2 transformer: [**BREAKING**] Rename `TransformerOptions::react`
to `jsx` (#6888 ) (Boshen)
- 90c786c regular_expression: [**BREAKING**] Support ES2025 Duplicated
named capture groups (#6847 ) (leaysgur)
- 67a7bde napi/parser: [**BREAKING**] Add typings to napi/parser (#6796 )
(ottomated)
### Features
- 1145341 ast_tools: Output typescript to a separate package (#6755 )
(ottomated)
- 4429754 ecmascript: Constant eval `null` to number (#6879 ) (Boshen)
- fd57e00 ecmascript: Add abstract_relational_comparison to dce (#6846 )
(Boshen)
- 8bcaf59 minifier: Late peeophole optimization (#6882 ) (Boshen)
- 860cbca minifier: Implement folding simple arrow fns (#6875 ) (camc314)
- c26020e minifier: Implement folding String.prototype.replaceAll
(#6871 ) (camc314)
- 50744f3 minifier: Implement folding String.prototype.replace (#6870 )
(camc314)
- fccf82e minifier: Implement folding `substring` string fns (#6869 )
(camc314)
- e6a5a1b minifier: Implement folding `charCodeAt` string fns (#6475 )
(camc314)
- 0d0bb17 transformer: Complete the async-to-generator plugin (#6658 )
(Dunqing)
- 419343b traverse: Implement `GetAddress` for `Ancestor` (#6877 )
(overlookmotel)
### Bug Fixes
- a47c70e minifier: Fix remaining runtime bugs (#6855 ) (Boshen)
- 686727f minifier: Reference read has side effect (#6851 ) (Boshen)
- c658d93 minifier: Keep template literals with expressions (#6849 )
(Boshen)
- 4dc5e51 transformer: Only run typescript plugin for typescript source
(#6889 ) (Boshen)
- 076f5c3 transformer/typescript: Retain ExportNamedDeclaration without
specifiers and declaration (#6848 ) (Dunqing)
- b075982 types: Change @oxc/types package name (#6874 ) (ottomated)
### Documentation
- 6eeb0e6 ast: Mention typescript-eslint, field ordering and shape
(#6863 ) (Boshen)
- 99e3b32 napi: Remove JSON.parse from example (#6836 ) (ottomated)
### Refactor
- adb5039 allocator: Add `impl GetAddress for Address` (#6891 )
(overlookmotel)
- 3e7507f ast_tools: Reduce macro usage (#6895 ) (overlookmotel)
- 423d54c rust: Remove the annoying `clippy::wildcard_imports` (#6860 )
(Boshen)
- 2d95009 transformer: Implement `Debug` on `StatementInjector` internal
types (#6886 ) (overlookmotel)
- c383c34 transformer: Make `StatementInjectorStore` methods generic
over `GetAddress` (#6885 ) (overlookmotel)
- 1f29523 transformer: Rename ReactJsx to Jsx (#6883 ) (Boshen)
- 333b758 transformer: `StatementInjectorStore` methods take
`&Statement` as target (#6858 ) (overlookmotel)
- c19996c transformer: Add `StatementInjectorStore::insert_many_before`
method (#6857 ) (overlookmotel)
- 7339dde transformer: `StatementInjectorStore::insert_many_after` take
an iterator (#6856 ) (overlookmotel)
- 4348eae transformer/typescript: Re-order visitor methods (#6864 )
(overlookmotel)
- 3a56d59 transformer/typescript: Insert assignments after super by
`StatementInjector` (#6654 ) (Dunqing)
- a366fae traverse: Rename
`TraverseScoping::generate_binding_in_current_scope` (#6832 )
(overlookmotel)
- 3b99fe6 traverse: Move `generate_binding` to `TraverseScoping` (#6831 )
(overlookmotel)
- 60f487a traverse: `TraverseCtx::generate_binding` take an `Atom`
(#6830 ) (overlookmotel)
### Styling
- 262b2ed ast: Move crate doc comment to top of file (#6890 )
(overlookmotel)
---------
Co-authored-by: Boshen <1430279+Boshen@users.noreply.github.com>
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2024-10-26 09:39:53 +08:00
Boshen
d49716bc3b
ci(release_types): changes for ready to publish
2024-10-25 11:16:03 +08:00
ottomated
b075982eaa
fix(types): Change @oxc/types package name ( #6874 )
...
Closes #6862 .
Possible options:
- `oxc-types`
- `@oxc-project/types`
- `@oxc-ast/types`
- `oxc-ast-types`
2024-10-24 20:04:09 +00:00
ottomated
99e3b32d43
docs(napi): Remove JSON.parse from example ( #6836 )
...
Co-authored-by: overlookmotel <theoverlookmotel@gmail.com>
2024-10-24 14:49:44 +01:00
ottomated
67a7bde4c6
feat(napi/parser)!: add typings to napi/parser ( #6796 )
...
- Added TypeScript annotation for `ParseResult.program`
- Modified the entrypoint for `oxc-parser` to allow wrapping the napi functions
- Updated `index.js` to parse the `program` string into a JSON object
- Updated tests
- Added a dependency on `@oxc/types`
2024-10-24 13:08:59 +00:00
ottomated
1145341a92
feat(ast_tools): output typescript to a separate package ( #6755 )
...
Part of #6347 .
Moves typescript logic from derive_estree into a new ast_tools generator.
2024-10-24 13:08:57 +00:00
oxc-bot
8f392e828e
release(crates): v0.33.0 ( #6843 )
2024-10-24 10:29:22 +08:00
Dmitry Zakharov
3923e63b61
docs(linter): add schema to config examples ( #6838 )
...
closes #6762
2024-10-24 08:44:04 +08:00
overlookmotel
d48e008e47
docs(napi): simplify + reformat README ( #6834 )
...
In particular:
* the long comment was scrolling off side of screen on
[npm.com](https://www.npmjs.com/package/oxc-parser ).
* the example is ESM, so can simplify it by using top level await.
2024-10-24 08:34:46 +08:00
oxc-bot
9648e98998
release(oxlint): v0.10.2 ( #6764 )
...
## [0.10.2] - 2024-10-22
### Features
- dbe1972 linter: Import/no-cycle should turn on ignore_types by default
(#6761 ) (Boshen)
- 619d06f linter: Fix suggestion for `eslint:no_empty_static_block` rule
(#6732 ) (Tapan Prakash)
### Bug Fixes
### Performance
- 8387bac linter: Apply small file optimization, up to 30% faster
(#6600 ) (camchenry)
### Refactor
- b884577 linter: All ast_util functions take Semantic (#6753 )
(DonIsaac)
- 744aa74 linter: Impl `Deref<Target = Semantic>` for `LintContext`
(#6752 ) (DonIsaac)
- 6ffdcc0 oxlint: Lint/mod.rs -> lint.rs (#6746 ) (Boshen)
### Testing
- b03cec6 oxlint: Add `--fix` test case (#6747 ) (Boshen)
---------
Co-authored-by: Boshen <1430279+Boshen@users.noreply.github.com>
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2024-10-22 12:31:17 +08:00
oxc-bot
abb4ff30eb
release(oxlint): v0.10.1 ( #6729 )
...
## [0.10.1] - 2024-10-21
### Features
- af25752 linter: Add `unicorn/prefer-math-min-max` (#6621 ) (Brian Liu)
- 5095f02 linter: Added fixer for duplicate prefix in valid title jest
rule (#6699 ) (Tapan Prakash)
- e9976d4 linter: Add title whitespace fixer for jest valid title rule
(#6669 ) (Tapan Prakash)
- 45f02d5 linter: Add `unicorn/consistent-empty-array-spread` (#6695 )
(Brian Liu)
- 01a35bb linter/eslint: Show ignore patterns in `eslint/no-unused-vars`
diagnostic messages (#6696 ) (DonIsaac)
### Bug Fixes
- 1bcd707 editor: Update config sent to language server (#6724 )
(Nicholas Rayburn)
- ce25c45 linter: Panic in `disable-directives` (#6677 ) (dalaoshu)
- a5de230 linter/import: `import/no-duplicates` handles namespace
imports correctly (#6694 ) (DonIsaac)
- b0b6ac7 linter/no-cond-assign: False positive when assignment is in
body statement (#6665 ) (camchenry)
### Performance
- 6a76ea8 linter/no-unused-vars: Use default IgnorePattern when /^_/ is
provided as a pattern (#6697 ) (DonIsaac)
### Refactor
- d6609e9 linter: Use `run_on_jest_node` for existing lint rules (#6722 )
(camchenry)
- 97195ec linter: Add `run_on_jest_node` to run rules on only jest nodes
(#6721 ) (camchenry)
- 155fe7e linter: Allow `Semantic` to be passed for collecting Jest
nodes (#6720 ) (camchenry)
- ad8f281 linter: Use iter for collecting jest nodes (#6719 ) (camchenry)
- dc19a8f linter: Use iterator for collecting jest imports (#6718 )
(camchenry)
- 29c1447 linter: `jest/valid-title` fixer to use `Span::shrink` method
(#6703 ) (Tapan Prakash)
- 2eb984a linter: Add missing `should_run` implementations (#6666 )
(camchenry)
- 23f88b3 linter/import: Better diagnostic messages for
`import/no-duplicates` (#6693 ) (DonIsaac)
---------
Co-authored-by: Boshen <1430279+Boshen@users.noreply.github.com>
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2024-10-21 12:29:57 +08:00
oxc-bot
de99391032
release(crates): v0.32.0 ( #6691 )
...
## [0.32.0] - 2024-10-19
- c0e9d7e codegen: [**BREAKING**] `Codegen::into_source_text` consume
`Codegen` (#6539 ) (overlookmotel)
- 782f0a7 codegen: [**BREAKING**] Rename `print_char` method to
`print_ascii_byte` (#6512 ) (overlookmotel)
- 91c87dd codegen: [**BREAKING**] Remove `Codegen::enableSourceMap` API
(#6452 ) (Boshen)
- 7645e5c codegen: [**BREAKING**] Remove CommentOptions API (#6451 )
(Boshen)
- 5200960 oxc: [**BREAKING**] Remove passing `Trivias` around (#6446 )
(Boshen)
- 2808973 ast: [**BREAKING**] Add `Program::comments` (#6445 ) (Boshen)
### Features
- 5ee1ef3 allocator: Add `Vec::into_boxed_slice` (#6195 ) (DonIsaac)
- d9718ad ast_tools: Support `#[scope(exit_before)]` (#6350 ) (DonIsaac)
- e5ed6a5 codegen: Print negative numbers (#6624 ) (Boshen)
- 15c04e5 ecmascript: Add feature flag for constant evaluation (Boshen)
- d11770d ecmascript: Add `StringToNumber` (#6576 ) (Boshen)
- e561880 ecmascript: Add constant_evaluation and side_effects code
(#6550 ) (Boshen)
- 3556062 ecmascript: Add `ConstantEvaluation` (#6549 ) (Boshen)
- 39c2e66 ecmascript: Add `ToBigInt` and `StringToBigInt` (#6508 )
(Boshen)
- 6f22538 ecmascript: Add `ToBoolean`, `ToNumber`, `ToString` (#6502 )
(Boshen)
- 15dfc1d isolated-declarations: Impl `Default` for options (#6372 )
(DonIsaac)
- 071e564 minifier: Finish implementing folding object expressions
(#6586 ) (camc314)
- 590925a minifier: Finish implementing folding array expressions
(#6575 ) (camc314)
- ef237cf minifier: Complete implementation of statement fusion (#6566 )
(camc314)
- 97c8a36 minifier: Implement `collapse-variable-declarations` (#6464 )
(dalaoshu)
- 096e590 minifier: Implement folding `charAt` string fns (#6436 )
(camc314)
- e5a6f5d minifier: Implement converting template literals to strings
(#6486 ) (camc314)
- 14d0590 minifier: Implement folding of simple function calls
(`Boolean`) (#6484 ) (camc314)
- 7fbc7b6 minifier: Implement folding of simple function calls
(`String`) (#6483 ) (camc314)
- a4f57a4 minifier: Implement folding `indexOf` and `lastIndexOf` string
fns (#6435 ) (camc314)
- 3677ef8 minifier: Dce ExpressionStatements with no side effect (#6457 )
(7086cmd)
- 06ea121 minifier: Fold for statement (#6450 ) (7086cmd)
- a9544ae minifier: Partially implement minification for some known
string methods (#6424 ) (camc314)
- 9dc4ee9 minifier: Implement block stmt support for `StatementFusion`
(#6422 ) (camc314)
- ebbf77d minifier: Implement calculations for NumberValue (#6419 )
(7086cmd)
- 97ac179 minifier: Arithmetic operations for infinity. (#6332 )
(7086cmd)
- 13b0b0b minifier: Fold literal object constructors on window (#6379 )
(dalaoshu)
- e310e52 parser: Generate `Serialize` impls in ast_tools (#6404 )
(ottomated)
- 58467a5 parser: Better handling of invalid modifiers (#6482 )
(DonIsaac)
- 8ea6b72 parser: Better errors for reserved words used as identifier
names (#6478 ) (DonIsaac)
- b5b0af9 regular_expression: Support RegExp Modifiers (#6410 )
(leaysgur)
- a01a5df transformer: Pass TransformerCtx to async-to-generator plugin
(#6633 ) (Dunqing)
- a9260cf transformer: `async-to-generator` plugin. (#5590 ) (Ethan Goh)
- 8fe1b0a transformer: Support helper loader (#6162 ) (Dunqing)
- ab51c2a transformer: Support `DefaultImport` in `ModuleImports`
(#6434 ) (Dunqing)
- a3dea9c transformer/async-to-generator: Handle arrow-function
correctly (#6640 ) (Dunqing)
- 41c8675 transformer/object-rest-spread: Using helper loader (#6449 )
(Dunqing)
### Bug Fixes
- ba385fc codegen: Panic occurred when printing the comment of the right
parenthesis (#6593 ) (Dunqing)
- 02bfbfe codegen: Preserve parenthesis for `ChainExpression` (#6430 )
(Dunqing)
- 2ade16e codegen: Invalid codegen when `in` inside bin expr in or loop
(#6431 ) (camc314)
- 6896efc codegen: Fix `in` in sequence expr in for loops (#6428 )
(camc314)
- 7cc05f1 data_structures: Fix compilation failure on older Rust
versions (#6526 ) (overlookmotel)
- 2ce3e5f identifier: Add `ZWSP` to `is_irregular_whitespace` (#6662 )
(Boshen)
- 2673397 isolated_declarations: Fix potential memory leak (#6622 )
(overlookmotel)
- 389d261 minifier: `~~` operator should only work on numbers (#6598 )
(Boshen)
- 16bea12 minifier: Use `to_js_string()` instead of `fs64::to_string`
(#6597 ) (Boshen)
- a71e8a0 minifier: Preserve init variable declarations when removing
`for` statements during DCE (#6551 ) (magic-akari)
- 721cf0f parser: Should be treated comments where after `(` as leading
comments of next token (#6588 ) (Dunqing)
- b1bf12c parser: Do not parse `as` and `satisfies` expression in
javascript (#6442 ) (Boshen)
- 9f9057b regular_expression: Fixed control Y regular expression (#6524 )
(Tapan Prakash)
- c822b48 regular_expression: Fix CharacterClass negative codegen
(#6415 ) (leaysgur)
- 384d5be regular_expression: Flatten Spans on regex AST nodes (#6396 )
(ottomated)
- 834ee2a semantic: `TSConditionalType` scope enter/exit locations
(#6351 ) (DonIsaac)
- 1d3d256 transformer: Correctly trim JSX (#6639 ) (magic-akari)
- c6f2b5f transformer: `HelperLoader` common transform: do not assume
`babelHelpers` is global (#6569 ) (overlookmotel)
- 85d93ed transformer: Arrow function transform: correctly resolve
`this` in class accessor properties (#6386 ) (overlookmotel)
### Performance
- 77f3a1a codegen: Check last char with byte methods (#6509 )
(overlookmotel)
- 18b68ff codegen: Optimize `CodeBuffer::print_ascii_byte` (#6516 )
(overlookmotel)
- 4d8bc8c parser: Precompute `is_typescript` (#6443 ) (Boshen)
- 7c20056 regex: Reduce string allocations in `Display` impls (#6528 )
(DonIsaac)
- f70a413 transformer: Object spread transform: do not lookup `Object`
binding if not needed (#6570 ) (overlookmotel)
- ac77c87 traverse: Optimize `TraverseScoping::generate_uid_name`
(#6663 ) (overlookmotel)
### Documentation
- 9f555d7 allocator: Clarify docs for `Box` (#6625 ) (overlookmotel)
- 06e75b0 allocator: Enable lint warnings on missing docs, and add
missing doc comments (#6613 ) (DonIsaac)
- 7e909a7 codegen: Fix example for `CodeBuffer::print_ascii_bytes`
(#6535 ) (overlookmotel)
- 235d357 codegen: Improve doc comments for `CodeBuffer` (#6511 )
(overlookmotel)
- c8fa2eb codegen: Correct and reformat doc comments for `CodeBuffer`
(#6504 ) (overlookmotel)
- 40d1ee4 codegen: Fix and reformat `CodeBuffer` examples (#6499 )
(overlookmotel)
- de22b81 data-structures: Enable lint warnings on missing docs, and add
missing doc comments (#6612 ) (DonIsaac)
- 9e9fa9e span: Enable lint warnings on missing docs (#6617 )
(overlookmotel)
- 6a194f9 span: Document validity of `ModuleKind::Unambiguous` (#6423 )
(Boshen)
- 335b7f2 syntax: Enable lint warnings on missing docs, and add a lot of
documentation (#6611 ) (DonIsaac)
- f3451d7 transformer/async-to-generator: Remove empty lines from doc
comment (#6642 ) (overlookmotel)
- 448388a transformer/module_imports: Update outdated comments (#6574 )
(Dunqing)
### Refactor
- 073b02a ast: Type params field before params in TS function
declaration types (#6391 ) (overlookmotel)
- 458f8f3 ast_tools: Consistent comments on `AstBuilder` methods (#6664 )
(overlookmotel)
- 51fc63d codegen: Rename `CodeBuffer::print_bytes_unchecked` method
(#6517 ) (overlookmotel)
- 05a2ebd codegen: Reorder dependencies in `Cargo.toml` (#6514 )
(overlookmotel)
- e7f3e28 codegen: Rename var in `CodeBuffer` (#6510 ) (overlookmotel)
- 1bbd383 codegen: Rename `CodeBuffer::print_ascii_bytes` method (#6507 )
(overlookmotel)
- cd9fe9e codegen: Rename vars in `CodeBuffer` methods (#6506 )
(overlookmotel)
- fc536a5 codegen: Inline `CodeBuffer` methods (#6501 ) (overlookmotel)
- 7420620 codegen: Add `CodeBuffer::as_bytes` method (#6498 )
(overlookmotel)
- 8ae174b codegen: Rename `CodeBuffer::print_byte_unchecked` method
(#6496 ) (overlookmotel)
- 5843e01 codegen: Shorten `CodeBuffer::take_source_text` (#6495 )
(overlookmotel)
- 951def6 codegen: Clarify safety comments in `CodeBuffer` (#6494 )
(overlookmotel)
- 84a51ee codegen: Rename vars in `CodeBuffer` (#6493 ) (overlookmotel)
- 05bd616 codegen: Add line break (#6492 ) (overlookmotel)
- 204bf55 codegen: Add `CodeBuffer` to fix soundness hole (#6148 )
(DonIsaac)
- 702b574 codegen: Only print necessary parentheses in TSAsExpression
(#6429 ) (Dunqing)
- aa6ba24 ecmascript: Improve string to number conversion (#6577 )
(magic-akari)
- 6d041fb ecmascript: Remove `NumberValue` (#6519 ) (Boshen)
- 856cab5 ecmascript: Move ToInt32 from `oxc_syntax` to `oxc_ecmascript`
(#6471 ) (Boshen)
- 1ba2a24 ecmascript: Remove `HasProto` which is not part of the spec
(#6470 ) (Boshen)
- a504f96 isolated-declarations: Mark return struct as non exhaustive
(#6374 ) (DonIsaac)
- f4cdc56 minifier: Use constant folding unary expression from
`oxc_ecmascript` (#6647 ) (Boshen)
- 67ad08a minifier: Unify `ValueType` (#6545 ) (Boshen)
- bbca743 minifier: Move string methods to `oxc_ecmascript` (#6472 )
(Boshen)
- 702c049 minifier: Move compress block to dce (#6468 ) (7086cmd)
- 46a38c6 minifier: Remove allow `clippy::unused_self` (#6441 ) (Boshen)
- 994b60b minifier: Use builtin get_number_value. (#6335 ) (7086cmd)
- 435a89c oxc: Remove useless `allocator.alloc(program)` calls (#6571 )
(Boshen)
- c45723b parser: Fix typo in var name (#6500 ) (overlookmotel)
- 1a90ec4 rust: Backport v1.82.0 changes to main branch first (#6690 )
(Boshen)
- 3faee66 span: Remove unused `ContentHash::content_hash_slice` (#6609 )
(DonIsaac)
- 9281234 transformer: Shorten imports (#6643 ) (overlookmotel)
- 3af0840 transformer: `HelperLoader`: add import immediately (#6601 )
(overlookmotel)
- f81aa7f transformer: `HelperLoader` common transform: comments (#6599 )
(overlookmotel)
- 679cc68 transformer: `HelperLoader` common transform: construct string
directly in arena (#6596 ) (overlookmotel)
- c346ebb transformer: `HelperLoader` common transform: `Helper` enum
(#6595 ) (overlookmotel)
- 7a028b3 transformer: Remove unnecessary `#![warn]` attr (#6585 )
(overlookmotel)
- 8c6afe0 transformer: Reorder imports (#6582 ) (overlookmotel)
- 779ff46 transformer: `HelperLoader` common transform: `Helper` struct
(#6568 ) (overlookmotel)
- bc24a24 transformer: `HelperLoader` common transform: use hashmap
`Entry` API (#6567 ) (overlookmotel)
- 9f02fc7 transformer: `HelperLoader` common transform: re-order fields
(#6565 ) (overlookmotel)
- 50ecade transformer: `HelperLoader` common transform: remove `Rc`s
(#6564 ) (overlookmotel)
- 1c1e9fc transformer: `HelperLoader` common transform: reorder methods
(#6563 ) (overlookmotel)
- c9054c8 transformer: Rename `ImportKind` to `Import` (#6561 )
(overlookmotel)
- 9542c4e transformer: Add more specific methods to `ModuleImportsStore`
(#6560 ) (overlookmotel)
- 7e57a1d transformer: `ImportKind` use `BoundIdentifier` (#6559 )
(overlookmotel)
- 602df9d transformer: Re-order fields of `Common` and `TransformCtx`
(#6562 ) (overlookmotel)
- 390abca transformer/async-to-generator: Use `helper_call_expr` (#6634 )
(Dunqing)
- 2ff917f transformer/async-to-generator: Move internal methods below
entry points (#6632 ) (Dunqing)
### Styling
- fb916b2 regular_expression: Re-order dependencies in `Cargo.toml`
(#6672 ) (overlookmotel)
- 9d43a11 transformer: Re-order dependencies (#6659 ) (overlookmotel)
### Testing
- e7c89a5 codegen: Uncomment passed tests that are related to trailing
comments (#6589 ) (Dunqing)
- d816b0b codegen: Add test for `CodeBuffer::print_byte_unchecked`
(#6497 ) (overlookmotel)
- c5deb32 minifier: Port the rest of tests (#6420 ) (7086cmd)
- e59da61 minifier: Add all test cases for
`collapse_variable_declarations` (#6421 ) (dalaoshu)
- 73d6a4a minifier: Port all replace_known_methods tests. (#6418 )
(7086cmd)
---------
Co-authored-by: Boshen <1430279+Boshen@users.noreply.github.com>
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2024-10-19 23:09:35 +08:00
oxc-bot
70c6f24a08
release(oxlint): v0.10.0 ( #6661 )
...
## [0.10.0] - 2024-10-18
- 7f6b219 editor/vscode: [**BREAKING**] Unify configuration logic
(#6630 ) (DonIsaac)
- 782f0a7 codegen: [**BREAKING**] Rename `print_char` method to
`print_ascii_byte` (#6512 ) (overlookmotel)
- 7645e5c codegen: [**BREAKING**] Remove CommentOptions API (#6451 )
(Boshen)
- 5200960 oxc: [**BREAKING**] Remove passing `Trivias` around (#6446 )
(Boshen)
- 80266d8 linter: [**BREAKING**] Support plugins in oxlint config files
(#6088 ) (DonIsaac)
### Features
- 6f22538 ecmascript: Add `ToBoolean`, `ToNumber`, `ToString` (#6502 )
(Boshen)
- 1e7fab3 linter: Implement `no-callback-in-promise` (#6157 ) (dalaoshu)
- c56343d linter: Promote `no_unsafe_optional_chaining` to correctness
(#6491 ) (Boshen)
- 454874a linter: Implement `react/iframe-missing-sandbox` (#6383 ) (Radu
Baston)
- c8174e2 linter: Add suggestions for `no-plusplus` (#6376 ) (camchenry)
- 6e3224d linter: Configure by category in config files (#6120 )
(DonIsaac)
- c5e66e1 linter/no-unused-vars: Report own type references within
class, interface, and type alias declarations (#6557 ) (DonIsaac)
- 8c78f97 linter/node: Implement no-new-require (#6165 ) (Jelle van der
Waa)
### Bug Fixes
- cf92730 editor: Use human-readable output channel names (#6629 )
(DonIsaac)
- d9159a2 editor: Misaligned command prefixes (#6628 ) (DonIsaac)
- b9c94bb editors/vscode: Temporarily solve oxc_language_server issue on
windows (#6384 ) (dalaoshu)
- e340424 linter: Support import type with namespaced import in
`import/no-duplicates` (#6650 ) (Dmitry Zakharov)
- a668397 linter: Panic in `no-else-return` (#6648 ) (dalaoshu)
- 41dc8e3 linter: Stack overflow in `oxc/no-async-endpoint-handlers`
(#6614 ) (DonIsaac)
- d07a9b0 linter: Panic in `no-zero-fractions` (#6607 ) (dalaoshu)
- d6a0d2e linter: Fix file name checking behavior of
`unicorn/filename-case` (#6463 ) (camchenry)
- 0784e74 linter: Error fixer of `switch-case-braces` (#6474 ) (dalaoshu)
- e811812 linter: Error diagnostic message based on parameter length of
valid-expect (#6455 ) (dalaoshu)
- f71c91e linter: Move `eslint/sort-keys` to `style` category (#6377 )
(DonIsaac)
- 2b86de9 linter/no-control-regex: False negative for flags in template
literals (#6531 ) (DonIsaac)
- 685a590 linter/no-control-regex: Better diagnostic messages (#6530 )
(DonIsaac)
- 6d5a9f2 linter/no-control-regex: Allow capture group references
(#6529 ) (DonIsaac)
- ba53bc9 linter/no-unused-vars: False positives in TS type assertions
(#6397 ) (DonIsaac)
- d3e59c6 linter/no-unused-vars: False positive in some default export
cases (#6395 ) (DonIsaac)
- e08f956 linter/no-unused-vars: False positive for functions and
classes in arrays (#6394 ) (DonIsaac)
- b9d7c5f no-unused-vars: Consider functions within conditional
expressions usable (#6553 ) (Brian Donovan)
### Performance
- 0cbd4d0 linter: Avoid megamorphism in `RuleFixer` methods (#6606 )
(DonIsaac)
- 725f9f6 linter: Get fewer parent nodes in
`unicorn/prefer-dom-node-text-content` (#6467 ) (camchenry)
- c00f669 linter: Use NonZeroUsize for pending module cache entries
(#6439 ) (DonIsaac)
- a1a2721 linter: Replace `ToString::to_string` with `CompactStr` in
remaining rules (#6407 ) (camchenry)
- c5c69d6 linter: Use `CompactStr` in `valid-title` (#6406 ) (camchenry)
- d66e826 linter: Use `CompactStr` in `prefer-lowercase-title` (#6405 )
(camchenry)
- 889400c linter: Use `CompactStr` for `get_node_name` in Jest rules
(#6403 ) (camchenry)
- 9906849 linter: Use `CompactStr` in `no-large-snapshots` (#6402 )
(camchenry)
- c382ec4 linter: Use `CompactStr` in `no-hooks` (#6401 ) (camchenry)
- 24a5d9b linter: Use `CompactStr` in `expect-expect` (#6400 )
(camchenry)
- 71dbdad linter: Use `CompactStr` in `no-console` (#6399 ) (camchenry)
- f5f00a1 linter: Use `CompactStr` in `no-bitwise` (#6398 ) (camchenry)
- 62afaa9 linter/jsx-no-comment-textnodes: Remove regex for checking
comment patterns (#6534 ) (camchenry)
- b3d0cce linter/no-unescaped-entities: Add fast path to check if char
should be replaced (#6594 ) (camchenry)
- ee73f56 linter/no-unused-vars: Do not construct `Regex` for default
ignore pattern (#6590 ) (camchenry)
- 77ddab8 linter/numeric-separators-style: Replace regex with number
parser (#6546 ) (camchenry)
- 8f47cd0 linter/react: Remove regex patterns in `no-unknown-property`
(#6536 ) (camchenry)
### Documentation
- 557f941 linter: Add docs to no-unused-vars and Tester (#6558 )
(DonIsaac)
### Refactor
- ecce5c5 linter: Improve recursive argument handling and diagnostics
creation (#6513 ) (no-yan)
- f960e9e linter: Add suggested file names for `unicorn/filename-case`
(#6465 ) (camchenry)
- 7240ee2 linter: Make advertised fix kinds consistent (#6461 )
(Alexander S.)
- b48c368 linter: `no_global_assign` rule: reduce name lookups (#6460 )
(overlookmotel)
- 2566ce7 linter: Remove OxlintOptions (#6098 ) (DonIsaac)
- 002078a linter: Make Runtime's members private (#6440 ) (DonIsaac)
- 6a0a533 linter: Move module cache logic out of Runtime (#6438 )
(DonIsaac)
- c18c6e9 linter: Split service code into separate modules (#6437 )
(DonIsaac)
- 5ea9ef7 linter: Improve labels and help message for
`eslint/no-useless-constructor` (#6389 ) (DonIsaac)
- 2c32dac linter/no-control-regex: Remove duplicate code (#6527 )
(DonIsaac)
- 435a89c oxc: Remove useless `allocator.alloc(program)` calls (#6571 )
(Boshen)
- f70e93b oxc: Ban index methods on std::str::Chars (#6075 ) (dalaoshu)
### Testing
- a6cae98 linter: Make sure all auto-fixing rules have fixer test
(#6378 ) (DonIsaac)
- 06b09b2 linter/no-unused-vars: Enable now-passing tests (#6556 )
(DonIsaac)
- badd11c linter/no-unused-vars: Ignored catch parameters (#6555 )
(DonIsaac)
- 84aa2a2 linter/no-useless-constructor: Add cases for initializers in
subclass constructors (#6390 ) (DonIsaac)
---------
Co-authored-by: DonIsaac <22823424+DonIsaac@users.noreply.github.com>
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2024-10-18 20:34:15 -04:00
DonIsaac
6e3224d5fa
feat(linter): configure by category in config files ( #6120 )
...
> closes #5454
Adds a `categories` property to config files, where each key is a `RuleCategory` and each value is `"allow"/"off"`, `"warn"`, or `"deny"/"error"`.
Note that this change won't come into effect until after #6088 is merged.
2024-10-08 22:19:07 +00:00
oxc-bot
6921d50371
release(crates): v0.31.0 ( #6360 )
...
## [0.31.0] - 2024-10-08
- 01b878e parser: [**BREAKING**] Use `BindingIdentifier` for `namespace`
declaration names (#6003 ) (DonIsaac)
- 95ca01c cfg: [**BREAKING**] Make BasicBlock::unreachable private
(#6321 ) (DonIsaac)
- 020bb80 codegen: [**BREAKING**] Change to `CodegenReturn::code` and
`CodegenReturn::map` (#6310 ) (Boshen)
- 409dffc traverse: [**BREAKING**] `generate_uid` return a
`BoundIdentifier` (#6294 ) (overlookmotel)
- 5a73a66 regular_expression: [**BREAKING**] Simplify public APIs
(#6262 ) (leaysgur)
- 32d972e parser: [**BREAKING**] Treat unambiguous files containing TS
export assignments as modules (#6253 ) (overlookmotel)
- 4f6bc79 transformer: [**BREAKING**] Remove `source_type` param from
`Transformer::new` (#6251 ) (overlookmotel)
- afc3ccb napi/transform: [**BREAKING**] Rename
`TransformOptions::react` to `jsx`. (#6211 ) (Boshen)
- 82ab689 transformer,minifier: [**BREAKING**] Move define and inject
plugin from minifier to transformer (#6199 ) (Boshen)
### Features
- fa4d505 cfg: Derive more base traits for CFG blocks (#6320 ) (DonIsaac)
- 14275b1 cfg: Color-code edges in CFG dot diagrams (#6314 ) (DonIsaac)
- 7566c2d data_structures: Add `as_slice` + `as_mut_slice` methods to
stacks (#6216 ) (overlookmotel)
- c3c3447 data_structures: Add `oxc_data_structures` crate; add stack
(#6206 ) (Boshen)
- e304e8c minifier: Minify exponential arithmetic operation. (#6281 )
(7086cmd)
- f9ae70c minifier: Minify basic arithmetic calculations. (#6280 )
(7086cmd)
- 4008afe minifier: Fold array and object constructors (#6257 )
(camchenry)
- 115ccc9 minifier: Bitwise not in exceeded value. (#6235 ) (7086cmd)
- ee6c850 minifier: Scaffold peephole replace known methods. (#6245 )
(7086cmd)
- c32af57 minifier: Fold demical bitwise not for bigint. (#6233 )
(7086cmd)
- 23b6464 minifier: Fold true / false comparison. (#6225 ) (7086cmd)
- 585ccda minifier: Support subtraction assignment. (#6214 ) (7086cmd)
- cca0034 minifier: Handle positive `NaN` and `Infinity`. (#6207 )
(7086cmd)
- dac8f09 minifier: Minify unary plus negation. (#6203 ) (7086cmd)
- 3b79e1b minifier: Evaluate bigint in fold constant (#6178 ) (Boshen)
- abd3a9f napi/transform: Perform dce after define plugin (#6312 )
(Boshen)
- a0ccc26 napi/transform: Add `lang` option to change source type
(#6309 ) (Boshen)
- f98e12c napi/transform: Add inject plugin (#6250 ) (Boshen)
- 291891e napi/transform: Add `define` option (#6212 ) (Boshen)
- 51a78d5 napi/transform: Rename all mention of React to Jsx; remove
mention of `Binding` (#6198 ) (Boshen)
- 2f888ed oxc: Add napi transform options (#6268 ) (Boshen)
- 8729755 oxc,napi/transform: Napi/transform use oxc compiler pipeline
(#6298 ) (Boshen)
- f6e42b6 sourcemap: Add support for sourcemap debug IDs (#6221 ) (Tim
Fish)
- 9e62396 syntax_operations: Add crate `oxc_syntax_operations` (#6202 )
(Boshen)
- cf20f3a transformer: Exponentiation transform: support private fields
(#6345 ) (overlookmotel)
### Bug Fixes
- 84b2d07 codegen: Converts line comment to block comment if it is a
`PURE` comment (#6356 ) (Dunqing)
- e9eeae0 isolated-declarations: False positive for function with a type
asserted parameters (#6181 ) (Dunqing)
- d953a6b minifier: Correct the reference link (#6283 ) (dalaoshu)
- 37cbabb minifier: Should not handle the strict operation for bool
comparison. (#6261 ) (7086cmd)
- e29c067 minifier: Handle exceeded shifts. (#6237 ) (7086cmd)
- 294da86 napi/transform: Fix index.d.ts (Boshen)
- 9736aa0 oxc_transformer: Define `import.meta` and `import.meta.*`
(#6277 ) (IWANABETHATGUY)
- 6159560 parser: String `ImportSpecifier`s for type imports (#6352 )
(DonIsaac)
- 1380d8b parser: Should regard comments where after `=` as leading
comments of next token (#6355 ) (Dunqing)
- 2bcd12a transformer: Exponentiation transform: fix reference flags
(#6330 ) (overlookmotel)
- 28cbfa7 transformer: Exponentiation transform: fix temp var names
(#6329 ) (overlookmotel)
- 3a4bcc7 transformer: Exponentiation transform: fix temp var names
(#6318 ) (overlookmotel)
- ccb7bdc transformer: Exponentiation transform: do not replace object
when private property (#6313 ) (overlookmotel)
- 56d50cf transformer: Exponentiation transform: do not assume `Math` is
not a local var (#6302 ) (overlookmotel)
- bd81c51 transformer: Exponentiation transform: fix duplicate symbols
(#6300 ) (overlookmotel)
- 06797b6 transformer: Logical assignment operator transform: fix
reference IDs (#6289 ) (overlookmotel)
- 4b42047 transformer: Fix memory leak in `ReplaceGlobalDefines` (#6224 )
(overlookmotel)
- a28926f transformer: Fix inserting `require` with `front` option
(#6188 ) (overlookmotel)
- b92fe84 transformer: `NonEmptyStack::push` write value before updating
cursor (#6169 ) (overlookmotel)
### Performance
- 5db9b30 allocator: Use lower bound of size hint when creating Vecs
from an iterator (#6194 ) (DonIsaac)
- 788e444 transformer: Parse options from comments only once (#6152 )
(overlookmotel)
- da2b2a4 transformer: Look up `SymbolId` for `require` only once
(#6192 ) (overlookmotel)
- 40bd919 transformer: Faster parsing JSX pragmas from comments (#6151 )
(overlookmotel)
### Documentation
- eb1d0b8 transformer: Exponentiation transform: update doc comments
(#6315 ) (overlookmotel)
- c7636d7 traverse: Remove erroneous doc comment (#6328 ) (overlookmotel)
### Refactor
- f7d1136 allocator: Remove unnecessary `Vec` impl (#6213 )
(overlookmotel)
- 40932f7 cfg: Use IndexVec for storing basic blocks (#6323 ) (DonIsaac)
- a1e0d30 cfg: Add type alias for Graph (#6322 ) (DonIsaac)
- 7672793 cfg: Move block data types to separate file (#6319 ) (DonIsaac)
- cc57541 data_structures: `NonEmptyStack::len` hint that `len` is never
0 (#6220 ) (overlookmotel)
- 147a5d5 data_structures: Remove `is_empty` methods for non-empty
stacks (#6219 ) (overlookmotel)
- 61805fd data_structures: Add debug assertion to `SparseStack` (#6218 )
(overlookmotel)
- dbfa0bc data_structures: Add `len` method to `StackCommon` trait
(#6215 ) (overlookmotel)
- ac5a23f minifier: Use ctx.ast.vec instead of Vec::new. (#6331 )
(7086cmd)
- 1cee207 minifier: Some boilerplate work for PeepholeFoldConstants
(#6054 ) (Boshen)
- 5b5daec napi: Use vitest (#6307 ) (Boshen)
- 58a8615 napi/transform: Remove context (#6306 ) (Boshen)
- 099ff3a napi/transform: Remove "Binding" from types; fix type error
(#6260 ) (Boshen)
- 54c1c53 napi/transform: Remove a call on `TransformOptions::clone`
(#6210 ) (Boshen)
- aa0dbb6 oxc: Add `napi` feature, change napi parser to use `oxc` crate
(#6265 ) (Boshen)
- 3b53dd4 parser: Provide better error messages for `const` modifiers on
class elements (#6353 ) (DonIsaac)
- acab777 regular_expression: Misc fixes (#6234 ) (leaysgur)
- bdd9e92 semantic: Rename vars from `ast_node_id` to `node_id` (#6304 )
(overlookmotel)
- d110700 semantic: Dereference IDs as quickly as possible (#6303 )
(overlookmotel)
- 03bc041 syntax: Remove some unsafe code creating IDs (#6324 )
(overlookmotel)
- bd5fb5a transformer: Exponentiation transform: rename methods (#6344 )
(overlookmotel)
- 4aa4e6b transformer: Exponentiation transform: do not wrap in
`SequenceExpression` if not needed (#6343 ) (overlookmotel)
- a15235a transformer: Exponentiation transform: no cloning (#6338 )
(overlookmotel)
- 7d93b25 transformer: Exponentiation transform: split into 2 paths
(#6316 ) (overlookmotel)
- 15cc8af transformer: Exponentiation transform: break up into functions
(#6301 ) (overlookmotel)
- 7f5a94b transformer: Use `Option::get_or_insert_with` (#6299 )
(overlookmotel)
- 0cea6e9 transformer: Exponentiation transform: reduce identifier
cloning (#6297 ) (overlookmotel)
- ac7a3ed transformer: Logical assignment transform: reduce identifier
cloning (#6296 ) (overlookmotel)
- 527f7c8 transformer: Nullish coalescing transform: no cloning
identifier references (#6295 ) (overlookmotel)
- 7b62966 transformer: Move `BoundIdentifier` into `oxc_traverse` crate
(#6293 ) (overlookmotel)
- c7fbf68 transformer: Logical assignment operator transform: no cloning
identifier references (#6290 ) (overlookmotel)
- f0a74ca transformer: Prefer `create_bound_reference_id` to
`create_reference_id` (#6282 ) (overlookmotel)
- ba3e85b transformer: Fix spelling (#6279 ) (overlookmotel)
- bc757c8 transformer: Move functionality of common transforms into
stores (#6243 ) (overlookmotel)
- 1c31932 transformer: Rename var in `VarDeclarations` common transform
(#6242 ) (overlookmotel)
- 0400ff9 transformer: `VarDeclarations` common transform: check if at
top level with `ctx.parent()` (#6231 ) (overlookmotel)
- 235cdba transformer: Use AstBuilder instance from TraverseCtx (#6209 )
(overlookmotel)
- a7ed29e transformer: Insert `import` statement or `require` depending
on source type (#6191 ) (overlookmotel)
- 4c63f0e transformer: Rename methods (#6190 ) (overlookmotel)
- 900cb46 transformer: Convert `ModuleImports` into common transform
(#6186 ) (overlookmotel)
- 00e2802 transformer: Introduce `TopLevelStatements` common transform
(#6185 ) (overlookmotel)
- 70d4c56 transformer: Rename `VarDeclarationsStore` methods (#6184 )
(overlookmotel)
- 81be545 transformer: Export `var_declarations` module from `common`
module (#6183 ) (overlookmotel)
- 02fedf5 transformer: Shorten import (#6180 ) (overlookmotel)
- f2ac584 transformer: Use TraverseCtx's ast in ModuleImports (#6175 )
(Dunqing)
- 21b08ba transformer: Shared `VarDeclarations` (#6170 ) (overlookmotel)
- 0dd9a2e traverse: Add helper methods to `BoundIdentifier` (#6341 )
(overlookmotel)
- c0e2fef traverse: Function to get var name from node (#6317 )
(overlookmotel)
- adc5381 traverse: `TraverseAncestry` use `NonEmptyStack` (#6217 )
(overlookmotel)
### Testing
- 964d71e minifier: Add arithmetic tests for fold constants. (#6269 )
(7086cmd)
- fcb4651 minifier: Enable null comparison with bigint. (#6252 )
(7086cmd)
- d4f2ee9 transformer: Tidy up transform checker (#6287 ) (overlookmotel)
- 0f5afd7 transformer: Transform checker output symbol name for
mismatches (#6286 ) (overlookmotel)
---------
Co-authored-by: Boshen <1430279+Boshen@users.noreply.github.com>
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2024-10-08 20:55:24 +08:00
oxc-bot
62d45bf14e
release(oxlint): v0.9.10 ( #6340 )
...
## [0.9.10] - 2024-10-07
### Features
- f272137 editors/vscode: Clear diagnostics on file deletion (#6326 )
(dalaoshu)
- 1a5f293 editors/vscode: Update VSCode extention to use project's
language server (#6132 ) (dalaoshu)
- 376cc09 linter: Implement `no-throw-literal` (#6144 ) (dalaoshu)
- 5957214 linter: Allow fixing in files with source offsets (#6197 )
(camchenry)
- a089e19 linter: Eslint/no-else-return (#4305 ) (yoho)
- 183739f linter: Implement prefer-await-to-callbacks (#6153 ) (dalaoshu)
- ae539af linter: Implement no-return-assign (#6108 ) (Radu Baston)
### Bug Fixes
- 9e9808b linter: Fix regression when parsing ts in vue files (#6336 )
(Boshen)
- 93c6db6 linter: Improve docs and diagnostics message for
no-else-return (#6327 ) (DonIsaac)
- e0a3378 linter: Correct false positive in
`unicorn/prefer-string-replace-all` (#6263 ) (H11)
- ea28ee9 linter: Improve the fixer of `prefer-namespace-keyword`
(#6230 ) (dalaoshu)
- f6a3450 linter: Get correct source offsets for astro files (#6196 )
(camchenry)
- be0030c linter: Allow whitespace control characters in
`no-control-regex` (#6140 ) (camchenry)
- e7e8ead linter: False positive in `no-return-assign` (#6128 )
(DonIsaac)
### Performance
- ac0a82a linter: Reuse allocator when there are multiple source texts
(#6337 ) (Boshen)
- 50a0029 linter: Do not concat vec in `no-useless-length-check` (#6276 )
(camchenry)
### Documentation
- 7ca70dd linter: Add docs for `ContextHost` and `LintContext` (#6272 )
(camchenry)
- a949ecb linter: Improve docs for `eslint/getter-return` (#6229 )
(DonIsaac)
- 14ba263 linter: Improve docs for `eslint-plugin-import` rules (#6131 )
(dalaoshu)
### Refactor
- 642725c linter: Rename vars from `ast_node_id` to `node_id` (#6305 )
(overlookmotel)
- 8413175 linter: Move shared function from utils to rule (#6127 )
(dalaoshu)
- ba9c372 linter: Make jest/vitest rule mapping more clear (#6273 )
(camchenry)
- 82b8f21 linter: Add schemars and serde traits to AllowWarnDeny and
RuleCategories (#6119 ) (DonIsaac)
- ea908f7 linter: Consolidate file loading logic (#6130 ) (DonIsaac)
- db751f0 linter: Use regexp AST visitor in `no-control-regex` (#6129 )
(camchenry)
- 3aa7e42 linter: Use RegExp AST visitor for `no-hex-escape` (#6117 )
(camchenry)
- 9d5b44a linter: Use regex visitor in `no-regex-spaces` (#6063 )
(camchenry)
- 0d44cf7 linter: Use regex visitor in `no-useless-escape` (#6062 )
(camchenry)
- eeb8873 linter: Use regex visitor in `no-empty-character-class`
(#6058 ) (camchenry)
### Testing
- d883562 linter: Invalid `eslint/no-unused-vars` options (#6228 )
(DonIsaac)
---------
Co-authored-by: Boshen <1430279+Boshen@users.noreply.github.com>
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2024-10-08 12:14:54 +08:00
oxc-bot
6c01fd7480
release(crates): v0.30.5 ( #6163 )
...
## [0.30.5] - 2024-09-29
### Features
- 15552ac napi/transform: Display semantic error (#6160 ) (Boshen)
- f50fdcd napi/transform: Make react refresh option take a boolean
(#6146 ) (Boshen)
### Bug Fixes
- f27d59f napi/transform: Remove confusing `jsx` option (#6159 ) (Boshen)
- bfd1988 transformer/react: Should not collect use-hooks if it's a
nested member expression (#6143 ) (Dunqing)
### Refactor
- ab187d1 codegen: Restrict visibility of internal methods (#6145 )
(DonIsaac)
- 375bebe transformer: Improve parsing React pragmas (#6138 )
(overlookmotel)
- 0836f6b transformer: Move parsing pragmas into TS transform (#6137 )
(overlookmotel)
- 30424fa transformer: TS transforms only store options they need
(#6135 ) (overlookmotel)
---------
Co-authored-by: Boshen <1430279+Boshen@users.noreply.github.com>
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2024-09-29 15:20:19 +08:00
oxc-bot
73098a43ff
release(crates): v0.30.4 ( #6134 )
...
## [0.30.4] - 2024-09-28
### Bug Fixes
- 8582ae3 codegen: Missing parentheses if there is a pure comment before
a NewExpression as a ComputedMemberExpression's callee (#6105 ) (Dunqing)
- fd6798f parser: Remove unintended `pub Kind` (#6109 ) (Boshen)
- 6f98aad sourcemap: Align sourcemap type with Rollup (#6133 ) (Boshen)
- 64d4756 transformer: Fix debug assertion in `Stack` (#6106 )
(overlookmotel)
### Performance
- 05852a0 codegen: Do not check whether there are annotation comments or
not if we don't preserve annotation comments (#6107 ) (Dunqing)
### Documentation
- 26a273a oxc-transform: Update README (Boshen)
- e2c5baf transformer: Fix formatting of README (#6111 ) (overlookmotel)
### Refactor
- 2090fce semantic: Fix lint warning in nightly (#6110 ) (overlookmotel)
- 7bc3988 transformer: Remove dead code (#6124 ) (overlookmotel)
- 07fe45b transformer: Exponentiation operator: convert to match (#6123 )
(overlookmotel)
- 4387845 transformer: Share `TypeScriptOptions` with ref not `Rc`
(#6121 ) (overlookmotel)
- 09e41c2 transformer: Share `TransformCtx` with ref not `Rc` (#6118 )
(overlookmotel)
- 58fd6eb transformer: Pre-allocate more stack space (#6095 )
(overlookmotel)
- 9ac80bd transformer: Add wrapper around `NonNull` (#6115 )
(overlookmotel)
- c50500e transformer: Move common stack functionality into
`StackCommon` trait (#6114 ) (overlookmotel)
- 9839059 transformer: Simplify `StackCapacity` trait (#6113 )
(overlookmotel)
---------
Co-authored-by: Boshen <1430279+Boshen@users.noreply.github.com>
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2024-09-28 13:08:44 +08:00
overlookmotel
e2c5baf868
docs(transformer): fix formatting of README ( #6111 )
2024-09-27 14:27:21 +01:00
Boshen
26a273a462
docs(oxc-transform): update README
2024-09-27 21:11:17 +08:00