Commit graph

3427 commits

Author SHA1 Message Date
Dunqing
fd6a1aa1d2 feat(transformer_conformance): correct source type (#3233) 2024-05-11 09:30:43 +00:00
overlookmotel
ec41dba197
refactor(traverse): simplify build script (#3231)
Refactor build script to simplify it. No changes to the `.rs` files the
script creates, only the script itself.
2024-05-11 09:03:16 +01:00
Boshen
2064ae9e0a refactor(parser,diagnostic): one diagnostic struct to eliminate monomorphization of generic types (#3214)
part of #3213

We should only have one diagnostic struct instead 353 copies of them, so we don't end up choking LLVM with 50k lines of the same code due to monomorphization.

If the proposed approach is good, then I'll start writing a codemod to turn all the existing structs to plain functions.

---

Background:

Using `--timings`, we see `oxc_linter` is slow on codegen (the purple part).

![image](https://github.com/zkat/miette/assets/1430279/c1df4f7d-90ef-4c0f-9956-2ec3194db7ca)

The crate currently contains 353 miette errors. [cargo-llvm-lines](https://github.com/dtolnay/cargo-llvm-lines) displays

```
cargo llvm-lines -p oxc_linter --lib --release

  Lines                 Copies               Function name
  -----                 ------               -------------
  830350                33438                (TOTAL)
   29252 (3.5%,  3.5%)    808 (2.4%,  2.4%)  <alloc::boxed::Box<T,A> as core::ops::drop::Drop>::drop
   23298 (2.8%,  6.3%)    353 (1.1%,  3.5%)  miette::eyreish::error::object_downcast
   19062 (2.3%,  8.6%)    706 (2.1%,  5.6%)  core::error::Error::type_id
   12610 (1.5%, 10.1%)     65 (0.2%,  5.8%)  alloc::raw_vec::RawVec<T,A>::grow_amortized
   12002 (1.4%, 11.6%)    706 (2.1%,  7.9%)  miette::eyreish::ptr::Own<T>::boxed
    9215 (1.1%, 12.7%)    115 (0.3%,  8.2%)  core::iter::traits::iterator::Iterator::try_fold
    9150 (1.1%, 13.8%)      1 (0.0%,  8.2%)  oxc_linter::rules::RuleEnum::read_json
    8825 (1.1%, 14.9%)    353 (1.1%,  9.3%)  <miette::eyreish::error::ErrorImpl<E> as core::error::Error>::source
    8822 (1.1%, 15.9%)    353 (1.1%, 10.3%)  miette::eyreish::error::<impl miette::eyreish::Report>::construct
    8119 (1.0%, 16.9%)    353 (1.1%, 11.4%)  miette::eyreish::error::object_ref
    8119 (1.0%, 17.9%)    353 (1.1%, 12.5%)  miette::eyreish::error::object_ref_stderr
    7413 (0.9%, 18.8%)    353 (1.1%, 13.5%)  <miette::eyreish::error::ErrorImpl<E> as core::fmt::Display>::fmt
    7413 (0.9%, 19.7%)    353 (1.1%, 14.6%)  miette::eyreish::ptr::Own<T>::new
    6669 (0.8%, 20.5%)     39 (0.1%, 14.7%)  alloc::raw_vec::RawVec<T,A>::try_allocate_in
    6173 (0.7%, 21.2%)    353 (1.1%, 15.7%)  miette::eyreish::error::<impl miette::eyreish::Report>::from_std
    6027 (0.7%, 21.9%)     70 (0.2%, 16.0%)  <alloc::vec::Vec<T> as alloc::vec::spec_from_iter_nested::SpecFromIterNested<T,I>>::from_iter
    6001 (0.7%, 22.7%)    353 (1.1%, 17.0%)  miette::eyreish::error::object_drop
    6001 (0.7%, 23.4%)    353 (1.1%, 18.1%)  miette::eyreish::error::object_drop_front
    5648 (0.7%, 24.1%)    353 (1.1%, 19.1%)  <miette::eyreish::error::ErrorImpl<E> as core::fmt::Debug>::fmt
```

It's totalling more than 50k llvm lines, and is putting pressure on rustc codegen (the purple part on `oxc_linter` in the image above.

---

It's pretty obvious by looking at https://github.com/zkat/miette/blob/main/src/eyreish/error.rs, the generics can expand out to lots of code.
2024-05-11 04:56:22 +00:00
overlookmotel
46c02aee61 feat(traverse): add scope flags to TraverseCtx (#3229)
Add scope flags to `TraverseCtx`.

Closes #3189.

`walk_*` functions build a stack of `ScopeFlags` as AST is traversed, and they can be queried from within visitors with `ctx.scope()`, `ctx.ancestor_scope()` and `ctx.find_scope()`.

The codegen which generates `walk_*` functions gets the info about which AST types have scopes, and how to check for strict mode from the `#[visited_node]` attrs on AST type definitions in `oxc_ast`.

A few notes:

Each scope inherits the strict mode flag from the level before it in the stack, so if you need to know "am I in strict mode context here?", `ctx.scope().is_strict_mode()` will tell you - no need to travel back up the stack to find out.

Scopes do *not* inherit any other flags from level before it. So `ctx.scope()` in a block nested in a function will return `ScopeFlags::empty()` not `ScopeFlags::Function`.

I had to add an extra flag `ScopeFlags::Method`. The reason for this is to deal with when a `Function` is actually a `MethodDefinition`, and to avoid creating 2 scopes in this case. The principle I'm trying to follow is to encode as little logic in the codegen as possible, as it's rather hidden away. Instead the codegen follows a standard logic for every node, guided by attributes which are visible next to the types in `oxc_ast`. This hopefully makes how `Traverse`'s visitors are generated less mysterious, and easier to change.

The case of `Function` within `MethodDefinition` is a weird one and would not be possible to implement without encoding a magic "special case" within the codegen without this extra `ScopeFlags::Method` variant. Its existence does not alter the operation of any other code in Oxc which uses `ScopeFlags`.

In my view `ScopeFlags` might benefit from a little bit of an overhaul anyway. I believe we could pack more information into the bits and make it more useful.
2024-05-11 04:39:42 +00:00
overlookmotel
4208733180 refactor(ast): order AST type fields in visitation order (#3228)
Reorder the fields in a couple of AST types.

`walk_*` functions in `oxc_traverse` visit the fields in the order they appear in AST. So this change means that decorators are visited before classes and methods that they decorate.
2024-05-11 04:39:39 +00:00
overlookmotel
c84c116ac3 refactor(ast): add is_strict methods (#3227)
De-duplicate logic for checking for `"use strict"` directives.
2024-05-11 04:39:36 +00:00
overlookmotel
132db7d2a1
refactor(traverse): do not expose TraverseCtx::new (#3226)
Creating a `TraverseCtx` with `TraverseCtx::new` should be an internal API within `oxc_traverse`. Don't expose it outside the crate.
2024-05-11 12:17:05 +08:00
Dunqing
6ac8a8479e
fix(transformer): correctly jsx-self inside arrow-function (#3224) 2024-05-11 00:48:18 +00:00
Ali Rezvani
20f643063e
improvement(semantic/cfg): add explicit break block element. (#3223)
Works similar to how `throw` is working but is done for `break` statements.
2024-05-10 22:22:30 +08:00
Ali Rezvani
5e36e0d575
fix(semantic): add cfg nodes for ConditionalExpressions. (#3127)
It is done similarly to how `IfStatement`s are structured at the moment.
2024-05-10 22:16:55 +08:00
Ali Rezvani
c91d26129c
fix(semantic): connect test expression of for statements to the cfg. (#3122)
I don't know if it is correct or not, Fixes my issues with dangling cfg nodes created in for statements. #3071
2024-05-10 22:11:25 +08:00
Dunqing
18d853bb2b
feat(transformer/react): support development mode (#3143) 2024-05-10 22:07:33 +08:00
overlookmotel
f0cbbbe28c
ci: build each benchmark only with deps it needs (#3221)
This PR builds on #3201 to further speed up the benchmarks and reduce CI
time.

* Build and run each benchmark as separate job (like before).
* But now each bench is only built with the dependencies it needs.
* For linter benchmarks, build benchmark in 1 job (like #3201 does).
* Run each linter fixture in a separate job as they're slow.

This reduces total time to complete benchmarks from between 6m-7m to
~4m40s.

All the individual jobs complete in under 1m30s, except for building
linter benchmark which takes 2m30s. So there won't be the problem of
blocking the CI queue that there was before.

NB: I did try this before, and didn't see a benefit. But I realized
today what I was doing wrong - it only works once the caches are
populated by a previous run on main branch.

So the CI times in this PR won't look good, but once it's merged to
main, it will take effect. Here it is running on main branch of my fork:

https://github.com/overlookmotel/oxc/actions/runs/9030511348

I also added a step to delete the temp artefacts which aren't needed
once the run has completed.
2024-05-10 22:01:24 +08:00
overlookmotel
952565329b
refactor(transformer): remove no-op scopes code (#3210)
Remove some code from the transformer which doesn't do anything.
2024-05-09 19:40:48 +08:00
Dunqing
0ba7778e5e
fix(parser): correctly parse cls.fn<C> = x (#3208)
close: #3206
2024-05-09 10:23:45 +08:00
Kuba Jastrzębski
7113e850b4
feat(linter): add radix rule (#3167) 2024-05-08 23:44:12 +08:00
overlookmotel
9590eb0cf4
fix(transform): implement transform-react-display-name with bottom-up lookup (#3183)
Sliced off from #3152.

Re-implement `transform-react-display-name` using bottom-up lookup
provided by `Traverse` trait.

This fixes the 1 remaining failing test case for this plugin (see
#2937).

`Traverse` is not complete yet (see #3182), so this is also not ready to
merge yet.
2024-05-08 15:33:39 +00:00
Boshen
be2aaa1d7e
ci: add release crates workflow
closes #2518
2024-05-08 22:32:05 +08:00
Boshen
15f275f572
refactor(linter): reduce llvm lines generated by RuleEnum::read_json (#3207)
Previous: 

```
  Lines                 Copies               Function name
  -----                 ------               -------------
    9150 (1.1%, 13.8%)      1 (0.0%,  8.2%)  oxc_linter::rules::RuleEnum::read_json
```

After:

```
    2285 (0.3%, 36.2%)      1 (0.0%, 40.3%)  oxc_linter::rules::RuleEnum::read_json
```
2024-05-08 21:53:06 +08:00
Dunqing
a227050ed0
chore: update babel repo (#3205) 2024-05-08 20:15:15 +08:00
overlookmotel
be958ce299
refactor(transform): transformer use Traverse (#3182)
Sliced off from #3152.

This switches the transformer over to use `Traverse` instead of
`VisitMut`.

This is incomplete - scopes are not implemented yet. At present, no
transforms use scopes anyway, so all tests pass, but regardless I don't
think should be merged until the implementation is complete.
2024-05-08 17:18:40 +08:00
Boshen
5683aceae9
ci: improve benchmark build time by only building once (#3201)
relates #3200
2024-05-08 14:54:10 +08:00
Wang Wenzhe
cba1e7f463
chore(linter): shorten eslint/eqeqeq rule error message's span (#3193) 2024-05-08 14:32:57 +08:00
Boshen
7363e14335
feat(sourcemap): add "rayon" feature (#3198) 2024-05-07 23:47:36 +08:00
Boshen
9b93a17429
chore(tasks/lint_rules): remove the now fixed @ts-expect-error
relates #2932
2024-05-07 23:21:12 +08:00
overlookmotel
5329b0f260
refactor(transform): fix doc comments for methods generated by inherit_variants! macro (#3195)
Nit: Remove whitespace from doc comments for methods generated by
`inherit_variants!` macro.
2024-05-07 15:16:43 +01:00
overlookmotel
a4f881fff4
docs(transform): improve docs for TraverseCtx::ancestors_depth (#3194)
Update doc comment to clarify what `TraverseCtx::ancestors_depth`
returns.
2024-05-07 15:15:40 +01:00
Boshen
ed3fa399a6
feat(linter): add --format github for github check annotation (#3191)
closes #480
2024-05-07 20:55:10 +08:00
overlookmotel
c6bd616456
docs(ast): document enum inheritance (#3192)
Add more docs for AST type enum inheritance and the `inherit_variants!`
macro.

This covers the changes made in #3115.
2024-05-07 20:28:15 +08:00
Boshen
82bd97d420
refactor(diagnostics): use a trait to implement the reporters (#3190) 2024-05-07 18:44:03 +08:00
Dunqing
fa0093b222
feat(linter): eslint-plugin-next/no-page-custom-font (#3185) 2024-05-07 09:53:43 +00:00
Boshen
4defe37f12
feat(linter): remove deprecated eslint v9 rules no-return-await and no-mixed-operators (#3188) 2024-05-07 17:17:31 +08:00
Boshen
ca9f13f4f2
feat(linter): eslint/no-new-native-nonconstructor (#3187)
feat(linter): eslint/no-new-native-nonconstructor

closes #3179

remove no new symbol
2024-05-07 17:10:17 +08:00
Boshen
7338364219
perf(lexer): improve comment building performance by using a vec instead of btreemap (#3186)
closes #2693
2024-05-07 16:43:27 +08:00
Boshen
b66d578fed
chore: update renovate.json 2024-05-07 12:33:40 +08:00
Jelle van der Waa
5081652bc1
feat(linter/eslint): Implement no-empty-function rule (#3181)
Rule Detail:
[link](https://eslint.org/docs/latest/rules/no-empty-function)

---------

Co-authored-by: Boshen <boshenc@gmail.com>
2024-05-07 02:56:13 +00:00
Dunqing
5514936f51
feat(linter): eslint-plugin-next/no-styled-jsx-in-document (#3184) 2024-05-07 10:35:28 +08:00
overlookmotel
762677e17b
refactor(transform): retag_stack use AncestorType (#3173)
Make the code for `retag_stack` in `walk_*` functions more
comprehensible, by replacing hard-coded enum discriminants as integers
with an `AncestorType` type.

Alternative solution to the problem raised in #3170.

close: #3170
2024-05-06 18:53:41 +01:00
Boshen
4e9b9d9e09
chore(renovate): migrate renovate config 2024-05-07 00:59:43 +08:00
Boshen
51855d6734
chore(renovate): remove unused ignoreDeps from rust crates 2024-05-07 00:37:07 +08:00
Wang Wenzhe
c0abbbd204
feat(linter/tree-shaking): add isPureFunction (#3175) 2024-05-07 00:03:04 +08:00
Cameron
07076d9765
feat(linter) improve prefer-string-starts-ends-with rule (#3176)
basically:
`^#/i.test(hex)` is the same as `/^#/.test(hex)`
so, in this case the `i` flag does nothing and we can safely ignore it


inspired by https://x.com/the_moisrex/status/1787444601571221892


---

This could potentially lead a new `oxc` rule called
`no_useless_case_insensitive_regex_flag` that reports if you have a
regex with the `i` flag with no ascii alphabetic chars.
2024-05-06 23:52:19 +08:00
Boshen
cb2e651eea
feat(linter): eslint-plugin-next/no-duplicate-head (#3174)
closes #2438
2024-05-06 19:43:38 +08:00
Boshen
d91b688f3a
chore(rulegen): default rule to nursery 2024-05-06 17:17:36 +08:00
Boshen
8fbba03afd
ci: reduce the total number of linter benchmarks (#3172)
closes #2981
2024-05-06 12:54:50 +08:00
Boshen
a84454cf87
refactor(linter): clean up prefer_node_protocol and move to restriction (#3171)
closes #3161
2024-05-06 12:43:24 +08:00
renovate[bot]
e6027beec3
chore(deps): lock file maintenance (#3163)
[![Mend
Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com)

This PR contains the following updates:

| Update | Change |
|---|---|
| lockFileMaintenance | All locks refreshed |

🔧 This Pull Request updates lock files to use the latest dependency
versions.

---

### Configuration

📅 **Schedule**: Branch creation - "before 4am on monday" in timezone
Asia/Shanghai, Automerge - At any time (no schedule defined).

🚦 **Automerge**: Disabled by config. Please merge this manually once you
are satisfied.

♻ **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 has been generated by [Mend
Renovate](https://www.mend.io/free-developer-tools/renovate/). View
repository job log
[here](https://developer.mend.io/github/oxc-project/oxc).

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNy4zNDAuMTAiLCJ1cGRhdGVkSW5WZXIiOiIzNy4zNDAuMTAiLCJ0YXJnZXRCcmFuY2giOiJtYWluIiwibGFiZWxzIjpbXX0=-->

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-05-06 12:34:01 +08:00
overlookmotel
be87ca8419
feat(transform): oxc_traverse crate (#3169)
First part of #3152.

This adds a crate `oxc_traverse`, but doesn't connect it up to the
transformer or anything else yet.

I think we could merge this now - as it doesn't affect any code that's
in use - and then iterate on it to add scopes before using it in
transformer. Please see
https://github.com/oxc-project/oxc/pull/3152#issuecomment-2094965406 for
the broader picture.
2024-05-06 09:37:04 +08:00
renovate[bot]
0ceeec8cbe
chore(deps): lock file maintenance website npm packages (#3166)
[![Mend
Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com)

This PR contains the following updates:

| Package | Type | Update | Change | Age | Adoption | Passing |
Confidence |
|---|---|---|---|---|---|---|---|
|  |  | lockFileMaintenance | All locks refreshed |  |  |  |  |
|
[@codemirror/autocomplete](https://togithub.com/codemirror/autocomplete)
| dependencies | minor | [`6.15.0` ->
`6.16.0`](https://renovatebot.com/diffs/npm/@codemirror%2fautocomplete/6.15.0/6.16.0)
|
[![age](https://developer.mend.io/api/mc/badges/age/npm/@codemirror%2fautocomplete/6.16.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/@codemirror%2fautocomplete/6.16.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/@codemirror%2fautocomplete/6.15.0/6.16.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/@codemirror%2fautocomplete/6.15.0/6.16.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
| [@codemirror/commands](https://togithub.com/codemirror/commands) |
dependencies | minor | [`6.3.3` ->
`6.5.0`](https://renovatebot.com/diffs/npm/@codemirror%2fcommands/6.3.3/6.5.0)
|
[![age](https://developer.mend.io/api/mc/badges/age/npm/@codemirror%2fcommands/6.5.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/@codemirror%2fcommands/6.5.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/@codemirror%2fcommands/6.3.3/6.5.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/@codemirror%2fcommands/6.3.3/6.5.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
| [@codemirror/lint](https://togithub.com/codemirror/lint) |
dependencies | minor | [`6.5.0` ->
`6.7.0`](https://renovatebot.com/diffs/npm/@codemirror%2flint/6.5.0/6.7.0)
|
[![age](https://developer.mend.io/api/mc/badges/age/npm/@codemirror%2flint/6.7.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/@codemirror%2flint/6.7.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/@codemirror%2flint/6.5.0/6.7.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/@codemirror%2flint/6.5.0/6.7.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
| [@codemirror/view](https://togithub.com/codemirror/view) |
dependencies | patch | [`6.26.0` ->
`6.26.3`](https://renovatebot.com/diffs/npm/@codemirror%2fview/6.26.0/6.26.3)
|
[![age](https://developer.mend.io/api/mc/badges/age/npm/@codemirror%2fview/6.26.3?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/@codemirror%2fview/6.26.3?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/@codemirror%2fview/6.26.0/6.26.3?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/@codemirror%2fview/6.26.0/6.26.3?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
| [pnpm](https://pnpm.io) ([source](https://togithub.com/pnpm/pnpm)) |
packageManager | patch | [`9.0.4` ->
`9.0.6`](https://renovatebot.com/diffs/npm/pnpm/9.0.4/9.0.6) |
[![age](https://developer.mend.io/api/mc/badges/age/npm/pnpm/9.0.6?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/pnpm/9.0.6?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/pnpm/9.0.4/9.0.6?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/pnpm/9.0.4/9.0.6?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
| [vite](https://vitejs.dev)
([source](https://togithub.com/vitejs/vite/tree/HEAD/packages/vite)) |
devDependencies | patch | [`5.2.6` ->
`5.2.11`](https://renovatebot.com/diffs/npm/vite/5.2.6/5.2.11) |
[![age](https://developer.mend.io/api/mc/badges/age/npm/vite/5.2.11?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/vite/5.2.11?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/vite/5.2.6/5.2.11?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/vite/5.2.6/5.2.11?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|

🔧 This Pull Request updates lock files to use the latest dependency
versions.

---

### Release Notes

<details>
<summary>codemirror/autocomplete
(@&#8203;codemirror/autocomplete)</summary>

###
[`v6.16.0`](https://togithub.com/codemirror/autocomplete/blob/HEAD/CHANGELOG.md#6160-2024-04-12)

[Compare
Source](https://togithub.com/codemirror/autocomplete/compare/6.15.0...6.16.0)

##### New features

The new `activateOnCompletion` option allows autocompletion to be
configured to chain completion activation for some types of completions.

</details>

<details>
<summary>codemirror/commands (@&#8203;codemirror/commands)</summary>

###
[`v6.5.0`](https://togithub.com/codemirror/commands/blob/HEAD/CHANGELOG.md#650-2024-04-19)

[Compare
Source](https://togithub.com/codemirror/commands/compare/6.4.0...6.5.0)

##### New features

The `insertNewlineKeepIndent` command inserts a newline along with the
same indentation as the line before.

###
[`v6.4.0`](https://togithub.com/codemirror/commands/blob/HEAD/CHANGELOG.md#640-2024-04-17)

[Compare
Source](https://togithub.com/codemirror/commands/compare/6.3.3...6.4.0)

##### Bug fixes

Fix an issue where `deleteLine` sometimes leaves the cursor on the wrong
line.

##### New features

The new `deleteCharBackwardStrict` command just deletes a character,
without further smart behavior around indentation.

</details>

<details>
<summary>codemirror/lint (@&#8203;codemirror/lint)</summary>

###
[`v6.7.0`](https://togithub.com/codemirror/lint/blob/HEAD/CHANGELOG.md#670-2024-04-30)

[Compare
Source](https://togithub.com/codemirror/lint/compare/6.6.0...6.7.0)

##### New features

The `renderMessage` function is now called with the editor view as first
argument.

###
[`v6.6.0`](https://togithub.com/codemirror/lint/blob/HEAD/CHANGELOG.md#660-2024-04-29)

[Compare
Source](https://togithub.com/codemirror/lint/compare/6.5.0...6.6.0)

##### New features

The new `hideOn` configuration option can be used to control in what
circumstances lint tooltips get hidden by state changes.

</details>

<details>
<summary>codemirror/view (@&#8203;codemirror/view)</summary>

###
[`v6.26.3`](https://togithub.com/codemirror/view/blob/HEAD/CHANGELOG.md#6263-2024-04-12)

[Compare
Source](https://togithub.com/codemirror/view/compare/6.26.2...6.26.3)

##### Bug fixes

Fix an issue where dispatching an update to an editor before it measured
itself for the first time could cause the scroll position to incorrectly
move.

Fix a crash when multiple tooltips with arrows are shown.

###
[`v6.26.2`](https://togithub.com/codemirror/view/blob/HEAD/CHANGELOG.md#6262-2024-04-09)

[Compare
Source](https://togithub.com/codemirror/view/compare/6.26.1...6.26.2)

##### Bug fixes

Improve behavior of `scrollPastEnd` in a scaled editor.

When available, use `Selection.getComposedRanges` on Safari to find the
selection inside a shadow DOM.

Remove the workaround that avoided inappropriate styling on composed
text after a decoration again, since it breaks the stock Android virtual
keyboard.

###
[`v6.26.1`](https://togithub.com/codemirror/view/blob/HEAD/CHANGELOG.md#6261-2024-03-28)

[Compare
Source](https://togithub.com/codemirror/view/compare/6.26.0...6.26.1)

##### Bug fixes

Fix the editor getting stuck in composition when Safari fails to fire a
compositionend event for a dead key composition.

Fix an issue where, with IME systems that kept the cursor at the start
of the composed text, the editor misidentified the target node and
disrupted composition.

Fix a bug where in a line-wrapped editor, with some content, the initial
scroll position would be off from the top of the document.

</details>

<details>
<summary>pnpm/pnpm (pnpm)</summary>

### [`v9.0.6`](https://togithub.com/pnpm/pnpm/compare/v9.0.5...v9.0.6)

[Compare Source](https://togithub.com/pnpm/pnpm/compare/v9.0.5...v9.0.6)

### [`v9.0.5`](https://togithub.com/pnpm/pnpm/compare/v9.0.4...v9.0.5)

[Compare Source](https://togithub.com/pnpm/pnpm/compare/v9.0.4...v9.0.5)

</details>

<details>
<summary>vitejs/vite (vite)</summary>

###
[`v5.2.11`](https://togithub.com/vitejs/vite/blob/HEAD/packages/vite/CHANGELOG.md#small5211-2024-05-02-small)

[Compare
Source](https://togithub.com/vitejs/vite/compare/v5.2.10...v5.2.11)

- feat: improve dynamic import variable failure error message
([#&#8203;16519](https://togithub.com/vitejs/vite/issues/16519))
([f8feeea](https://togithub.com/vitejs/vite/commit/f8feeea)), closes
[#&#8203;16519](https://togithub.com/vitejs/vite/issues/16519)
- fix: dynamic-import-vars plugin normalize path issue
([#&#8203;16518](https://togithub.com/vitejs/vite/issues/16518))
([f71ba5b](https://togithub.com/vitejs/vite/commit/f71ba5b)), closes
[#&#8203;16518](https://togithub.com/vitejs/vite/issues/16518)
- fix: scripts and styles were missing from built HTML on Windows
([#&#8203;16421](https://togithub.com/vitejs/vite/issues/16421))
([0e93f58](https://togithub.com/vitejs/vite/commit/0e93f58)), closes
[#&#8203;16421](https://togithub.com/vitejs/vite/issues/16421)
- fix(deps): update all non-major dependencies
([#&#8203;16488](https://togithub.com/vitejs/vite/issues/16488))
([2d50be2](https://togithub.com/vitejs/vite/commit/2d50be2)), closes
[#&#8203;16488](https://togithub.com/vitejs/vite/issues/16488)
- fix(deps): update all non-major dependencies
([#&#8203;16549](https://togithub.com/vitejs/vite/issues/16549))
([2d6a13b](https://togithub.com/vitejs/vite/commit/2d6a13b)), closes
[#&#8203;16549](https://togithub.com/vitejs/vite/issues/16549)
- fix(dev): watch publicDir explicitly to include it outside the root
([#&#8203;16502](https://togithub.com/vitejs/vite/issues/16502))
([4d83eb5](https://togithub.com/vitejs/vite/commit/4d83eb5)), closes
[#&#8203;16502](https://togithub.com/vitejs/vite/issues/16502)
- fix(preload): skip preload for non-static urls
([#&#8203;16556](https://togithub.com/vitejs/vite/issues/16556))
([bb79c9b](https://togithub.com/vitejs/vite/commit/bb79c9b)), closes
[#&#8203;16556](https://togithub.com/vitejs/vite/issues/16556)
- fix(ssr): handle class declaration and expression name scoping
([#&#8203;16569](https://togithub.com/vitejs/vite/issues/16569))
([c071eb3](https://togithub.com/vitejs/vite/commit/c071eb3)), closes
[#&#8203;16569](https://togithub.com/vitejs/vite/issues/16569)
- fix(ssr): handle function expression name scoping
([#&#8203;16563](https://togithub.com/vitejs/vite/issues/16563))
([02db947](https://togithub.com/vitejs/vite/commit/02db947)), closes
[#&#8203;16563](https://togithub.com/vitejs/vite/issues/16563)

###
[`v5.2.10`](https://togithub.com/vitejs/vite/blob/HEAD/packages/vite/CHANGELOG.md#small5210-2024-04-20-small)

[Compare
Source](https://togithub.com/vitejs/vite/compare/v5.2.9...v5.2.10)

- revert: perf: use workspace root for fs cache
([#&#8203;15712](https://togithub.com/vitejs/vite/issues/15712))
([#&#8203;16476](https://togithub.com/vitejs/vite/issues/16476))
([77e7359](https://togithub.com/vitejs/vite/commit/77e7359)), closes
[#&#8203;15712](https://togithub.com/vitejs/vite/issues/15712)
[#&#8203;16476](https://togithub.com/vitejs/vite/issues/16476)
- fix: add base to virtual html
([#&#8203;16442](https://togithub.com/vitejs/vite/issues/16442))
([721f94d](https://togithub.com/vitejs/vite/commit/721f94d)), closes
[#&#8203;16442](https://togithub.com/vitejs/vite/issues/16442)
- fix: adjust esm syntax judgment logic
([#&#8203;16436](https://togithub.com/vitejs/vite/issues/16436))
([af72eab](https://togithub.com/vitejs/vite/commit/af72eab)), closes
[#&#8203;16436](https://togithub.com/vitejs/vite/issues/16436)
- fix: don't add outDirs to watch.ignored if emptyOutDir is false
([#&#8203;16453](https://togithub.com/vitejs/vite/issues/16453))
([6a127d6](https://togithub.com/vitejs/vite/commit/6a127d6)), closes
[#&#8203;16453](https://togithub.com/vitejs/vite/issues/16453)
- fix(cspNonce): don't overwrite existing nonce values
([#&#8203;16415](https://togithub.com/vitejs/vite/issues/16415))
([b872635](https://togithub.com/vitejs/vite/commit/b872635)), closes
[#&#8203;16415](https://togithub.com/vitejs/vite/issues/16415)
- feat: show warning if root is in build.outDir
([#&#8203;16454](https://togithub.com/vitejs/vite/issues/16454))
([11444dc](https://togithub.com/vitejs/vite/commit/11444dc)), closes
[#&#8203;16454](https://togithub.com/vitejs/vite/issues/16454)
- feat: write cspNonce to style tags
([#&#8203;16419](https://togithub.com/vitejs/vite/issues/16419))
([8e54bbd](https://togithub.com/vitejs/vite/commit/8e54bbd)), closes
[#&#8203;16419](https://togithub.com/vitejs/vite/issues/16419)
- chore(deps): update dependency eslint-plugin-n to v17
([#&#8203;16381](https://togithub.com/vitejs/vite/issues/16381))
([6cccef7](https://togithub.com/vitejs/vite/commit/6cccef7)), closes
[#&#8203;16381](https://togithub.com/vitejs/vite/issues/16381)

###
[`v5.2.9`](https://togithub.com/vitejs/vite/blob/HEAD/packages/vite/CHANGELOG.md#small529-2024-04-15-small)

[Compare
Source](https://togithub.com/vitejs/vite/compare/v5.2.8...v5.2.9)

- fix: `fsp.rm` removing files does not take effect
([#&#8203;16032](https://togithub.com/vitejs/vite/issues/16032))
([b05c405](https://togithub.com/vitejs/vite/commit/b05c405)), closes
[#&#8203;16032](https://togithub.com/vitejs/vite/issues/16032)
- fix: fix accumulated stacks in error overlay
([#&#8203;16393](https://togithub.com/vitejs/vite/issues/16393))
([102c2fd](https://togithub.com/vitejs/vite/commit/102c2fd)), closes
[#&#8203;16393](https://togithub.com/vitejs/vite/issues/16393)
- fix(deps): update all non-major dependencies
([#&#8203;16376](https://togithub.com/vitejs/vite/issues/16376))
([58a2938](https://togithub.com/vitejs/vite/commit/58a2938)), closes
[#&#8203;16376](https://togithub.com/vitejs/vite/issues/16376)
- chore: update region comment
([#&#8203;16380](https://togithub.com/vitejs/vite/issues/16380))
([77562c3](https://togithub.com/vitejs/vite/commit/77562c3)), closes
[#&#8203;16380](https://togithub.com/vitejs/vite/issues/16380)
- perf: reduce size of injected \__vite\_\_mapDeps code
([#&#8203;16184](https://togithub.com/vitejs/vite/issues/16184))
([c0ec6be](https://togithub.com/vitejs/vite/commit/c0ec6be)), closes
[#&#8203;16184](https://togithub.com/vitejs/vite/issues/16184)
- perf(css): only replace empty chunk if imported
([#&#8203;16349](https://togithub.com/vitejs/vite/issues/16349))
([e2658ad](https://togithub.com/vitejs/vite/commit/e2658ad)), closes
[#&#8203;16349](https://togithub.com/vitejs/vite/issues/16349)

###
[`v5.2.8`](https://togithub.com/vitejs/vite/blob/HEAD/packages/vite/CHANGELOG.md#small528-2024-04-03-small)

[Compare
Source](https://togithub.com/vitejs/vite/compare/v5.2.7...v5.2.8)

- fix: csp nonce injection when no closing tag
([#&#8203;16281](https://togithub.com/vitejs/vite/issues/16281))
([#&#8203;16282](https://togithub.com/vitejs/vite/issues/16282))
([3c85c6b](https://togithub.com/vitejs/vite/commit/3c85c6b)), closes
[#&#8203;16281](https://togithub.com/vitejs/vite/issues/16281)
[#&#8203;16282](https://togithub.com/vitejs/vite/issues/16282)
- fix: do not access document in `/@&#8203;vite/client` when not defined
([#&#8203;16318](https://togithub.com/vitejs/vite/issues/16318))
([646319c](https://togithub.com/vitejs/vite/commit/646319c)), closes
[#&#8203;16318](https://togithub.com/vitejs/vite/issues/16318)
- fix: fix sourcemap when using object as `define` value
([#&#8203;15805](https://togithub.com/vitejs/vite/issues/15805))
([445c4f2](https://togithub.com/vitejs/vite/commit/445c4f2)), closes
[#&#8203;15805](https://togithub.com/vitejs/vite/issues/15805)
- fix(css): unknown file error happened with lightningcss
([#&#8203;16306](https://togithub.com/vitejs/vite/issues/16306))
([01af308](https://togithub.com/vitejs/vite/commit/01af308)), closes
[#&#8203;16306](https://togithub.com/vitejs/vite/issues/16306)
- fix(hmr): multiple updates happened when invalidate is called while
multiple tabs open
([#&#8203;16307](https://togithub.com/vitejs/vite/issues/16307))
([21cc10b](https://togithub.com/vitejs/vite/commit/21cc10b)), closes
[#&#8203;16307](https://togithub.com/vitejs/vite/issues/16307)
- fix(scanner): duplicate modules for same id if glob is used in
html-like types
([#&#8203;16305](https://togithub.com/vitejs/vite/issues/16305))
([eca68fa](https://togithub.com/vitejs/vite/commit/eca68fa)), closes
[#&#8203;16305](https://togithub.com/vitejs/vite/issues/16305)
- chore(deps): update all non-major dependencies
([#&#8203;16325](https://togithub.com/vitejs/vite/issues/16325))
([a78e265](https://togithub.com/vitejs/vite/commit/a78e265)), closes
[#&#8203;16325](https://togithub.com/vitejs/vite/issues/16325)
- refactor: use types from sass instead of
[@&#8203;types/sass](https://togithub.com/types/sass)
([#&#8203;16340](https://togithub.com/vitejs/vite/issues/16340))
([4581e83](https://togithub.com/vitejs/vite/commit/4581e83)), closes
[#&#8203;16340](https://togithub.com/vitejs/vite/issues/16340)

###
[`v5.2.7`](https://togithub.com/vitejs/vite/blob/HEAD/packages/vite/CHANGELOG.md#small527-2024-03-29-small)

[Compare
Source](https://togithub.com/vitejs/vite/compare/v5.2.6...v5.2.7)

- chore: deprecate splitVendorChunkPlugin
([#&#8203;16274](https://togithub.com/vitejs/vite/issues/16274))
([45a06da](https://togithub.com/vitejs/vite/commit/45a06da)), closes
[#&#8203;16274](https://togithub.com/vitejs/vite/issues/16274)
- fix: skip injecting `__vite__mapDeps` when it's not used
([#&#8203;16271](https://togithub.com/vitejs/vite/issues/16271))
([890538a](https://togithub.com/vitejs/vite/commit/890538a)), closes
[#&#8203;16271](https://togithub.com/vitejs/vite/issues/16271)
- fix(deps): update all non-major dependencies
([#&#8203;16258](https://togithub.com/vitejs/vite/issues/16258))
([7caef42](https://togithub.com/vitejs/vite/commit/7caef42)), closes
[#&#8203;16258](https://togithub.com/vitejs/vite/issues/16258)
- fix(hmr): don't mutate module graph when collecting modules
([#&#8203;16302](https://togithub.com/vitejs/vite/issues/16302))
([dfffea1](https://togithub.com/vitejs/vite/commit/dfffea1)), closes
[#&#8203;16302](https://togithub.com/vitejs/vite/issues/16302)
- fix(hmr): trigger hmr for missing file import errored module after
file creation
([#&#8203;16303](https://togithub.com/vitejs/vite/issues/16303))
([ffedc06](https://togithub.com/vitejs/vite/commit/ffedc06)), closes
[#&#8203;16303](https://togithub.com/vitejs/vite/issues/16303)
- fix(sourcemap): don't warn even if the sourcesContent is an empty
string ([#&#8203;16273](https://togithub.com/vitejs/vite/issues/16273))
([24e376a](https://togithub.com/vitejs/vite/commit/24e376a)), closes
[#&#8203;16273](https://togithub.com/vitejs/vite/issues/16273)
- feat(hmr): reload when HTML file is created/deleted
([#&#8203;16288](https://togithub.com/vitejs/vite/issues/16288))
([1f53796](https://togithub.com/vitejs/vite/commit/1f53796)), closes
[#&#8203;16288](https://togithub.com/vitejs/vite/issues/16288)

</details>

---

### Configuration

📅 **Schedule**: Branch creation - "before 4am on monday" in timezone
Asia/Shanghai, Automerge - At any time (no schedule defined).

🚦 **Automerge**: Disabled by config. Please merge this manually once you
are satisfied.

♻ **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 has been generated by [Mend
Renovate](https://www.mend.io/free-developer-tools/renovate/). View
repository job log
[here](https://developer.mend.io/github/oxc-project/oxc).

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNy4zNDAuMTAiLCJ1cGRhdGVkSW5WZXIiOiIzNy4zNDAuMTAiLCJ0YXJnZXRCcmFuY2giOiJtYWluIiwibGFiZWxzIjpbXX0=-->

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-05-06 09:35:15 +08:00
renovate[bot]
46b4f4fd31
chore(deps): lock file maintenance rust crates (#3164)
[![Mend
Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com)

This PR contains the following updates:

| Package | Type | Update | Change |
|---|---|---|---|
|  |  | lockFileMaintenance | All locks refreshed |
| [base64](https://togithub.com/marshallpierce/rust-base64) |
workspace.dependencies | patch | `0.22.0` -> `0.22.1` |
| [bpaf](https://togithub.com/pacak/bpaf) | workspace.dependencies |
patch | `0.9.11` -> `0.9.12` |
| [flate2](https://togithub.com/rust-lang/flate2-rs) |
workspace.dependencies | patch | `1.0.29` -> `1.0.30` |
| [num-traits](https://togithub.com/rust-num/num-traits) |
workspace.dependencies | patch | `0.2.18` -> `0.2.19` |
| [serde](https://serde.rs)
([source](https://togithub.com/serde-rs/serde)) | workspace.dependencies
| patch | `1.0.199` -> `1.0.200` |

🔧 This Pull Request updates lock files to use the latest dependency
versions.

---

### Release Notes

<details>
<summary>marshallpierce/rust-base64 (base64)</summary>

###
[`v0.22.1`](https://togithub.com/marshallpierce/rust-base64/blob/HEAD/RELEASE-NOTES.md#0221)

[Compare
Source](https://togithub.com/marshallpierce/rust-base64/compare/v0.22.0...v0.22.1)

-   Correct the symbols used for the predefined `alphabet::BIN_HEX`.

</details>

<details>
<summary>pacak/bpaf (bpaf)</summary>

###
[`v0.9.12`](https://togithub.com/pacak/bpaf/blob/HEAD/Changelog.md#bpaf-0912---2024-04-29)

[Compare
Source](https://togithub.com/pacak/bpaf/compare/v0.9.11...v0.9.12)

-   better error messages

</details>

<details>
<summary>rust-lang/flate2-rs (flate2)</summary>

###
[`v1.0.30`](https://togithub.com/rust-lang/flate2-rs/releases/tag/1.0.30):
- docs.rs pages should build again

[Compare
Source](https://togithub.com/rust-lang/flate2-rs/compare/1.0.29...1.0.30)

#### What's Changed

- Fix typos by [@&#8203;striezel](https://togithub.com/striezel) in
[https://github.com/rust-lang/flate2-rs/pull/406](https://togithub.com/rust-lang/flate2-rs/pull/406)
- Update actions/checkout in GitHub Actions workflows to v4 by
[@&#8203;striezel](https://togithub.com/striezel) in
[https://github.com/rust-lang/flate2-rs/pull/407](https://togithub.com/rust-lang/flate2-rs/pull/407)
- fix CI - `--all-features` wasn't tested and didn't work with arrival
of `zlib-rs` by [@&#8203;Byron](https://togithub.com/Byron) in
[https://github.com/rust-lang/flate2-rs/pull/405](https://togithub.com/rust-lang/flate2-rs/pull/405)

#### New Contributors

- [@&#8203;striezel](https://togithub.com/striezel) made their first
contribution in
[https://github.com/rust-lang/flate2-rs/pull/406](https://togithub.com/rust-lang/flate2-rs/pull/406)

**Full Changelog**:
https://github.com/rust-lang/flate2-rs/compare/1.0.29...1.0.30

</details>

<details>
<summary>rust-num/num-traits (num-traits)</summary>

###
[`v0.2.19`](https://togithub.com/rust-num/num-traits/blob/HEAD/RELEASES.md#Release-0219-2024-05-03)

[Compare
Source](https://togithub.com/rust-num/num-traits/compare/num-traits-0.2.18...num-traits-0.2.19)

-   [Upgrade to 2021 edition, **MSRV 1.60**][310]
-   [The new `Float::clamp` limits values by minimum and maximum][305]

**Contributors**: [@&#8203;cuviper](https://togithub.com/cuviper),
[@&#8203;michaelciraci](https://togithub.com/michaelciraci)

[305]: https://togithub.com/rust-num/num-traits/pull/305

[310]: https://togithub.com/rust-num/num-traits/pull/310

</details>

<details>
<summary>serde-rs/serde (serde)</summary>

###
[`v1.0.200`](https://togithub.com/serde-rs/serde/releases/tag/v1.0.200)

[Compare
Source](https://togithub.com/serde-rs/serde/compare/v1.0.199...v1.0.200)

- Fix formatting of "invalid type" and "invalid value" deserialization
error messages containing NaN or infinite floats
([#&#8203;2733](https://togithub.com/serde-rs/serde/issues/2733), thanks
[@&#8203;jamessan](https://togithub.com/jamessan))

</details>

---

### Configuration

📅 **Schedule**: Branch creation - "before 4am on monday" in timezone
Asia/Shanghai, Automerge - At any time (no schedule defined).

🚦 **Automerge**: Disabled by config. Please merge this manually once you
are satisfied.

♻ **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 has been generated by [Mend
Renovate](https://www.mend.io/free-developer-tools/renovate/). View
repository job log
[here](https://developer.mend.io/github/oxc-project/oxc).

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNy4zNDAuMTAiLCJ1cGRhdGVkSW5WZXIiOiIzNy4zNDAuMTAiLCJ0YXJnZXRCcmFuY2giOiJtYWluIiwibGFiZWxzIjpbXX0=-->

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-05-06 09:33:57 +08:00