Commit Graph

34 Commits

Author SHA1 Message Date
camc314 204fa80b5d ci(labeler): label lexer PRs (#26278)
## Summary

- automatically apply `A-lexer` to changes under `crates/oxc_lexer`
- keep parser-internal lexer changes covered by the existing `A-parser` rule
2026-09-03 09:17:38 +00:00
camc314 3bf05309dd ci(labeler): label codegen package PRs (#25784)
## Summary

- automatically apply A-codegen to changes under packages/codegen
- keep the Rust and TypeScript code generators in the same functional area

## Naming

Reuse A-codegen because recent packages/codegen PRs already receive it manually. A-printer is stale, while names such as A-codegen-js or P-codegen would introduce a distinction or label prefix the repository does not currently use.
2026-08-18 13:25:19 +00:00
camc314 e60f50b7c8 ci(labeler): label React Compiler PRs (#25782)
## Summary

- automatically apply the A-react-compiler label to React Compiler changes
- cover the compiler crate, linter bridge, N-API binding, benchmark, and release workflow
2026-08-17 11:29:31 +00:00
camc314 6d8b3e2b62 ci(labeler): label ECMAScript PRs (#25783)
## Summary

- automatically apply the A-ecmascript label to changes in crates/oxc_ecmascript
- add the corresponding repository area label
2026-08-17 10:36:09 +00:00
Boshen 1c4f519e36 feat(napi): add Relay transform plugin (#25503)
## What

Ports the Relay `graphql` tagged template transform (babel-plugin-relay / swc_relay) as an individual napi transform, per #24914:

- **`crates/oxc_relay`** — the core transform as its own crate (modeled on `oxc_react_compiler`): replaces `graphql` tagged templates with references to relay-compiler artifacts. Definition names are extracted textually like `swc_relay` (equivalent to `\b(fragment|mutation|query|subscription)\s+(\w+)` with `#` comments stripped; hand-rolled scanner, no regex dependency).
- **`napi/transform-relay`** (`oxc-transform-relay`) — standalone napi package copied from the `napi/transform-react` template: parse → semantic → relay traverse → codegen. Only `graphql` tags are rewritten; TypeScript/JSX syntax is preserved untouched, so the output composes with any downstream toolchain.

## Options

| option | default | behavior |
|---|---|---|
| `artifactDirectory` | unset | when set, the import path is computed lexically relative to the transformed file (babel-plugin-relay `getRelativeImportPath` semantics — swc emits absolute paths instead); unset → `./__generated__/` next to the file |
| `language` | `javascript` | `typescript` imports `Name.graphql.ts`, otherwise `Name.graphql.js` |
| `eagerEsModules` | `true` | hoisted default imports (babel-plugin-relay ≥ v17 parity); `false` emits inline `require()` (`@swc/plugin-relay` / Next.js behavior) |

A `graphql` tag with no extractable definition name produces an error diagnostic (babel throws; swc silently skips).

Not supported, documented in both READMEs: dev-mode artifact hash validation, `jsModuleFormat: "haste"`, `isDevVariableName`, swc's Next.js-specific `projects`/`pagesDir`, and GraphQL document validation.

closes #24914

---

Implemented with Claude Code.
2026-08-13 13:56:01 +00:00
leaysgur 0fa91283fd refactor(formatter,formatter_tests): move out prettier JS,TS,JSDoc conformance from tasks/ (#25477)
Migration from tasks/prettier_conformance to each crate test using oxc_formatter_tests, for JS/TS and JSDoc.
2026-08-12 00:48:32 +00:00
Boshen 85d0f4dd1f feat(napi): add React Compiler transform binding (#24934)
Adds the `oxc-transform-react` N-API binding and its public CI and publish workflows.

AI-assisted.
2026-07-29 09:08:58 +00:00
leaysgur 2e241c154f chore(ci): updatelabeler.yml (#24210) 2026-07-06 07:42:56 +00:00
camc314 291dd124f4 fix(ci): exclude generated oxlint config from plugin label (#23093)
This updates the `A-linter-plugins` label rule so changes to the generated oxlint package config no longer trigger the plugin-area label.

The old matcher used `apps/oxlint/src-js/**`, which also caught `apps/oxlint/src-js/package/config.generated.ts`. This splits that coverage into root `src-js` files, non-package subdirectories, and package files except `config.generated.ts`, keeping the rest of the existing plugin/test/conformance coverage intact.
2026-06-07 18:47:42 +00:00
overlookmotel 035b2f2894 ci(labeler): add A-allocator label to PRs touching oxc_allocator crate (#20978) 2026-04-02 17:03:44 +00:00
Sysix e15ea3fddc fix(ci): remove negative glob for "A-cli" label (#20714)
half reverting https://github.com/oxc-project/oxc/pull/20627
Now the label "A-cli" is applied for files outside oxfmt and oxlint apps.

Example PR: https://github.com/oxc-project/oxc/pull/20576
<img width="607" height="82" alt="grafik" src="https://github.com/user-attachments/assets/ac49328d-36fa-4d15-b32e-3427818fb241" />
2026-03-24 21:14:25 +00:00
Sysix a2ea8861a2 chore(ci): add label A-editor label to apps/oxlint/src/lsp/** and oxfmt (#20627) 2026-03-24 20:43:30 +00:00
Boshen 6fca2f7f60 chore(infra): use oxfmt for all files, remove dprint (#16599)
Toml formatting is missing but there's only a few toml files, can wait
for oxfmt plugins.

- [x] Something is slow, can't figure out why, need #16607
2025-12-15 12:06:24 +00:00
overlookmotel c41101440a ci(pr): label PRs as A-linter-plugins if they touch apps/oxlint/conformance directory (#16661)
#16650 added conformance tests for Oxlint JS plugins in `apps/oxlint/conformance`. Tag any PRs which alter the contents of this directory with `A-linter-plugins` label.
2025-12-09 18:37:48 +00:00
overlookmotel 459e2b8732 ci(pr): label PRs as A-linter-plugins if they touch apps/oxlint/test directory (#16504)
These tests almost exclusively relate to JS plugins.
2025-12-04 16:50:40 +00:00
overlookmotel 9b7edcdf5b ci(labeler): label PRs with changes to apps/oxlint/src-js dir as A-linter-plugins (#15677)
Add `A-linter-plugins` label to any PR which alters files in
`apps/oxlint/src-js`. It's tiresome adding the label by hand to loads of
PRs.
2025-11-13 23:25:01 +08:00
overlookmotel 7db4d3508e ci(pr): add package labels for changes to napi and apps (#13853)
Add "A-linter" label to PRs which change files in `apps/oxlint`.

Ditto for changes to files in `napi` or `apps` directories.

It was becoming annoying manually adding "A-linter" label to every PR related to Oxlint plugins, which mostly touch files in `apps/oxlint` directory.
2025-09-17 11:47:49 +00:00
Boshen d82dff91c8 feat(formatter): new implementation based on biome formatter (#10108)
Part of #5068, suggested by @ematipico and @MichaReiser, where @leaysgur
and I explored using biome formatter as the base and made a success. All
credits to the old Rome and the new Biome team.

This PR is in a boilerplate state where some of the functions are marked
as `todo!()`.

I also made the following changes:

* changed the base to be less generic, removed the `Language` and
`Context` generics
* expanded the formatter lifetime to include an `'ast` lifetime
* added access to the source text and comments
* added a mechanism for tracking and accessing parent ast nodes (done by
our codegen)
* removed most of the unit tests because they no longer compile
* removed the `oxc_prettier` crate
2025-03-30 16:54:37 +08:00
Don Isaac 111e2d798a ci: auto-label editor-related PRs (#6532) 2024-10-14 08:57:42 +08:00
Boshen 2386d7fca2 chore(dprint): format yaml files (#5598) 2024-09-08 14:05:46 +08:00
rzvxa c4354daab5 chore: add support for labelling A-ast-tools. (#4857) 2024-08-13 10:22:51 +08:00
Dunqing 253410017f chore(ci): auto label for oxc_isolated_declarations (#3924) 2024-06-26 19:13:51 +08:00
rzvxa 315f9ad9bf chore(ci): add A-cfg label to auto-labler. (#3772)
I have already added the `A-cfg` label if you don't want to merge this
please also remove the said label.
2024-06-19 23:23:31 +08:00
Boshen 21505e885c refactor(cli): move crates/oxc_cli to apps/oxlint (#3413)
We need to split the cli crate up to reduce dependencies,
the current cli crate is pulling in `oxc_prettier`, which is redundant
for the linter.
2024-05-26 05:00:30 +00:00
zoomdong 0f77e5dc52 chore: remove unsless oxc_resolve ci files (#1682) 2023-12-15 10:37:46 +00:00
Wenzhe Wang ea293c4e94 chore(ci): change to labeler-v5's style (#1656) 2023-12-12 12:35:43 +08:00
Boshen 781cd5a21a chore: cleanup labeler.yml 2023-11-19 00:36:27 +08:00
Boshen 7e9adeb222 ci: fix labeler 2023-11-17 21:19:14 +08:00
Boshen ad49551a3d ci: add prettier label 2023-11-15 17:44:20 +08:00
Boshen 809f050a5f feat(codegen): move minifying printer to codegen crate (#985) 2023-10-12 14:56:30 +08:00
Boshen 665c38574a chore: add A-transformer label 2023-10-10 21:01:24 +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 a27b60cfb4 chore: add resolver to README and ci labeler 2023-07-21 12:13:44 +08:00
阿良仔 707e717f0d ci: automatically labelling PRs (#553) 2023-07-16 14:37:42 +08:00