Boshen
cbaeea6d02
refactor(minifier): clean up some tests ( #5910 )
2024-09-20 05:55:05 +00:00
Boshen
144611ef49
refactor(minifier): align ast pass names with closure compiler ( #5908 )
2024-09-20 05:20:07 +00:00
camchenry
f4fac0f488
refactor(ast): remove .iter() where not needed ( #5904 )
...
this is just an experiment, I noticed while profiling these code paths came up a number of times:
<img width="1077" alt="Screenshot 2024-09-19 at 8 32 51 PM" src="https://github.com/user-attachments/assets/d0f4d703-c456-4344-8f57-81f0b3f491a0 ">
2024-09-20 02:41:49 +00:00
Alexander S.
65c337a071
feat(prettier): improve ts compatibility ( #5900 )
2024-09-20 10:40:31 +08:00
renovate
9192e5ad03
chore(deps): update rust crates ( #5899 )
...
This PR contains the following updates:
| Package | Type | Update | Change |
|---|---|---|---|
| [bpaf](https://redirect.github.com/pacak/bpaf ) | workspace.dependencies | patch | `0.9.12` -> `0.9.14` |
| [dashmap](https://redirect.github.com/xacrimon/dashmap ) | workspace.dependencies | minor | `6.0.1` -> `6.1.0` |
| [globset](https://redirect.github.com/BurntSushi/ripgrep/tree/master/crates/globset ) ([source](https://redirect.github.com/BurntSushi/ripgrep/tree/HEAD/crates/globset )) | workspace.dependencies | patch | `0.4.14` -> `0.4.15` |
| [handlebars](https://redirect.github.com/sunng87/handlebars-rust ) | workspace.dependencies | minor | `6.0.0` -> `6.1.0` |
| [ignore](https://redirect.github.com/BurntSushi/ripgrep/tree/master/crates/ignore ) ([source](https://redirect.github.com/BurntSushi/ripgrep/tree/HEAD/crates/ignore )) | workspace.dependencies | patch | `0.4.22` -> `0.4.23` |
| [indexmap](https://redirect.github.com/indexmap-rs/indexmap ) | workspace.dependencies | minor | `2.4.0` -> `2.5.0` |
| [insta](https://insta.rs/ ) ([source](https://redirect.github.com/mitsuhiko/insta )) | workspace.dependencies | minor | `1.39.0` -> `1.40.0` |
| [napi](https://redirect.github.com/napi-rs/napi-rs ) | workspace.dependencies | patch | `3.0.0-alpha.8` -> `3.0.0-alpha` |
| [napi-derive](https://redirect.github.com/napi-rs/napi-rs ) | workspace.dependencies | patch | `3.0.0-alpha.7` -> `3.0.0-alpha` |
| [owo-colors](https://redirect.github.com/jam1garner/owo-colors ) | workspace.dependencies | minor | `4.0.0` -> `4.1.0` |
| [oxc_resolver](https://redirect.github.com/oxc-project/oxc-resolver ) | workspace.dependencies | minor | `1.10.2` -> `1.11.0` |
| [serde](https://serde.rs ) ([source](https://redirect.github.com/serde-rs/serde )) | workspace.dependencies | patch | `1.0.209` -> `1.0.210` |
| [serde_json](https://redirect.github.com/serde-rs/json ) | workspace.dependencies | patch | `1.0.127` -> `1.0.128` |
| [tokio](https://tokio.rs ) ([source](https://redirect.github.com/tokio-rs/tokio )) | workspace.dependencies | minor | `1.39.3` -> `1.40.0` |
| [unicode-id-start](https://redirect.github.com/Boshen/unicode-id-start ) | workspace.dependencies | minor | `1.2.0` -> `1.3.0` |
| [unicode-width](https://redirect.github.com/unicode-rs/unicode-width ) | workspace.dependencies | minor | `0.1.13` -> `0.2.0` |
---
### Release Notes
<details>
<summary>pacak/bpaf (bpaf)</summary>
### [`v0.9.14`](https://redirect.github.com/pacak/bpaf/blob/HEAD/Changelog.md#bpaf-0914--2024-09-19 )
[Compare Source](https://redirect.github.com/pacak/bpaf/compare/v0.9.13...v0.9.14 )
- add license files ([#​388](https://redirect.github.com/pacak/bpaf/issues/388 ))
thanks [@​davide](https://redirect.github.com/davide )
- fix fish completions - you'll need to regenerate completion files for them to work
### [`v0.9.13`](https://redirect.github.com/pacak/bpaf/blob/HEAD/Changelog.md#bpaf-0913--bpafderive-0513---2024-09-06 )
[Compare Source](https://redirect.github.com/pacak/bpaf/compare/v0.9.12...v0.9.13 )
- You can now use `fallback_to_usage` in derive macro for options and subcommands ([#​376](https://redirect.github.com/pacak/bpaf/issues/376 ))
- Bugfixes related to shell completion and file masks
thanks [@​ozwaldorf](https://redirect.github.com/ozwaldorf )
- `not_strict` restriction for positional items (TODO - check the docs)
thanks [@​ozwaldorf](https://redirect.github.com/ozwaldorf )
- more shell completion bugfixes ([#​384](https://redirect.github.com/pacak/bpaf/issues/384 ), [#​382](https://redirect.github.com/pacak/bpaf/issues/382 ), [#​381](https://redirect.github.com/pacak/bpaf/issues/381 ))
- `ParseFailure::print_mesage` (with one `s` is deprecated in favor of the right spelling
</details>
<details>
<summary>xacrimon/dashmap (dashmap)</summary>
### [`v6.1.0`](https://redirect.github.com/xacrimon/dashmap/releases/tag/v6.1.0 )
[Compare Source](https://redirect.github.com/xacrimon/dashmap/compare/v6.0.1...v6.1.0 )
- [https://github.com/xacrimon/dashmap/pull/308 ](https://redirect.github.com/xacrimon/dashmap/pull/308 )
</details>
<details>
<summary>sunng87/handlebars-rust (handlebars)</summary>
### [`v6.1.0`](https://redirect.github.com/sunng87/handlebars-rust/blob/HEAD/CHANGELOG.md#610---2024-09-06 )
[Compare Source](https://redirect.github.com/sunng87/handlebars-rust/compare/v6.0.0...v6.1.0 )
- \[Added] More data type support in comparison helpers \[[#​673](https://redirect.github.com/sunng87/handlebars-rust/issues/673 )]
</details>
<details>
<summary>indexmap-rs/indexmap (indexmap)</summary>
### [`v2.5.0`](https://redirect.github.com/indexmap-rs/indexmap/blob/HEAD/RELEASES.md#250 )
[Compare Source](https://redirect.github.com/indexmap-rs/indexmap/compare/2.4.0...2.5.0 )
- Added an `insert_before` method to `IndexMap` and `IndexSet`, as an
alternative to `shift_insert` with different behavior on existing entries.
- Added `first_entry` and `last_entry` methods to `IndexMap`.
- Added `From` implementations between `IndexedEntry` and `OccupiedEntry`.
</details>
<details>
<summary>mitsuhiko/insta (insta)</summary>
### [`v1.40.0`](https://redirect.github.com/mitsuhiko/insta/blob/HEAD/CHANGELOG.md#1400 )
[Compare Source](https://redirect.github.com/mitsuhiko/insta/compare/1.39.0...1.40.0 )
- `cargo-insta` no longer panics when running `cargo insta test --accept --workspace`
on a workspace with a default crate. [#​532](https://redirect.github.com/mitsuhiko/insta/issues/532 )
- MSRV for `insta` has been raised to 1.60, and for `cargo-insta` to 1.64.
- Added support for compact debug snapshots (`assert_compact_debug_snapshot`). [#​514](https://redirect.github.com/mitsuhiko/insta/issues/514 )
- Deprecate `--no-force-pass` in `cargo-insta`. The `--check` option covers the
same functionality and has a clearer name. [#​513](https://redirect.github.com/mitsuhiko/insta/issues/513 )
- Inline snapshots now use the required number of `#`s to escape the snapshot
value, rather than always using `###`. This allows snapshotting values which
themselves contain `###`. If there are no existing `#` characters in the
snapshot value, a single `#` will be used. [#​540](https://redirect.github.com/mitsuhiko/insta/issues/540 )
- Inline snapshots can now be updated with `--force-update-snapshots`. [#​569](https://redirect.github.com/mitsuhiko/insta/issues/569 )
- `cargo insta test` accepts multiple `--exclude` flags. [#​520](https://redirect.github.com/mitsuhiko/insta/issues/520 )
- `test` `runner` in insta's yaml config works. [#​544](https://redirect.github.com/mitsuhiko/insta/issues/544 )
- Print a warning when encountering old snapshot formats. [#​503](https://redirect.github.com/mitsuhiko/insta/issues/503 )
- Group the options in `cargo insta --help`, upgrade to `clap` from `structopt`. [#​518](https://redirect.github.com/mitsuhiko/insta/issues/518 )
- No longer suggest running `cargo insta` message when running `cargo insta test --check`. [#​515](https://redirect.github.com/mitsuhiko/insta/issues/515 )
- Print a clearer error message when accepting a snapshot that was removed. [#​516](https://redirect.github.com/mitsuhiko/insta/issues/516 )
- Mark `require-full-match` as experimental, given some corner-cases are currently difficult to manage. [#​497](https://redirect.github.com/mitsuhiko/insta/issues/497 )
- Add a new integration test approach for `cargo-insta` and a set of integration tests. [#​537](https://redirect.github.com/mitsuhiko/insta/issues/537 )
- Enable Filters to be created from `IntoIterator` types, rather than just `Vec`s. [#​570](https://redirect.github.com/mitsuhiko/insta/issues/570 )
- Implemented total sort order for an internal `Key` type correctly. This prevents potential
crashes introduced by the new sort algorithm in Rust 1.81. [#​586](https://redirect.github.com/mitsuhiko/insta/issues/586 )
</details>
<details>
<summary>napi-rs/napi-rs (napi)</summary>
### [`v3.0.0-alpha.10`](https://redirect.github.com/napi-rs/napi-rs/releases/tag/napi%403.0.0-alpha.10 )
[Compare Source](https://redirect.github.com/napi-rs/napi-rs/compare/napi@3.0.0-alpha.9...napi@3.0.0-alpha.10 )
#### What's Changed
- fix(napi): nullptr handling in `TypedArray`s by [@​Xanewok](https://redirect.github.com/Xanewok ) in [https://github.com/napi-rs/napi-rs/pull/2258 ](https://redirect.github.com/napi-rs/napi-rs/pull/2258 )
- chore: enable corepack in Debian base Dockerfile by [@​stevefan1999-personal](https://redirect.github.com/stevefan1999-personal ) in [https://github.com/napi-rs/napi-rs/pull/2252 ](https://redirect.github.com/napi-rs/napi-rs/pull/2252 )
- refactor(napi): allow create BufferSlice from external data by [@​Brooooooklyn](https://redirect.github.com/Brooooooklyn ) in [https://github.com/napi-rs/napi-rs/pull/2263 ](https://redirect.github.com/napi-rs/napi-rs/pull/2263 )
#### New Contributors
- [@​Xanewok](https://redirect.github.com/Xanewok ) made their first contribution in [https://github.com/napi-rs/napi-rs/pull/2258 ](https://redirect.github.com/napi-rs/napi-rs/pull/2258 )
- [@​stevefan1999-personal](https://redirect.github.com/stevefan1999-personal ) made their first contribution in [https://github.com/napi-rs/napi-rs/pull/2252 ](https://redirect.github.com/napi-rs/napi-rs/pull/2252 )
**Full Changelog**: https://github.com/napi-rs/napi-rs/compare/napi-derive@3.0.0-alpha.8...napi@3.0.0-alpha.10
### [`v3.0.0-alpha.9`](https://redirect.github.com/napi-rs/napi-rs/releases/tag/napi-derive%403.0.0-alpha.9 )
[Compare Source](https://redirect.github.com/napi-rs/napi-rs/compare/napi@3.0.0-alpha.8...napi@3.0.0-alpha.9 )
#### What's Changed
- fix(derive): fix clippy warning with newer rust version by [@​richerfu](https://redirect.github.com/richerfu ) in [https://github.com/napi-rs/napi-rs/pull/2262 ](https://redirect.github.com/napi-rs/napi-rs/pull/2262 )
**Full Changelog**: https://github.com/napi-rs/napi-rs/compare/napi-derive@3.0.0-alpha.8...napi-derive@3.0.0-alpha.9
</details>
<details>
<summary>jam1garner/owo-colors (owo-colors)</summary>
### [`v4.1.0`](https://redirect.github.com/jam1garner/owo-colors/compare/v4.0.0...v4.1.0 )
[Compare Source](https://redirect.github.com/jam1garner/owo-colors/compare/v4.0.0...v4.1.0 )
</details>
<details>
<summary>oxc-project/oxc-resolver (oxc_resolver)</summary>
### [`v1.11.0`](https://redirect.github.com/oxc-project/oxc-resolver/blob/HEAD/CHANGELOG.md#1110---2024-08-26 )
[Compare Source](https://redirect.github.com/oxc-project/oxc-resolver/compare/oxc_resolver-v1.10.2...oxc_resolver-v1.11.0 )
##### Added
- use simdutf8 to validate UTF-8 when reading files ([#​237](https://redirect.github.com/oxc-project/oxc_resolver/pull/237 ))
- Yarn PnP (behind a feature flag) ([#​217](https://redirect.github.com/oxc-project/oxc_resolver/pull/217 ))
</details>
<details>
<summary>serde-rs/serde (serde)</summary>
### [`v1.0.210`](https://redirect.github.com/serde-rs/serde/releases/tag/v1.0.210 )
[Compare Source](https://redirect.github.com/serde-rs/serde/compare/v1.0.209...v1.0.210 )
- Support serializing and deserializing `IpAddr` and `SocketAddr` in no-std mode on Rust 1.77+ ([#​2816](https://redirect.github.com/serde-rs/serde/issues/2816 ), thanks [@​MathiasKoch](https://redirect.github.com/MathiasKoch ))
- Make `serde::ser::StdError` and `serde:🇩🇪 :StdError` equivalent to `core::error::Error` on Rust 1.81+ ([#​2818](https://redirect.github.com/serde-rs/serde/issues/2818 ))
</details>
<details>
<summary>serde-rs/json (serde_json)</summary>
### [`v1.0.128`](https://redirect.github.com/serde-rs/json/releases/tag/1.0.128 )
[Compare Source](https://redirect.github.com/serde-rs/json/compare/1.0.127...1.0.128 )
- Support serializing maps containing 128-bit integer keys to serde_json::Value ([#​1188](https://redirect.github.com/serde-rs/json/issues/1188 ), thanks [@​Mrreadiness](https://redirect.github.com/Mrreadiness ))
</details>
<details>
<summary>tokio-rs/tokio (tokio)</summary>
### [`v1.40.0`](https://redirect.github.com/tokio-rs/tokio/releases/tag/tokio-1.40.0 ): Tokio v1.40.0
[Compare Source](https://redirect.github.com/tokio-rs/tokio/compare/tokio-1.39.3...tokio-1.40.0 )
### 1.40.0 (August 30th, 2024)
##### Added
- io: add `util::SimplexStream` ([#​6589])
- process: stabilize `Command::process_group` ([#​6731])
- sync: add `{TrySendError,SendTimeoutError}::into_inner` ([#​6755])
- task: add `JoinSet::join_all` ([#​6784])
##### Added (unstable)
- runtime: add `Builder::{on_task_spawn, on_task_terminate}` ([#​6742])
##### Changed
- io: use vectored io for `write_all_buf` when possible ([#​6724])
- runtime: prevent niche-optimization to avoid triggering miri ([#​6744])
- sync: mark mpsc types as `UnwindSafe` ([#​6783])
- sync,time: make `Sleep` and `BatchSemaphore` instrumentation explicit roots ([#​6727])
- task: use `NonZeroU64` for `task::Id` ([#​6733])
- task: include panic message when printing `JoinError` ([#​6753])
- task: add `#[must_use]` to `JoinHandle::abort_handle` ([#​6762])
- time: eliminate timer wheel allocations ([#​6779])
##### Documented
- docs: clarify that `[build]` section doesn't go in Cargo.toml ([#​6728])
- io: clarify zero remaining capacity case ([#​6790])
- macros: improve documentation for `select!` ([#​6774])
- sync: document mpsc channel allocation behavior ([#​6773])
[#​6589]: https://redirect.github.com/tokio-rs/tokio/pull/6589
[#​6724]: https://redirect.github.com/tokio-rs/tokio/pull/6724
[#​6727]: https://redirect.github.com/tokio-rs/tokio/pull/6727
[#​6728]: https://redirect.github.com/tokio-rs/tokio/pull/6728
[#​6731]: https://redirect.github.com/tokio-rs/tokio/pull/6731
[#​6733]: https://redirect.github.com/tokio-rs/tokio/pull/6733
[#​6742]: https://redirect.github.com/tokio-rs/tokio/pull/6742
[#​6744]: https://redirect.github.com/tokio-rs/tokio/pull/6744
[#​6753]: https://redirect.github.com/tokio-rs/tokio/pull/6753
[#​6755]: https://redirect.github.com/tokio-rs/tokio/pull/6755
[#​6762]: https://redirect.github.com/tokio-rs/tokio/pull/6762
[#​6773]: https://redirect.github.com/tokio-rs/tokio/pull/6773
[#​6774]: https://redirect.github.com/tokio-rs/tokio/pull/6774
[#​6779]: https://redirect.github.com/tokio-rs/tokio/pull/6779
[#​6783]: https://redirect.github.com/tokio-rs/tokio/pull/6783
[#​6784]: https://redirect.github.com/tokio-rs/tokio/pull/6784
[#​6790]: https://redirect.github.com/tokio-rs/tokio/pull/6790
</details>
<details>
<summary>unicode-rs/unicode-width (unicode-width)</summary>
### [`v0.1.14`](https://redirect.github.com/unicode-rs/unicode-width/compare/v0.1.13...v0.1.14 )
[Compare Source](https://redirect.github.com/unicode-rs/unicode-width/compare/v0.1.13...v0.1.14 )
</details>
---
### Configuration
📅 **Schedule**: Branch creation - "before 10am on monday" in timezone Asia/Shanghai, Automerge - At any time (no schedule defined).
🚦 **Automerge**: Enabled.
♻ **Rebasing**: Whenever PR is behind base branch, or you tick the rebase/retry checkbox.
👻 **Immortal**: This PR will be recreated if closed unmerged. Get [config help](https://redirect.github.com/renovatebot/renovate/discussions ) if that's undesired.
---
- [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box
---
This PR was generated by [Mend Renovate](https://mend.io/renovate/ ). View the [repository job log](https://developer.mend.io/github/oxc-project/oxc ).
<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzOC44MC4wIiwidXBkYXRlZEluVmVyIjoiMzguODAuMCIsInRhcmdldEJyYW5jaCI6Im1haW4iLCJsYWJlbHMiOltdfQ==-->
2024-09-20 02:15:51 +00:00
overlookmotel
4d5c4f6cad
fix(transformer): fix reference flags in logical assignment operator transform ( #5903 )
2024-09-20 01:26:55 +00:00
overlookmotel
2cf5607799
refactor(transformer): split up logical assignment operator transform into functions ( #5902 )
...
Pure refactor. Split up into more functions.
2024-09-20 01:26:54 +00:00
overlookmotel
41fbe15c77
refactor(transformer): internal functions not pub in logical assignment operator transform ( #5898 )
2024-09-20 01:26:54 +00:00
overlookmotel
b11d91ce76
refactor(transformer): remove nested match in logical assignment operator transform ( #5897 )
...
No need to convert `AssignmentTarget` to `MemberExpression`, and then match on `MemberExpression::StaticMemberExpression` etc. Can just match on `AssignmentTarget::StaticMemberExpression` etc directly.
Diff is large due to big block of code having less indentation, but contains no changes apart from those described above.
2024-09-20 01:26:53 +00:00
overlookmotel
d335a6760e
fix(transformer): fix references in logical assignment operator transform ( #5896 )
...
Re-use existing reference, rather than creating a new one.
2024-09-20 01:26:53 +00:00
overlookmotel
cab441c572
test(transformer): fix JSX test options ( #5895 )
...
Fix a test by setting correct options.
2024-09-20 01:26:52 +00:00
overlookmotel
9758c1a5cc
fix(transformer): JSX source: add var _jsxFileName statement ( #5894 )
...
Fix JSX source transform when run alone without main JSX transform.
The added test case is same as one of Babel's exec test cases, but the exec test fails due to `transformAsync` not being present.
2024-09-20 01:26:52 +00:00
Boshen
bd7a6535f6
chore(README): change quick-lint-js website link to github
...
website is down.
2024-09-20 09:25:37 +08:00
camchenry
608d637e4d
perf(linter): use aho-corasick instead of regex for string matching in jsx-a11y/img-redundant-alt ( #5892 )
...
hypothesis: profiling shows that Regex creation takes a decent amount of time. the `regex` crate uses `aho-corasick` internally for string matching, which is all we need in some cases. in theory, we could save time by using the lib directly and not needing the full regex syntax.
2024-09-19 22:40:01 +00:00
overlookmotel
66b468857a
docs(transformer): React: convert docs to standard format ( #5891 )
...
Document React transforms in standardized style.
2024-09-19 16:39:45 +00:00
Boshen
cee9d0ba5f
fix(codegen): fix spacing of for await (x of y) ( #5890 )
2024-09-19 15:15:28 +00:00
Boshen
84a5816d03
feat(isolated_declarations): add stripInternal ( #5878 )
...
closes #3906
closes #5687
closes #3958
---------
Co-authored-by: Dunqing <dengqing0821@gmail.com>
2024-09-19 23:14:47 +08:00
Boshen
a07f03aab3
feat(transformer): sync Program::source_type after transform ( #5887 )
...
closes #5552
2024-09-19 14:41:07 +00:00
Boshen
127c88134e
fix(napi/transform): fix jsdoc links ( #5886 )
2024-09-19 13:55:29 +00:00
Boshen
ae89145256
feat(ast): revert #[non_exhaustive] change ( #5885 )
...
Too many downstream breaking changes.
2024-09-19 13:33:23 +00:00
overlookmotel
66e919e59b
fix(ast): correct TS types for JSX ( #5884 )
...
Part of #5354 . #5882 and #5883 corrected the JSON AST for JSX types to make it ESTree-compatible. Bring the TS types into line with those changes.
2024-09-19 11:31:48 +00:00
overlookmotel
0d105212bc
fix(ast): serialize JSXMemberExpressionObject to estree ( #5883 )
...
Follow-on after #5882 , part of #5354 .
Make JSON AST ESTree-compatible for:
* `<Foo.bar />`
* `<this.foo />`
2024-09-19 11:31:47 +00:00
Boshen
a822c9db0a
fix(ast): serialize JSXElementName to estree ( #5882 )
...
closes #5354
2024-09-19 09:47:45 +00:00
overlookmotel
d910304eac
refactor(semantic): rename lifetime on impl IntoIterator for &AstNodes ( #5881 )
...
Follow on after #5873 .
Rename lifetime. I generally consider `'a` in AST types as short for `'ast`, so using `'ast` to mean something else is confusing. Rename lifetime to `'n` (short for `'nodes`).
2024-09-19 09:30:47 +00:00
Boshen
6c04fa1e46
fix(napi/transform): make isolated_declaration options optional ( #5880 )
...
closes #5871
2024-09-19 08:07:54 +00:00
overlookmotel
52c99031ae
refactor(transformer): JSX: use AstBuilder::vec_from_iter ( #5862 )
...
Pure refactor. Shorten code a little by using `AstBuilder::vec_from_iter`.
2024-09-19 06:19:13 +00:00
overlookmotel
74364adce4
refactor(transformer): JSX: merge transform_jsx_attribute_item into transform_jsx ( #5861 )
...
`transform_jsx` branches on the type of each attribute, and then passes each attribute to `transform_jsx_attribute_item`, which branches on the type again. Instead, inline the two arms of `transform_jsx_attribute_item` into the match arms of `transform_jsx`.
This does make `transform_jsx` even bigger than it was already. I'll break it up in a later PR.
2024-09-19 06:19:12 +00:00
overlookmotel
d2eaa7dd41
refactor(transformer): reorder match arms in JSX transform ( #5860 )
...
Pure refactor. Switch order of code. Spread attributes are more unusual than standard attributes, so put the common case first.
2024-09-19 06:19:11 +00:00
overlookmotel
58a83274fd
refactor(transformer): simplify match in JSX transform ( #5859 )
...
Pure refactor. Reduce match to 1 arm per variant.
2024-09-19 06:19:11 +00:00
IWANABETHATGUY
a111bb69af
feat(oxc_wasm): add verbse option to debug_dot ( #5879 )
...
1. Adding a new option to control displaying `implicit error` edge.
**verbose**

**disable verbose**

2024-09-19 06:13:03 +00:00
leaysgur
f360e2c6f8
refactor(semantic): Remove redundunt is_leading check for JSDoc ( #5877 )
...
Late review for #5876 👀
`is_leading()` was already covered by `is_jsdoc()`.
9115dd947a/crates/oxc_ast/src/trivia.rs (L108-L110)
2024-09-19 06:08:31 +00:00
Boshen
9115dd947a
refactor(semantic): use Comment::attached_to for jsdoc attachment ( #5876 )
...
I can't believe tests passed on my first try 🤔
2024-09-19 04:48:30 +00:00
Boshen
db4f16a98f
refactor(semantic): call with_trivias before build_with_jsdoc ( #5875 )
2024-09-19 04:12:57 +00:00
DonIsaac
3d13c6d1f9
refactor(semantic): impl IntoIterator for &AstNodes ( #5873 )
...
Simple quality-of-life change.
2024-09-19 03:22:29 +00:00
DonIsaac
1ccf2907be
docs(semantic): document AstNode and AstNodes ( #5872 )
...
Part of #5870
2024-09-19 03:22:29 +00:00
DonIsaac
83ca7f56cd
docs(diagnostics): fully document oxc_diagnostics ( #5865 )
...
Just a step in my mission to document our entire API
2024-09-19 01:43:08 +00:00
Alexander S.
4e37d18b2e
feat(prettier): start supporting tsx syntax ( #5866 )
...
Look at first: #5864
the only merge conflict for this PR should then be the ts snap file.
If you want, you can also skip the other PR and merge this one directly
:)
2024-09-19 09:40:07 +08:00
Cam McHenry
16fe3837d9
feat(linter): implement no-extend-native rule ( #5867 )
...
- part of https://github.com/oxc-project/oxc/issues/479
This implements the `no-extend-native` rule from the ESLint core
ruleset. This was translated based on the rule source code from the
ESLint codebase. That means some oddity, such as treating any
capitalized identifier (like `Math`) as a global object, is preserved.
So even though `Math.prototype` doesn't exist in reality, we still
report it as an error. This is probably okay given that such code
doesn't make sense anyway.
2024-09-18 20:44:54 -04:00
Cam McHenry
3148d4b654
perf(linter): Check file path after checking node kind for nextjs/no-head-element ( #5868 )
2024-09-18 18:31:18 -04:00
overlookmotel
0c8733df23
test(transformer): clean up identation in test fixtures ( #5863 )
...
Not sure how added up with mix of tabs and spaces.
2024-09-18 15:19:59 +00:00
Boshen
dfbde2c602
feat(isolated_declarations): print jsdoc comments ( #5858 )
2024-09-18 14:09:00 +00:00
overlookmotel
c96b712f6b
refactor(syntax)!: remove SymbolFlags::ArrowFunction ( #5857 )
...
`SymbolFlags::ArrowFunction` is an oddity, as whether a symbol is an arrow function is not statically knowable. In the following cases, `f` symbol did not have `ArrowFunction` flag set:
```js
const {f} = {f: () => {}};
```
```js
let f = 123;
f = () => {};
```
`SymbolFlags::ArrowFunction` is therefore not particularly useful, and possibly misleading. Having it complicates the transformer, and it's not used anywhere in Oxc.
This PR removes it.
2024-09-18 14:03:03 +00:00
overlookmotel
7f05eed8cf
docs(transformer): add comment about missing features in arrow function transform ( #5855 )
2024-09-18 13:36:57 +00:00
overlookmotel
87706470f4
docs(transformer): correct docs for arrow function transform ( #5854 )
2024-09-18 13:00:27 +00:00
Boshen
9f6696a6aa
feat(codegen): add new lines to TSTypeParameterDeclaration ( #5853 )
2024-09-18 11:44:24 +00:00
overlookmotel
b9c45646d1
refactor(transformer): transformer example output semantic + transformer errors ( #5852 )
2024-09-18 11:08:27 +00:00
overlookmotel
2e93548816
ci(transformer): enable arrow function transform in transformer benchmark ( #5851 )
2024-09-18 11:08:27 +00:00
overlookmotel
ef8dcc9d4d
test(transformer): more tests for arrow function transform ( #5849 )
2024-09-18 09:46:58 +00:00
overlookmotel
49ee1dcff2
fix(transformer): arrow function transform handle this in arrow function in class static block ( #5848 )
...
Class static blocks also hold a `this` binding.
2024-09-18 09:46:57 +00:00
Boshen
bcdbba3981
feat(codegen): print jsdoc comments that are attached to statements and class elements ( #5845 )
...
I am unable to print all comments correctly. Comments have way too much semantic meaning in JavaScript.
This PR reduces the scope to only print jsdoc comments that are attached to statements and class elements, in order to get isolated declarations shipped.
2024-09-18 07:58:22 +00:00