heygsc
cbf08d2761
fix(linter): skip no-multi-str on jsx attributes ( #4666 )
2024-08-05 16:43:49 +03:30
camc314
229a0e9c45
feat(minifier): implement dot define for member expressions ( #3959 )
...
adds the ability to transform
`process.env.NODE_ENV`
into
`"development"`
when that config is passed in
2024-08-05 12:04:13 +00:00
Boshen
0236e947bd
chore: move fuzz/ to https://github.com/oxc-project/oxc-fuzz-parser
2024-08-05 17:34:29 +08:00
Boshen
a6f9f96e16
fix(linter): no unused errors should be warnings
2024-08-05 15:37:12 +08:00
oxc-bot
3ac02fd838
Release oxlint v0.7.0 ( #4657 )
...
## [0.7.0] - 2024-08-05
- 85a7cea semantic: [**BREAKING**] Remove name from `reference` (#4329 )
(Dunqing)
### Features
- aaee07e ast: Add `AstKind::AssignmentTargetPattern`,
`AstKind::ArrayAssignmentTarget` and `AstKind::ObjectAssignmentTarget`
(#4456 ) (Dunqing)
- 9df7b56 jsx-a11y/no-autofocus: Implement fixer support (#4171 ) (Jelle
van der Waa)
- b87bf70 linter: Add fix capabilties to existing lint rules (#4560 )
(DonIsaac)
- ddd8b27 linter: Support conditional fix capabilities (#4559 )
(DonIsaac)
- b952942 linter: Add eslint/no-unused-vars (⭐ attempt 3.2) (#4445 )
(DonIsaac)
- 6543958 linter: Add auto-fix metadata to RuleMeta (#4557 ) (Don Isaac)
- 85e8418 linter: Add react/jsx-curly-brace-presence (#3949 ) (Don Isaac)
- 4c4da56 linter: Add typescript-eslint/prefer-keyword-namespce (#4438 )
(Aza Walker)
- d8c2a83 linter: Eslint-plugin-vitest/no-import-node-test (#4440 )
(cinchen)
- e3b0c40 linter: Eslint-plugin-vitest/no-identical-title (#4422 )
(cinchen)
- c936782 linter: Eslint-plugin-vitest/no-conditional-expect (#4425 )
(cinchen)
- 27fdd69 linter: Eslint-plugin-vitest/no-commented-out-tests (#4424 )
(cinchen)
- 51f5025 linter: Add fixer for unicorn/prefer-string-starts-ends-with
(#4378 ) (DonIsaac)
- 3c0c709 linter: Add typescript-eslint/no-extraneous-class (#4357 )
(Jaden Rodriguez)
- 7afa1f0 linter: Support suggestions and dangerous fixes (#4223 )
(DonIsaac)
- acc5729 linter: Eslint-plugin-vitest/expect-expect (#4299 ) (cinchen)
- 2213f93 linter: Eslint-plugin-vitest/no-alias-methods (#4301 )
(cinchen)
- c296bc3 linter/eslint: Implement func-names (#4618 ) (Alexander S.)
- e116ae0 linter/eslint: Implement fixer for prefer-numeric-literals
(#4591 ) (Jelle van der Waa)
- eaf834f linter/eslint: Implement prefer-numeric-literals (#4109 )
(Jelle van der Waa)
- db2fd70 linter/eslint-plugin-promise: Implement
no-webpack-loader-syntax (#4331 ) (Jelle van der Waa)
- 5f1e070 linter/eslint-plugin-unicorn: Add fixer for prefer-code-point
(#4353 ) (Jelle van der Waa)
- ed49e16 linter/eslint-plugin-unicorn: Implement fixer for
prefer-dom-node-append (#4306 ) (Jelle van der Waa)
- e2b15ac linter/react: Implement react-jsx-boolean-value (#4613 ) (Jelle
van der Waa)
- 68efcd4 linter/react-perf: Handle new objects and arrays in prop
assignment patterns (#4396 ) (DonIsaac)
### Bug Fixes
- 368112c ast: Remove `#[visit(ignore)]` from
`ExportDefaultDeclarationKind`'s `TSInterfaceDeclaration` (#4497 )
(Dunqing)
- d384f60 ci: Remove unused(?) .html file (#4545 ) (Yuji Sugiura)
- 06aec77 linter: Invalid binary expression with overflow (#4647 )
(DonIsaac)
- b2da22b linter: Invalid tags in rule docs (#4646 ) (DonIsaac)
- 94440ad linter: Panic on invalid lang in `a11y/lang`. (#4630 ) (rzvxa)
- e0b03f8 linter: Improve the boundary for eslint/for-direction (#4590 )
(heygsc)
- 70b8cfa linter: Missing return in no-obj-calls recursion (#4594 )
(DonIsaac)
- fe1356d linter: Change no-unused-vars to nursery (#4588 ) (DonIsaac)
- 72337b1 linter: Change typescript-eslint/no-namespace to restriction
(#4539 ) (Don Isaac)
- 732f4e2 linter: Fix `oxlint` allocator cfg (#4527 ) (overlookmotel)
- 289dc39 linter: Overflow in no-obj-calls (#4397 ) (DonIsaac)
- a664715 linter/eslint: Fix invalid regexp in no_regex_spaces test
(#4605 ) (Yuji Sugiura)
- 74fa75a linter/eslint: Drop quotes around max-params lint warning
(#4608 ) (Jelle van der Waa)
- 9fcd9ae linter/eslint: Fix invalid regexp in no_control_regex test
(#4544 ) (leaysgur)
- ac08de8 linter/react_perf: Allow new objects, array, fns, etc in top
scope (#4395 ) (DonIsaac)
- 0fba738 npm: SyntaxError caused by optional chaining in low version
node (#4650 ) (heygsc)
- 73d2558 oxlint: Fix oxlint failed to build due to missing feature
(Boshen)
### Performance
- 6ff200d linter: Change react rules and utils to use `Cow` and
`CompactStr` instead of `String` (#4603 ) (DonIsaac)
- f259df0 linter: Make img-redundant-alt only build a regex once (#4604 )
(DonIsaac)
- 7585e16 linter: Remove allocations for string comparisons (#4570 )
(DonIsaac)
- b60bdf1 linter: `no_shadow_restricted_names` only look up name in
hashmap once (#4472 ) (overlookmotel)
- 81384f5 linter: Avoid unnecessary work in `nextjs:no_duplicate_head`
rule (#4465 ) (overlookmotel)
- f7da22d linter: Disable lint rules by file type (#4380 ) (DonIsaac)
- 348c1ad semantic: Remove `span` field from `Reference` (#4464 )
(overlookmotel)
- 6a9f4db semantic: Reduce storage size for symbol redeclarations
(#4463 ) (overlookmotel)- a207923 Replace some CompactStr usages with
Cows (#4377 ) (DonIsaac)
### Refactor
- 7a75e0f linter: Use diagnostic codes in lint rules (#4349 ) (DonIsaac)
- ccb1835 semantic: Methods take `Span` as param, not `&Span` (#4470 )
(overlookmotel)
- 7cd53f3 semantic: Var hoisting (#4379 ) (Dunqing)
- c99b3eb syntax: Give `ScopeId` a niche (#4468 ) (overlookmotel)
Co-authored-by: Boshen <1430279+Boshen@users.noreply.github.com>
2024-08-05 13:46:06 +08:00
Yuji Sugiura
17635973b6
fix(tasks/lint_rules): Refactor syncing typescript-eslint and eslint status ( #4654 )
...
Closes #4085
This issue seemed to have been addressed in #3779 , but partially
reverted in #3813 ? 🤔
Since I wasn't aware of these changes, I've just checked the current
implementation through the review requests in #4611 and refactored as
the original author.
2024-08-05 13:21:52 +08:00
DonIsaac
06aec77dfd
fix(linter): invalid binary expression with overflow ( #4647 )
...
Closes #4628
Also fixes an identical bug in `<<`
2024-08-05 05:02:28 +00:00
heygsc
0fba73897c
fix(npm): SyntaxError caused by optional chaining in low version node ( #4650 )
...
fix : #4602
2024-08-05 13:01:31 +08:00
renovate[bot]
649e7c30cf
chore(deps): update github-actions ( #4652 )
...
[](https://renovatebot.com )
This PR contains the following updates:
| Package | Type | Update | Change |
|---|---|---|---|
|
[cargo-bins/cargo-binstall](https://togithub.com/cargo-bins/cargo-binstall )
| action | minor | `v1.8.0` -> `v1.9.0` |
| [crate-ci/typos](https://togithub.com/crate-ci/typos ) | action | patch
| `v1.23.5` -> `v1.23.6` |
---
### Release Notes
<details>
<summary>cargo-bins/cargo-binstall (cargo-bins/cargo-binstall)</summary>
###
[`v1.9.0`](https://togithub.com/cargo-bins/cargo-binstall/releases/tag/v1.9.0 )
[Compare
Source](https://togithub.com/cargo-bins/cargo-binstall/compare/v1.8.0...v1.9.0 )
*Binstall is a tool to fetch and install Rust-based executables as
binaries. It aims to be a drop-in replacement for `cargo install` in
most cases. Install it today with `cargo install cargo-binstall`, from
the binaries below, or if you already have it, upgrade with `cargo
binstall cargo-binstall`.*
##### In this release:
- Add `--maximum-resolution-timeout`
([#​1823](https://togithub.com/cargo-bins/cargo-binstall/issues/1823 )
[#​1862](https://togithub.com/cargo-bins/cargo-binstall/issues/1862 ))
- Fix: `--strategies` on CLI do not seem to override disabled-strategies
in the manifest
([#​1851](https://togithub.com/cargo-bins/cargo-binstall/issues/1851 )
[#​1857](https://togithub.com/cargo-bins/cargo-binstall/issues/1857 ))
</details>
<details>
<summary>crate-ci/typos (crate-ci/typos)</summary>
###
[`v1.23.6`](https://togithub.com/crate-ci/typos/releases/tag/v1.23.6 )
[Compare
Source](https://togithub.com/crate-ci/typos/compare/v1.23.5...v1.23.6 )
#### \[1.23.6] - 2024-07-31
##### Fixes
- Updated the dictionary with the [July
2024](https://togithub.com/crate-ci/typos/issues/1051 ) changes
</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 becomes conflicted, 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://www.mend.io/free-developer-tools/renovate/ ). View the
[repository job log](https://developer.mend.io/github/oxc-project/oxc ).
<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNy40NDAuNyIsInVwZGF0ZWRJblZlciI6IjM3LjQ0MC43IiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6W119-->
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-08-05 04:05:57 +00:00
Dunqing
48031ada93
fix(transformer/typescript) shadowed imports have not been removed ( #4550 )
...
close : #4423
2024-08-05 03:15:14 +00:00
Dunqing
4efd54b84d
fix(transformer/typescript): incorrect SymbolFlags for jsx imports ( #4549 )
...
All `SymbolFlags` for imports should be `SymbolFlags::Import`
2024-08-05 03:15:13 +00:00
renovate[bot]
6058dfb214
chore(deps): update dependency @types/node to v22.1.0 ( #4649 )
...
[](https://renovatebot.com )
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.0.0` ->
`22.1.0`](https://renovatebot.com/diffs/npm/@types%2fnode/22.0.0/22.1.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/ )
|
---
### Configuration
📅 **Schedule**: Branch creation - "before 10am on monday" in timezone
Asia/Shanghai, Automerge - At any time (no schedule defined).
🚦 **Automerge**: Enabled.
♻ **Rebasing**: Whenever PR becomes conflicted, 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://www.mend.io/free-developer-tools/renovate/ ). View the
[repository job log](https://developer.mend.io/github/oxc-project/oxc ).
<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNy40NDAuNyIsInVwZGF0ZWRJblZlciI6IjM3LjQ0MC43IiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6W119-->
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-08-05 03:12:42 +00:00
DonIsaac
b2da22b30f
fix(linter): invalid tags in rule docs ( #4646 )
...
These are causing build errors in doc pages in PR #4640
2024-08-05 02:34:38 +00:00
overlookmotel
b8e67538f8
perf(codegen): u32 indexes in LineOffsetTable for source maps ( #4641 )
...
Oxc have a limit on size of source files of 4 GiB, so `u32` is sufficient to hold line and column offsets. Use `u32` for these values in `LineOffsetTable`, which reduces size of the type by 8 bytes.
2024-08-05 02:28:50 +00:00
leaysgur
6c612d141c
fix(semantic/jsdoc): Handle whitespace absence ( #4642 )
...
Follow up for #4632
2024-08-05 02:25:13 +00:00
renovate[bot]
b8e2d9c7ac
chore(deps): update rust crates ( #4645 )
...
[](https://renovatebot.com )
This PR contains the following updates:
| Package | Type | Update | Change |
|---|---|---|---|
| [flate2](https://togithub.com/rust-lang/flate2-rs ) |
workspace.dependencies | patch | `1.0.30` -> `1.0.31` |
| [indexmap](https://togithub.com/indexmap-rs/indexmap ) |
workspace.dependencies | minor | `2.2.6` -> `2.3.0` |
| [regex](https://togithub.com/rust-lang/regex ) | workspace.dependencies
| patch | `1.10.5` -> `1.10.6` |
| [serde_json](https://togithub.com/serde-rs/json ) |
workspace.dependencies | patch | `1.0.121` -> `1.0.122` |
| [tempfile](https://stebalien.com/projects/tempfile-rs/ )
([source](https://togithub.com/Stebalien/tempfile )) |
workspace.dependencies | minor | `3.10.1` -> `3.11.0` |
---
### Release Notes
<details>
<summary>indexmap-rs/indexmap (indexmap)</summary>
###
[`v2.3.0`](https://togithub.com/indexmap-rs/indexmap/blob/HEAD/RELEASES.md#230 )
[Compare
Source](https://togithub.com/indexmap-rs/indexmap/compare/2.2.6...2.3.0 )
- Added trait `MutableEntryKey` for opt-in mutable access to map entry
keys.
- Added method `MutableKeys::iter_mut2` for opt-in mutable iteration of
map
keys and values.
</details>
<details>
<summary>rust-lang/regex (regex)</summary>
###
[`v1.10.6`](https://togithub.com/rust-lang/regex/blob/HEAD/CHANGELOG.md#1106-2024-08-02 )
[Compare
Source](https://togithub.com/rust-lang/regex/compare/1.10.5...1.10.6 )
\===================
This is a new patch release with a fix for the `unstable` crate feature
that
enables `std::str::Pattern` trait integration.
Bug fixes:
- [BUG #​1219](https://togithub.com/rust-lang/regex/pull/1219 ):
Fix the `Pattern` trait implementation as a result of nightly API
breakage.
</details>
<details>
<summary>serde-rs/json (serde_json)</summary>
###
[`v1.0.122`](https://togithub.com/serde-rs/json/releases/tag/v1.0.122 )
[Compare
Source](https://togithub.com/serde-rs/json/compare/v1.0.121...v1.0.122 )
- Support using `json!` in no-std crates
([#​1166](https://togithub.com/serde-rs/json/issues/1166 ))
</details>
<details>
<summary>Stebalien/tempfile (tempfile)</summary>
###
[`v3.11.0`](https://togithub.com/Stebalien/tempfile/blob/HEAD/CHANGELOG.md#3110 )
[Compare
Source](https://togithub.com/Stebalien/tempfile/compare/v3.10.1...v3.11.0 )
- Add the ability to override the default temporary directory. This API
shouldn't be used in general, but there are some cases where it's
unavoidable.
</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 becomes conflicted, 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://www.mend.io/free-developer-tools/renovate/ ). View the
[repository job log](https://developer.mend.io/github/oxc-project/oxc ).
<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNy40NDAuNyIsInVwZGF0ZWRJblZlciI6IjM3LjQ0MC43IiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6W119-->
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-08-05 02:12:16 +00:00
overlookmotel
ff43dff99d
perf(sourcemap): speed up VLQ encoding ( #4633 )
...
Speed up source map VLQ encoding by removing a couple of operations from `serialize_mappings`'s hot loop.
On a local benchmark of just VLQ encoding, this change produces 5% performance increase (benchmarked on MacBook Pro M1).
2024-08-05 01:34:59 +00:00
overlookmotel
a3307734c5
perf(sourcemap): reduce string copying in ConcatSourceMapBuilder ( #4638 )
...
Clone `Arc<str>`s for source text instead of creating new `Arc<str>`s and copying the string data.
For the shorter strings (names and source filenames) it's cheaper to create a new `Arc<str>` than to clone, presumably because of the overhead of atomic operations involved in `Arc::clone`.
2024-08-05 01:26:13 +00:00
overlookmotel
372316bf87
perf(sourcemap): ConcatSourceMapBuilder extend source_contents in separate loop ( #4634 )
...
Small optimization to source map concatenation. Check if input sourcemap has `source_contents` once, rather than on each turn of the loop.
2024-08-05 01:26:12 +00:00
rzvxa
0d2c41a2cb
fix(semantic/jsdoc): panic on parsing type_name_comment. ( #4632 )
...
fixes #4627
2024-08-05 01:17:53 +00:00
rzvxa
94440ad35f
fix(linter): panic on invalid lang in a11y/lang. ( #4630 )
...
fixes #4629
2024-08-05 01:15:39 +00:00
renovate[bot]
439ce5bc85
chore(deps): update dependency axios to v1.7.3 ( #4637 )
...
[](https://renovatebot.com )
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.2` ->
`1.7.3`](https://renovatebot.com/diffs/npm/axios/1.7.2/1.7.3 ) |
[](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.3`](https://togithub.com/axios/axios/blob/HEAD/CHANGELOG.md#173-2024-08-01 )
[Compare
Source](https://togithub.com/axios/axios/compare/v1.7.2...v1.7.3 )
##### Bug Fixes
- **adapter:** fix progress event emitting;
([#​6518](https://togithub.com/axios/axios/issues/6518 ))
([e3c76fc](e3c76fc9bd ))
- **fetch:** fix withCredentials request config
([#​6505](https://togithub.com/axios/axios/issues/6505 ))
([85d4d0e](85d4d0ea0a ))
- **xhr:** return original config on errors from XHR adapter
([#​6515](https://togithub.com/axios/axios/issues/6515 ))
([8966ee7](8966ee7ea6 ))
##### 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 "+211/-159 (#​6518
#​6519 )")
- <img
src="https://avatars.githubusercontent.com/u/10867286?v=4&s=18 "
alt="avatar" width="18"/> [Valerii
Sidorenko](https://togithub.com/ValeraS "+3/-3 (#​6515 )")
- <img
src="https://avatars.githubusercontent.com/u/8599535?v=4&s=18 "
alt="avatar" width="18"/> [prianYu](https://togithub.com/prianyu "+2/-2
(#​6505 )")
</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 becomes conflicted, 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://www.mend.io/free-developer-tools/renovate/ ). View the
[repository job log](https://developer.mend.io/github/oxc-project/oxc ).
<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNy40NDAuNyIsInVwZGF0ZWRJblZlciI6IjM3LjQ0MC43IiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6W119-->
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-08-05 00:05:57 +00:00
renovate[bot]
819e0b1d09
chore(deps): update dependency @codemirror/view to v6.29.1 ( #4636 )
...
[](https://renovatebot.com )
This PR contains the following updates:
| Package | Change | Age | Adoption | Passing | Confidence |
|---|---|---|---|---|---|
| [@codemirror/view](https://togithub.com/codemirror/view ) | [`6.29.0`
->
`6.29.1`](https://renovatebot.com/diffs/npm/@codemirror%2fview/6.29.0/6.29.1 )
|
[](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>codemirror/view (@​codemirror/view)</summary>
###
[`v6.29.1`](https://togithub.com/codemirror/view/blob/HEAD/CHANGELOG.md#6291-2024-07-29 )
[Compare
Source](https://togithub.com/codemirror/view/compare/6.29.0...6.29.1 )
##### Bug fixes
Fix a crash on old Safari browsers that don't support
`MediaQueryList.addEventListener`.
Fix an issue where `EditorView.viewportLineBlocks` (and thus other
things like the gutter) might be out of date after some kinds of
decoration changes.
</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 becomes conflicted, 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://www.mend.io/free-developer-tools/renovate/ ). View the
[repository job log](https://developer.mend.io/github/oxc-project/oxc ).
<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNy40NDAuNyIsInVwZGF0ZWRJblZlciI6IjM3LjQ0MC43IiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6W119-->
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-08-05 00:02:20 +00:00
Alexander S.
c296bc34bc
feat(linter/eslint): implement func-names ( #4618 )
2024-08-04 19:41:57 -04:00
Boshen
e78cba6464
refactor(minifier): ast passes infrastructure ( #4625 )
...
After studying google closure compiler, I'm leaning towards a multi-ast-pass infrastructure for the minifier.
This is one of the few places where we are going to trade maintainability over performance, given the goal of the minifier is compression size not performance.
All of the terminologies and separation of concerns are aligned with google closure compiler.
Infrastructure of `terser` and `esbuild` are not suitable for us to study nor pursuit. Their code are so tightly coupled - I failed to comprehend any of them every time I try to walk through a piece of optmization. Google closure compiler despite being written in Java, it's actually the most readable minifier out there.
To improve performance between ast passes, I envision a change detection system over a portion of the code.
The benchmark will demonstrate the performance regression of running 5 ast passes instead of 2.
To complete this PR, I need to figure out "fix-point" and order of these ast passes.
2024-08-04 11:58:39 +00:00
Dunqing
3a6e4d91cf
feat(transformer_conformance): test ScopeTree and SymbolTable for correctness after transformation ( #4581 )
...
part of #4549
This test verifies that the correct symbols and scopes were added/changed during the transformation. From the snapshots, most of them are incorrect currently
2024-08-04 11:45:10 +00:00
Boshen
73d2558c14
fix(oxlint): fix oxlint failed to build due to missing feature
...
closes #4626
2024-08-04 19:33:04 +08:00
Rintaro Itokawa
c69ada4809
docs(ast): improve AST node documentation ( #4051 )
...
partof #2803
I even wrote a VariableDeclaration.
2024-08-04 17:38:54 +08:00
Yuji Sugiura
a6647153be
fix(linter/eslint): Fix invalid regexp in no_regex_spaces test ( #4605 )
...
The same as #4544

2024-08-04 15:07:53 +08:00
Boshen
a40a217de4
fix(parser): parse assert keyword in TSImportAttributes ( #4610 )
...
closes #4601
2024-08-04 01:41:31 +00:00
DonIsaac
6ff200d072
perf(linter): change react rules and utils to use Cow and CompactStr instead of String ( #4603 )
2024-08-03 21:26:08 +00:00
DonIsaac
fd2d9dafcd
feat(ast): improve AstKind::debug_name ( #4553 )
...
> Part of #4445
Improve `debug_name` to show identifier names for more AST kinds.
2024-08-03 21:22:05 +00:00
DonIsaac
b3b70282c7
feat(ast): implement missing Clone, Hash, and Display traits for literals ( #4552 )
2024-08-03 17:07:03 +00:00
rzvxa
ba7000107e
refactor(ast): put assert_layouts.rs behind debug_assertions ( #4621 )
...
#4615 was showing as green on all checks, but failed CI on main once merged because of errors in "Test wasm32-wasip1-threads" job, which only runs on main. This change will make sure any such problem gets caught at the PR stage in future.
2024-08-03 15:25:02 +00:00
rzvxa
61e8b8c6c5
chore: make test-wasm32-unknown-unknown run unconditionally. ( #4624 )
...
It used to be unconditional before #4547 , Having it to run all PRs allows us to run `oxc_ast::generated::assert_layouts` tests on 32-bit platforms.
2024-08-03 15:25:02 +00:00
rzvxa
49d5196e57
test(ast): fix assert_layouts.rs offset tests on 32bit platforms. ( #4620 )
2024-08-03 14:37:30 +00:00
rzvxa
297401db42
chore: fix mistake in configuring deny.toml V2 ( #4619 )
...
Follow up to #4616 , Fixing my mistake.
2024-08-03 13:03:05 +00:00
rzvxa
0c52c0db02
feat(ast_codegen): add alignment and size data to the schema. ( #4615 )
...
This PR generates the layouts in the schema but doesn't use it to reorder.
2024-08-03 12:43:10 +00:00
rzvxa
3f53b6f586
refactor(ast): make AST structs repr(C). ( #4614 )
...
Make structs `#[repr(C)]` without reordering them to benchmark the performance implications of it.
This PR adds 136 bytes of padding in total. You can visit the list of these types [here](https://github.com/oxc-project/oxc/pull/4404/files/ )(checkout the `assert_layouts.rs` diff).
Update:
Doesn't seem too bad!

* Linter: We can easily get more than 1% performance gain in the linter to even things out
* Prepass: If we fix our issue with Rust `1.80.0` we gain 13% And it should also be possible to find some other areas there to gain back this one percent.
The most notable thing is that `parser` isn't impacted by this, That is our most optimized crate which every percent counts(and it can be hard to gain back any perf regression there).
2024-08-03 12:23:41 +00:00
rzvxa
bcfa2978e7
fix(ast_codegen): detect "complex" type wrappers ( #4617 )
...
Detect types such as `Cell<Option<ScopeId>>` and mark them as such! We didn't used to use this method for these options but now we have to check all types to calculate their layouts which means we need to process them correctly(instead of falling to their inner value).
2024-08-03 12:11:34 +00:00
Jelle van der Waa
e2b15ac920
feat(linter/react): implement react-jsx-boolean-value ( #4613 )
...
Rule Detail:
[link](https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/jsx-boolean-value.md )
2024-08-03 13:36:42 +08:00
rzvxa
d25dea7b94
refactor(parser): use ast_builder in more places. ( #4612 )
2024-08-02 22:38:06 +00:00
rzvxa
84d80c124f
chore: update deny.toml to version 2. ( #4616 )
...
Fixes the errors raised
[here](https://github.com/oxc-project/oxc/actions/runs/10218564260/job/28274959011?pr=4404 ).
Based on https://github.com/EmbarkStudios/cargo-deny/pull/611 and the
latest version of
[docs](https://embarkstudios.github.io/cargo-deny/checks/index.html ).
2024-08-03 08:10:11 +10:00
overlookmotel
54047e021c
feat(ast): GetSpanMut trait ( #4609 )
...
Closes #4606 .
Introduce `GetSpanMut` trait and implement it on all AST node types.
This has to be a separate trait, rather than adding `span_mut` method to `GetSpan` because `AstKind` implements `GetSpan`, and it only has an immutable `&` ref to AST node it contains.
2024-08-02 11:50:24 +00:00
DonIsaac
f259df0d62
perf(linter): make img-redundant-alt only build a regex once ( #4604 )
2024-08-02 11:35:52 +00:00
Jelle van der Waa
74fa75aa87
fix(linter/eslint): drop quotes around max-params lint warning ( #4608 )
...
This was introduced by the diagnostic codes in lint rules 7a75e0f8a7 .
---
Checked the rest of the codebase and haven't found other issues.
2024-08-02 17:36:08 +08:00
rzvxa
f39e759a53
refactor(ast_codegen): abstract passes and generators behind Runner trait. ( #4556 )
2024-08-02 00:08:05 +00:00
rzvxa
abc88363d7
fix(ast_codegen): create output path if doesn't exist. ( #4555 )
2024-08-02 00:08:02 +00:00
rzvxa
65c411eea1
feat(ast_codegen): add normalize_with to create errors from options. ( #4554 )
2024-08-02 00:07:59 +00:00
rzvxa
e736a5478c
refactor(ast_codegen): cleanup schema generated by ast_codegen. ( #4403 )
2024-08-02 00:07:56 +00:00