Boshen
83a1715a08
chore: oxc-browserslist to v0.16.2 ( #3466 )
2024-05-30 19:30:21 +08:00
IWANABETHATGUY
0cdb45a1ff
feat(oxc_codegen): preserve annotate comment ( #3465 )
...
1. Copy tests from
efa3dd2d8e/internal/bundler_tests/bundler_dce_test.go (L3833-L3971)
2. Add option to preserve annotate comment like `/* #__NO_SIDE_EFFECTS__
*/` and `/* #__PURE__ */`
2024-05-30 15:25:23 +08:00
Boshen
ec041a07fd
chore: oxc-browserslist to v0.16.1 ( #3466 )
2024-05-30 10:30:57 +08:00
Boshen
64246c59ae
deps: bump oxc-browserslist (removes the build script)
2024-05-28 23:04:20 +08:00
Boshen
c2c425d4dc
chore: bump criterion2 ( #3444 )
2024-05-28 15:49:51 +08:00
Boshen
570b234a70
chore(transformers): switch crate browserslist-rs to oxc-browserslist
2024-05-28 10:49:49 +08:00
Dunqing
816a782254
feat(transformer): support targets option of preset-env ( #3371 )
...
The implementation of the `targets` options was copied from
[swc](https://github.com/swc-project/swc/tree/main/crates/preset_env_base ),
which resulted in some added dependencies in transformer.
Currently, it has supported enabling plugins by `targets`
2024-05-27 10:33:40 +08:00
renovate[bot]
ea0d57f944
chore(deps): lock file maintenance rust crates ( #3422 )
...
[](https://renovatebot.com )
This PR contains the following updates:
| Package | Type | Update | Change |
|---|---|---|---|
| | | lockFileMaintenance | All locks refreshed |
| [insta](https://insta.rs/ )
([source](https://togithub.com/mitsuhiko/insta )) |
workspace.dependencies | minor | `1.38.0` -> `1.39.0` |
| [itertools](https://togithub.com/rust-itertools/itertools ) |
workspace.dependencies | minor | `0.12.1` -> `0.13.0` |
| [mimalloc](https://togithub.com/purpleprotocol/mimalloc_rust ) |
workspace.dependencies | patch | `0.1.41` -> `0.1.42` |
| [napi-derive](https://togithub.com/napi-rs/napi-rs ) |
workspace.dependencies | patch | `2.16.4` -> `2.16.5` |
| [ouroboros](https://togithub.com/someguynamedjosh/ouroboros ) |
workspace.dependencies | patch | `0.18.3` -> `0.18.4` |
| [proc-macro2](https://togithub.com/dtolnay/proc-macro2 ) |
workspace.dependencies | patch | `1.0.82` -> `1.0.84` |
| [serde](https://serde.rs )
([source](https://togithub.com/serde-rs/serde )) | workspace.dependencies
| patch | `1.0.201` -> `1.0.203` |
| [trybuild](https://togithub.com/dtolnay/trybuild ) |
workspace.dependencies | patch | `1.0.95` -> `1.0.96` |
🔧 This Pull Request updates lock files to use the latest dependency
versions.
---
### Release Notes
<details>
<summary>mitsuhiko/insta (insta)</summary>
###
[`v1.39.0`](https://togithub.com/mitsuhiko/insta/blob/HEAD/CHANGELOG.md#1390 )
[Compare
Source](https://togithub.com/mitsuhiko/insta/compare/1.38.0...1.39.0 )
- Fixed a bug in `require_full_match`.
[#​485](https://togithub.com/mitsuhiko/insta/issues/485 )
- Fixed a bug that caused snapshot and module names to sometimes be
inaccurate.
[#​483](https://togithub.com/mitsuhiko/insta/issues/483 )
- Insta will no longer error when removing snapshots that were already
removed. [#​484](https://togithub.com/mitsuhiko/insta/issues/484 )
- Added support for trailing commas in inline snapshots.
[#​472](https://togithub.com/mitsuhiko/insta/issues/472 )
- Don't pass `--color` in all cases to `libtest` any more to work around
limitations
with custom test harnesses.
[#​491](https://togithub.com/mitsuhiko/insta/issues/491 )
</details>
<details>
<summary>rust-itertools/itertools (itertools)</summary>
###
[`v0.13.0`](https://togithub.com/rust-itertools/itertools/blob/HEAD/CHANGELOG.md#0130 )
[Compare
Source](https://togithub.com/rust-itertools/itertools/compare/v0.12.1...v0.13.0 )
##### Breaking
- Removed implementation of `DoubleEndedIterator` for `ConsTuples`
([#​853](https://togithub.com/rust-itertools/itertools/issues/853 ))
- Made `MultiProduct` fused and fixed on an empty iterator
([#​835](https://togithub.com/rust-itertools/itertools/issues/835 ),
[#​834](https://togithub.com/rust-itertools/itertools/issues/834 ))
- Changed `iproduct!` to return tuples for maxi one iterator too
([#​870](https://togithub.com/rust-itertools/itertools/issues/870 ))
- Changed `PutBack::put_back` to return the old value
([#​880](https://togithub.com/rust-itertools/itertools/issues/880 ))
- Removed deprecated `repeat_call, Itertools::{foreach, step,
map_results, fold_results}`
([#​878](https://togithub.com/rust-itertools/itertools/issues/878 ))
- Removed `TakeWhileInclusive::new`
([#​912](https://togithub.com/rust-itertools/itertools/issues/912 ))
##### Added
- Added `Itertools::{smallest_by, smallest_by_key, largest, largest_by,
largest_by_key}`
([#​654](https://togithub.com/rust-itertools/itertools/issues/654 ),
[#​885](https://togithub.com/rust-itertools/itertools/issues/885 ))
- Added `Itertools::tail`
([#​899](https://togithub.com/rust-itertools/itertools/issues/899 ))
- Implemented `DoubleEndedIterator` for `ProcessResults`
([#​910](https://togithub.com/rust-itertools/itertools/issues/910 ))
- Implemented `Debug` for `FormatWith`
([#​931](https://togithub.com/rust-itertools/itertools/issues/931 ))
- Added `Itertools::get`
([#​891](https://togithub.com/rust-itertools/itertools/issues/891 ))
##### Changed
- Deprecated `Itertools::group_by` (renamed `chunk_by`)
([#​866](https://togithub.com/rust-itertools/itertools/issues/866 ),
[#​879](https://togithub.com/rust-itertools/itertools/issues/879 ))
- Deprecated `unfold` (use `std::iter::from_fn` instead)
([#​871](https://togithub.com/rust-itertools/itertools/issues/871 ))
- Optimized `GroupingMapBy`
([#​873](https://togithub.com/rust-itertools/itertools/issues/873 ),
[#​876](https://togithub.com/rust-itertools/itertools/issues/876 ))
- Relaxed `Fn` bounds to `FnMut` in `diff_with,
Itertools::into_group_map_by`
([#​886](https://togithub.com/rust-itertools/itertools/issues/886 ))
- Relaxed `Debug/Clone` bounds for `MapInto`
([#​889](https://togithub.com/rust-itertools/itertools/issues/889 ))
- Documented the `use_alloc` feature
([#​887](https://togithub.com/rust-itertools/itertools/issues/887 ))
- Optimized `Itertools::set_from`
([#​888](https://togithub.com/rust-itertools/itertools/issues/888 ))
- Removed badges in `README.md`
([#​890](https://togithub.com/rust-itertools/itertools/issues/890 ))
- Added "no-std" categories in `Cargo.toml`
([#​894](https://togithub.com/rust-itertools/itertools/issues/894 ))
- Fixed `Itertools::k_smallest` on short unfused iterators
([#​900](https://togithub.com/rust-itertools/itertools/issues/900 ))
- Deprecated `Itertools::tree_fold1` (renamed `tree_reduce`)
([#​895](https://togithub.com/rust-itertools/itertools/issues/895 ))
- Deprecated `GroupingMap::fold_first` (renamed `reduce`)
([#​902](https://togithub.com/rust-itertools/itertools/issues/902 ))
- Fixed `Itertools::k_smallest(0)` to consume the iterator, optimized
`Itertools::k_smallest(1)`
([#​909](https://togithub.com/rust-itertools/itertools/issues/909 ))
- Specialized `Combinations::nth`
([#​914](https://togithub.com/rust-itertools/itertools/issues/914 ))
- Specialized `MergeBy::fold`
([#​920](https://togithub.com/rust-itertools/itertools/issues/920 ))
- Specialized `CombinationsWithReplacement::nth`
([#​923](https://togithub.com/rust-itertools/itertools/issues/923 ))
- Specialized `FlattenOk::{fold, rfold}`
([#​927](https://togithub.com/rust-itertools/itertools/issues/927 ))
- Specialized `Powerset::nth`
([#​924](https://togithub.com/rust-itertools/itertools/issues/924 ))
- Documentation fixes
([#​882](https://togithub.com/rust-itertools/itertools/issues/882 ),
[#​936](https://togithub.com/rust-itertools/itertools/issues/936 ))
- Fixed `assert_equal` for iterators longer than `i32::MAX`
([#​932](https://togithub.com/rust-itertools/itertools/issues/932 ))
- Updated the `must_use` message of non-lazy `KMergeBy` and
`TupleCombinations`
([#​939](https://togithub.com/rust-itertools/itertools/issues/939 ))
##### Notable Internal Changes
- Tested iterator laziness
([#​792](https://togithub.com/rust-itertools/itertools/issues/792 ))
- Created `CONTRIBUTING.md`
([#​767](https://togithub.com/rust-itertools/itertools/issues/767 ))
</details>
<details>
<summary>purpleprotocol/mimalloc_rust (mimalloc)</summary>
###
[`v0.1.42`](https://togithub.com/purpleprotocol/mimalloc_rust/releases/tag/v0.1.42 ):
Version 0.1.42
[Compare
Source](https://togithub.com/purpleprotocol/mimalloc_rust/compare/v0.1.41...v0.1.42 )
##### Changes
- MiMalloc `v2.1.6`
- Expose `usable_size` and `version`. Credits
[@​nathaniel-daniel](https://togithub.com/nathaniel-daniel ).
- Link with libatomic on armv6-linux. Credits
[@​notorca](https://togithub.com/notorca ).
- Add no_thp option for Linux/Android. Credits
[@​devnexen](https://togithub.com/devnexen ).
</details>
<details>
<summary>napi-rs/napi-rs (napi-derive)</summary>
###
[`v2.16.5`](https://togithub.com/napi-rs/napi-rs/compare/napi-derive@2.16.4...napi-derive@2.16.5 )
[Compare
Source](https://togithub.com/napi-rs/napi-rs/compare/napi-derive@2.16.4...napi-derive@2.16.5 )
</details>
<details>
<summary>dtolnay/proc-macro2 (proc-macro2)</summary>
###
[`v1.0.84`](https://togithub.com/dtolnay/proc-macro2/releases/tag/1.0.84 )
[Compare
Source](https://togithub.com/dtolnay/proc-macro2/compare/1.0.83...1.0.84 )
- Documentation improvements
([#​455](https://togithub.com/dtolnay/proc-macro2/issues/455 ),
thanks
[@​CensoredUsername](https://togithub.com/CensoredUsername ))
###
[`v1.0.83`](https://togithub.com/dtolnay/proc-macro2/releases/tag/1.0.83 )
[Compare
Source](https://togithub.com/dtolnay/proc-macro2/compare/1.0.82...1.0.83 )
- Optimize the representation of `Ident`
([#​462](https://togithub.com/dtolnay/proc-macro2/issues/462 ))
</details>
<details>
<summary>serde-rs/serde (serde)</summary>
###
[`v1.0.203`](https://togithub.com/serde-rs/serde/releases/tag/v1.0.203 )
[Compare
Source](https://togithub.com/serde-rs/serde/compare/v1.0.202...v1.0.203 )
- Documentation improvements
([#​2747](https://togithub.com/serde-rs/serde/issues/2747 ))
###
[`v1.0.202`](https://togithub.com/serde-rs/serde/releases/tag/v1.0.202 )
[Compare
Source](https://togithub.com/serde-rs/serde/compare/v1.0.201...v1.0.202 )
- Provide public access to RenameAllRules in serde_derive_internals
([#​2743](https://togithub.com/serde-rs/serde/issues/2743 ))
</details>
<details>
<summary>dtolnay/trybuild (trybuild)</summary>
###
[`v1.0.96`](https://togithub.com/dtolnay/trybuild/releases/tag/1.0.96 )
[Compare
Source](https://togithub.com/dtolnay/trybuild/compare/1.0.95...1.0.96 )
- Support Windows builds that have OUT_DIR prefixed with `\\?\`
([#​271](https://togithub.com/dtolnay/trybuild/issues/271 ))
</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:eyJjcmVhdGVkSW5WZXIiOiIzNy4zNjguMTAiLCJ1cGRhdGVkSW5WZXIiOiIzNy4zNjguMTAiLCJ0YXJnZXRCcmFuY2giOiJtYWluIiwibGFiZWxzIjpbXX0=-->
---------
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Boshen <boshenc@gmail.com>
2024-05-27 01:48:50 +00:00
Boshen
19bb1c02f2
fix(website): hack schemars to render code snippet in markdown ( #3417 )
2024-05-26 10:36:53 +00:00
Boshen
21505e885c
refactor(cli): move crates/oxc_cli to apps/oxlint ( #3413 )
...
We need to split the cli crate up to reduce dependencies,
the current cli crate is pulling in `oxc_prettier`, which is redundant
for the linter.
2024-05-26 05:00:30 +00:00
Boshen
4149d22aa3
chore(cli): remove the regex feature from tracing_subscriber ( #3412 )
2024-05-26 04:46:25 +00:00
overlookmotel
bcdc658bbb
feat(transformer): add TraverseCtx::generate_uid ( #3394 )
...
Add `TraverseCtx::generate_uid` method.
This is modelled on Babel's `scope.generateUid()` method. As discussed
in
https://github.com/oxc-project/oxc/discussions/3251#discussioncomment-9416826 ,
this is required to fix most of the remaining failing tests in
transformer Milestone 1.
I have implemented this to work as closely as possible to Babel, so that
it will generate same output as Babel for our tests. However, as
mentioned in the code comments, this means it's a pretty expensive
function to call. Those code comments suggest 2 ways in which we could
make it much more efficient, but we'd need to decide how we're going to
handle divergence from Babel before we can decide which route to go.
I've left it as a `TODO(improve-on-babel)` for now.
2024-05-24 17:19:02 +08:00
Boshen
9377a60677
chore(linter): write json schema to npm/oxlint
2024-05-24 13:28:03 +08:00
Boshen
809e4fc03f
chore(website): snapshot cli and json schema output
2024-05-24 12:23:43 +08:00
Boshen
ead637bf50
feat(website): generate linter configuration page
2024-05-23 12:07:17 +08:00
Boshen
57d2bcacea
feat(tasks/website): start generating linter config markdown from json schema ( #3386 )
2024-05-22 16:09:33 +00:00
Boshen
86beca5379
Release crates v0.13.1
2024-05-22 16:50:30 +08:00
Boshen
40ab95b055
feat(tasks): add website tasks ( #3377 )
...
Adds the following tasks so we can use them in the website repo to generate documentations.
`cargo run -p website`
* linter-cli
* linter-rules
* linter-json-schema
2024-05-21 17:46:07 +00:00
Boshen
fe208ddef6
feat(linter): start adding json schema for configuration file ( #3375 )
2024-05-22 00:35:29 +08:00
Dunqing
e2c6fe0cb1
feat(transformer): report errors when options have unknown fields ( #3322 )
2024-05-19 01:19:40 +08:00
Don Isaac
27030b9eb4
perf(lexer): use bitshifting when parsing known integers ( #3296 )
...
## What This PR Does
- perf(lexer): use bit shifting when parsing hex, octal, and binary
integers instead of `mul_add`-ing on `f64`s. Check out the difference in
assembly generated [here](https://godbolt.org/z/zMEKaeYzh )
- perf(lexer): skip redundant utf8 check when parsing BigInts
- refactor(lexer): remove `unsafe` usage (as per @overlookmotel's
request
[here](https://github.com/oxc-project/oxc/pull/3283#issuecomment-2111814598 ))
- test(lexer): add numeric parsing unit tests
I don't expect this PR to have a large performance improvement, since
the most common case (`Kind::Decimal`) is not affected. We could do
this, however, by splitting `Kind::Decimal` into `Kind::DecimalFloat`
and `Kind::DecimalInt` when the lexer encounters a `.`
2024-05-17 09:39:10 +08:00
overlookmotel
05c71d20b1
refactor(traverse): Traverse produce scopes tree using Semantic ( #3304 )
...
`Traverse` use `Semantic` to construct scopes tree and expose it to visitors via `TraverseCtx`.
Currently scopes tree is immutable. Will expose it as a mutable in a follow-on.
This is extremely inefficient. Semantic does all kinds of stuff (control flow graph etc) which `Traverse` doesn't need, and `Traverse` just throws away all that work after semantic has done it. Intent here is to get a working implementation first, and then to do another pass later on to improve performance.
2024-05-16 16:21:20 +00:00
Boshen
6dcfc13e02
Publish oxc_module_lexer v0.13.0
2024-05-16 22:14:47 +08:00
Dunqing
9ee962add8
feat(transformer): support from_babel_options in TransformOptions ( #3301 )
...
Move `BabelOptions` to Transformer. The `output.json` is a standard babel configuration. We can reuse BabelOptions to read [babel.config.json](https://babeljs.io/docs/configuration#babelconfigjson ) or our configuration(maybe oxc.config.json)
The current `from_babel_options` implementation is copied from the `transform_options` in `test_case.rs`, which I'll completely reimplement next
2024-05-16 10:10:39 +00:00
Boshen
23b39169a6
Release crate oxc_ast_macros v0.13.0
2024-05-14 23:15:20 +08:00
Boshen
c395f8641e
Release crates v0.13.0
2024-05-14 23:14:15 +08:00
renovate[bot]
3633500dec
chore(deps): lock file maintenance rust crates ( #3248 )
...
[](https://renovatebot.com )
This PR contains the following updates:
| Package | Type | Update | Change |
|---|---|---|---|
| | | lockFileMaintenance | All locks refreshed |
| [napi](https://togithub.com/napi-rs/napi-rs ) | workspace.dependencies
| patch | `2.16.4` -> `2.16.6` |
| [napi-derive](https://togithub.com/napi-rs/napi-rs ) |
workspace.dependencies | patch | `2.16.3` -> `2.16.4` |
| [num-bigint](https://togithub.com/rust-num/num-bigint ) |
workspace.dependencies | patch | `0.4.4` -> `0.4.5` |
| [petgraph](https://togithub.com/petgraph/petgraph ) |
workspace.dependencies | patch | `0.6.4` -> `0.6.5` |
| [proc-macro2](https://togithub.com/dtolnay/proc-macro2 ) |
workspace.dependencies | patch | `1.0.81` -> `1.0.82` |
| [serde](https://serde.rs )
([source](https://togithub.com/serde-rs/serde )) | workspace.dependencies
| patch | `1.0.200` -> `1.0.201` |
| [serde_json](https://togithub.com/serde-rs/json ) |
workspace.dependencies | patch | `1.0.116` -> `1.0.117` |
| [trybuild](https://togithub.com/dtolnay/trybuild ) |
workspace.dependencies | patch | `1.0.93` -> `1.0.95` |
🔧 This Pull Request updates lock files to use the latest dependency
versions.
---
### Release Notes
<details>
<summary>napi-rs/napi-rs (napi)</summary>
###
[`v2.16.6`](https://togithub.com/napi-rs/napi-rs/releases/tag/napi%402.16.6 )
[Compare
Source](https://togithub.com/napi-rs/napi-rs/compare/napi@2.16.5...napi@2.16.6 )
#### What's Changed
- fix(napi): panic when deserializing empty buffer with Rust 1.78 by
[@​mischnic](https://togithub.com/mischnic ) in
[https://github.com/napi-rs/napi-rs/pull/2094 ](https://togithub.com/napi-rs/napi-rs/pull/2094 )
**Full Changelog**:
https://github.com/napi-rs/napi-rs/compare/napi@2.16.5...napi@2.16.6
###
[`v2.16.5`](https://togithub.com/napi-rs/napi-rs/releases/tag/napi%402.16.5 )
[Compare
Source](https://togithub.com/napi-rs/napi-rs/compare/napi@2.16.4...napi@2.16.5 )
##### What's Changed
- Fix panic in JsArrayBufferValue as_ref/as_mut with Rust 1.78 by
[@​tronical](https://togithub.com/tronical ) in
[https://github.com/napi-rs/napi-rs/pull/2083 ](https://togithub.com/napi-rs/napi-rs/pull/2083 )
- fix(napi): make sure env without exception pending before throw error
by [@​southorange0929](https://togithub.com/southorange0929 ) in
[https://github.com/napi-rs/napi-rs/pull/2092 ](https://togithub.com/napi-rs/napi-rs/pull/2092 )
**Full Changelog**:
https://github.com/napi-rs/napi-rs/compare/napi@2.16.4...napi@2.16.5
</details>
<details>
<summary>rust-num/num-bigint (num-bigint)</summary>
###
[`v0.4.5`](https://togithub.com/rust-num/num-bigint/blob/HEAD/RELEASES.md#Release-045-2024-05-06 )
[Compare
Source](https://togithub.com/rust-num/num-bigint/compare/num-bigint-0.4.4...num-bigint-0.4.5 )
- [Upgrade to 2021 edition, **MSRV 1.60**][292]
- [Add `const ZERO` and implement `num_traits::ConstZero`][298]
- [Add `modinv` methods for the modular inverse][288]
- [Optimize multiplication with imbalanced operands][295]
- [Optimize scalar division on x86 and x86-64][236]
**Contributors**: [@​cuviper](https://togithub.com/cuviper ),
[@​joelonsql](https://togithub.com/joelonsql ),
[@​waywardmonkeys](https://togithub.com/waywardmonkeys )
[236]: https://togithub.com/rust-num/num-bigint/pull/236
[288]: https://togithub.com/rust-num/num-bigint/pull/288
[292]: https://togithub.com/rust-num/num-bigint/pull/292
[295]: https://togithub.com/rust-num/num-bigint/pull/295
[298]: https://togithub.com/rust-num/num-bigint/pull/298
</details>
<details>
<summary>petgraph/petgraph (petgraph)</summary>
###
[`v0.6.5`](https://togithub.com/petgraph/petgraph/blob/HEAD/RELEASES.rst#Version-065-2024-05-06 )
[Compare
Source](https://togithub.com/petgraph/petgraph/compare/petgraph@v0.6.4...petgraph@v0.6.5 )
\==========================
- Add rayon support for `GraphMap` (`#573`*, `#615`*)
- Add `Topo::with_initials` method (`#585`\_)
- Add logo to the project (`#598`\_)
- Add Ford-Fulkerson algorithm (`#640`\_)
- Update `itertools` to 0.12.1 (`#628`\_)
- Update `GraphMap` to allow custom hash functions (`#623`\_)
- Fix documentation (`#630`\_)
- Fix clippy warnings (`#627`\_)
- (internal) Fix remove old `copyclone` macro (`#601`\_)
- (internal) Move minimum spanning tree into own module (`#624`\_)
.. \_`#573`:
[https://github.com/petgraph/petgraph/pull/573 ](https://togithub.com/petgraph/petgraph/pull/573 )
.. \_`#615`:
[https://github.com/petgraph/petgraph/pull/615 ](https://togithub.com/petgraph/petgraph/pull/615 )
.. \_`#585`:
[https://github.com/petgraph/petgraph/pull/585 ](https://togithub.com/petgraph/petgraph/pull/585 )
.. \_`#598`:
[https://github.com/petgraph/petgraph/pull/598 ](https://togithub.com/petgraph/petgraph/pull/598 )
.. \_`#640`:
[https://github.com/petgraph/petgraph/pull/640 ](https://togithub.com/petgraph/petgraph/pull/640 )
.. \_`#628`:
[https://github.com/petgraph/petgraph/pull/628 ](https://togithub.com/petgraph/petgraph/pull/628 )
.. \_`#623`:
[https://github.com/petgraph/petgraph/pull/623 ](https://togithub.com/petgraph/petgraph/pull/623 )
.. \_`#630`:
[https://github.com/petgraph/petgraph/pull/630 ](https://togithub.com/petgraph/petgraph/pull/630 )
.. \_`#627`:
[https://github.com/petgraph/petgraph/pull/627 ](https://togithub.com/petgraph/petgraph/pull/627 )
.. \_`#601`:
[https://github.com/petgraph/petgraph/pull/601 ](https://togithub.com/petgraph/petgraph/pull/601 )
.. \_`#624`:
[https://github.com/petgraph/petgraph/pull/624 ](https://togithub.com/petgraph/petgraph/pull/624 )
</details>
<details>
<summary>dtolnay/proc-macro2 (proc-macro2)</summary>
###
[`v1.0.82`](https://togithub.com/dtolnay/proc-macro2/releases/tag/1.0.82 )
[Compare
Source](https://togithub.com/dtolnay/proc-macro2/compare/1.0.81...1.0.82 )
- Resolve unexpected_cfgs warning
([#​456](https://togithub.com/dtolnay/proc-macro2/issues/456 ))
</details>
<details>
<summary>serde-rs/serde (serde)</summary>
###
[`v1.0.201`](https://togithub.com/serde-rs/serde/releases/tag/v1.0.201 )
[Compare
Source](https://togithub.com/serde-rs/serde/compare/v1.0.200...v1.0.201 )
- Resolve unexpected_cfgs warning
([#​2737](https://togithub.com/serde-rs/serde/issues/2737 ))
</details>
<details>
<summary>serde-rs/json (serde_json)</summary>
###
[`v1.0.117`](https://togithub.com/serde-rs/json/releases/tag/v1.0.117 )
[Compare
Source](https://togithub.com/serde-rs/json/compare/v1.0.116...v1.0.117 )
- Resolve unexpected_cfgs warning
([#​1130](https://togithub.com/serde-rs/json/issues/1130 ))
</details>
<details>
<summary>dtolnay/trybuild (trybuild)</summary>
###
[`v1.0.95`](https://togithub.com/dtolnay/trybuild/releases/tag/1.0.95 )
[Compare
Source](https://togithub.com/dtolnay/trybuild/compare/1.0.94...1.0.95 )
- Keep long type names in diagnostics so that test output does not vary
depending on the length of the absolute filepath of the crate
([#​269](https://togithub.com/dtolnay/trybuild/issues/269 ))
###
[`v1.0.94`](https://togithub.com/dtolnay/trybuild/releases/tag/1.0.94 )
[Compare
Source](https://togithub.com/dtolnay/trybuild/compare/1.0.93...1.0.94 )
- Resolve unexpected_cfgs warning
([#​268](https://togithub.com/dtolnay/trybuild/issues/268 ))
</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:eyJjcmVhdGVkSW5WZXIiOiIzNy4zNTEuMiIsInVwZGF0ZWRJblZlciI6IjM3LjM1MS4yIiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6W119-->
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-05-12 19:31:59 +00:00
Boshen
551632a348
refactor(diagnostics): remove thiserror
2024-05-12 11:34:14 +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
7363e14335
feat(sourcemap): add "rayon" feature ( #3198 )
2024-05-07 23:47:36 +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]
46b4f4fd31
chore(deps): lock file maintenance rust crates ( #3164 )
...
[](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 [@​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
[@​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 [@​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
- [@​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**: [@​cuviper](https://togithub.com/cuviper ),
[@​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
([#​2733](https://togithub.com/serde-rs/serde/issues/2733 ), thanks
[@​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
Dunqing
a52e321b25
feat(transformer/jsx-source): get the correct lineNumber and columnNumber from the span. ( #3142 )
2024-05-01 00:30:47 +00:00
Boshen
67225a8091
refactor(coverage): replace yaml parsing with saphyr ( #3144 )
...
closes #3128
Profiling `cargo run -p oxc_coverage -- parser` no longer shows a
bottleneck in yaml parsing
2024-04-30 22:49:39 +08:00
Boshen
a63a45d5b2
refactor(transformer): remove the requirement of Semantic ( #3140 )
...
It seems like we need to rebuild the scopes and symbols while
traversing. We can't utilize the scopes and symbols built by semantic
because they are immutable.
2024-04-30 12:48:21 +08:00
Boshen
870d11f1bb
feat(syntax): add ToJsString trait for f64 ( #3131 )
2024-04-29 21:00:04 +08:00
Dunqing
843318cdbe
refactor(transformer/typescript): reimplementation of Enum conversion based on Babel ( #3102 )
...
The remaining test cases will perform better with a scope
implementation, and while we can implement them without the scope, it
still requires us to do what the scope did.
---------
Co-authored-by: Boshen <boshenc@gmail.com>
2024-04-29 16:26:22 +08:00
renovate[bot]
6fd6170154
chore(deps): lock file maintenance rust crates ( #3125 )
2024-04-29 06:00:15 +00:00
Boshen
ae6561308c
refactor(syntax): use FxHashMap for ModuleRecord::request_modules ( #3124 )
...
closes #3121
The ordering is not important here.
2024-04-29 03:37:34 +00:00
Ali Rezvani
ac72d08592
chore: cleanup the dependencies on static_assertions and oxc_index. ( #3095 )
...
We used to export `static_assertions` as part of the `oxc_index`. It
would've made sense back when it was only a vessel for exporting other
crates - although even then it wouldn't make much sense other than being
convenient - Now with it turning into a port of `index_vec` and
potentially getting bigger as the result of specific needs of the
project; It makes much more sense to stop exporting it from `oxc_index`
and use the crate directly in places that used to use what `oxc_index`
were exporting.
PS: we may want to follow up this with an `oxc_asset` crate containing
our own set of assertion tools which would also export
`static_assertions`.
2024-04-25 16:56:23 +08:00
Ali Rezvani
8618f6b32a
chore(index): fork index_vec crate. ( #3092 )
...
related to #3086
2024-04-25 06:09:53 +00:00
Boshen
559bca86c5
Release crates v0.12.5
2024-04-22 12:52:17 +08:00
renovate[bot]
df7b9ee8da
chore(deps): lock file maintenance rust crates ( #3059 )
2024-04-22 09:58:21 +08:00
Boshen
a05c4e39b8
Release crates v0.12.4
2024-04-19 16:40:05 +08:00
Boshen
e43c245388
feat(transformer): add import helpers to manage module imports ( #2996 )
...
closes #2971
2024-04-16 14:33:44 +08:00
Boshen
d57526103c
feat(coverage): add transformer to prevent crashes ( #2970 )
2024-04-14 18:52:51 +08:00
Boshen
b15bf2826b
feat(napi/parser): remove experimental flexbuffer api ( #2957 )
2024-04-13 14:59:31 +08:00
Boshen
f366d9bd7c
chore(minsize): remove brotlic because it takes too long to compile ( #2954 )
2024-04-13 13:24:25 +08:00
branchseer
f159f60084
Make ast types covariant over the allocator lifetime. ( #2943 )
...
## Why
Due to the usage of `&'alloc mut T` in `oxc_allocator::Box`, and
`bumpalo::collections::Vec` in `oxc_allocator::Vec`, ast types are
currently invariant over their allocator lifetime `'a`. This prevents
`ouroboros` from generating `borrow_*` on ast type fields, leading to
the unfriendly `with_*` api:
c250b288ef/crates/oxc_parser/examples/multi-thread.rs (L82-L84)
## How
- For `oxc_allocator::Vec`, switch to `allocator_api2::vec::Vec`, which
has a covariant relationship with the allocator lifetime.
- For `oxc_allocator::Box`, use `std::ptr::NonNull` which is
specifically designed to be covariant. I don't use
`allocator_api2::boxed::Box` because it holds the allocator for
dropping, so the size is bigger.
## Downside
Now that `oxc_allocator::Box` uses the unsafe `NonNull`. It has to be a
private field to be safe. This make it impossible to do `Box(....)`
pattern matching.
2024-04-12 18:12:18 +08:00
Boshen
0c04bf743f
feat(transformer): transform TypeScript namespace ( #2942 )
2024-04-12 10:19:13 +08:00