Commit graph

3223 commits

Author SHA1 Message Date
Boshen
b4bfa2f34c
refactor(transform_conformance): correctly handle BABEL_8_BREAKING (#2990) 2024-04-15 13:41:45 +08:00
Boshen
6532799ff2
Revert "chore(deps): update dependency tar to v7 (#2985)"
This reverts commit 00d75b2fad.
2024-04-15 10:32:01 +08:00
Yuji Sugiura
40af2b1662
feat(semantic/jsdoc): Handle optional type syntax for type name part (#2960)
It seems `JSDocTypeNamePart` can contain whitespace like...

```js
/** @property [cfg.n12="default value"] Config... */
```
2024-04-15 10:18:39 +08:00
renovate[bot]
ec1ca3ac98
chore(deps): update peaceiris/actions-gh-pages action to v4 (#2986)
[![Mend
Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com)

This PR contains the following updates:

| Package | Type | Update | Change |
|---|---|---|---|
|
[peaceiris/actions-gh-pages](https://togithub.com/peaceiris/actions-gh-pages)
| action | major | `v3` -> `v4` |

---

### Release Notes

<details>
<summary>peaceiris/actions-gh-pages
(peaceiris/actions-gh-pages)</summary>

###
[`v4`](https://togithub.com/peaceiris/actions-gh-pages/compare/v3...v4)

[Compare
Source](https://togithub.com/peaceiris/actions-gh-pages/compare/v3...v4)

</details>

---

### Configuration

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

🔕 **Ignore**: Close this PR and you won't be reminded about this update
again.

---

- [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check
this box

---

This PR has been generated by [Mend
Renovate](https://www.mend.io/free-developer-tools/renovate/). View
repository job log
[here](https://developer.mend.io/github/oxc-project/oxc).

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNy4yOTMuMCIsInVwZGF0ZWRJblZlciI6IjM3LjI5My4wIiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6W119-->

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-04-15 10:11:26 +08:00
renovate[bot]
00d75b2fad
chore(deps): update dependency tar to v7 (#2985)
[![Mend
Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com)

This PR contains the following updates:

| Package | Change | Age | Adoption | Passing | Confidence |
|---|---|---|---|---|---|
| [tar](https://togithub.com/isaacs/node-tar) | [`^6.2.0` ->
`^7.0.0`](https://renovatebot.com/diffs/npm/tar/6.2.1/7.0.1) |
[![age](https://developer.mend.io/api/mc/badges/age/npm/tar/7.0.1?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/tar/7.0.1?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/tar/6.2.1/7.0.1?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/tar/6.2.1/7.0.1?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|

---

### Release Notes

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

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

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

###
[`v7.0.0`](https://togithub.com/isaacs/node-tar/compare/v6.2.1...v7.0.0)

[Compare
Source](https://togithub.com/isaacs/node-tar/compare/v6.2.1...v7.0.0)

</details>

---

### Configuration

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

🔕 **Ignore**: Close this PR and you won't be reminded about this update
again.

---

- [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check
this box

---

This PR has been generated by [Mend
Renovate](https://www.mend.io/free-developer-tools/renovate/). View
repository job log
[here](https://developer.mend.io/github/oxc-project/oxc).

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNy4yOTMuMCIsInVwZGF0ZWRJblZlciI6IjM3LjI5My4wIiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6W119-->

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-04-15 10:11:05 +08:00
Boshen
5a286c3d9f
feat(transform_conformance): drop more unsupported plugins (#2984) 2024-04-14 23:04:04 +08:00
Boshen
9643cba4a4
feat(transform_conformance): drop all babel 7 specific tests (#2982)
@Dunqing Is this correct?
2024-04-14 23:02:38 +08:00
Boshen
c753c9fa74
feat(transform_conformance): handle deserialization errors (#2980) 2024-04-14 22:47:28 +08:00
Jose
627dd424cb
fix(linter/no-empty-interface): add missing test (#2979)
As requested add new test
https://github.com/oxc-project/oxc/pull/2973#discussion_r1564728188

---------

Co-authored-by: j.buendia <j.buendia>
2024-04-14 22:33:59 +08:00
Boshen
b6b63ac9bc
feat(transform_conformance): skip tests with plugin.js (#2978) 2024-04-14 21:55:32 +08:00
Boshen
7cf0927a38
feat(transform_conformance): skip tests with plugin.js (#2977) 2024-04-14 21:45:27 +08:00
Boshen
c211f1e57f
feat(transformer): add diagnostics to react transform (#2974) 2024-04-14 21:42:32 +08:00
Boshen
ef602af4cc
feat(transform_conformance): skip plugins we don't support yet (#2967) 2024-04-14 21:32:03 +08:00
Jose
aa62dbbfd5
feat(linter): add missing test cases to no-empty-interface and add config (#2973)
Based on this https://github.com/oxc-project/oxc/issues/2934 I added
missing test cases and rule configuration

---------

Co-authored-by: j.buendia <j.buendia>
2024-04-14 12:12:28 +00:00
Boshen
c7e70c80f0
fix(transformer): deserialize ReactJsxRuntime with camelCase (#2972) 2024-04-14 19:40:24 +08:00
Boshen
3a6eae1abd
feat(transformer): apply jsx self and source plugin inside jsx transform (#2966) 2024-04-14 19:10:59 +08:00
Boshen
10814d5331
fix(transformer): turn on react preset by default (#2968) 2024-04-14 19:04:59 +08:00
Boshen
d57526103c
feat(coverage): add transformer to prevent crashes (#2970) 2024-04-14 18:52:51 +08:00
Boshen
35e3b0f1cb
fix(transformer): fix incorrect jsx whitespace text handling (#2969) 2024-04-14 18:40:40 +08:00
Wang Wenzhe
5b02ae1175
feat(linter/tree-shaking): support ConditionalExpression (#2965) 2024-04-14 13:41:44 +08:00
Wang Wenzhe
da5ea411dd
feat(linter/tree-shaking): support Class (#2964) 2024-04-14 13:39:27 +08:00
Boshen
bd9fc6d169
feat(transformer): react jsx transform (#2961) 2024-04-14 10:50:17 +08:00
Cameron
01e64bf64d
feat(linter) eslint-plugin-unicorn no await in promise methods (#2963) 2024-04-14 10:44:36 +08:00
Cameron
98a3acd8b5
feat(linter) eslint-plugin-unicorn no single promise in promise methods (#2962)
part of #684
2024-04-14 10:39:12 +08:00
Boshen
6561392202
feat(transform_conformance): add baseline for all TypeScript and jsx plugins 2024-04-13 19:05:39 +08:00
Miles Johnson
e67355045e
feat(transformer): start on TypeScript annotation removal (#2951) 2024-04-13 18:49:54 +08:00
Boshen
93ce5a919a
chore: fix internal doc warnings 2024-04-13 15:59:24 +08:00
Boshen
9df5001543
ci: explicitly disable incremental build and deny warnings for cargo and rust 2024-04-13 15:40:10 +08:00
Boshen
21509ae15b
chore: disable profile.dev debug symbols because we don't need it that much 2024-04-13 15:38:19 +08:00
Boshen
56c71e2b1e
chore: enable some rust lints 2024-04-13 15:38:00 +08:00
Boshen
b15bf2826b
feat(napi/parser): remove experimental flexbuffer api (#2957) 2024-04-13 14:59:31 +08:00
renovate[bot]
071010964e
chore(deps): update dependency rust to v1.77.2 (#2956) 2024-04-13 06:19:38 +00:00
Boshen
51e1fe32e5
chore: fix rust toolchain update not working 2024-04-13 14:12:10 +08:00
Boshen
bd56d51443
chore(macros): only select required features from syn to reduce compile time (#2955) 2024-04-13 13:37:59 +08:00
Boshen
f366d9bd7c
chore(minsize): remove brotlic because it takes too long to compile (#2954) 2024-04-13 13:24:25 +08:00
Boshen
adabbac696
ci: only run cargo-shear when Rust changes (#2953) 2024-04-13 13:24:09 +08:00
Boshen
003c2960c6
chore: add auto rust-toolchain.toml version update 2024-04-13 12:58:35 +08:00
Boshen
063b281c39
feat(allocator): make Box's PhantomData own the passed in T (#2952) 2024-04-13 12:31:40 +08:00
Boshen
e651e50bda
feat(transformer): add the most basic plugin toggles (#2950) 2024-04-12 20:25:34 +08:00
Boshen
60ccbb105c
refactor(transformer): clean up some code (#2949) 2024-04-12 20:23:44 +08:00
Boshen
14754777a4
feat(transformer): implement react-jsx-source (#2948) 2024-04-12 20:21:54 +08:00
Boshen
b05c26374c
ci: fix codecov stack overflow by increasing the stack size
The underlying cause is oxc_prettier recursively printing assignment expressions.
2024-04-12 20:17:53 +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
f903a225a8
feat(transformer): implement react-jsx-self (#2946) 2024-04-12 18:08:36 +08:00
Yuji Sugiura
ba2121f17d
feat(linter): Add --jsdoc-plugin flag (#2935)
Add flag to:

```sh
$ oxlint --jsdoc-plugin
```


![image](https://github.com/oxc-project/oxc/assets/6259812/0e12ceab-966f-47e1-b4b9-5bc2eb6bdb56)
2024-04-12 10:39:12 +08:00
Boshen
0c04bf743f
feat(transformer): transform TypeScript namespace (#2942) 2024-04-12 10:19:13 +08:00
Boshen
c250b288ef
fix(cli): return error if --format receives an unknown value 2024-04-11 21:38:39 +08:00
Boshen
f3a28c61b9
chore(transform_conformance): enable typescript plugin snapshot 2024-04-11 20:06:53 +08:00
Boshen
3419306ac0
feat(transformer): add filename (#2941) 2024-04-11 18:43:51 +08:00
Boshen
df11d10a22
Release oxlint and vscode extension v0.2.17 2024-04-11 16:27:56 +08:00