Commit Graph

11 Commits

Author SHA1 Message Date
Boshen 1193c9dbaf chore(oxfmt): dogfood operator position at line start (#25937)
dogfood
2026-08-20 14:36:47 +00:00
camc314 c9517f75aa refactor(napi/parser): add some missing TS type annotations (#23817) 2026-06-26 10:08:36 +00:00
camc314 ae02b4e7a0 fix(ci/parser): use minimal for vitest reporter (#23457)
The large output from the dot reporter (caused by `RUN_LAZY_TESTS`, `RUN_RAW_TESTS`, `RUN_RAW_RANGE_TESTS` and `RUN_RAW_TOKENS_TESTS`) sometimes causes CI to fail.

This PR switches to the [`minimal` reporter ](https://vitest.dev/guide/reporters.html#minimal-reporter) which should only log on failed test cases.
2026-06-15 14:25:29 +00:00
overlookmotel 1f9c115632 test(estree/tokens): add tests for tokens via raw transfer (#19885)
Implement the beginnings of support for tokens in `napi/parser`.

This PR only adds support for tokens via raw transfer, and behind an undocumented `experimentalTokens` option.

Add tests checking that tokens received on JS side via raw transfer match snapshots for all Test262, AcornJSX, and TypeScript test cases. They do!

The tests are the main purpose of this PR, making sure it works before we switch over to tokens via raw transfer in Oxlint.

We can add full tokens support to `napi/parser` (including via JSON transfer) later on.
2026-03-01 20:02:49 +00:00
Boshen 79689ba59b chore(napi/parser): use dot reporter in CI to reduce log output (#18974)
## Summary

- Use `dot` reporter in CI to avoid logging ~58,000 test names from
`parse-raw.test.ts`
- `parse-raw.test.ts` runs test cases via `it.each()` from Test262
(~46k), TypeScript (~11k), and JSX (~40) fixtures

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-05 18:05:46 +08:00
Boshen 523a30a016 style(all): apply oxfmt default options (#16091)
Embrace the defaults!

---------

Co-authored-by: Yuji Sugiura <y.sugiura.0316@gmail.com>
2025-11-25 15:56:24 +09:00
leaysgur a8e5181ab7 chore(infra): dogfooding oxfmt (#14979)
Fixes #14803

- Added `oxfmt` and `oxfmtrc.jsonc`
- Remove `dprint` plugin and useless ignore paths
- Apply `dprint` again
- Apply `oxfmt`
2025-10-28 01:16:46 +00:00
overlookmotel 0b076b413a test(napi/parser): fix and clarify exclude tests logic (#14409)
Fix a bug in Vitest config for `napi/parser` package. When providing `exclude` property, should extend the default to prevent Vitest searching `node_modules` for test files ([docs](https://vitest.dev/config/)).

Also refactor to clarify the logic of which tests are skipped depending on different `env` vars.
2025-10-07 15:54:08 +00:00
camc314 0ec084708d feat(ci): run napi tests on windows (#14383) 2025-10-07 13:56:24 +00:00
overlookmotel 7e4d04fadf feat(napi/parser): add option to add parent prop to AST nodes with raw transfer (#14344)
Add an option to `oxc-parser` to add `parent` to all AST nodes. This option is only available with raw transfer (not really feasible with JSON transfer, as JSON doesn't support circular references).

This is really for the purposes of JS plugins in Oxlint, so have not included the new deserializers which add `parent` in the `oxc-parser` NPM package, to avoid bloating download size. But it's ideal home is in `napi/parser` so can add it to the conformance tests.

`parent` is correct for all nodes in all Test262 and TypeScript test cases.
2025-10-05 00:32:09 +00:00
overlookmotel bb040bc2d5 refactor(parser, linter): replace .mjs files with .js (#14045)
Now that `apps/oxlint` and `napi/parser` are both ESM packages (#13723 and #14042), we can use `.js` file extensions for all ESM files, rather than the mix of `.js` and `.mjs` file we had previously.

It's less confusing having to remember what's `.js` and what's `.mjs`, and avoids ugly workarounds like #14038 (`.d.mts`??).
2025-09-23 14:47:40 +00:00