Commit graph

1404 commits

Author SHA1 Message Date
dependabot[bot]
0b02cb7da9
chore(deps): bump the dependencies group with 3 updates (#936)
Bumps the dependencies group with 3 updates:
[rayon](https://github.com/rayon-rs/rayon),
[insta](https://github.com/mitsuhiko/insta) and
[unicode-width](https://github.com/unicode-rs/unicode-width).

Updates `rayon` from 1.7.0 to 1.8.0
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a
href="https://github.com/rayon-rs/rayon/blob/master/RELEASES.md">rayon's
changelog</a>.</em></p>
<blockquote>
<h1>Release rayon 1.8.0 / rayon-core 1.12.0 (2023-09-20)</h1>
<ul>
<li>The minimum supported <code>rustc</code> is now 1.63.</li>
<li>Added <code>ThreadPoolBuilder::use_current_thread</code> to use the
builder thread as
part of the new thread pool. That thread does not run the pool's main
loop,
but it may participate in work-stealing if it yields to rayon in some
way.</li>
<li>Implemented <code>FromParallelIterator&lt;T&gt;</code> for
<code>Box&lt;[T]&gt;</code>, <code>Rc&lt;[T]&gt;</code>, and
<code>Arc&lt;[T]&gt;</code>, as well as
<code>FromParallelIterator&lt;Box&lt;str&gt;&gt;</code> and
<code>ParallelExtend&lt;Box&lt;str&gt;&gt;</code> for
<code>String</code>.</li>
<li><code>ThreadPoolBuilder::build_scoped</code> now uses
<code>std:🧵:scope</code>.</li>
<li>The default number of threads is now determined using
<code>std:🧵:available_parallelism</code> instead of the
<code>num_cpus</code> crate.</li>
<li>The internal logging facility has been removed, reducing bloat for
all users.</li>
<li>Many smaller performance tweaks and documentation updates.</li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="21e1ae1e12"><code>21e1ae1</code></a>
Release rayon 1.4.0 / rayon-core 1.8.0</li>
<li><a
href="a0e5833b76"><code>a0e5833</code></a>
Merge <a
href="https://redirect.github.com/rayon-rs/rayon/issues/785">#785</a> <a
href="https://redirect.github.com/rayon-rs/rayon/issues/790">#790</a> <a
href="https://redirect.github.com/rayon-rs/rayon/issues/791">#791</a></li>
<li><a
href="9f7357befb"><code>9f7357b</code></a>
Merge <a
href="https://redirect.github.com/rayon-rs/rayon/issues/792">#792</a></li>
<li><a
href="998f134242"><code>998f134</code></a>
Removed outdated documentation</li>
<li><a
href="c7d963a9c2"><code>c7d963a</code></a>
Use crossbeam_deque::Injector instead of crossbeam_queue::SegQueue</li>
<li><a
href="2e889293a8"><code>2e88929</code></a>
Micro-optimize the WorkerThread::steal loop</li>
<li><a
href="66559fe9ce"><code>66559fe</code></a>
Remove the lifetime constraint from the scope OP</li>
<li><a
href="09428ec11d"><code>09428ec</code></a>
Merge <a
href="https://redirect.github.com/rayon-rs/rayon/issues/746">#746</a></li>
<li><a
href="ed6a5f75c4"><code>ed6a5f7</code></a>
Update ci/compat-Cargo.lock</li>
<li><a
href="96ba9ef188"><code>96ba9ef</code></a>
inline more Counter methods</li>
<li>Additional commits viewable in <a
href="https://github.com/rayon-rs/rayon/compare/rayon-core-v1.7.0...rayon-core-v1.8.0">compare
view</a></li>
</ul>
</details>
<br />

Updates `insta` from 1.31.0 to 1.32.0
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a
href="https://github.com/mitsuhiko/insta/blob/master/CHANGELOG.md">insta's
changelog</a>.</em></p>
<blockquote>
<h2>1.32.0</h2>
<ul>
<li>Added <code>--profile</code> parameter support to <code>cargo insta
test</code>.</li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="845ee36cf4"><code>845ee36</code></a>
1.32.0</li>
<li><a
href="5b34e7eaad"><code>5b34e7e</code></a>
Added changlog entry</li>
<li><a
href="bee0ff41af"><code>bee0ff4</code></a>
cargo-insta: reduce visibility of all items (<a
href="https://redirect.github.com/mitsuhiko/insta/issues/407">#407</a>)</li>
<li><a
href="6e22d67092"><code>6e22d67</code></a>
cargo-insta: edit reject message (<a
href="https://redirect.github.com/mitsuhiko/insta/issues/404">#404</a>)</li>
<li><a
href="7e9315ede7"><code>7e9315e</code></a>
test-stable requires 1.61</li>
<li><a
href="84cddf9c70"><code>84cddf9</code></a>
Fix incorrect --profile command</li>
<li><a
href="20656ad902"><code>20656ad</code></a>
cargo-insta: allow passing --profile (<a
href="https://redirect.github.com/mitsuhiko/insta/issues/402">#402</a>)</li>
<li>See full diff in <a
href="https://github.com/mitsuhiko/insta/compare/1.31.0...1.32.0">compare
view</a></li>
</ul>
</details>
<br />

Updates `unicode-width` from 0.1.10 to 0.1.11
<details>
<summary>Commits</summary>
<ul>
<li><a
href="8942487195"><code>8942487</code></a>
Publish 0.1.11 (Unicode 15.1)</li>
<li><a
href="34fdd6b66e"><code>34fdd6b</code></a>
Add ignore file</li>
<li><a
href="24651a204d"><code>24651a2</code></a>
Merge pull request <a
href="https://redirect.github.com/unicode-rs/unicode-width/issues/33">#33</a>
from chrisduerr/unicode_15_1</li>
<li><a
href="30e33bdb2c"><code>30e33bd</code></a>
Fixup script</li>
<li><a
href="8872449ab3"><code>8872449</code></a>
Create rust.yml</li>
<li><a
href="a859939f91"><code>a859939</code></a>
Update to Unicode 15.1</li>
<li><a
href="f5a9b4efa5"><code>f5a9b4e</code></a>
Merge pull request <a
href="https://redirect.github.com/unicode-rs/unicode-width/issues/32">#32</a>
from linkmauve/patch-1</li>
<li><a
href="78cfe571e0"><code>78cfe57</code></a>
Use Iterator::sum() instead of fold()</li>
<li>See full diff in <a
href="https://github.com/unicode-rs/unicode-width/compare/v0.1.10...v0.1.11">compare
view</a></li>
</ul>
</details>
<br />


Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after
your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge
and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating
it. You can achieve the same result by closing it manually
- `@dependabot show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore <dependency name> major version` will close this
group update PR and stop Dependabot creating any more for the specific
dependency's major version (unless you unignore this specific
dependency's major version or upgrade to it yourself)
- `@dependabot ignore <dependency name> minor version` will close this
group update PR and stop Dependabot creating any more for the specific
dependency's minor version (unless you unignore this specific
dependency's minor version or upgrade to it yourself)
- `@dependabot ignore <dependency name>` will close this group update PR
and stop Dependabot creating any more for the specific dependency
(unless you unignore this specific dependency or upgrade to it yourself)
- `@dependabot unignore <dependency name>` will remove all of the ignore
conditions of the specified dependency
- `@dependabot unignore <dependency name> <ignore condition>` will
remove the ignore condition of the specified dependency and ignore
conditions


</details>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-09-25 23:38:30 -04:00
cin
24539545a9
feat(linter): add no-redeclare rule. (#683)
Close: #615 #520 
Rule: [Docs](https://eslint.org/docs/latest/rules/no-redeclare)
2023-09-23 23:54:54 +12:00
Jason Miller
a4c064795c
Fix: return 0 exit code when warnings<max_warnings (#933)
`oxlint --max-warnings 99999` should exit with success status code when
there are warnings but no errors found. Currently any warning or error
results in an exit status of 1.
2023-09-23 23:46:15 +12:00
Wenzhe Wang
d700cf899c
feat(linter): add eslint(jest/no-standalone-expect) (#931) 2023-09-22 23:41:46 +12:00
Boshen
8553817bc9
chore(transform_conformance): update test cases and README regarding regex 2023-09-18 17:49:36 +08:00
Boshen
5973e5aede
feat(transformer): setup typescript and react transformers (#930) 2023-09-18 16:56:41 +08:00
Boshen
46d2623c1f
feat(transform_conformance): add jsx and ts tests 2023-09-18 15:35:02 +08:00
dependabot[bot]
9c259a4ddf
chore(deps): bump the dependencies group with 3 updates (#929) 2023-09-18 15:33:02 +08:00
Wenzhe Wang
e2a49271ac
feat(linter): add eslint(jest/no-export) (#925) 2023-09-17 22:40:29 +08:00
Wenzhe Wang
0f02d3783c
fix(semantic): make ExportDeclaration span accurate (#928) 2023-09-17 14:11:25 +00:00
Wenzhe Wang
eec9fd433a
feat(linter): add eslint(jest/no-mocks-import) (#924) 2023-09-17 20:11:52 +08:00
Wenzhe Wang
8867f9ada2
fix(playground): compatible with older encoded codes (#926)
The playground crashed when I visited some old links in my browser
history:


https://web-infra-dev.github.io/oxc/playground/?code=ZQB4AHAAZQBjAHQAKAAxACkALgB0AG8AQgBlACgAMgApAA%3D%3D

<img width="1512" alt="image"
src="https://github.com/web-infra-dev/oxc/assets/33973865/55eb63d9-2df9-431a-8eae-7e1b7817fef6">


Maybe newcomers feel confused about this(e.g. missing a part of
character)
2023-09-17 20:07:12 +08:00
IWANABETHATGUY
d63d07a050
chore: 🤖 refactor crates/oxc_transformer/src/es2021/logical_assignment_operators.rs and fix typo (#927)
1. Fixing typo.
2. Making the code more expresisonful.
2023-09-17 19:58:10 +08:00
Boshen
4e036630ed
feat(transform_conformance): add all babel tests 2023-09-17 09:56:13 +08:00
Boshen
5863f8ffdb
feat(transformer): logical assignment operators (#923) 2023-09-16 23:54:53 +08:00
Boshen
1bb649243a
feat(transformer_conformance): group tests in the snapshot (#922) 2023-09-16 21:29:21 +08:00
Boshen
7172953fe9
feat(transformer_conformance): snapshot passed and failed tests (#921) 2023-09-16 20:58:31 +08:00
Boshen
8f59eb0960
chore(transformer): add feature list to README 2023-09-16 18:51:00 +08:00
Boshen
f4cea34534
feat(transformer): add babel conformance test suite (#920) 2023-09-16 18:50:51 +08:00
Devin-Yeung
4bf329e1cf
feat(linter): implement eslint-plugin-unicorn/no-thenable rule (#910)
related to #684
2023-09-16 18:10:49 +08:00
Boshen
540fa03ec0
feat(benchmark): add transformer benchmark (#919) 2023-09-16 17:09:27 +08:00
Boshen
70189f9758
refactor(ast): change the arguments order for some new functions 2023-09-16 16:07:52 +08:00
Boshen
419d5aa6ee
feat(transformer): transformer prototype (#918)
This PR introduces the oxc transformer.

The code is purposely arranged without any Rust trickery such as traits
and macros.
I intend to keep the code style this way until something blows up.

The next steps are:
* unit tests
* conformance tests with TypeScript and Babel
* benchmarks
2023-09-16 16:05:35 +08:00
Wenzhe Wang
91784515f0
feat(linter): add eslint-plugin-jest/no-jasmine-globals (#914) 2023-09-15 23:57:40 +08:00
Boshen
ceeee5909b
Remove HIR (#917)
closes #273
closes #814

HIR is removed from this PR, with the minifier being commented out.

HIR is a wonderful idea for compiling to lower languages, but after
sitting on it for a few months I found that it only adds confusion and
uncertainties to both myself and future contributors.

It also adds too much burden to maintainers if we plan to support more
downstream tools.

1 AST is the only way.
2023-09-15 23:48:32 +08:00
Boshen
38bbc96fb0
Release oxc v0.2.0 2023-09-14 23:41:44 +08:00
Boshen
47faff3fc2
chore: update README 2023-09-14 23:20:21 +08:00
Boshen
f447cf3a3b
perf(lexer): only check the first lower case for match_keyword (#913) 2023-09-14 23:19:16 +08:00
Boshen
a6d8d05cd3
feat(cli): init miette everything else to reduce is_atty system calls 2023-09-14 22:46:06 +08:00
Boshen
7962e81a43
perf(lexer): remove an extra branch from identifier_name_handler (#912) 2023-09-14 22:42:38 +08:00
Boshen
9d7e1657e9
perf(cli): force terminal_links to reduce sys calls (#911)
terminal_links has auto detection on by default,
it will get repeatedly called from parser rewind
with a `is_atty` system call.

closes #906
2023-09-14 22:28:30 +08:00
Todor Andonov
dd74d93ac9
feat(linter): add no-console rule (#887)
implements #864
2023-09-14 19:15:09 +08:00
Wenzhe Wang
8c44a9e05a
feat(linter): add eslint-plugin-import/default (#895) 2023-09-14 16:18:40 +08:00
dependabot[bot]
e174c2f555
chore(deps): bump the dependencies group with 5 updates (#908) 2023-09-14 16:15:50 +08:00
Boshen
242c698d78
Release oxc_resolver v0.2.0 2023-09-14 15:36:41 +08:00
Boshen
4faf3c7976
feat(resolver): add more tracing events to resolver (#907) 2023-09-14 15:34:51 +08:00
Boshen
d208d6f325
ci: longer slow-timeout for cargo codecov 2023-09-13 17:05:46 +08:00
Boshen
b7a0b4f27f
feat(resolver): add TsconfigNotFound error (#905) 2023-09-13 16:36:59 +08:00
Boshen
814f71c15e
feat(resolver): add tracing-subscriber feature (#904) 2023-09-13 16:36:24 +08:00
Boshen
a077e877ba
fix(resolver): fix tsconfig lookup when a directory is provided (#900) 2023-09-13 14:20:04 +08:00
Boshen
babbc47d61
perf(parser): lazily build trivia map instead of build in-place (#903)
closes #898
2023-09-12 23:23:56 +08:00
Boshen
95cae98e2b
perf(resolver): use system canonicalize to reduce total number of path hashes (#902) 2023-09-12 18:01:39 +08:00
Boshen
2e99af3f67
perf(resolver): used cached node_modules in package_resolve (#901) 2023-09-12 16:51:40 +08:00
Boshen
ad891c3af2
perf(resolver): do not search inside non-existent directories for scoped packages (#899) 2023-09-12 15:27:29 +08:00
Boshen
8b17a9cc76
ci: cache the oxlint build for ecosystem-ci 2023-09-12 00:25:07 +08:00
Boshen
1793397f20
perf(parser): remove an extra branch from parse_member_expression_rhs hot path (#896) 2023-09-11 23:25:19 +08:00
Boshen
38aa3205b4
deps: remove default-features from codspeed-criterion-compat 2023-09-11 18:59:30 +08:00
dependabot[bot]
9204c19dab
chore(deps): bump the dependencies group with 4 updates (#893) 2023-09-11 18:53:29 +08:00
dependabot[bot]
5de4841a3e
chore(deps): bump actions/checkout from 3 to 4 (#894) 2023-09-11 18:52:08 +08:00
Don Isaac
027a67d94c
feat(minifier): constant addition expression folding (#882)
Fold constant addition expressions. Handles string concatenation and
addition, both with implicit casting.

For example,
```ts
let x = 1 + 1
let y = "hello " + "world"
```
now becomes
```ts
let x = 2
let y = "hello world"
```

## Extra Goodies
- test(minifier): add `test_snapshot` helper to perform snapshot tests
with `insta`
- up(hir): implement `std::ops::Add` for `NumericValue`
- up(span): impl `TryFrom<Cow<'_, &str>>` for `Atom`
2023-09-11 10:38:35 +08:00