Commit graph

29 commits

Author SHA1 Message Date
Boshen
ca0b4fa08a refactor(tasks): clean up test files and remove libs.txt (#4172) 2024-07-10 17:38:06 +00:00
Boshen
051ceb6539
chore: improve some format by running cargo +nightly fmt 2024-06-19 00:48:30 +08:00
Boshen
982e6f08df chore: make println and eprintln opt-in (#3712)
I noticed accidental `println` can be merged, which isn't really nice.
2024-06-17 10:40:34 +00: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
530455849b chore(tasks): add commit sha to snapshots to make sure submodules are not outdated (#3267)
If submodules are outdated, it'll panic with the following message

```
Repository is outdated, please run `just submodules` to update it.
```

For us maintainers, we'll need the env `UPDATE_SNAPSHOT` to force an update.
2024-05-14 10:18:00 +00:00
overlookmotel
f0cbbbe28c
ci: build each benchmark only with deps it needs (#3221)
This PR builds on #3201 to further speed up the benchmarks and reduce CI
time.

* Build and run each benchmark as separate job (like before).
* But now each bench is only built with the dependencies it needs.
* For linter benchmarks, build benchmark in 1 job (like #3201 does).
* Run each linter fixture in a separate job as they're slow.

This reduces total time to complete benchmarks from between 6m-7m to
~4m40s.

All the individual jobs complete in under 1m30s, except for building
linter benchmark which takes 2m30s. So there won't be the problem of
blocking the CI queue that there was before.

NB: I did try this before, and didn't see a benefit. But I realized
today what I was doing wrong - it only works once the caches are
populated by a previous run on main branch.

So the CI times in this PR won't look good, but once it's merged to
main, it will take effect. Here it is running on main branch of my fork:

https://github.com/overlookmotel/oxc/actions/runs/9030511348

I also added a step to delete the temp artefacts which aren't needed
once the run has completed.
2024-05-10 22:01:24 +08:00
Boshen
5683aceae9
ci: improve benchmark build time by only building once (#3201)
relates #3200
2024-05-08 14:54:10 +08:00
Boshen
ae9d681b4d
feat(transform_conformance): skip windows tests (#3003) 2024-04-16 17:50:43 +08:00
Boshen
85a3653994
feat(transformer): add "_jsxFileName" variable in jsx source plugin (#3000) 2024-04-16 17:40:24 +08:00
Boshen
bd9fc6d169
feat(transformer): react jsx transform (#2961) 2024-04-14 10:50:17 +08:00
Boshen
7710d8caf1
feat(transformer): add compiler assumptions (#2872)
closes #2869
2024-03-31 02:04:21 +00:00
overlookmotel
68f304faa3
feat(tasks): shard linter benchmarks in CI (#2752)
Follow-on from #2751. Further shards linter benchmarks so each fixture runs in its own job.

This reduces total time to run benchmarks by another ~75 secs. So approx 2.5 mins shaved off in total.
2024-03-18 10:50:44 +08:00
overlookmotel
73ec4df61c
chore(benchmark): add radix-ui.jsx as a real world jsx example (#2304)
Following #2297, this adds another benchmark.

This one is from radix-ui website. I've chosen this particular file
because it differs from the other benchmark sources in 3 ways:

1. JSX not TSX (despite the file extension).
2. Contains no logic, only JSX component hierarchy, and content text.
3. Very small (60 LOC).

The last is particularly important, I think. Often developers will be
working on small files (single component per file convention). And some
possible directions for the parser (SIMD etc) involve optimizing chewing
through chunks of text, with a de-opt at the end to process the final
batch of bytes. If that imposes a penalty on short files, this benchmark
will surface it.

---------

Co-authored-by: Boshen <boshenc@gmail.com>
2024-02-05 13:42:45 +08:00
Boshen
018674c56c
chore(benchmark): add cal.com.tsx as a realword tsx example (#2297)
closes #1884
2024-02-04 22:40:55 +08:00
IWANABETHATGUY
4bbc977971
chore: upgrade rustc toolchain to stable 1.75.0 (#1853)
ref: 
https://blog.rust-lang.org/2023/12/28/Rust-1.75.0.html
2023-12-29 12:20:51 +08:00
Boshen
601153fe8f
refactor(benchmark): use more complicated files (#1811)
closes #1806

---------

Co-authored-by: Dunqing <dengqing0821@gmail.com>
2023-12-25 17:27:02 +08:00
Boshen
c61a6c6694
chore(benchmark): remove vue from test benchmark because it is flaky 2023-12-19 19:05:42 +08:00
IWANABETHATGUY
4fb4a85ab1
chore(transformer): 🤖 add diff section when conformance failed in filter mode (#1488) 2023-11-21 21:47:58 +08:00
Dunqing
472707c04e
feat(task/transformer-conformance): skip babel 8 unsupported test cases (#1258)
Prior to babel8, object merging would use `babelHelper.extend`, which
caused most tests to fail
2023-11-13 11:05:36 +08:00
Dunqing
ae71b36f9b
fix(tasks): avoid overriding existing babel options (#1193) 2023-11-08 17:04:59 +08:00
Boshen
1b3b100475
feat(transformer_conformance): read plugins options from babel options.json (#1006)
This PR correctly handles babel `options.json` such as
https://github.com/babel/babel/blob/main/packages/babel-plugin-transform-nullish-coalescing-operator/test/fixtures/assumption-noDocumentAll/options.json
2023-10-17 14:52:51 +08:00
Boshen
7172953fe9
feat(transformer_conformance): snapshot passed and failed tests (#921) 2023-09-16 20:58:31 +08:00
Boshen
2ba18e073c
fix(benchmark): use different data sets for benchmark and minifier test 2023-09-02 20:56:45 +08:00
阿良仔
0fef2d317a
chore: proxy detection for all tasks (#801)
related PR: #740
2023-08-27 17:24:28 +08:00
Boshen
24c56a8b53
Revert "fix(tasks): use the current working directory if project rood is not found"
This reverts commit 971f597036.
2023-08-25 12:56:12 +08:00
Boshen
971f597036
fix(tasks): use the current working directory if project rood is not found 2023-08-25 12:27:55 +08:00
Boshen
7f93e58f10
chore: remove all #[must_use] 2023-05-11 21:08:00 +08:00
Boshen
f0066ea4cc
refactor: unify the usage of std::fmt import 2023-04-27 22:21:59 +08:00
Boshen
a7cd845fff
feat: add cargo minsize task for tracking minification size (#276)
* feat: add `cargo minsize` task for tracking minification size

* add gzip
2023-04-14 13:07:37 +08:00