Commit Graph

14 Commits

Author SHA1 Message Date
Boshen f7da875f0b feat(oxlint)!: remove oxc_language_server binary (#17457)
Given that all IDEs now use `--lsp`, we can "safely" remove the binary
to reduce the published package size by half.

This is breaking and forces people to upgrade their oxc IDE extensions.

closes #12251
closes #15740
2025-12-29 11:58:25 +00:00
Boshen a14aa79850 feat(npm/oxlint): convert to ES modules (#13876)
## Summary
- Convert npm/oxlint package to ES modules by setting `"type": "module"` in package.json

## Test plan
- [ ] Verify CLI binaries continue to work correctly
- [ ] Test package installation and execution
- [ ] Run existing test suites
- [ ] Confirm language server binary still functions

🤖 Generated with [Claude Code](https://claude.ai/code)
2025-09-20 08:43:24 +00:00
overlookmotel 7e0d736737 refactor(linter/plugins): rename --experimental-js-plugins to --js-plugins (#13860)
Change CLI option to enable JS plugins from `--experimental-js-plugins` to `--js-plugins`. We'll make it clear in docs that JS plugins are experimental and not covered by semver.
2025-09-17 14:24:29 +00:00
overlookmotel 53d04dd1dc feat(linter): convert oxlint to NAPI app (#13723)
Convert `oxlint` to a NAPI package.

This PR:

1. Moves files from `napi/oxlint` into `apps/oxlint`.
2. Converts `oxlint` into a NAPI package.
3. Alters the [release workflow](https://github.com/oxc-project/oxc/pull/13723/files#diff-80cb497c859bbaf7756da6ced2bca3d31933affc96102983eee1ad7d4bcc60fd) and [script](https://github.com/oxc-project/oxc/pull/13723/files#diff-4c4b7045c68805aeeae7c0af94cf7cf7487cb0403496da974a6a23accdc457d0) for building `oxlint` packages.

Most of necessary code modifications and refactoring was done in previous PRs (#13701, #13712, #13722, #13745), so this PR only includes changes necessary for packaging as NAPI.

I've done my best to update release workflow, but am mostly "flying blind" without ability to test it, so very likely there are mistakes.

A few notes and oddities:

* I've kept the `oxlint` NPM package as CommonJS. We could probably switch to ESM, but I thought it better to minimize the changes in this PR.
* NAPI-RS creates `.node` files named with a `-msvc` postfix for Windows. The scripts here remove that postfix so that filename of `.node` files and NPM package names match for all platforms, for simplicity.
* `tasks/website` has a dependency on `oxlint` as a normal library. This resulted in linker errors, so have had to put all the NAPI stuff behind `napi` cargo feature. Tests for `tasks/website` are run separately in CI, to avoid feature unification turning on the `napi` feature for `website`.

I've made a few comments below for the parts which aren't fairly self-explanatory.
2025-09-17 09:20:21 +00:00
Luiz Felipe Weber 79ba9b5970 feat(linter): added support to run in Node.JS legacy versions (#8648)
With a few adjustments It is possible to run _oxlint_ in projects which
use legacy **Node.js** versions, such as **8.x.x**. Basically this is
possible by removing spread operator in 'binpath' environment assemble
and changing a catch command to inform an error variable.

Without this modification, we got always this error:

```
node_modules/oxlint/bin/oxlint:23
  } catch {
          ^

SyntaxError: Unexpected token {
    at createScript (vm.js:74:10)
    at Object.runInThisContext (vm.js:116:10)
    at Module._compile (module.js:533:28)
    at Object.Module._extensions..js (module.js:580:10)
    at Module.load (module.js:503:32)
    at tryModuleLoad (module.js:466:12)
    at Function.Module._load (module.js:458:3)
    at Function.Module.runMain (module.js:605:10)
    at startup (bootstrap_node.js:158:16)
    at bootstrap_node.js:575:3
```
2025-01-23 21:17:48 +08:00
Boshen 6c4081e148 chore: update pnpm lock file 2025-01-18 14:05:58 +08:00
heygsc 0fba73897c fix(npm): SyntaxError caused by optional chaining in low version node (#4650)
fix: #4602
2024-08-05 13:01:31 +08:00
rzvxa 56cbdf5f0e ci(oxlint): add oxc_language_server binary to the oxlint package. (#3350)
I didn't introduce a new set of native packages for the `oxc_language_server` binary, This change temporarily bundles them as part of oxlint, We most probably would want to make it an optional dependency in the future if we start to add more futures like formatting, jump to definition, etc to it.
2024-05-27 02:46:43 +00:00
Boshen 0ae28dd159 feat(npm/oxlint): display target triple when error is thrown (#2259)
To improve debuggability

closes #2196
2024-02-02 11:22:34 +08:00
Boshen 382a187175 fix(npm): fix bin script for musl / gnu 2024-01-23 19:09:11 +08:00
Boshen eca98cf2ed s/web-infra-dev/oxc-project 2023-11-10 14:30:18 +08:00
Boshen 1a1fc3c99c Release oxidation-compiler 0.2.1 2023-08-21 15:07:08 +08:00
Boshen 03b69bbd4b fix: fix wrong npm/oxlint binary package name 2023-06-27 23:28:48 +08:00
Boshen 681df1ad1f feat(cli): create a oxlint binary
closes #485
2023-06-27 21:55:07 +08:00