Commit graph

3714 commits

Author SHA1 Message Date
overlookmotel
14c00a5c1d improve(transformer): validate JSX pragma options (#3536)
Validate React JSX `pragma` and `pragma_frag` options. Don't allow:

* empty string
* `foo.bar.qux`
* `foo.`
* `.bar`
* `.`

If options provided are invalid, raise an error and use the defaults.

Also fast path the defaults.
2024-06-06 03:19:34 +00:00
Don Isaac
6506d086b3
feat(linter): add fixer for no-single-promise-in-promise-methods (#3531)
Fixes look like this:

```rs
let fix = vec![
    ("Promise.all([null]).then()", "Promise.resolve(null).then()", None),
    ("let x = await Promise.all([foo()])", "let x = await foo()", None),
    ("let x = await (Promise.all([foo()]))", "let x = await (foo())", None),
];
```

---------

Co-authored-by: Boshen <boshenc@gmail.com>
2024-06-06 01:40:03 +08:00
Boshen
0674604d7a
chore: regenerate changelog 2024-06-06 01:29:38 +08:00
Don Isaac
1d3c0d7879
docs(span): add doc comments to oxc_span::Span (#3543) 2024-06-06 01:05:34 +08:00
Boshen
dd42f279f7
chore: change website url to https://oxc.rs 2024-06-05 22:05:08 +08:00
overlookmotel
9f467b8479
perf(transformer): avoid fragment update where possible (#3535)
Due to needing to align output with Babel, React JSX transform has to
perform imports for fragments after dealing with the fragments'
children.

Transform generates a dummy identifier initially, and then generates a
UID later on and replaces the dummy.

The PR avoids that process 2-stage process unless we have to. If the UID
was already generated for a previous fragment, we can just use it
straight away.
2024-06-05 19:35:07 +08:00
overlookmotel
ac394f0ec3
perf(transformer): JSX parse pragma only once (#3534)
Currently React JSX transform in classic mode with a custom
`options.pragma` value parses `options.pragma` on every JSX node, and
inserts new `Atom`s into arena every time.

This PR makes it parse `options.pragma` only once at the start of the
transform pass, and re-use the same `Atom`s for each JSX node.
2024-06-05 18:42:43 +08:00
Dunqing
6978269be0 refactor(transformer/typescript): replace reference collector with symbols references (#3533)
https://github.com/oxc-project/oxc/pull/3524 handled the references correctly, now we can remove the reference collector.
2024-06-05 09:02:51 +00:00
Dunqing
ee9a215a21 feat(transformer/typescript): handle namespace directive correctly (#3532) 2024-06-05 09:02:49 +00:00
Boshen
30ba828bc3
Update README.md 2024-06-05 16:35:38 +08:00
Dunqing
affb2c864e
fix(codegen): print indentation before directive (#3512) 2024-06-05 16:32:12 +08:00
overlookmotel
c00598b9d4
fix(transformer): JSX set reference_id on refs to imports (#3524)
Set `reference_id` for references to new imported bindings. e.g. `_jsx`
in `_jsx(Foo, {})` where JSX transform has inserted `import {jsx as
_jsx} from "react/jsx-runtime";`.
2024-06-05 10:57:05 +08:00
IWANABETHATGUY
9fe0863479
chore(oxc_codegen): Pass trivias reference instead of ownership in CommentGenRelated (#3529)
1. Avoid clone or move the ownership when generate comment with `oxc`
2024-06-04 23:21:06 +08:00
Boshen
19bc7eb20f
ci: fix mac build in release_napi_parser 2024-06-04 18:40:24 +08:00
Boshen
119d87510d
ci: fix release crate push tag permission 2024-06-04 18:22:22 +08:00
Boshen
20f1754f57
chore: update Cargo.lock 2024-06-04 18:05:57 +08:00
github-actions[bot]
d48e62aca4
Publish crates v0.13.3 (#3527)
Automated Release

Co-authored-by: Boshen <Boshen@users.noreply.github.com>
2024-06-04 18:02:40 +08:00
Dunqing
ddac2a0e12
refactor(codegen): reduce allocation for print_unquoted_str (#3525) 2024-06-04 16:46:56 +08:00
Boshen
9706c3b533
ci: adjust publish workflow 2024-06-04 16:40:15 +08:00
Boshen
9a0d1ad165
chore: format top level toml files 2024-06-04 16:05:08 +08:00
Boshen
ebd683bb4b
chore: add oxc_release.toml 2024-06-04 16:05:08 +08:00
overlookmotel
591c54bd31 fix(transformer): JSX set symbol_id on imports (#3523)
JSX transform set `symbol_id` on imported bindings. e.g. `_jsx` in `import {jsx as _jsx} from "react/jsx-runtime";`.

Setting matching `reference_id` on `IdentifierReference`s referring to the imports is not yet implemented.
2024-06-04 03:02:44 +00:00
overlookmotel
91519d9e67 perf(transformer): React JSX reduce allocations (#3522)
React JSX transform was creating `CompactStr`s (which can involve heap allocations) and then converting them back to `Atom`s to insert into AST.

This PR removes the intermediate `CompactStr`s and allocates strings directly into the arena without intermediate heap allocations.
2024-06-04 03:02:42 +00:00
overlookmotel
f3a755c3dc perf(transformer): React JSX reuse same Atoms (#3521)
Previously new `Atom`s were generated and allocated into arena each time e.g. `_React` is used. This PR changes that to allocate each string into arena once only, and then re-use that same `Atom` over and over.
2024-06-04 03:02:39 +00:00
overlookmotel
7bbd3da0f2 refactor(traverse): generate_uid return SymbolId (#3520)
Preparatory step for setting correct `SymbolId` for identifiers added to AST in transformer.
2024-06-04 03:02:37 +00:00
Boshen
a5276c3be2
chore: git cliff configure bump strategy 2024-06-03 22:18:51 +08:00
Boshen
4a59a2b5ae
chore(ISSUE_TEMPLATE): remove the assignees 2024-06-03 22:18:51 +08:00
overlookmotel
837776e1ab fix(transformer): TS namespace transform do not track var decl names (#3501)
Don't track variable declaration or import binding names in TS namespace transform.

Babel does, but it appears to be wrong. It's illegal to have a `var`/`let`/`const` declaration or import in same scope as a TS namespace declaration with same binding.

https://www.typescriptlang.org/play/?#code/JYWwDg9gTgLgBAQTgMyhEcDkUCmBDAYxkwG4AoAOzxBwGcxCdE4BvAXzLIIgtvgCE4AXjgBGclRr1GcQSzJxFcADY54AD3Icyq+AGFhYidToMCTA-KUq1cTWW0A3PFDgARQ+Monp596wUlXTstMiA
2024-06-03 12:35:57 +00:00
overlookmotel
8d2beff2fe fix(transformer): use correct scope for TS namespaces (#3489)
Re-use scope ID from `TSModuleDeclaration` for the scope of the function which replaces it in transformed output.

This should mean the scope tree is left in correct state after the transform.

NB: Still incomplete - we also need to transfer the binding ID from `X` in `namespace X {}` to `let X` in output.
2024-06-03 12:31:39 +00:00
overlookmotel
8e4f33557d
fix(transformer): output empty file for TS definition files (#3500)
As discussed in
https://github.com/oxc-project/oxc/pull/3489#issuecomment-2143482458,
transformer should output an empty file for TS definition files.
2024-06-03 20:25:02 +08:00
Dunqing
98c90291b0 fix(codegen): should be double quote for jsx attribute value (#3516) 2024-06-03 10:05:13 +00:00
Dunqing
d4588d7cac chore(codegen): print typescript code for typescript files (#3515)
We should not print typescript code as javascript code. Forcing to print as JavaScript code may result in syntax errors. If we truly want javascript code, we can use the `oxc_transformer`.
2024-06-03 10:05:08 +00:00
Dunqing
d8063b6210
fix(codegen): wrong escape string (#3514)
close: #3492
2024-06-03 15:48:01 +08:00
github-actions[bot]
079d42f68b
Release crates v0.13.2 (#3513)
Co-authored-by: Boshen <Boshen@users.noreply.github.com>
2024-06-03 12:40:53 +08:00
Wang Wenzhe
6b39654c80
feat(linter/tree-shaking): support options (#3504) 2024-06-03 11:28:48 +08:00
renovate[bot]
568c9c54c4
chore(deps): lock file maintenance website npm packages (#3511)
[![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 | patch | [`6.16.0` ->
`6.16.2`](https://renovatebot.com/diffs/npm/@codemirror%2fautocomplete/6.16.0/6.16.2)
|
[![age](https://developer.mend.io/api/mc/badges/age/npm/@codemirror%2fautocomplete/6.16.2?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/@codemirror%2fautocomplete/6.16.2?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/@codemirror%2fautocomplete/6.16.0/6.16.2?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/@codemirror%2fautocomplete/6.16.0/6.16.2?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
| [pnpm](https://pnpm.io) ([source](https://togithub.com/pnpm/pnpm)) |
packageManager | patch | [`9.1.2` ->
`9.1.4`](https://renovatebot.com/diffs/npm/pnpm/9.1.2/9.1.4) |
[![age](https://developer.mend.io/api/mc/badges/age/npm/pnpm/9.1.4?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/pnpm/9.1.4?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/pnpm/9.1.2/9.1.4?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/pnpm/9.1.2/9.1.4?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.11` ->
`5.2.12`](https://renovatebot.com/diffs/npm/vite/5.2.11/5.2.12) |
[![age](https://developer.mend.io/api/mc/badges/age/npm/vite/5.2.12?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/vite/5.2.12?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/vite/5.2.11/5.2.12?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/vite/5.2.11/5.2.12?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.2`](https://togithub.com/codemirror/autocomplete/blob/HEAD/CHANGELOG.md#6162-2024-05-31)

[Compare
Source](https://togithub.com/codemirror/autocomplete/compare/6.16.1...6.16.2)

##### Bug fixes

Allow backslash-escaped closing braces inside snippet field
names/content.

###
[`v6.16.1`](https://togithub.com/codemirror/autocomplete/blob/HEAD/CHANGELOG.md#6161-2024-05-29)

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

##### Bug fixes

Fix a bug where multiple backslashes before a brace in a snippet were
all removed.

</details>

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

### [`v9.1.4`](https://togithub.com/pnpm/pnpm/compare/v9.1.3...v9.1.4)

[Compare Source](https://togithub.com/pnpm/pnpm/compare/v9.1.3...v9.1.4)

### [`v9.1.3`](https://togithub.com/pnpm/pnpm/compare/v9.1.2...v9.1.3)

[Compare Source](https://togithub.com/pnpm/pnpm/compare/v9.1.2...v9.1.3)

</details>

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

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

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

- chore: move to eslint flat config
([#&#8203;16743](https://togithub.com/vitejs/vite/issues/16743))
([8f16765](https://togithub.com/vitejs/vite/commit/8f16765)), closes
[#&#8203;16743](https://togithub.com/vitejs/vite/issues/16743)
- chore(deps): remove unused deps
([#&#8203;17329](https://togithub.com/vitejs/vite/issues/17329))
([5a45745](https://togithub.com/vitejs/vite/commit/5a45745)), closes
[#&#8203;17329](https://togithub.com/vitejs/vite/issues/17329)
- chore(deps): update all non-major dependencies
([#&#8203;16722](https://togithub.com/vitejs/vite/issues/16722))
([b45922a](https://togithub.com/vitejs/vite/commit/b45922a)), closes
[#&#8203;16722](https://togithub.com/vitejs/vite/issues/16722)
- fix: mention `build.rollupOptions.output.manualChunks` instead of
`build.rollupOutput.manualChunks`
([89378c0](https://togithub.com/vitejs/vite/commit/89378c0)), closes
[#&#8203;16721](https://togithub.com/vitejs/vite/issues/16721)
- fix(build): make SystemJSWrapRE match lazy
([#&#8203;16633](https://togithub.com/vitejs/vite/issues/16633))
([6583ad2](https://togithub.com/vitejs/vite/commit/6583ad2)), closes
[#&#8203;16633](https://togithub.com/vitejs/vite/issues/16633)
- fix(css): avoid generating empty JS files when JS files becomes empty
but has CSS files imported
([#&#8203;1](https://togithub.com/vitejs/vite/issues/1)
([95fe5a7](https://togithub.com/vitejs/vite/commit/95fe5a7)), closes
[#&#8203;16078](https://togithub.com/vitejs/vite/issues/16078)
- fix(css): handle lightningcss compiled css in Deno
([#&#8203;17301](https://togithub.com/vitejs/vite/issues/17301))
([8e4e932](https://togithub.com/vitejs/vite/commit/8e4e932)), closes
[#&#8203;17301](https://togithub.com/vitejs/vite/issues/17301)
- fix(css): only use files the current bundle contains
([#&#8203;16684](https://togithub.com/vitejs/vite/issues/16684))
([15a6ebb](https://togithub.com/vitejs/vite/commit/15a6ebb)), closes
[#&#8203;16684](https://togithub.com/vitejs/vite/issues/16684)
- fix(css): page reload was not happening with .css?raw
([#&#8203;16455](https://togithub.com/vitejs/vite/issues/16455))
([8041846](https://togithub.com/vitejs/vite/commit/8041846)), closes
[#&#8203;16455](https://togithub.com/vitejs/vite/issues/16455)
- fix(deps): update all non-major dependencies
([#&#8203;16603](https://togithub.com/vitejs/vite/issues/16603))
([6711553](https://togithub.com/vitejs/vite/commit/6711553)), closes
[#&#8203;16603](https://togithub.com/vitejs/vite/issues/16603)
- fix(deps): update all non-major dependencies
([#&#8203;16660](https://togithub.com/vitejs/vite/issues/16660))
([bf2f014](https://togithub.com/vitejs/vite/commit/bf2f014)), closes
[#&#8203;16660](https://togithub.com/vitejs/vite/issues/16660)
- fix(deps): update all non-major dependencies
([#&#8203;17321](https://togithub.com/vitejs/vite/issues/17321))
([4a89766](https://togithub.com/vitejs/vite/commit/4a89766)), closes
[#&#8203;17321](https://togithub.com/vitejs/vite/issues/17321)
- fix(error-logging): rollup errors weren't displaying id and codeframe
([#&#8203;16540](https://togithub.com/vitejs/vite/issues/16540))
([22dc196](https://togithub.com/vitejs/vite/commit/22dc196)), closes
[#&#8203;16540](https://togithub.com/vitejs/vite/issues/16540)
- fix(hmr): normalize the path info
([#&#8203;14255](https://togithub.com/vitejs/vite/issues/14255))
([6a085d0](https://togithub.com/vitejs/vite/commit/6a085d0)), closes
[#&#8203;14255](https://togithub.com/vitejs/vite/issues/14255)
- fix(hmr): trigger page reload when calling invalidate on root module
([#&#8203;16636](https://togithub.com/vitejs/vite/issues/16636))
([2b61cc3](https://togithub.com/vitejs/vite/commit/2b61cc3)), closes
[#&#8203;16636](https://togithub.com/vitejs/vite/issues/16636)
- fix(logger): truncate log over 5000 characters long
([#&#8203;16581](https://togithub.com/vitejs/vite/issues/16581))
([b0b839a](https://togithub.com/vitejs/vite/commit/b0b839a)), closes
[#&#8203;16581](https://togithub.com/vitejs/vite/issues/16581)
- fix(optimizer): log dependencies added by plugins
([#&#8203;16729](https://togithub.com/vitejs/vite/issues/16729))
([f0fb987](https://togithub.com/vitejs/vite/commit/f0fb987)), closes
[#&#8203;16729](https://togithub.com/vitejs/vite/issues/16729)
- fix(sourcemap): improve sourcemap compatibility for vue2
([#&#8203;16594](https://togithub.com/vitejs/vite/issues/16594))
([913c040](https://togithub.com/vitejs/vite/commit/913c040)), closes
[#&#8203;16594](https://togithub.com/vitejs/vite/issues/16594)
- docs: correct proxy shorthand example
([#&#8203;15938](https://togithub.com/vitejs/vite/issues/15938))
([abf766e](https://togithub.com/vitejs/vite/commit/abf766e)), closes
[#&#8203;15938](https://togithub.com/vitejs/vite/issues/15938)
- docs: deprecate server.hot
([#&#8203;16741](https://togithub.com/vitejs/vite/issues/16741))
([e7d38ab](https://togithub.com/vitejs/vite/commit/e7d38ab)), closes
[#&#8203;16741](https://togithub.com/vitejs/vite/issues/16741)

</details>

---

### Configuration

📅 **Schedule**: Branch creation - "before 4am 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 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:eyJjcmVhdGVkSW5WZXIiOiIzNy4zNzcuOCIsInVwZGF0ZWRJblZlciI6IjM3LjM3Ny44IiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6W119-->

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-06-03 00:04:53 +00:00
renovate[bot]
fabe7d02ae
chore(deps): lock file maintenance vscode npm packages (#3510)
[![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 |  |  |  |  |
|
[@types/node](https://togithub.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/node)
([source](https://togithub.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node))
| devDependencies | minor | [`20.12.12` ->
`20.14.0`](https://renovatebot.com/diffs/npm/@types%2fnode/20.12.12/20.14.0)
|
[![age](https://developer.mend.io/api/mc/badges/age/npm/@types%2fnode/20.14.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/@types%2fnode/20.14.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/@types%2fnode/20.12.12/20.14.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/@types%2fnode/20.12.12/20.14.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
| [prettier](https://prettier.io)
([source](https://togithub.com/prettier/prettier)) | devDependencies |
minor | [`3.2.5` ->
`3.3.0`](https://renovatebot.com/diffs/npm/prettier/3.2.5/3.3.0) |
[![age](https://developer.mend.io/api/mc/badges/age/npm/prettier/3.3.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/prettier/3.3.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/prettier/3.2.5/3.3.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/prettier/3.2.5/3.3.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|

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

---

### Release Notes

<details>
<summary>prettier/prettier (prettier)</summary>

###
[`v3.3.0`](https://togithub.com/prettier/prettier/blob/HEAD/CHANGELOG.md#330)

[Compare
Source](https://togithub.com/prettier/prettier/compare/3.2.5...3.3.0)

[diff](https://togithub.com/prettier/prettier/compare/3.2.5...3.3.0)

🔗 [Release Notes](https://prettier.io/blog/2024/06/01/3.3.0.html)

</details>

---

### Configuration

📅 **Schedule**: Branch creation - "before 4am 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 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:eyJjcmVhdGVkSW5WZXIiOiIzNy4zNzcuOCIsInVwZGF0ZWRJblZlciI6IjM3LjM3Ny44IiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6W119-->

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-06-02 23:34:54 +00:00
renovate[bot]
dc0ccba397
chore(deps): lock file maintenance rust crates (#3509)
[![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 |
| [oxc_resolver](https://togithub.com/oxc-project/oxc-resolver) |
workspace.dependencies | minor | `1.7.0` -> `1.8.1` |
| [proc-macro2](https://togithub.com/dtolnay/proc-macro2) |
workspace.dependencies | patch | `1.0.84` -> `1.0.85` |
| [tokio](https://tokio.rs)
([source](https://togithub.com/tokio-rs/tokio)) | workspace.dependencies
| minor | `1.37.0` -> `1.38.0` |

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

---

### Release Notes

<details>
<summary>oxc-project/oxc-resolver (oxc_resolver)</summary>

###
[`v1.8.1`](https://togithub.com/oxc-project/oxc-resolver/blob/HEAD/CHANGELOG.md#181---2024-05-31)

[Compare
Source](https://togithub.com/oxc-project/oxc-resolver/compare/oxc_resolver-v1.8.0...oxc_resolver-v1.8.1)

##### Fixed

- alias value should try fragment as path
([#&#8203;172](https://togithub.com/oxc-project/oxc_resolver/pull/172))

###
[`v1.8.0`](https://togithub.com/oxc-project/oxc-resolver/blob/HEAD/CHANGELOG.md#180---2024-05-27)

[Compare
Source](https://togithub.com/oxc-project/oxc-resolver/compare/v1.7.0...oxc_resolver-v1.8.0)

##### Added

- \[**breaking**] remove the constraint on packages exports `default`
must be the last one
([#&#8203;171](https://togithub.com/oxc-project/oxc_resolver/pull/171))
- \[**breaking**] return `ResolveError:Builtin("node:{specifier}")` from
package imports and exports
([#&#8203;165](https://togithub.com/oxc-project/oxc_resolver/pull/165))

##### Fixed

- alias not found should return error
([#&#8203;168](https://togithub.com/oxc-project/oxc_resolver/pull/168))

##### Other

- add panic test for extensions without a leading dot
([#&#8203;150](https://togithub.com/oxc-project/oxc_resolver/pull/150))
- add test case for empty alias fields
([#&#8203;149](https://togithub.com/oxc-project/oxc_resolver/pull/149))

</details>

<details>
<summary>dtolnay/proc-macro2 (proc-macro2)</summary>

###
[`v1.0.85`](https://togithub.com/dtolnay/proc-macro2/releases/tag/1.0.85)

[Compare
Source](https://togithub.com/dtolnay/proc-macro2/compare/1.0.84...1.0.85)

- Mark some tests as only for 64-bit targets
([#&#8203;463](https://togithub.com/dtolnay/proc-macro2/issues/463))

</details>

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

###
[`v1.38.0`](https://togithub.com/tokio-rs/tokio/releases/tag/tokio-1.38.0):
Tokio v1.38.0

[Compare
Source](https://togithub.com/tokio-rs/tokio/compare/tokio-1.37.0...tokio-1.38.0)

This release marks the beginning of stabilization for runtime metrics.
It
stabilizes `RuntimeMetrics::worker_count`. Future releases will continue
to
stabilize more metrics.

##### Added

-   fs: add `File::create_new` ([#&#8203;6573])
-   io: add `copy_bidirectional_with_sizes` ([#&#8203;6500])
-   io: implement `AsyncBufRead` for `Join` ([#&#8203;6449])
-   net: add Apple visionOS support ([#&#8203;6465])
-   net: implement `Clone` for `NamedPipeInfo` ([#&#8203;6586])
-   net: support QNX OS ([#&#8203;6421])
-   sync: add `Notify::notify_last` ([#&#8203;6520])
-   sync: add `mpsc::Receiver::{capacity,max_capacity}` ([#&#8203;6511])
- sync: add `split` method to the semaphore permit ([#&#8203;6472],
[#&#8203;6478])
- task: add `tokio::task::join_set::Builder::spawn_blocking`
([#&#8203;6578])
- wasm: support rt-multi-thread with wasm32-wasi-preview1-threads
([#&#8203;6510])

##### Changed

- macros: make `#[tokio::test]` append `#[test]` at the end of the
attribute list ([#&#8203;6497])
-   metrics: fix `blocking_threads` count ([#&#8203;6551])
-   metrics: stabilize `RuntimeMetrics::worker_count` ([#&#8203;6556])
- runtime: move task out of the `lifo_slot` in `block_in_place`
([#&#8203;6596])
-   runtime: panic if `global_queue_interval` is zero ([#&#8203;6445])
- sync: always drop message in destructor for oneshot receiver
([#&#8203;6558])
-   sync: instrument `Semaphore` for task dumps ([#&#8203;6499])
- sync: use FIFO ordering when waking batches of wakers ([#&#8203;6521])
-   task: make `LocalKey::get` work with Clone types ([#&#8203;6433])
-   tests: update nix and mio-aio dev-dependencies ([#&#8203;6552])
-   time: clean up implementation ([#&#8203;6517])
-   time: lazily init timers on first poll ([#&#8203;6512])
-   time: remove the `true_when` field in `TimerShared` ([#&#8203;6563])
-   time: use sharding for timer implementation ([#&#8203;6534])

##### Fixed

- taskdump: allow building taskdump docs on non-unix machines
([#&#8203;6564])
-   time: check for overflow in `Interval::poll_tick` ([#&#8203;6487])
- sync: fix incorrect `is_empty` on mpsc block boundaries
([#&#8203;6603])

##### Documented

-   fs: rewrite file system docs ([#&#8203;6467])
-   io: fix `stdin` documentation ([#&#8203;6581])
- io: fix obsolete reference in `ReadHalf::unsplit()` documentation
([#&#8203;6498])
- macros: render more comprehensible documentation for `select!`
([#&#8203;6468])
-   net: add missing types to module docs ([#&#8203;6482])
-   net: fix misleading `NamedPipeServer` example ([#&#8203;6590])
- sync: add examples for `SemaphorePermit`, `OwnedSemaphorePermit`
([#&#8203;6477])
- sync: document that `Barrier::wait` is not cancel safe
([#&#8203;6494])
- sync: explain relation between `watch::Sender::{subscribe,closed}`
([#&#8203;6490])
- task: clarify that you can't abort `spawn_blocking` tasks
([#&#8203;6571])
-   task: fix a typo in doc of `LocalSet::run_until` ([#&#8203;6599])
- time: fix test-util requirement for pause and resume in docs
([#&#8203;6503])

[#&#8203;6421]: https://togithub.com/tokio-rs/tokio/pull/6421

[#&#8203;6433]: https://togithub.com/tokio-rs/tokio/pull/6433

[#&#8203;6445]: https://togithub.com/tokio-rs/tokio/pull/6445

[#&#8203;6449]: https://togithub.com/tokio-rs/tokio/pull/6449

[#&#8203;6465]: https://togithub.com/tokio-rs/tokio/pull/6465

[#&#8203;6467]: https://togithub.com/tokio-rs/tokio/pull/6467

[#&#8203;6468]: https://togithub.com/tokio-rs/tokio/pull/6468

[#&#8203;6472]: https://togithub.com/tokio-rs/tokio/pull/6472

[#&#8203;6477]: https://togithub.com/tokio-rs/tokio/pull/6477

[#&#8203;6478]: https://togithub.com/tokio-rs/tokio/pull/6478

[#&#8203;6482]: https://togithub.com/tokio-rs/tokio/pull/6482

[#&#8203;6487]: https://togithub.com/tokio-rs/tokio/pull/6487

[#&#8203;6490]: https://togithub.com/tokio-rs/tokio/pull/6490

[#&#8203;6494]: https://togithub.com/tokio-rs/tokio/pull/6494

[#&#8203;6497]: https://togithub.com/tokio-rs/tokio/pull/6497

[#&#8203;6498]: https://togithub.com/tokio-rs/tokio/pull/6498

[#&#8203;6499]: https://togithub.com/tokio-rs/tokio/pull/6499

[#&#8203;6500]: https://togithub.com/tokio-rs/tokio/pull/6500

[#&#8203;6503]: https://togithub.com/tokio-rs/tokio/pull/6503

[#&#8203;6510]: https://togithub.com/tokio-rs/tokio/pull/6510

[#&#8203;6511]: https://togithub.com/tokio-rs/tokio/pull/6511

[#&#8203;6512]: https://togithub.com/tokio-rs/tokio/pull/6512

[#&#8203;6517]: https://togithub.com/tokio-rs/tokio/pull/6517

[#&#8203;6520]: https://togithub.com/tokio-rs/tokio/pull/6520

[#&#8203;6521]: https://togithub.com/tokio-rs/tokio/pull/6521

[#&#8203;6534]: https://togithub.com/tokio-rs/tokio/pull/6534

[#&#8203;6551]: https://togithub.com/tokio-rs/tokio/pull/6551

[#&#8203;6552]: https://togithub.com/tokio-rs/tokio/pull/6552

[#&#8203;6556]: https://togithub.com/tokio-rs/tokio/pull/6556

[#&#8203;6558]: https://togithub.com/tokio-rs/tokio/pull/6558

[#&#8203;6563]: https://togithub.com/tokio-rs/tokio/pull/6563

[#&#8203;6564]: https://togithub.com/tokio-rs/tokio/pull/6564

[#&#8203;6571]: https://togithub.com/tokio-rs/tokio/pull/6571

[#&#8203;6573]: https://togithub.com/tokio-rs/tokio/pull/6573

[#&#8203;6578]: https://togithub.com/tokio-rs/tokio/pull/6578

[#&#8203;6581]: https://togithub.com/tokio-rs/tokio/pull/6581

[#&#8203;6586]: https://togithub.com/tokio-rs/tokio/pull/6586

[#&#8203;6590]: https://togithub.com/tokio-rs/tokio/pull/6590

[#&#8203;6596]: https://togithub.com/tokio-rs/tokio/pull/6596

[#&#8203;6599]: https://togithub.com/tokio-rs/tokio/pull/6599

[#&#8203;6603]: https://togithub.com/tokio-rs/tokio/pull/6603

</details>

---

### Configuration

📅 **Schedule**: Branch creation - "before 4am 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 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:eyJjcmVhdGVkSW5WZXIiOiIzNy4zNzcuOCIsInVwZGF0ZWRJblZlciI6IjM3LjM3Ny44IiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6W119-->

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-06-02 18:31:21 +00:00
Boshen
28cc351cf3
ci: add prepare release workflow 2024-06-03 00:54:13 +08:00
renovate[bot]
b59356c3ed
chore(deps): lock file maintenance npm packages (#3506)
[![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 |  |  |  |  |
| [pnpm](https://pnpm.io) ([source](https://togithub.com/pnpm/pnpm)) |
packageManager | patch | [`9.1.2` ->
`9.1.4`](https://renovatebot.com/diffs/npm/pnpm/9.1.2/9.1.4) |
[![age](https://developer.mend.io/api/mc/badges/age/npm/pnpm/9.1.4?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/pnpm/9.1.4?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/pnpm/9.1.2/9.1.4?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/pnpm/9.1.2/9.1.4?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
| [tar](https://togithub.com/isaacs/node-tar) | devDependencies | minor
| [`7.1.0` ->
`7.2.0`](https://renovatebot.com/diffs/npm/tar/7.1.0/7.2.0) |
[![age](https://developer.mend.io/api/mc/badges/age/npm/tar/7.2.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/tar/7.2.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/tar/7.1.0/7.2.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/tar/7.1.0/7.2.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|

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

---

### Release Notes

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

### [`v9.1.4`](https://togithub.com/pnpm/pnpm/compare/v9.1.3...v9.1.4)

[Compare Source](https://togithub.com/pnpm/pnpm/compare/v9.1.3...v9.1.4)

### [`v9.1.3`](https://togithub.com/pnpm/pnpm/compare/v9.1.2...v9.1.3)

[Compare Source](https://togithub.com/pnpm/pnpm/compare/v9.1.2...v9.1.3)

</details>

<details>
<summary>isaacs/node-tar (tar)</summary>

###
[`v7.2.0`](https://togithub.com/isaacs/node-tar/compare/v7.1.0...v7.2.0)

[Compare
Source](https://togithub.com/isaacs/node-tar/compare/v7.1.0...v7.2.0)

</details>

---

### Configuration

📅 **Schedule**: Branch creation - "before 4am 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 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:eyJjcmVhdGVkSW5WZXIiOiIzNy4zNzcuOCIsInVwZGF0ZWRJblZlciI6IjM3LjM3Ny44IiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6W119-->

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-06-02 16:13:02 +00:00
renovate[bot]
ef35792623
chore(deps): update samypr100/setup-dev-drive action to v3 (#3505)
[![Mend
Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com)

This PR contains the following updates:

| Package | Type | Update | Change |
|---|---|---|---|
|
[samypr100/setup-dev-drive](https://togithub.com/samypr100/setup-dev-drive)
| action | major | `v2` -> `v3` |

---

### Release Notes

<details>
<summary>samypr100/setup-dev-drive (samypr100/setup-dev-drive)</summary>

###
[`v3`](https://togithub.com/samypr100/setup-dev-drive/releases/tag/v3)

[Compare
Source](https://togithub.com/samypr100/setup-dev-drive/compare/v2...v3)

#### What's Changed

- See
[CHANGELOG.md](https://togithub.com/samypr100/setup-dev-drive/blob/v3/CHANGELOG.md)

**Full Changelog**:
https://github.com/samypr100/setup-dev-drive/compare/v2...v3

</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 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:eyJjcmVhdGVkSW5WZXIiOiIzNy4zNzcuOCIsInVwZGF0ZWRJblZlciI6IjM3LjM3Ny44IiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6W119-->

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-06-02 16:08:16 +00:00
cinchen
daf559f06f
feat(linter): eslint-plugin-jest/no-large-snapshot (#3436)
part of https://github.com/oxc-project/oxc/issues/492

Rule Detail:
[link](https://github.com/jest-community/eslint-plugin-jest/blob/main/src/rules/no-large-snapshots.ts)

---------

Co-authored-by: wenzhe <mysteryven@gmail.com>
2024-06-02 22:58:28 +08:00
Boshen
ac66de651b
chore: bump criterion2 to 0.10.0 (#3499) 2024-06-02 00:22:53 +08:00
overlookmotel
6f71541db0 fix(semantic): set program scope_id for TS definition files (#3496)
Semantic does not visit the AST for TS definition files, but it does create a root scope. Record this scope ID in `Program`'s `scope_id` field.
2024-06-01 10:13:45 +00:00
Boshen
9ff4feaa4c
chore: bump oxc-browserslist to 0.17.0 (#3495) 2024-06-01 15:06:34 +08:00
overlookmotel
ff7e8c7448 refactor(ast): update scope attrs (#3494)
Update scope attrs used by `oxc_traverse` codegen on `MethodDefinition` and `Function` types. These attrs are currently ignored by the codegen anyway, so causes no change in generated code, but bringing them up to date in preparation for #3392.
2024-05-31 17:58:01 +00:00
overlookmotel
3967a15b60 fix(traverse): exit scope early if enter it late (#3493)
Fixes #3490.
2024-05-31 17:53:23 +00:00
overlookmotel
55bbde2888 refactor(ast): move scope from TSModuleBlock to TSModuleDeclaration (#3488)
Closes #3471.

Remove scope from `TSModuleBlock` and add scope to `TSModuleDeclaration` instead.
2024-05-31 17:33:05 +00:00
overlookmotel
9c3d1631a4 refactor(ast): rename function params (#3487)
Rename function params from `_kind` to `kind`. This has no practical effect but makes Rust Analyser give nicer param name hints when using these APIs.
2024-05-31 12:34:48 +00:00
overlookmotel
286b5ed3d7 refactor(ast): remove defunct hashing of Span (#3486)
`Span` has a no-op `Hash` impl.

ea53267956/crates/oxc_span/src/span.rs (L50-L54)

So remove pointless `self.span.hash(state)` operations from `Hash` impls for AST nodes.
2024-05-31 12:25:05 +00:00