Boshen
58bab2b52a
chore(regular_expression): prevent cargo shear wasm-bindgen
2024-09-03 12:16:47 +08:00
Boshen
310e05ca8e
ci: match autofix trigger with ci.yml
2024-09-03 12:05:02 +08:00
Boshen
a834424a41
ci: change commit message to follow conventional commit
2024-09-03 11:29:09 +08:00
Boshen
5a5fbcbec2
chore: format toml
2024-09-03 11:14:49 +08:00
Boshen
ea7a52f1b4
fix(napi/transform): fix test
2024-09-03 11:03:44 +08:00
rzvxa
59abf27d95
feat(ast, parser): add oxc_regular_expression types to the parser and AST. ( #5256 )
...
closes #5060
2024-09-03 02:36:37 +00:00
rzvxa
b47aca0e88
refactor(syntax): use generate_derive for CloneIn in types outside of oxc_ast crate. ( #5280 )
...
Removes the temporary `CloneIn` derive macro used for "foreign" types - as in types outside of the `oxc_ast` crate - since now we have support for multiple derive outputs - one per each crate - that allows us to use `generate_derive` across multiple crates.
2024-09-03 02:36:37 +00:00
rzvxa
68a1c01f4e
feat(ast_tools): add dedicated Derive trait. ( #5278 )
...
In an effort toward the implementation of #5256 , this PR allows us to have a separately generated "derive" file for each crate.
This also eliminates a bunch of boilerplate when writing new "derive" generators and generally makes it more approachable.
2024-09-03 02:36:36 +00:00
oxc-bot
be1a6d4c84
Release crates v0.26.0 ( #5418 )
...
## [0.26.0] - 2024-09-03
- 1aa49af ast: [**BREAKING**] Remove
`JSXMemberExpressionObject::Identifier` variant (#5358 ) (Dunqing)
- 01cc2ce semantic: [**BREAKING**] Add `ScopeTree:get_child_ids` API
behind a runtime flag (#5403 ) (Boshen)
- b1d0075 napi/transform: [**BREAKING**] Align output API `sourceText`
-> `code` with babel (#5398 ) (Boshen)
- 32f7300 ast: [**BREAKING**] Add `JSXElementName::IdentifierReference`
and `JSXMemberExpressionObject::IdentifierReference` (#5223 ) (Dunqing)
- 23e8456 traverse: [**BREAKING**] `TraverseCtx::ancestor` with level 0
= equivalent to `parent` (#5294 ) (overlookmotel)
- 582ce9e traverse: [**BREAKING**] `TraverseCtx::ancestor` return
`Ancestor::None` if out of bounds (#5286 ) (overlookmotel)
- 234a24c ast: [**BREAKING**] Merge `UsingDeclaration` into
`VariableDeclaration` (#5270 ) (Kevin Deng 三咲智子)
- c100826 semantic: [**BREAKING**] Always create a scope for `for`
statements (#5110 ) (overlookmotel)
- d304d6f semantic: [**BREAKING**] Always create a scope for
`CatchClause` (#5109 ) (overlookmotel)
### Features
- 180b1a1 ast: Add `Function::name()` (#5361 ) (DonIsaac)
- 5505749 ast: Add `accessibility` field to `AccessorProperty` (#5290 )
(Dunqing)
- 49cd5db ast,parser: Add `definite` flag to `AccessorProperty` node
(#5182 ) (DonIsaac)
- c2fa725 ast,parser: Parse `TSTypeAnnotations` on `AccessorProperty`
(#5179 ) (DonIsaac)
- 292d162 codegen: Print missing fields for `AccessorProperty` (#5291 )
(Dunqing)
- 72740b3 isolated_declaration: Support sourcemap option (#5170 )
(dalaoshu)
- f81e8a1 linter: Add `oxc/no-async-endpoint-handlers` (#5364 )
(DonIsaac)
- 9c22ce9 linter: Add hyperlinks to diagnostic messages (#5318 )
(DonIsaac)
- d22bd20 module_lexer: Distinguish for types-only imports and exports
(#5184 ) (Kevin Deng 三咲智子)
- 7dfd51a parser: Report class properties that are both definite and
optional (#5181 ) (DonIsaac)
- a563968 parser: Report errors on optional accessor properties (#5180 )
(DonIsaac)
- 46b641b regular_expression: Validate max quantifier value (#5218 )
(leaysgur)
- be4642f semantic: Transform checker check child scope IDs (#5410 )
(overlookmotel)
- 6e969f9 semantic: Add `ScopeTree::delete_root_unresolved_reference`
(#5305 ) (overlookmotel)
- 1b20ceb span: Add `CompactStr::to_compact_string` method (#5385 )
(Boshen)
- 5a137f0 span/source-type: Add SourceType factory methods (#5242 )
(DonIsaac)
- f5e05db span/source-type: Impl `Display` and `Error` for
`UnknownExtension` (#5240 ) (DonIsaac)
- d04857b transformer: Support `Targets::from_query` method (#5336 )
(Dunqing)
- 3d4a64c transformer: Make `Targets` public (#5335 ) (Dunqing)
- 0eb7602 transformer: Support `TransformOptions::from_preset_env` API
(#5323 ) (Dunqing)
- 08dc0ad transformer: Add `object-spread` plugin (#3133 ) (magic-akari)
- 01c0c3e transformer: Add remaining options to transformer options
(#5169 ) (Boshen)
- 056c667 transformer/arrow-functions: The output that uses `this`
inside blocks doesn't match Babel (#5188 ) (Dunqing)
- 0abfc50 transformer/typescript: Support `rewrite_import_extensions`
option (#5399 ) (Dunqing)
### Bug Fixes
- 8ebc23f ast: Serialize `TSParenthesizedType` with camelCase (#5199 )
(Kevin Deng 三咲智子)
- 5c4c001 codegen: Print `export @decorator declare abstract class Foo`
correctly (#5303 ) (Boshen)
- 7b1546b codegen: Do not print comments when `--minify` (Boshen)
- ff7fa98 diagnostics: Improve "file is too long to fit on the screen"
(#5120 ) (Boshen)
- 8a17807 parser: Treat JSX element tags starting with `_` or `$` as
`IdentifierReference`s (#5343 ) (overlookmotel)
- d4c06ef parser: Revert "check for `@flow` with recoverable errors as
well" (#5297 ) (overlookmotel)
- e1d8b92 parser: Check for `@flow` with recoverable errors as well
(Boshen)
- e6fd52e parser: Change unterminated regex error to be non-recoverable
(#5285 ) (Boshen)
- 1686920 parser: Span for invalid regex flags (#5225 ) (leaysgur)
- cffce11 regular_expression: Prevent panic on too large number (#5282 )
(leaysgur)
- 293413f semantic: Implicit return `UpdateExpression` in
`ArrowFunctionExpression` does not as read reference (#5161 ) (Dunqing)
- a6bb3b1 span/source-type: Consider `.cjs` and `.cts` files as
`ModuleKind::Script` (#5239 ) (DonIsaac)
- 35f03db transformer: `ArrowfunctionExpression`'s expression is true
but has more than one body statement (#5366 ) (Dunqing)
- 8d6b05c transformer: Class property with typescript value should not
be removed (#5298 ) (Boshen)
- 47e69a8 transformer-optional-catch-binding: The `unused` binding is
not in the correct scope (#5066 ) (Dunqing)
- 94ff94c transformer/arrow-functions: Reaches `unreachable` when
`<this.foo>` is inside an arrow function (#5356 ) (Dunqing)
- f8bb022 transformer/arrow-functions: Remove
`SymbolFlags::ArrowFunction` (#5190 ) (Dunqing)
- d9ba5ad transformer/arrow-functions: Correct scope for `_this` (#5189 )
(Dunqing)
- 3acb3f6 transformer/react: Mismatch output caused by incorrect
transformation ordering (#5255 ) (Dunqing)
- 5754c89 transformer/typescript: Remove accessibility from
`AccessorProperty` (#5292 ) (Dunqing)
- d594818 traverse: `insert_scope_below` update child scopes records
(#5409 ) (overlookmotel)
- 25d6e20 traverse: Add missing visitors to `ChildScopeCollector`
(#5118 ) (overlookmotel)
### Performance
- 292f217 ast: Optimize `JSXIdentifier::is_reference` (#5344 )
(overlookmotel)
- 12a7607 codegen: Inline `Codegen::print_list` (#5221 ) (overlookmotel)
- fb847bd codegen: Slightly faster `print_list` (#5192 ) (Boshen)
- a1523c6 transformer: Remove an allocation from arrow functions
transform (#5412 ) (overlookmotel)
### Documentation
- 8334bd4 transformer: Add documentation for `Targets::get_targets`
(#5337 ) (Dunqing)
- d51a954 transformer: Add documentation for arrow-functions plugin
(#5186 ) (Dunqing)
### Refactor
- c2d8c9e ast: Reduce allocations in
`AstBuilder::move_assignment_target` (#5367 ) (overlookmotel)
- 946c867 ast: Box `TSThisParameter` (#5325 ) (overlookmotel)
- 960e1d5 ast: Rename `IdentifierReference::new_with_reference_id`
(#5157 ) (overlookmotel)
- f63b568 ast: Remove `#[non_exhaustive]` attr from `AstBuilder` (#5130 )
(overlookmotel)
- d4c3778 codegen: Rename vars (#5222 ) (overlookmotel)
- 543cad6 codegen: Remove some pub APIs (Boshen)
- cd63336 diagnostic: Change how diagnostic codes are rendered (#5317 )
(DonIsaac)
- d236554 parser: Move `JSXIdentifier` conversion code into parser
(#5345 ) (overlookmotel)
- bc59dd2 parser: Improve example for `byte_search!` macro usage (#5234 )
(overlookmotel)
- a3ddfdd parser: Improve lexer pointer maths (#5233 ) (overlookmotel)
- 3ae94b8 semantic: Change `build_module_record` to accept &Path instead
of PathBuf (Boshen)
- 05d25e2 semantic: Combine add scope methods (#5262 ) (overlookmotel)
- fdedc0f semantic: Transform checker: rename `SemanticData` to
`Scoping` (#5261 ) (overlookmotel)
- 1086109 semantic: Transform checker do not output spans in errors
(#5260 ) (overlookmotel)
- af5713e semantic: Transform checker continue checks if missing IDs
(#5259 ) (overlookmotel)
- 943454f semantic: Update transform checker for no conditional scopes
(#5252 ) (overlookmotel)
- 892a7fa semantic: Replace `ref` syntax (#5253 ) (overlookmotel)
- cbb4725 semantic: Add comment to transform checker (#5250 )
(overlookmotel)
- a17cf33 semantic: Remove `ScopeTree::child_ids` (#5232 ) (Boshen)
- d5a4940 semantic: Rewrite handling of label statement errors (#5138 )
(Boshen)
- 94f60e7 span/source-type: Make `SourceType` factories `const` (#5241 )
(DonIsaac)
- 0de844d transformer: Remove unnecessary code from JSX transform
(#5339 ) (overlookmotel)
- 5136f01 transformer: Remove unnecessary type annotation (#5131 )
(overlookmotel)
- 260c9d2 transformer/es2015: Move all entry points to implementation of
Traverse trait (#5187 ) (Dunqing)
- 1645115 transformer/object-reset-spread: Make plugin initialization
unconditional (#5319 ) (Dunqing)
- d2666fe transformer/object-rest-spread: Move plugin-relates files to
`object_rest_spread` mod (#5320 ) (Dunqing)
- 7e2a7af transformer/react: Remove `CalculateSignatureKey`
implementation from refresh (#5289 ) (Dunqing)
- b43a394 traverse: Correct code comments (#5293 ) (overlookmotel)
- d71f0ed traverse: Inline all passthrough methods (#5279 )
(overlookmotel)
- 188ce07 traverse: Improve safety via type system (#5277 )
(overlookmotel)
- 0f4a8b3 traverse: Add debug asserts for safety invariants (#5272 )
(overlookmotel)
- 341e42a traverse: Make `Ancestor` an owned type (#5269 )
(overlookmotel)
- eba5033 traverse: Codegen `ChildScopeCollector` (#5119 )
(overlookmotel)
- f771d7c traverse: Remove unnecessary imports (#5116 ) (overlookmotel)
- c6590ae traverse: Move generated files into separate folder (#5115 )
(overlookmotel)
- fc2e9ad traverse: Remove support for `#[scope(if(...))]` attr (#5114 )
(overlookmotel)
- 1ba11a3 traverse: Refactor `ChildScopeCollector` (#5112 )
(overlookmotel)
- 40e2f6e traverse: Remove unnecessary branch in `ChildScopeCollector`
(#5111 ) (overlookmotel)
- b39c0d6 wasm: Add `source_type` for parser, replace class options with
plain object (#5217 ) (Kevin Deng 三咲智子)
### Testing
- 7009177 parser: Fix incorrect flow error test (Boshen)
- be7b8c6 semantic: Add `JSXIdentifierReference`-related tests (#5224 )
(Dunqing)
Co-authored-by: Boshen <1430279+Boshen@users.noreply.github.com>
2024-09-03 10:36:02 +08:00
rzvxa
c0b6269cef
feat(regular_expression): implement Display for RegularExpression type. ( #5304 )
...
Part of #5060
2024-09-03 02:20:45 +00:00
Dunqing
0abfc5049f
feat(transformer/typescript): support rewrite_import_extensions option ( #5399 )
...
close : #5395
Babel only supports `rewrite`, we also support `remove`
2024-09-03 01:57:42 +00:00
overlookmotel
a1523c6cc8
perf(transformer): remove an allocation from arrow functions transform ( #5412 )
...
Follow-up after #5356 . No need to allocate a new `IdentifierReference` when we can just mutate the existing one.
2024-09-03 01:07:12 +00:00
overlookmotel
be4642fc02
feat(semantic): transform checker check child scope IDs ( #5410 )
...
Transform checker check child scope IDs. If we have to track child scope IDs, we should make sure they're correct!
2024-09-03 00:57:13 +00:00
overlookmotel
d594818701
fix(traverse): insert_scope_below update child scopes records ( #5409 )
...
Follow on after #5403 . Make `Traverse` update child scope IDs when inserting new scope. These lines were removed in #5232 , but not reinstated in #5403 .
2024-09-03 00:57:12 +00:00
camc314
b8464325e7
feat(linter/oxc): add fixer for erasing-op ( #5377 )
...
adds a fixer for `erasing-op` (replace the binary expression with `0`)
2024-09-03 00:46:55 +00:00
overlookmotel
2ccbd9361b
refactor(linter): react/jsx_no_undef rule get_member_ident do not return Option ( #5411 )
...
Small tidy-up after #5358 . `get_member_ident` now always returns a value, never `None`, so no need for it to return an `Option`.
2024-09-02 18:42:02 +00:00
Dunqing
1aa49af010
feat(ast)!: remove JSXMemberExpressionObject::Identifier variant ( #5358 )
...
close : #5353
`JSXMemberExpressionObject::Identifier` is dead code.
2024-09-02 18:35:39 +00:00
Dunqing
a72cc96482
chore(ast)!: remove get_object_identifier and get_object_identifier_mut ( #5357 )
...
These two methods are no longer needed
2024-09-02 18:26:05 +00:00
Dunqing
94ff94cd34
fix(transformer/arrow-functions): reaches unreachable when <this.foo> is inside an arrow function ( #5356 )
...
Fixes: https://github.com/oxc-project/oxc/issues/5353#issuecomment-2321792915
2024-09-02 18:06:08 +00:00
Boshen
01cc2ceac0
feat(semantic)!: add ScopeTree:get_child_ids API behind a runtime flag ( #5403 )
...
The runtime API for enabling `get_child_ids` is `SemanticBuilder::with_scope_tree_child_ids`.
I've tested this PR in Rolldown to ensure correctness.
2024-09-02 16:22:26 +00:00
Boshen
927034d09b
ci: fix release vscode workflow
2024-09-02 21:50:24 +08:00
oxc-bot
953344dd42
Release oxlint v0.9.2 ( #5401 )
...
## [0.9.2] - 2024-09-02
### Features
- f81e8a1 linter: Add `oxc/no-async-endpoint-handlers` (#5364 )
(DonIsaac)
- b103737 linter: Improve no-accumulating-spread (#5302 ) (camc314)
- 9c22ce9 linter: Add hyperlinks to diagnostic messages (#5318 )
(DonIsaac)
- 1967c67 linter/eslint: Implement no-new-func (#5360 ) (dalaoshu)
- b867e5f linter/eslint-plugin-promise: Implement catch-or-return
(#5121 ) (Jelle van der Waa)
- 8d781e7 linter/oxc: Differentiate between array/object in
`no-accumulating-spread` loop diagnostic (#5375 ) (camc314)
- db55444 linter/oxc: Add fixer for `double-comparisons` (#5378 )
(camc314)
- e5c755a linter/promise: Add `spec-only` rule (#5124 ) (Jelle van der
Waa)
- 4c0861f linter/unicorn: Add fixer for `prefer-type-error` (#5311 )
(camc314)
- 084c2d1 linter/vitest: Implement prefer-to-be-object (#5321 )
(dalaoshu)
### Bug Fixes
- 11b93af linter/unicorn: Consistent-function-scoping false positive on
assignment expression (#5312 ) (Arian94)
### Performance
- f052a6d linter: `react/jsx_no_undef` faster check for unbound
references (#5349 ) (overlookmotel)
- 05636b7 linter: Avoid unnecessary work in `jsx_a11y/anchor_is_valid`
rule (#5341 ) (overlookmotel)
### Refactor
- afb038e linter: `react/jsx_no_undef` use loop instead of recursion
(#5347 ) (overlookmotel)
- fe62687 linter: Simplify skipping JSX elements in
`unicorn/consistent_function_scoping` (#5351 ) (overlookmotel)
- 381d9fe linter: Shorten code in `react/jsx_no_useless_fragment`
(#5350 ) (overlookmotel)
- 83b9a82 linter: Fix indentation in
`nextjs/no_script_component_in_head` rule (#5338 ) (overlookmotel)
- 89f0188 linter: Improve docs for `react/jsx_no_target_blank` rule
(#5342 ) (overlookmotel)
- 57050ab linter: Shorten code in
`jsx_a11y/aria_activedescendant_has_tabindex` rule (#5340 )
(overlookmotel)
- ed31d67 linter/jest: Fix indentation in code comment (#5372 ) (camc314)
- 2499cb9 linter/oxc: Update rule docs for `erasing-op` (#5376 )
(camc314)
- 69493d2 linter/oxc: Improve diagnostic for `no-accumulating-spread` in
loops (#5374 ) (camc314)
- 024b585 linter/oxc: Improve code comment for `no-accumulating-spread`
(#5373 ) (camc314)
Co-authored-by: Boshen <1430279+Boshen@users.noreply.github.com>
2024-09-02 20:30:22 +08:00
leaysgur
c7e61a1391
chore(prettier): Update conformance tests to Prettier v3.3.3 ( #5394 )
...
- v3.3.3 is latest released version
- Test file name was changed from v3.3.x
- https://github.com/prettier/prettier/pull/16244
2024-09-02 10:32:17 +00:00
Boshen
4c4be81b87
chore: update README
2024-09-02 16:09:07 +08:00
Boshen
b1d0075359
feat(napi/transform)!: align output API sourceText -> code with babel ( #5398 )
...
And `sourceMap` -> `map`
closes #5397
2024-09-02 07:53:46 +00:00
Boshen
3cb9452338
ci: clean up workflows/ci.yml
2024-09-02 14:53:53 +08:00
renovate[bot]
556fcff2cb
chore(deps): update vscode npm packages ( #5393 )
...
This PR contains the following updates:
| Package | Change | Age | Adoption | Passing | Confidence |
|---|---|---|---|---|---|
|
[@types/node](https://togithub.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/node )
([source](https://togithub.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node ))
| [`22.5.0` ->
`22.5.2`](https://renovatebot.com/diffs/npm/@types%2fnode/22.5.0/22.5.2 )
|
[](https://docs.renovatebot.com/merge-confidence/ )
|
[](https://docs.renovatebot.com/merge-confidence/ )
|
[](https://docs.renovatebot.com/merge-confidence/ )
|
[](https://docs.renovatebot.com/merge-confidence/ )
|
| [pnpm](https://pnpm.io ) ([source](https://togithub.com/pnpm/pnpm )) |
[`9.8.0` -> `9.9.0`](https://renovatebot.com/diffs/npm/pnpm/9.8.0/9.9.0 )
|
[](https://docs.renovatebot.com/merge-confidence/ )
|
[](https://docs.renovatebot.com/merge-confidence/ )
|
[](https://docs.renovatebot.com/merge-confidence/ )
|
[](https://docs.renovatebot.com/merge-confidence/ )
|
---
### Release Notes
<details>
<summary>pnpm/pnpm (pnpm)</summary>
### [`v9.9.0`](https://togithub.com/pnpm/pnpm/compare/v9.8.0...v9.9.0 )
[Compare Source](https://togithub.com/pnpm/pnpm/compare/v9.8.0...v9.9.0 )
</details>
---
### Configuration
📅 **Schedule**: Branch creation - "before 10am on monday" in timezone
Asia/Shanghai, Automerge - At any time (no schedule defined).
🚦 **Automerge**: Enabled.
♻ **Rebasing**: Whenever PR is behind base branch, or you tick the
rebase/retry checkbox.
👻 **Immortal**: This PR will be recreated if closed unmerged. Get
[config help](https://togithub.com/renovatebot/renovate/discussions ) if
that's undesired.
---
- [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check
this box
---
This PR was generated by [Mend Renovate](https://mend.io/renovate/ ).
View the [repository job
log](https://developer.mend.io/github/oxc-project/oxc ).
<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzOC41Ni4wIiwidXBkYXRlZEluVmVyIjoiMzguNTYuMCIsInRhcmdldEJyYW5jaCI6Im1haW4iLCJsYWJlbHMiOltdfQ==-->
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-09-01 23:13:13 +00:00
renovate[bot]
8cf9cf9919
chore(deps): update npm packages ( #5392 )
...
This PR contains the following updates:
| Package | Change | Age | Adoption | Passing | Confidence |
|---|---|---|---|---|---|
| [axios](https://axios-http.com )
([source](https://togithub.com/axios/axios )) | [`1.7.5` ->
`1.7.7`](https://renovatebot.com/diffs/npm/axios/1.7.5/1.7.7 ) |
[](https://docs.renovatebot.com/merge-confidence/ )
|
[](https://docs.renovatebot.com/merge-confidence/ )
|
[](https://docs.renovatebot.com/merge-confidence/ )
|
[](https://docs.renovatebot.com/merge-confidence/ )
|
| [pnpm](https://pnpm.io ) ([source](https://togithub.com/pnpm/pnpm )) |
[`9.8.0` -> `9.9.0`](https://renovatebot.com/diffs/npm/pnpm/9.8.0/9.9.0 )
|
[](https://docs.renovatebot.com/merge-confidence/ )
|
[](https://docs.renovatebot.com/merge-confidence/ )
|
[](https://docs.renovatebot.com/merge-confidence/ )
|
[](https://docs.renovatebot.com/merge-confidence/ )
|
---
### Release Notes
<details>
<summary>axios/axios (axios)</summary>
###
[`v1.7.7`](https://togithub.com/axios/axios/blob/HEAD/CHANGELOG.md#177-2024-08-31 )
[Compare
Source](https://togithub.com/axios/axios/compare/v1.7.6...v1.7.7 )
##### Bug Fixes
- **fetch:** fix stream handling in Safari by fallback to using a stream
reader instead of an async iterator;
([#​6584](https://togithub.com/axios/axios/issues/6584 ))
([d198085](d1980854fe ))
- **http:** fixed support for IPv6 literal strings in url
([#​5731](https://togithub.com/axios/axios/issues/5731 ))
([364993f](364993f0d8 ))
##### Contributors to this release
- <img
src="https://avatars.githubusercontent.com/u/10539109?v=4&s=18 "
alt="avatar" width="18"/> [Rishi556](https://togithub.com/Rishi556
"+39/-1 (#​5731 )")
- <img
src="https://avatars.githubusercontent.com/u/12586868?v=4&s=18 "
alt="avatar" width="18"/> [Dmitriy
Mozgovoy](https://togithub.com/DigitalBrainJS "+27/-7 (#​6584 )")
###
[`v1.7.6`](https://togithub.com/axios/axios/blob/HEAD/CHANGELOG.md#176-2024-08-30 )
[Compare
Source](https://togithub.com/axios/axios/compare/v1.7.5...v1.7.6 )
##### Bug Fixes
- **fetch:** fix content length calculation for FormData payload;
([#​6524](https://togithub.com/axios/axios/issues/6524 ))
([085f568](085f56861a ))
- **fetch:** optimize signals composing logic;
([#​6582](https://togithub.com/axios/axios/issues/6582 ))
([df9889b](df9889b83c ))
##### Contributors to this release
- <img
src="https://avatars.githubusercontent.com/u/12586868?v=4&s=18 "
alt="avatar" width="18"/> [Dmitriy
Mozgovoy](https://togithub.com/DigitalBrainJS "+98/-46 (#​6582 )")
- <img
src="https://avatars.githubusercontent.com/u/3534453?v=4&s=18 "
alt="avatar" width="18"/> [Jacques
Germishuys](https://togithub.com/jacquesg "+5/-1 (#​6524 )")
- <img
src="https://avatars.githubusercontent.com/u/53894505?v=4&s=18 "
alt="avatar" width="18"/> [kuroino721](https://togithub.com/kuroino721
"+3/-1 (#​6575 )")
</details>
<details>
<summary>pnpm/pnpm (pnpm)</summary>
### [`v9.9.0`](https://togithub.com/pnpm/pnpm/compare/v9.8.0...v9.9.0 )
[Compare Source](https://togithub.com/pnpm/pnpm/compare/v9.8.0...v9.9.0 )
</details>
---
### Configuration
📅 **Schedule**: Branch creation - "before 10am on monday" in timezone
Asia/Shanghai, Automerge - At any time (no schedule defined).
🚦 **Automerge**: Enabled.
♻ **Rebasing**: Whenever PR is behind base branch, or you tick the
rebase/retry checkbox.
👻 **Immortal**: This PR will be recreated if closed unmerged. Get
[config help](https://togithub.com/renovatebot/renovate/discussions ) if
that's undesired.
---
- [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check
this box
---
This PR was generated by [Mend Renovate](https://mend.io/renovate/ ).
View the [repository job
log](https://developer.mend.io/github/oxc-project/oxc ).
<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzOC41Ni4wIiwidXBkYXRlZEluVmVyIjoiMzguNTYuMCIsInRhcmdldEJyYW5jaCI6Im1haW4iLCJsYWJlbHMiOltdfQ==-->
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-09-01 19:31:44 +00:00
Boshen
4a9c2e719a
ci: cargo check in windows is unnecessary
...
We do not use any windows specific code (`git grep cfg | grep windows`)
2024-09-01 22:34:52 +08:00
Boshen
ff74fd158f
chore: bump node to v22.7.0 ( #5388 )
2024-09-01 21:52:01 +08:00
dalaoshu
084c2d166c
feat(linter/vitest): implement prefer-to-be-object ( #5321 )
...
Related to #4656
2024-09-01 19:09:36 +08:00
Boshen
1b20ceb70c
feat(span): add CompactStr::to_compact_string method ( #5385 )
...
For cases where we want to get the inner string and mutate it.
2024-09-01 10:49:39 +00:00
Boshen
29f8497001
ci: autofix formatting relates jobs ( #5383 )
...
closes #5382
Autofixes toml, rust and unused dependencies.
---------
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2024-09-01 16:19:53 +08:00
renovate[bot]
23ae0fa335
chore(deps): update crate-ci/typos action to v1.24.3 ( #5384 )
...
This PR contains the following updates:
| Package | Type | Update | Change |
|---|---|---|---|
| [crate-ci/typos](https://togithub.com/crate-ci/typos ) | action | patch
| `v1.24.1` -> `v1.24.3` |
---
### Release Notes
<details>
<summary>crate-ci/typos (crate-ci/typos)</summary>
###
[`v1.24.3`](https://togithub.com/crate-ci/typos/releases/tag/v1.24.3 )
[Compare
Source](https://togithub.com/crate-ci/typos/compare/v1.24.2...v1.24.3 )
#### \[1.24.3] - 2024-08-30
##### Fixes
- Updated the dictionary with the [August
2024](https://togithub.com/crate-ci/typos/issues/1069 ) changes
###
[`v1.24.2`](https://togithub.com/crate-ci/typos/releases/tag/v1.24.2 )
[Compare
Source](https://togithub.com/crate-ci/typos/compare/v1.24.1...v1.24.2 )
#### \[1.24.2] - 2024-08-30
##### Performance
- Cap unbounded parsing to avoid worst case performance (hit with test
data)
</details>
---
### Configuration
📅 **Schedule**: Branch creation - At any time (no schedule defined),
Automerge - At any time (no schedule defined).
🚦 **Automerge**: Enabled.
♻ **Rebasing**: Whenever PR is behind base branch, or you tick the
rebase/retry checkbox.
🔕 **Ignore**: Close this PR and you won't be reminded about this update
again.
---
- [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check
this box
---
This PR was generated by [Mend Renovate](https://mend.io/renovate/ ).
View the [repository job
log](https://developer.mend.io/github/oxc-project/oxc ).
<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzOC41Ni4wIiwidXBkYXRlZEluVmVyIjoiMzguNTYuMCIsInRhcmdldEJyYW5jaCI6Im1haW4iLCJsYWJlbHMiOltdfQ==-->
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-09-01 07:49:57 +00:00
_lmmmmmm
3864eb42ce
chore: typo fix ( #5380 )
...
fixed #5379
Fix typos so `just ready` works
2024-09-01 15:10:40 +08:00
camc314
2499cb9785
refactor(linter/oxc): update rule docs for erasing-op ( #5376 )
...
updates the rule docs to align with the template:
a266b45167/tasks/rulegen/template.txt (L13)
2024-09-01 06:23:25 +00:00
camc314
8d781e7dff
feat(linter/oxc): differentiate between array/object in no-accumulating-spread loop diagnostic ( #5375 )
...
when reporting diagnotics for code such as
```ts
let foo = {};
for (let i = 0; i < 10; i++) {
foo = { ...foo, [i]: i };
}
```
we do not currently differentiate the diagnostic message between object/array.
this PR changes this to help the user fix ths issue
2024-08-31 20:52:05 +00:00
camc314
69493d2987
refactor(linter/oxc): improve diagnostic for no-accumulating-spread in loops ( #5374 )
...
when reporting diagnotics for code such as
```ts
let foo = {};
for (let i = 0; i < 10; i++) {
foo = { ...foo, [i]: i };
}
```
we do not currently report **where** the accumulator is defined.
since this is constant for `Array.prototype.reduce`, it is not necessary.
however for loops, it makes sense to add this span to clearly show the user where the accumator is defined.
2024-08-31 20:52:05 +00:00
camc314
024b58506e
refactor(linter/oxc): improve code comment for no-accumulating-spread ( #5373 )
...
mentioned here: https://github.com/oxc-project/oxc/pull/5302#discussion_r1735759462
it's not exactly clear why we check that it's a `let` declaration kind.
2024-08-31 20:52:04 +00:00
camc314
db554447aa
feat(linter/oxc): add fixer for double-comparisons ( #5378 )
2024-08-31 20:48:59 +00:00
camc314
ed31d67b51
refactor(linter/jest): fix indentation in code comment ( #5372 )
...
previously, `test('...` was indented, making it look like it was inside a block statement/callback.
this PR corrects this by fixing the indentation
2024-08-31 18:56:25 +00:00
Arian94
11b93af0d1
fix(linter/unicorn): consistent-function-scoping false positive on assignment expression ( #5312 )
...
fixes #5159 and any other named function assigned to a property like:
```js
const foo = {};
foo.bar = function fooBar() {}
```
---------
Co-authored-by: Don Isaac <donald.isaac@gmail.com>
Co-authored-by: Cameron Clark <cameron.clark@hey.com>
2024-08-31 19:41:25 +01:00
DonIsaac
f81e8a126e
feat(linter): add oxc/no-async-endpoint-handlers ( #5364 )
...
Adds `no-async-endpoint-handlers` rules, which bans async functions used as endpoint handlers in Express applications. These do not get caught by Express' error handler, causing the server to crash with an unhandled process rejection error.
```js
app.use(async (req, res) => {
const foo = await api.getFoo(req.query) // server panics if this function rejects
return res.json(foo)
})
```
I could not find this rule implemented in any ESLint plugin, but this is a problem I see quite often and I'm tired of dealing with it. I've added it to `oxc` for now, but we should consider adding an `express` or `api` plugin in the future.
2024-08-31 16:59:52 +00:00
Boshen
add146557c
feat(wasm): turn on all transform options
2024-09-01 00:24:10 +08:00
Jelle van der Waa
b867e5f16b
feat(linter/eslint-plugin-promise): implement catch-or-return ( #5121 )
...
Rule detail:
[link](https://github.com/eslint-community/eslint-plugin-promise/blob/main/docs/rules/catch-or-return.md )
Co-authored-by: Don Isaac <donald.isaac@gmail.com>
2024-08-31 17:04:06 +01:00
Jelle van der Waa
e5c755a7a6
feat(linter/promise): add spec-only rule ( #5124 )
...
Rule Detail:
[link](https://github.com/eslint-community/eslint-plugin-promise/blob/main/docs/rules/spec-only.md )
Co-authored-by: Don Isaac <donald.isaac@gmail.com>
2024-08-31 11:38:47 -04:00
dalaoshu
1967c6730b
feat(linter/eslint): implement no-new-func ( #5360 )
...
Related to #479
---------
Co-authored-by: Don Isaac <donald.isaac@gmail.com>
2024-08-31 11:37:03 -04:00
Dunqing
35f03db464
fix(transformer): ArrowfunctionExpression's expression is true but has more than one body statement ( #5366 )
...
close : #5363
We insert the new statement here, but it's broken if it a `() => x;`, we need to transform it to `function () { return x }`
8d565d5b23/crates/oxc_transformer/src/es2020/nullish_coalescing_operator.rs (L59-L76)
I don't where we should put the fallback logic, It's useful for all plugins. We had already done the same thing in the react refresh plugin.
8d565d5b23/crates/oxc_transformer/src/react/refresh.rs (L578-L605)
2024-08-31 14:49:58 +00:00
Boshen
e75e0f1465
chore: update test262 / babel / typescript submodules ( #5369 )
...
closes #5215
2024-08-31 12:28:25 +00:00
overlookmotel
c2d8c9e743
refactor(ast): reduce allocations in AstBuilder::move_assignment_target ( #5367 )
...
`AstBuilder::move_assignment_target` pass a static `Atom` instead of empty string to `AstBuilder::simple_assignment_target_identifier_reference`. This avoids a call to `alloc` to allocate an empty string in arena.
2024-08-31 08:34:26 +00:00