camc314
3c534aeb5a
refactor(linter): refactor LintBuilder to prep for nested configs ( #8034 )
...
More simplification/preparations for nested configurations:
1. renames `LinterBuilder` to `ConfigStoreBuilder`
2. moves the `options` logic out of `LintBuilder`
3. make `ConfigStoreBuilder::build()` return a result (currently always returns OK, but it will return errors when nested config is implemented
The next steps to implement nested config which i hope to do in the next week are:
1. refactor the `from_oxlintrc` to accept a file path
2. introduce a new method on `ConfigStoreBuilder` (name TBC) that walks all child directories, collecting `.oxlintrc` files. these will be put into `ConfigStore` as a hash map of path > config.
2025-01-05 04:08:26 +00:00
overlookmotel
6f8bb1cebf
ci(benchmarks): simplify benchmarks ( #7939 )
...
Pure refactor. Use `bench_function` instead of `bench_with_input` and
just borrow data from outside closure. This shortens the code and (I
think) makes it easier to read.
2024-12-16 22:01:01 +08:00
overlookmotel
3c73e86f8c
ci(codegen): simplify codegen benchmark ( #7938 )
...
Follow-on after #7934 . Pure refactor. Make codegen benchmark simpler.
2024-12-16 13:51:40 +00:00
camc314
9b3a2beaa3
refactor(benchmark): transform code before codegen ( #7934 )
...
@overlookmotel suggested this [here](https://github.com/oxc-project/oxc/pull/7926#discussion_r1886023496 ).
2024-12-16 13:08:11 +00:00
Boshen
348d4f451a
feat(sourcemap): move oxc_sourcemap to github.com/oxc-project/oxc-sourcemap ( #7604 )
...
It's mostly stable so we can v1.0.0 it.
And we will create cyclic dependency with StringWizard soon.
2024-12-03 11:59:43 +00:00
Boshen
0f3f67a05a
refactor(linter): add capability of adding semantic data to module record ( #7561 )
...
closes #5814
closes #5816
2024-12-01 08:14:43 +00:00
Boshen
c2ced15dfd
feat(parser,linter)!: use a different ModuleRecord for linter ( #7554 )
...
The parser returns a simple `ModuleRecord` that is allocated in the arena for performance reasons.
The linter uses a more complicated, `Send` + `Sync` `ModuleRecord` that will hold more cross-module information.
The next step is to return more esm information from the parser to eliminated the need of the `oxc_module_lexer` crate.
2024-11-30 16:02:01 +00:00
Boshen
0be5233c84
refactor(semantic)!: remove ModuleRecord from Semantic ( #7548 )
...
`ModuleRecord` will eventually be moved to be linter specific thing for cross module data sharing, which means we can add more data to it.
2024-11-29 16:30:54 +00:00
Boshen
8a788b8f4b
feat(parser)!: Build ModuleRecord directly in parser ( #7546 )
...
This has the benefit of:
* expose dynamic import / import meta info from parser
* 1 less ast shallow in semantic builder
* no ast walk in oxc's module lexer
* some more benefits coming soon
2024-11-29 14:50:42 +00:00
camc314
3dcac1ae0b
feat(linter): react/exhaustive-deps ( #7151 )
...
Firstly, a massive thanks to @alisnic for starting this (incredibly complicated) lint rule in https://github.com/oxc-project/oxc/pull/2637 !
still a draft. current state:
3x false positives (all todo with refs)
3x false negatives (TS will catch these
13x false negatvies todo with refs
1x false negative TODO
closes #2637
relates to #2174
2024-11-12 11:42:47 +00:00
Boshen
846711cf41
feat(transformer)!: change API to take a &TransformOptions instead of TransformOptions ( #7213 )
...
closes #7185
`TransformOption`s has an initialization cost, it should be initialized once and shared across files.
2024-11-09 06:01:13 +00:00
Dunqing
70e2582726
ci(transformer): enable unfinished plugins in benchmark ( #7040 )
...
Even the plugins are unfinished, we still want to enable all of them to track the performance changes during the development.
2024-11-02 15:17:21 +00:00
Boshen
fcaba4a92a
feat(transformer): add TransformerOptions::env with EnvOptions ( #7037 )
2024-10-31 12:30:32 +00:00
Boshen
fe28bae1e0
chore: remove unnecessary packageManager from package.json
2024-10-25 10:38:02 +08:00
Boshen
8d9a2da9f3
ci(benchmark): add small test file to linter benchmark ( #6572 )
...
closes #6540
2024-10-15 02:37:22 +00:00
Boshen
435a89c6e4
refactor(oxc): remove useless allocator.alloc(program) calls ( #6571 )
2024-10-15 02:21:20 +00:00
Dunqing
c67acfaae7
chore(transformer): turns off async_to_generator plugin in enable_all ( #6554 )
...
The plugin is not ready to test
2024-10-15 02:08:28 +00:00
Boshen
91c87dd380
refactor(codegen)!: remove Codegen::enableSourceMap API ( #6452 )
2024-10-12 04:56:43 +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
2b7be08af4
feat(ast)! add source_text to Program ( #6444 )
2024-10-11 04:13:41 +00:00
DonIsaac
80266d85c9
feat(linter)!: support plugins in oxlint config files ( #6088 )
...
> Closes #5046
This PR migrates the linter crate and oxlint app to use the new `LinterBuilder` API. This PR has the following effects:
1. `plugins` in oxlint config files are now supported
2. irons out weirdness when using CLI args and config files together. CLI args are now always applied on top of config file settings, overriding them.
# Breaking Changes
Before, config files would override rules set in CLI arguments. For example, running this command:
```sh
oxlint -A correctness -c oxlintrc.json
```
With this config file
```jsonc
// oxlintrc.json
{
"rules": {
"no-const-assign": "error"
}
}
```
Would result in a single rule, `no-const-assign` being turned on at an error level with all other rules disabled (i.e. set to "allow").
Now, **CLI arguments will override config files**. That same command with the same config file will result with **all rules being disabled**.
## Details
For a more in-depth explanation, assume we are running the below command using the `oxlintrc.json` file above:
```sh
oxlint -A all -W correctness -A all -W suspicious -c oxlintrc.json
```
### Before
> Note: GitHub doesn't seem to like deeply nested lists. Apologies for the formatting.
Here was the config resolution process _before_ this PR:
<details><summary>Before Steps</summary>
1. Start with a default set of filters (["correctness", "warn"]) if no filters were passed to the CLI. Since some were, the filter list starts out empty.
2. Apply each filter taken from the CLI from left to right. When a filter allows a rule or category, it clears the configured set of rules. So applying those filters looks like this
a. start with an empty list `[]`
b. `("all", "allow")` -> `[]`
c. `("correctness", "warn")` -> `[ <correctness rules> ]`
d. `("all", "allow")` -> `[]`
e. `("suspicious", "warn")` -> `[ <suspicious rules> ]`. This is the final rule set for this step
3. Apply overrides from `oxlintrc.json`. This is where things get a little funky, as mentioned in point 2 of what this PR does. At this point, all rules in the rules list are only from the CLI.
a. If a rule is only set in the CLI and is not present in the config file, there's no effect
b. If a rule is in the config file but not the CLI, it gets inserted into the list.
c. If a rule is already in the list and in the config file
i. If the rule is only present once (e.g. `"no-loss-of-precision": "error"`), unconditionally override whatever was in the CLI with what was set in the config file
ii. If the rule is present twice (e.g. `"no-loss-of-precision": "off", "@typescript-eslint/no-loss-of-precision": "error"`),
a. if all rules in the config file are set to `allow`, then turn the rule off
b. If one of them is `warn` or `deny`, then update the currently-set rule's config object, but _leave its severity alone_.
So, for our example, the final rule set would be `[<all suspicious rules: "warn">, no-const-assign: "error"]`
</details>
### After
Rule filters were completely re-worked in a previous PR. Now, lint filters aren't kept on hand-only the rule list is.
<details><summary>After Steps</summary>
1. Start with the default rule set, which is all correctness rules for all enabled plugins (`[<all correctness rules: "warn">]`)
2. Apply configuration from `oxlintrc.json` _first_.
a. If the rule is warn/deny exists in the list already, update its severity and config object. If it's not in the list, add it.
b. If the rule is set to allow, remove it from the list.
The list is now `[<all correctness rules except no-const-assign: "warn">, no-const-assign: "error"]`.
3. Apply each filter taken from the CLI from left to right. This works the same way as before. So, after they're applied, the list is now `[<suspicous rules: "warn">]`
</details>
2024-10-10 19:21:50 +00:00
Boshen
f0a97811e4
chore(deps): update pnpm to v9.12.1 ( #6365 )
2024-10-08 14:54:27 +00:00
Boshen
020bb80b65
refactor(codegen)!: change to CodegenReturn::code and CodegenReturn::map ( #6310 )
2024-10-06 05:05:47 +00:00
overlookmotel
4f6bc79734
refactor(transformer)!: remove source_type param from Transformer::new ( #6251 )
...
Closes #6248 .
2024-10-03 00:21:01 +00:00
overlookmotel
911e4e58ab
ci(minifier): minifier benchmark measure only the minifier itself ( #6222 )
...
Minifier benchmark currently includes the time to run parser and semantic as well as the minifier itself. Similar to transformer benchmark, only measure the minifier itself in the benchmark.
This will give us a clearer picture of performance changes, and should also reduce variance in the benchmarks.
2024-10-01 17:43:39 +00:00
renovate[bot]
646cd1d1ab
chore(deps): update npm packages ( #6164 )
...
This PR contains the following updates:
| Package | Change | Age | Adoption | Passing | Confidence |
|---|---|---|---|---|---|
| [express](http://expressjs.com/ )
([source](https://redirect.github.com/expressjs/express )) | [`4.19.2` ->
`4.21.0`](https://renovatebot.com/diffs/npm/express/4.19.2/4.21.0 ) |
[](https://docs.renovatebot.com/merge-confidence/ )
|
[](https://docs.renovatebot.com/merge-confidence/ )
|
[](https://docs.renovatebot.com/merge-confidence/ )
|
[](https://docs.renovatebot.com/merge-confidence/ )
|
| [pnpm](https://pnpm.io )
([source](https://redirect.github.com/pnpm/pnpm )) | [`9.9.0` ->
`9.11.0`](https://renovatebot.com/diffs/npm/pnpm/9.9.0/9.11.0 ) |
[](https://docs.renovatebot.com/merge-confidence/ )
|
[](https://docs.renovatebot.com/merge-confidence/ )
|
[](https://docs.renovatebot.com/merge-confidence/ )
|
[](https://docs.renovatebot.com/merge-confidence/ )
|
---
### Release Notes
<details>
<summary>expressjs/express (express)</summary>
###
[`v4.21.0`](https://redirect.github.com/expressjs/express/releases/tag/4.21.0 )
[Compare
Source](https://redirect.github.com/expressjs/express/compare/4.20.0...4.21.0 )
#### What's Changed
- Deprecate `"back"` magic string in redirects by
[@​blakeembrey](https://redirect.github.com/blakeembrey ) in
[https://github.com/expressjs/express/pull/5935 ](https://redirect.github.com/expressjs/express/pull/5935 )
- finalhandler@1.3.1 by
[@​wesleytodd](https://redirect.github.com/wesleytodd ) in
[https://github.com/expressjs/express/pull/5954 ](https://redirect.github.com/expressjs/express/pull/5954 )
- fix(deps): serve-static@1.16.2 by
[@​wesleytodd](https://redirect.github.com/wesleytodd ) in
[https://github.com/expressjs/express/pull/5951 ](https://redirect.github.com/expressjs/express/pull/5951 )
- Upgraded dependency qs to 6.13.0 to match qs in body-parser by
[@​agadzinski93](https://redirect.github.com/agadzinski93 ) in
[https://github.com/expressjs/express/pull/5946 ](https://redirect.github.com/expressjs/express/pull/5946 )
#### New Contributors
- [@​agadzinski93](https://redirect.github.com/agadzinski93 ) made
their first contribution in
[https://github.com/expressjs/express/pull/5946 ](https://redirect.github.com/expressjs/express/pull/5946 )
**Full Changelog**:
https://github.com/expressjs/express/compare/4.20.0...4.21.0
###
[`v4.20.0`](https://redirect.github.com/expressjs/express/blob/HEAD/History.md#4200--2024-09-10 )
[Compare
Source](https://redirect.github.com/expressjs/express/compare/4.19.2...4.20.0 )
\==========
- deps: serve-static@0.16.0
- Remove link renderization in html while redirecting
- deps: send@0.19.0
- Remove link renderization in html while redirecting
- deps: body-parser@0.6.0
- add `depth` option to customize the depth level in the parser
- IMPORTANT: The default `depth` level for parsing URL-encoded data is
now `32` (previously was `Infinity`)
- Remove link renderization in html while using `res.redirect`
- deps: path-to-regexp@0.1.10
- Adds support for named matching groups in the routes using a regex
- Adds backtracking protection to parameters without regexes defined
- deps: encodeurl@~2.0.0
- Removes encoding of `\`, `|`, and `^` to align better with URL spec
- Deprecate passing `options.maxAge` and `options.expires` to
`res.clearCookie`
- Will be ignored in v5, clearCookie will set a cookie with an expires
in the past to instruct clients to delete the cookie
</details>
<details>
<summary>pnpm/pnpm (pnpm)</summary>
###
[`v9.11.0`](https://redirect.github.com/pnpm/pnpm/compare/v9.10.0...v9.11.0 )
[Compare
Source](https://redirect.github.com/pnpm/pnpm/compare/v9.10.0...v9.11.0 )
###
[`v9.10.0`](https://redirect.github.com/pnpm/pnpm/releases/tag/v9.10.0 ):
pnpm 9.10
[Compare
Source](https://redirect.github.com/pnpm/pnpm/compare/v9.9.0...v9.10.0 )
#### Minor Changes
- Support for a new CLI flag, `--exclude-peers`, added to the `list` and
`why` commands. When `--exclude-peers` is used, peer dependencies are
not printed in the results, but dependencies of peer dependencies are
still scanned
[#​8506](https://redirect.github.com/pnpm/pnpm/pull/8506 ).
- Added a new setting to `package.json` at
`pnpm.auditConfig.ignoreGhsas` for ignoring vulnerabilities by their
GHSA code
[#​6838](https://redirect.github.com/pnpm/pnpm/issues/6838 ).
For instance:
```json
{
"pnpm": {
"auditConfig": {
"ignoreGhsas": [
"GHSA-42xw-2xvc-qx8m",
"GHSA-4w2v-q235-vp99",
"GHSA-cph5-m8f7-6c5x",
"GHSA-vh95-rmgr-6w4m"
]
}
}
}
```
#### Patch Changes
- Throw an exception if pnpm switches to the same version of itself.
- Reduce memory usage during peer dependencies resolution.
#### Platinum Sponsors
<table>
<tbody>
<tr>
<td align="center" valign="middle">
<a href="https://bit.dev/?utm_source=pnpm&utm_medium=release_notes "
target="_blank"><img src="https://pnpm.io/img/users/bit.svg "
width="80"></a>
</td>
<td align="center" valign="middle">
<a href="https://figma.com/?utm_source=pnpm&utm_medium=release_notes "
target="_blank"><img src="https://pnpm.io/img/users/figma.svg "
width="80"></a>
</td>
</tr>
</tbody>
</table>
#### Gold Sponsors
<table>
<tbody>
<tr>
<td align="center" valign="middle">
<a href="https://discord.com/?utm_source=pnpm&utm_medium=release_notes "
target="_blank">
<picture>
<source media="(prefers-color-scheme: light)"
srcset="https://pnpm.io/img/users/discord.svg " />
<source media="(prefers-color-scheme: dark)"
srcset="https://pnpm.io/img/users/discord_light.svg " />
<img src="https://pnpm.io/img/users/discord.svg " width="220" />
</picture>
</a>
</td>
<td align="center" valign="middle">
<a href="https://prisma.io/?utm_source=pnpm&utm_medium=release_notes "
target="_blank">
<picture>
<source media="(prefers-color-scheme: light)"
srcset="https://pnpm.io/img/users/prisma.svg " />
<source media="(prefers-color-scheme: dark)"
srcset="https://pnpm.io/img/users/prisma_light.svg " />
<img src="https://pnpm.io/img/users/prisma.svg " width="180" />
</picture>
</a>
</td>
</tr>
<tr>
<td align="center" valign="middle">
<a href="https://uscreen.de/?utm_source=pnpm&utm_medium=release_notes "
target="_blank">
<picture>
<source media="(prefers-color-scheme: light)"
srcset="https://pnpm.io/img/users/uscreen.svg " />
<source media="(prefers-color-scheme: dark)"
srcset="https://pnpm.io/img/users/uscreen_light.svg " />
<img src="https://pnpm.io/img/users/uscreen.svg " width="180" />
</picture>
</a>
</td>
<td align="center" valign="middle">
<a
href="https://www.jetbrains.com/?utm_source=pnpm&utm_medium=release_notes "
target="_blank">
<picture>
<source media="(prefers-color-scheme: light)"
srcset="https://pnpm.io/img/users/jetbrains.svg " />
<source media="(prefers-color-scheme: dark)"
srcset="https://pnpm.io/img/users/jetbrains.svg " />
<img src="https://pnpm.io/img/users/jetbrains.svg " width="180" />
</picture>
</a>
</td>
</tr>
<tr>
<td align="center" valign="middle">
<a href="https://nx.dev/?utm_source=pnpm&utm_medium=release_notes "
target="_blank">
<picture>
<source media="(prefers-color-scheme: light)"
srcset="https://pnpm.io/img/users/nx.svg " />
<source media="(prefers-color-scheme: dark)"
srcset="https://pnpm.io/img/users/nx_light.svg " />
<img src="https://pnpm.io/img/users/nx.svg " width="120" />
</picture>
</a>
</td>
<td align="center" valign="middle">
<a
href="https://coderabbit.ai/?utm_source=pnpm&utm_medium=release_notes "
target="_blank">
<picture>
<source media="(prefers-color-scheme: light)"
srcset="https://pnpm.io/img/users/coderabbit.svg " />
<source media="(prefers-color-scheme: dark)"
srcset="https://pnpm.io/img/users/coderabbit_light.svg " />
<img src="https://pnpm.io/img/users/coderabbit.svg " width="220" />
</picture>
</a>
</td>
</tr>
</tbody>
</table>
#### Our Silver Sponsors
<table>
<tbody>
<tr>
<td align="center" valign="middle">
<a
href="https://leniolabs.com/?utm_source=pnpm&utm_medium=release_notes "
target="_blank">
<img src="https://pnpm.io/img/users/leniolabs.jpg " width="80">
</a>
</td>
<td align="center" valign="middle">
<a href="https://vercel.com/?utm_source=pnpm&utm_medium=release_notes "
target="_blank">
<picture>
<source media="(prefers-color-scheme: light)"
srcset="https://pnpm.io/img/users/vercel.svg " />
<source media="(prefers-color-scheme: dark)"
srcset="https://pnpm.io/img/users/vercel_light.svg " />
<img src="https://pnpm.io/img/users/vercel.svg " width="180" />
</picture>
</a>
</td>
</tr>
<tr>
<td align="center" valign="middle">
<a href="https://depot.dev/?utm_source=pnpm&utm_medium=release_notes "
target="_blank">
<picture>
<source media="(prefers-color-scheme: light)"
srcset="https://pnpm.io/img/users/depot.svg " />
<source media="(prefers-color-scheme: dark)"
srcset="https://pnpm.io/img/users/depot_light.svg " />
<img src="https://pnpm.io/img/users/depot.svg " width="200" />
</picture>
</a>
</td>
<td align="center" valign="middle">
<a href="https://moonrepo.dev/?utm_source=pnpm&utm_medium=release_notes "
target="_blank">
<picture>
<source media="(prefers-color-scheme: light)"
srcset="https://pnpm.io/img/users/moonrepo.svg " />
<source media="(prefers-color-scheme: dark)"
srcset="https://pnpm.io/img/users/moonrepo_light.svg " />
<img src="https://pnpm.io/img/users/moonrepo.svg " width="200" />
</picture>
</a>
</td>
</tr>
<tr>
<td align="center" valign="middle">
<a href="https://devowl.io/?utm_source=pnpm&utm_medium=release_notes "
target="_blank">
<picture>
<source media="(prefers-color-scheme: light)"
srcset="https://pnpm.io/img/users/devowlio.svg " />
<source media="(prefers-color-scheme: dark)"
srcset="https://pnpm.io/img/users/devowlio.svg " />
<img src="https://pnpm.io/img/users/devowlio.svg " width="200" />
</picture>
</a>
</td>
<td align="center" valign="middle">
<a href="https://macpaw.com/?utm_source=pnpm&utm_medium=release_notes "
target="_blank">
<picture>
<source media="(prefers-color-scheme: light)"
srcset="https://pnpm.io/img/users/macpaw.svg " />
<source media="(prefers-color-scheme: dark)"
srcset="https://pnpm.io/img/users/macpaw_light.svg " />
<img src="https://pnpm.io/img/users/macpaw.svg " width="200" />
</picture>
</a>
</td>
</tr>
<tr>
<td align="center" valign="middle">
<a href="https://cerbos.dev/?utm_source=pnpm&utm_medium=release_notes "
target="_blank">
<picture>
<source media="(prefers-color-scheme: light)"
srcset="https://pnpm.io/img/users/cerbos.svg " />
<source media="(prefers-color-scheme: dark)"
srcset="https://pnpm.io/img/users/cerbos_light.svg " />
<img src="https://pnpm.io/img/users/cerbos.svg " width="180" />
</picture>
</a>
</td>
</tr>
</tbody>
</table>
</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:eyJjcmVhdGVkSW5WZXIiOiIzOC45Ny4wIiwidXBkYXRlZEluVmVyIjoiMzguOTcuMCIsInRhcmdldEJyYW5jaCI6Im1haW4iLCJsYWJlbHMiOltdfQ==-->
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-09-29 09:48:23 +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
db4f16a98f
refactor(semantic): call with_trivias before build_with_jsdoc ( #5875 )
2024-09-19 04:12:57 +00:00
overlookmotel
2e93548816
ci(transformer): enable arrow function transform in transformer benchmark ( #5851 )
2024-09-18 11:08:27 +00:00
overlookmotel
3230ae5842
feat(semantic): add SemanticBuilder::with_excess_capacity ( #5762 )
...
Add `SemanticBuilder::with_excess_capacity` method to request that `SemanticBuilder` over-allocate space in `Semantic`'s `Vec`s.
Use this method to reserve 200% extra capacity for transformer to create more scopes, symbols and references.
200% is an unscientific guess of how much extra capacity is required. Obviously it depends on what transforms are enabled and content of the source code.
2024-09-14 15:02:16 +00:00
overlookmotel
3ce8546393
ci(benchmarks): NeverGrowInPlaceAllocator not pub ( #5727 )
...
Global allocator used in benchmarks `NeverGrowInPlaceAllocator` doesn't need to be `pub`.
2024-09-12 12:58:13 +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
DonIsaac
9e9435f03b
refactor(linter): add LintFilter ( #5685 )
...
Re-creation of #5329
2024-09-11 03:19:04 +00:00
DonIsaac
5ae9b48509
refactor(linter): start internal/external split of OxlintOptions ( #5659 )
...
re-creation of #5141
2024-09-10 03:19:04 +00:00
Boshen
63a830e08c
chore(dprint): format toml files ( #5599 )
...
Co-authored-by: Boshen <1430279+Boshen@users.noreply.github.com>
2024-09-08 14:26:16 +08:00
Boshen
d00a1f6511
chore: use dprint to format js, json and markdown
2024-09-08 13:24:58 +08:00
Boshen
f7912ad6c0
chore: remove unused pnpm-lock.yaml
2024-09-07 13:11:34 +08:00
Boshen
b06052501a
refactor(semantic)!: remove source_type argument from SemanticBuilder::new ( #5553 )
...
Realized we can get the source type from the AST.
The next PR will introduce `unambiguous` to `SourceType` and directly set `Program::source_type` to either `script` or `module`.
2024-09-06 16:40:10 +00:00
Boshen
32d4bbb519
feat(transformer): add TransformOptions::enable_all method ( #5495 )
...
Make it **really** explicit about which transformer options are being
turned on. I also need this in monitor-oxc.
2024-09-06 12:04:06 +08: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
Boshen
9c937e06e8
fix(benchmark): do not measure initialization of transformer options ( #5442 )
...
relates #5267
2024-09-04 14:52:21 +00:00
dalaoshu
4473779074
feat(linter/node): implement no-exports-assign ( #5370 )
2024-09-03 07:53:14 -04:00
Boshen
0a5780d328
ci: fix broken benchmark ( #5424 )
2024-09-03 18:21:39 +08:00
renovate[bot]
8cf9cf9919
chore(deps): update npm packages ( #5392 )
...
This PR contains the following updates:
| Package | Change | Age | Adoption | Passing | Confidence |
|---|---|---|---|---|---|
| [axios](https://axios-http.com )
([source](https://togithub.com/axios/axios )) | [`1.7.5` ->
`1.7.7`](https://renovatebot.com/diffs/npm/axios/1.7.5/1.7.7 ) |
[](https://docs.renovatebot.com/merge-confidence/ )
|
[](https://docs.renovatebot.com/merge-confidence/ )
|
[](https://docs.renovatebot.com/merge-confidence/ )
|
[](https://docs.renovatebot.com/merge-confidence/ )
|
| [pnpm](https://pnpm.io ) ([source](https://togithub.com/pnpm/pnpm )) |
[`9.8.0` -> `9.9.0`](https://renovatebot.com/diffs/npm/pnpm/9.8.0/9.9.0 )
|
[](https://docs.renovatebot.com/merge-confidence/ )
|
[](https://docs.renovatebot.com/merge-confidence/ )
|
[](https://docs.renovatebot.com/merge-confidence/ )
|
[](https://docs.renovatebot.com/merge-confidence/ )
|
---
### Release Notes
<details>
<summary>axios/axios (axios)</summary>
###
[`v1.7.7`](https://togithub.com/axios/axios/blob/HEAD/CHANGELOG.md#177-2024-08-31 )
[Compare
Source](https://togithub.com/axios/axios/compare/v1.7.6...v1.7.7 )
##### Bug Fixes
- **fetch:** fix stream handling in Safari by fallback to using a stream
reader instead of an async iterator;
([#​6584](https://togithub.com/axios/axios/issues/6584 ))
([d198085](d1980854fe ))
- **http:** fixed support for IPv6 literal strings in url
([#​5731](https://togithub.com/axios/axios/issues/5731 ))
([364993f](364993f0d8 ))
##### Contributors to this release
- <img
src="https://avatars.githubusercontent.com/u/10539109?v=4&s=18 "
alt="avatar" width="18"/> [Rishi556](https://togithub.com/Rishi556
"+39/-1 (#​5731 )")
- <img
src="https://avatars.githubusercontent.com/u/12586868?v=4&s=18 "
alt="avatar" width="18"/> [Dmitriy
Mozgovoy](https://togithub.com/DigitalBrainJS "+27/-7 (#​6584 )")
###
[`v1.7.6`](https://togithub.com/axios/axios/blob/HEAD/CHANGELOG.md#176-2024-08-30 )
[Compare
Source](https://togithub.com/axios/axios/compare/v1.7.5...v1.7.6 )
##### Bug Fixes
- **fetch:** fix content length calculation for FormData payload;
([#​6524](https://togithub.com/axios/axios/issues/6524 ))
([085f568](085f56861a ))
- **fetch:** optimize signals composing logic;
([#​6582](https://togithub.com/axios/axios/issues/6582 ))
([df9889b](df9889b83c ))
##### Contributors to this release
- <img
src="https://avatars.githubusercontent.com/u/12586868?v=4&s=18 "
alt="avatar" width="18"/> [Dmitriy
Mozgovoy](https://togithub.com/DigitalBrainJS "+98/-46 (#​6582 )")
- <img
src="https://avatars.githubusercontent.com/u/3534453?v=4&s=18 "
alt="avatar" width="18"/> [Jacques
Germishuys](https://togithub.com/jacquesg "+5/-1 (#​6524 )")
- <img
src="https://avatars.githubusercontent.com/u/53894505?v=4&s=18 "
alt="avatar" width="18"/> [kuroino721](https://togithub.com/kuroino721
"+3/-1 (#​6575 )")
</details>
<details>
<summary>pnpm/pnpm (pnpm)</summary>
### [`v9.9.0`](https://togithub.com/pnpm/pnpm/compare/v9.8.0...v9.9.0 )
[Compare Source](https://togithub.com/pnpm/pnpm/compare/v9.8.0...v9.9.0 )
</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://togithub.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:eyJjcmVhdGVkSW5WZXIiOiIzOC41Ni4wIiwidXBkYXRlZEluVmVyIjoiMzguNTYuMCIsInRhcmdldEJyYW5jaCI6Im1haW4iLCJsYWJlbHMiOltdfQ==-->
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-09-01 19:31:44 +00:00
Dunqing
783a31beb6
ci(benchmark/transformer): enable all > es6 plugins ( #5324 )
...
There is a bug in the react refresh plugin, I will fix it in follow-up PR and enable the plugin in the benchmark
2024-08-30 09:30:17 +00:00
Boshen
3ae94b8801
refactor(semantic): change build_module_record to accept &Path instead of PathBuf
2024-08-30 12:24:49 +08:00
DonIsaac
270fc53401
chore(bench): include fixers in linter benchmarks ( #5307 )
...
Fixing code is an important part of linter logic. We want to make sure fixers for each rule, and the code responsible for applying those fixes, are included in benchmarks.
As it currently stands, fixer closures are applied regardless of whether the user wants fixers to be applied. However, this is an implementation detail and is subject to change. I also want to bench the performance of `Fixer`.
2024-08-28 23:19:43 +00:00
overlookmotel
b479afdafc
ci: transformer benchmark measure transformer itself only ( #5193 )
...
Transformer benchmark measure only the transformer itself. Parse, generate `Semantic`, and drop `Semantic` outside of the measured section.
This should:
1. Give us greater visibility of how changes to transformer affect its performance.
2. Reduce variance in transformer benchmarks, since they will no longer include the variance introduced by `SemanticBuilder`.
Not ready to merge yet. We should first add an "end to end" benchmark testing the entire compilation process (parse - semantic - transform - minify - codegen).
This PR depends on https://github.com/Boshen/criterion2.rs/pull/49 . This PR currently makes Oxc's dependency on `criterion2` a git dependency on that PR's branch. That can be changed once the upstream PR is merged.
2024-08-27 01:53:27 +00:00
overlookmotel
7c4f009521
refactor(ci): include drop in semantic benchmark ( #5245 )
...
Include dropping `Semantic` in semantic benchmark measure.
If you create a `Semantic`, you have to drop it, so the time it takes to
drop is part of the cost of using this API, and we should be working to
reduce it. Therefore I think it should be included in the benchmark.
It'll be interesting to see what effect a PR like #5232 which removes a
bunch of `Vec`s from `Semantic` has on the drop time.
2024-08-27 09:30:52 +08:00