Boshen
52c20d633c
refactor(transformer): deserialize BabelOptions::plugins ( #7045 )
2024-11-01 05:44:57 +00:00
Boshen
fcaba4a92a
feat(transformer): add TransformerOptions::env with EnvOptions ( #7037 )
2024-10-31 12:30:32 +00:00
Boshen
b518670582
chore(coverage): remove known runtime issues
2024-10-28 21:38:37 +08:00
renovate
56f5506ca9
chore(deps): update rust crates ( #6961 )
...
This PR contains the following updates:
| Package | Type | Update | Change |
|---|---|---|---|
| [encoding_rs](https://docs.rs/encoding_rs/ ) ([source](https://redirect.github.com/hsivonen/encoding_rs )) | workspace.dependencies | patch | `0.8.34` -> `0.8.35` |
| [handlebars](https://redirect.github.com/sunng87/handlebars-rust ) | workspace.dependencies | minor | `6.1.0` -> `6.2.0` |
| [insta](https://insta.rs/ ) ([source](https://redirect.github.com/mitsuhiko/insta )) | workspace.dependencies | minor | `1.40.0` -> `1.41.0` |
| [prettyplease](https://redirect.github.com/dtolnay/prettyplease ) | workspace.dependencies | patch | `0.2.24` -> `0.2.25` |
| [regex](https://redirect.github.com/rust-lang/regex ) | workspace.dependencies | patch | `1.11.0` -> `1.11.1` |
| [saphyr](https://redirect.github.com/saphyr-rs/saphyr ) | workspace.dependencies | patch | `0.0.1` -> `0.0.3` |
| [serde](https://serde.rs ) ([source](https://redirect.github.com/serde-rs/serde )) | workspace.dependencies | patch | `1.0.210` -> `1.0.213` |
| [tokio](https://tokio.rs ) ([source](https://redirect.github.com/tokio-rs/tokio )) | workspace.dependencies | minor | `1.40.0` -> `1.41.0` |
---
### Release Notes
<details>
<summary>hsivonen/encoding_rs (encoding_rs)</summary>
### [`v0.8.35`](https://redirect.github.com/hsivonen/encoding_rs/compare/v0.8.34...v0.8.35 )
[Compare Source](https://redirect.github.com/hsivonen/encoding_rs/compare/v0.8.34...v0.8.35 )
</details>
<details>
<summary>sunng87/handlebars-rust (handlebars)</summary>
### [`v6.2.0`](https://redirect.github.com/sunng87/handlebars-rust/blob/HEAD/CHANGELOG.md#620---2024-10-26 )
[Compare Source](https://redirect.github.com/sunng87/handlebars-rust/compare/v6.1.0...v6.2.0 )
- \[Added] `@index` variable for object iteration \[[#​682](https://redirect.github.com/sunng87/handlebars-rust/issues/682 )]
- \[Changed] improve number comparison between different types \[[#​679](https://redirect.github.com/sunng87/handlebars-rust/issues/679 )]
</details>
<details>
<summary>mitsuhiko/insta (insta)</summary>
### [`v1.41.0`](https://redirect.github.com/mitsuhiko/insta/blob/HEAD/CHANGELOG.md#1410 )
[Compare Source](https://redirect.github.com/mitsuhiko/insta/compare/1.40.0...1.41.0 )
- Experimental support for binary snapshots. [#​610](https://redirect.github.com/mitsuhiko/insta/issues/610 ) (Florian Plattner)
- `--force-update-snapshots` now causes `cargo-insta` to write every snapshot, regardless of whether
snapshots fully match, and now implies `--accept`. This
allows for `--force-update-snapshots` to update inline snapshots'
delimiters and indentation.
For the previous behavior of `--force-update-snapshots`, which limited writes to
snapshots which didn't fully match, use `--require-full-match`.
The main difference between `--require-full-match` and the existing behavior of `--force-update-snapshots`
is a non-zero exit code on any snapshots which don't fully match.
Like the previous behavior or `--force-update-snapshots`, `--require-full-match`
doesn't track inline snapshots' delimiters or
indentation, so can't update if those don't match. [#​644](https://redirect.github.com/mitsuhiko/insta/issues/644 )
- Inline snapshots only use `#` characters as delimiters when required. [#​603](https://redirect.github.com/mitsuhiko/insta/issues/603 )
- Warnings for undiscovered snapshots are more robust, and include files with
custom snapshot extensions. [#​637](https://redirect.github.com/mitsuhiko/insta/issues/637 )
- Insta runs correctly on packages which reference rust files in a parent path. [#​626](https://redirect.github.com/mitsuhiko/insta/issues/626 )
- Warnings are printed when any snapshot uses a legacy format. [#​599](https://redirect.github.com/mitsuhiko/insta/issues/599 )
- `cargo insta --version` now prints a version. [#​665](https://redirect.github.com/mitsuhiko/insta/issues/665 )
- `insta` now internally uses `INSTA_UPDATE=force` rather than
`INSTA_FORCE_UPDATE=1`. (This doesn't affect users of `cargo-insta`, which
handles this internally.) [#​482](https://redirect.github.com/mitsuhiko/insta/issues/482 )
- `cargo-insta`'s integration tests continue to grow over the past couple of versions,
and now offer coverage of most of `cargo-insta`'s interface.
</details>
<details>
<summary>dtolnay/prettyplease (prettyplease)</summary>
### [`v0.2.25`](https://redirect.github.com/dtolnay/prettyplease/releases/tag/0.2.25 )
[Compare Source](https://redirect.github.com/dtolnay/prettyplease/compare/0.2.24...0.2.25 )
- Print safe and explicitly unsafe foreign items ([#​85](https://redirect.github.com/dtolnay/prettyplease/issues/85 ), [https://github.com/rust-lang/rust/issues/123743 ](https://redirect.github.com/rust-lang/rust/issues/123743 ))
</details>
<details>
<summary>rust-lang/regex (regex)</summary>
### [`v1.11.1`](https://redirect.github.com/rust-lang/regex/blob/HEAD/CHANGELOG.md#1111-2024-10-24 )
[Compare Source](https://redirect.github.com/rust-lang/regex/compare/1.11.0...1.11.1 )
\===================
This is a new patch release of `regex` that fixes compilation on nightly
Rust when the unstable `pattern` crate feature is enabled. Users on nightly
Rust without this feature enabled are unaffected.
Bug fixes:
- [BUG #​1231](https://redirect.github.com/rust-lang/regex/issues/1231 ):
Fix the `Pattern` trait implementation as a result of nightly API breakage.
</details>
<details>
<summary>saphyr-rs/saphyr (saphyr)</summary>
### [`v0.0.3`](https://redirect.github.com/saphyr-rs/saphyr/compare/v0.0.1...v0.0.3 )
[Compare Source](https://redirect.github.com/saphyr-rs/saphyr/compare/v0.0.1...v0.0.3 )
</details>
<details>
<summary>serde-rs/serde (serde)</summary>
### [`v1.0.213`](https://redirect.github.com/serde-rs/serde/releases/tag/v1.0.213 )
[Compare Source](https://redirect.github.com/serde-rs/serde/compare/v1.0.212...v1.0.213 )
- Fix support for macro-generated `with` attributes inside a newtype struct ([#​2847](https://redirect.github.com/serde-rs/serde/issues/2847 ))
### [`v1.0.212`](https://redirect.github.com/serde-rs/serde/releases/tag/v1.0.212 )
[Compare Source](https://redirect.github.com/serde-rs/serde/compare/v1.0.211...v1.0.212 )
- Fix hygiene of macro-generated local variable accesses in serde(with) wrappers ([#​2845](https://redirect.github.com/serde-rs/serde/issues/2845 ))
### [`v1.0.211`](https://redirect.github.com/serde-rs/serde/releases/tag/v1.0.211 )
[Compare Source](https://redirect.github.com/serde-rs/serde/compare/v1.0.210...v1.0.211 )
- Improve error reporting about mismatched signature in `with` and `default` attributes ([#​2558](https://redirect.github.com/serde-rs/serde/issues/2558 ), thanks [@​Mingun](https://redirect.github.com/Mingun ))
- Show variant aliases in error message when variant deserialization fails ([#​2566](https://redirect.github.com/serde-rs/serde/issues/2566 ), thanks [@​Mingun](https://redirect.github.com/Mingun ))
- Improve binary size of untagged enum and internally tagged enum deserialization by about 12% ([#​2821](https://redirect.github.com/serde-rs/serde/issues/2821 ))
</details>
<details>
<summary>tokio-rs/tokio (tokio)</summary>
### [`v1.41.0`](https://redirect.github.com/tokio-rs/tokio/releases/tag/tokio-1.41.0 ): Tokio v1.41.0
[Compare Source](https://redirect.github.com/tokio-rs/tokio/compare/tokio-1.40.0...tokio-1.41.0 )
##### 1.41.0 (Oct 22th, 2024)
##### Added
- metrics: stabilize `global_queue_depth` ([#​6854], [#​6918])
- net: add conversions for unix `SocketAddr` ([#​6868])
- sync: add `watch::Sender::sender_count` ([#​6836])
- sync: add `mpsc::Receiver::blocking_recv_many` ([#​6867])
- task: stabilize `Id` apis ([#​6793], [#​6891])
##### Added (unstable)
- metrics: add H2 Histogram option to improve histogram granularity ([#​6897])
- metrics: rename some histogram apis ([#​6924])
- runtime: add `LocalRuntime` ([#​6808])
##### Changed
- runtime: box futures larger than 16k on release mode ([#​6826])
- sync: add `#[must_use]` to `Notified` ([#​6828])
- sync: make `watch` cooperative ([#​6846])
- sync: make `broadcast::Receiver` cooperative ([#​6870])
- task: add task size to tracing instrumentation ([#​6881])
- wasm: enable `cfg_fs` for `wasi` target ([#​6822])
##### Fixed
- net: fix regression of abstract socket path in unix socket ([#​6838])
##### Documented
- io: recommend `OwnedFd` with `AsyncFd` ([#​6821])
- io: document cancel safety of `AsyncFd` methods ([#​6890])
- macros: render more comprehensible documentation for `join` and `try_join` ([#​6814], [#​6841])
- net: fix swapped examples for `TcpSocket::set_nodelay` and `TcpSocket::nodelay` ([#​6840])
- sync: document runtime compatibility ([#​6833])
[#​6793]: https://redirect.github.com/tokio-rs/tokio/pull/6793
[#​6808]: https://redirect.github.com/tokio-rs/tokio/pull/6808
[#​6810]: https://redirect.github.com/tokio-rs/tokio/pull/6810
[#​6814]: https://redirect.github.com/tokio-rs/tokio/pull/6814
[#​6821]: https://redirect.github.com/tokio-rs/tokio/pull/6821
[#​6822]: https://redirect.github.com/tokio-rs/tokio/pull/6822
[#​6826]: https://redirect.github.com/tokio-rs/tokio/pull/6826
[#​6828]: https://redirect.github.com/tokio-rs/tokio/pull/6828
[#​6833]: https://redirect.github.com/tokio-rs/tokio/pull/6833
[#​6836]: https://redirect.github.com/tokio-rs/tokio/pull/6836
[#​6838]: https://redirect.github.com/tokio-rs/tokio/pull/6838
[#​6840]: https://redirect.github.com/tokio-rs/tokio/pull/6840
[#​6841]: https://redirect.github.com/tokio-rs/tokio/pull/6841
[#​6846]: https://redirect.github.com/tokio-rs/tokio/pull/6846
[#​6854]: https://redirect.github.com/tokio-rs/tokio/pull/6854
[#​6867]: https://redirect.github.com/tokio-rs/tokio/pull/6867
[#​6868]: https://redirect.github.com/tokio-rs/tokio/pull/6868
[#​6870]: https://redirect.github.com/tokio-rs/tokio/pull/6870
[#​6881]: https://redirect.github.com/tokio-rs/tokio/pull/6881
[#​6890]: https://redirect.github.com/tokio-rs/tokio/pull/6890
[#​6891]: https://redirect.github.com/tokio-rs/tokio/pull/6891
[#​6897]: https://redirect.github.com/tokio-rs/tokio/pull/6897
[#​6918]: https://redirect.github.com/tokio-rs/tokio/pull/6918
[#​6924]: https://redirect.github.com/tokio-rs/tokio/pull/6924
</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:eyJjcmVhdGVkSW5WZXIiOiIzOC4xMjAuMSIsInVwZGF0ZWRJblZlciI6IjM4LjEyMC4xIiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6W119-->
2024-10-28 06:22:28 +00:00
Boshen
6d97af46c7
feat(rust): use oxc-miette ( #6938 )
2024-10-27 13:30:20 +00:00
Boshen
4618aa22d9
refactor(transformer)!: rename TransformerOptions::react to jsx ( #6888 )
2024-10-25 12:04:33 +00:00
leaysgur
90c786c420
feat(regular_expression)!: Support ES2025 Duplicated named capture groups ( #6847 )
...
Closes #6358
@preyneyv I know you've been working on this problem.
This is an implementation that has been dormant on my local for a while.
- All tests are passing
- However, the approach is simple but not general, so there might be some edge cases that were missed
- There's also room for improvement in terms of performance
For these reasons, it was marked as WIP for me.
I believe the test cases and other parts are usable, so feel free to fork and replace them with your implementation if you'd like.
2024-10-25 02:13:57 +00:00
Boshen
088c1b6460
fix(coverage): turn off mangle for runtime test ( #6827 )
2024-10-23 15:05:36 +00:00
Boshen
7291f71019
fix(coverage): enable only_remove_type_imports for runtime transform test ( #6826 )
2024-10-23 14:26:48 +00:00
Boshen
11077708bb
fix(coverage): inject babel helpers for transform ( #6818 )
2024-10-23 12:43:56 +00:00
Boshen
4757376136
fix(coverage): omit explicit-resource-management from runtime test ( #6804 )
2024-10-23 07:49:01 +00:00
Boshen
8f179534c2
fix(coverage): remove some broken cases ( #6797 )
2024-10-23 03:10:49 +00:00
Boshen
9c7ae78c75
fix(coverage): better handling of test262 failling cases ( #6794 )
2024-10-23 02:02:18 +00:00
Boshen
ffa3945465
chore(coverage): ignore v8 failed cases from runtime.snap ( #6780 )
2024-10-22 16:21:42 +00:00
Boshen
e15b7ce09c
fix(coverage): tests for --> in the first line should not have raw flag. ( #6772 )
2024-10-22 10:24:27 +00:00
leaysgur
8032813bf8
fix(regular_expression)!: Migrate to new regexp parser API ( #6741 )
...
Follow up #6635
- [x] Remove old APIs
- [x] Update linter usage
- [x] Update parser usage
- [x] Update transformer usage
2024-10-22 05:34:18 +00:00
Boshen
70efa47d75
fix(coverage): turn off refresh plugin in runtime test ( #6749 )
2024-10-21 15:53:29 +00:00
Boshen
b09e28b720
fix(coverage): fix compile error
2024-10-21 19:44:02 +08:00
Boshen
112580a408
feat(coverage): add transformer and minifier to runtime test ( #6734 )
...
closes #6578
2024-10-21 08:55:29 +00:00
Boshen
2e8579ce81
chore(coverage): update codegen runtime snapshot ( #6730 )
2024-10-21 06:14:53 +00:00
Boshen
f99528d3c2
refactor(coverage): remove unused run_sync_v8_test262_status ( #6704 )
2024-10-20 16:02:26 +00:00
Dunqing
673b66620b
chore(transform_conformance): do not extend plugins if current options has plugins ( #6627 )
...
I saw many tests were ignored even if they don't contain any unsupported plugins
2024-10-17 02:07:03 +00:00
Boshen
cb8f4210c3
refactor(prettier)!: remove source_text argument from constructor ( #6448 )
2024-10-11 06:27:33 +00:00
Boshen
520096030a
refactor(oxc)!: remove passing Trivias around ( #6446 )
...
part of #6426
2024-10-11 06:09:25 +00:00
Boshen
6a194f9086
docs(span): document validity of ModuleKind::Unambiguous ( #6423 )
...
relates #6249
2024-10-10 14:59:41 +00:00
leaysgur
b5b0af98cb
feat(regular_expression): Support RegExp Modifiers ( #6410 )
...
Fixes #6354
2024-10-10 14:46:17 +00:00
Boshen
95892ecc86
feat(coverage): add ContentEq test for regular_expression ( #6411 )
...
closes #6409
Marking as good first issue if anyone wants to pick this up and fix the failing test.
2024-10-10 02:21:21 +00:00
Boshen
eacde0553e
chore(coverage): proposal-json-modules to stage 4 ( #6380 )
2024-10-09 03:09:35 +00:00
Boshen
020bb80b65
refactor(codegen)!: change to CodegenReturn::code and CodegenReturn::map ( #6310 )
2024-10-06 05:05:47 +00:00
Boshen
8729755baa
feat(oxc,napi/transform): napi/transform use oxc compiler pipeline ( #6298 )
...
part of #6156
2024-10-05 16:35:09 +00:00
overlookmotel
e19deaa102
ci(transformer): move post-transform checker to tasks crate ( #6288 )
...
Move post-transform checker into a `tasks` crate. It doesn't feel like it belongs in `oxc_semantic`. It also feels like too heavy a lump of code to put in `tasks/common`.
2024-10-05 14:48:37 +00:00
leaysgur
5a73a663dc
refactor(regular_expression)!: Simplify public APIs ( #6262 )
...
This PR makes 2 changes to improve the existing API that are not very useful.
- Remove `(Literal)Parser` and `FlagsParser` and their ASTs
- Add `with_flags(flags_text)` helper to `ParserOptions`
Here are the details.
> Remove `(Literal)Parser` and `FlagsParser` and their ASTs
Previously, the `oxc_regular_expression` crate exposed 3 parsers.
- `(Literal)Parser`: assumes `/pattern/flags` format
- `PatternParser`: assumes `pattern` part only
- `FlagsParser`: assumes `flags` part only
However, it turns out that in actual usecases, only the `PatternParser` is actually sufficient, as the pattern and flags are validated and sliced in advance on the `oxc_parser` side.
The current usecase for `(Literal)Parser` is mostly for internal testing.
There were also some misuses of `(Literal)Parser` that restore `format!("/{pattern}/{flags}")` back and use `(Literal)Parser`.
Therefore, only `PatternParser` is now published, and unnecessary ASTs have been removed.
(This also obsoletes #5592 .)
> Added `with_flags(flags_text)` helper to `ParserOptions`
Strictly speaking, there was a subtle difference between the "flag" strings that users were aware of and the "mode" recognised by the parser.
Therefore, it was a common mistake to forget to enable `unicode_mode` when using the `v` flag.
With this helper, crate users no longer need to distinguish between flags and modes.
2024-10-03 02:47:08 +00:00
Boshen
51a78d5946
feat(napi/transform): rename all mention of React to Jsx; remove mention of Binding ( #6198 )
...
This does not alter field names nor file names.
part of #6156
2024-10-01 11:52:50 +08:00
Cam McHenry
65d8f9e8fe
perf(linter, ast-tools, coverage): Use FxHashSet instead of std::collections::HashSet ( #6001 )
2024-09-24 19:29:08 +08:00
camchenry
02d5637dbc
perf(ast-tools): use FxHashMap over std::collections::HashMap ( #5997 )
2024-09-23 18:28:54 +00:00
overlookmotel
eadffb900e
test(conformance): move conformance snapshots into separate directory ( #5924 )
2024-09-20 12:30:39 +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
5901d2a0f1
fix(codegen): various spacing issues ( #5820 )
2024-09-17 09:03:28 +00:00
Boshen
512be65fa7
refactor(coverage): remove sourcemap snapshot ( #5782 )
2024-09-15 08:56:54 +00:00
dalaoshu
d18c896a2c
perf(rust): use cow_utils instead ( #5664 )
...
Related to #5586 and #5662
---------
Co-authored-by: Boshen <boshenc@gmail.com>
2024-09-11 18:39:30 +08:00
Boshen
2016bae98c
feat(coverage): add regular expression idempotency test ( #5676 )
...
closes #5634
2024-09-11 02:07:42 +00:00
Boshen
f49e6ebd41
fix(span): treat .js as module file (reverts the previous breaking change) ( #5612 )
...
As it turns out it's not ideal to treat `.js` as `script` in today's world anymore.
This makes https://github.com/oxc-project/oxlint-ecosystem-ci pass again.
2024-09-08 15:14:04 +00:00
Boshen
d00a1f6511
chore: use dprint to format js, json and markdown
2024-09-08 13:24:58 +08:00
Boshen
1bc08e296e
fix(coverage): parse babel unambiguously ( #5579 )
2024-09-07 10:49:00 +00:00
Boshen
43933912ce
fix(coverage): parse typescript unambiguously ( #5575 )
2024-09-07 10:48:59 +00:00
Boshen
28b934ca74
fix(coverage): apply always_strict to test262 and typescript per the specifcation ( #5555 )
...
This also removes the confusing `SourceType::always_strict` field.
I hacked it with `SourceType::always_strict`, but what we actually want is add `'use strict'`.
This is technically a breaking change but I don't expect anyone using this outside of oxc.
The snapshot has a large diff due to every single line shifting by 1 row :-/
2024-09-06 17:14:01 +00:00
overlookmotel
dc924892cc
test: add trailing line breaks to conformance fixtures ( #5541 )
...
Continuation of #5537 . Ensure all conformance fixture files have a trailing line break.
2024-09-06 12:55:17 +00:00
overlookmotel
694f032a3d
style: add trailing line breaks to package.json files ( #5542 )
...
For consistency with our `.editorconfig`.
2024-09-06 12:43:44 +00:00
Boshen
1bed5ce2a5
chore: run cargo +nightly fmt to sort imports ( #5503 )
...
They are never going to be stable are they ... cedf7a4daa/.rustfmt.toml (L8-L16)
2024-09-06 04:04:26 +00:00
Boshen
c3cfbfb480
chore: clippy::allow_attributes ( #5521 )
...
https://blog.rust-lang.org/2024/09/05/Rust-1.81.0.html#expectlint
https://rust-lang.github.io/rust-clippy/master/index.html#/allow_attributes
2024-09-06 03:07:02 +00:00