Skip to content

Commit d69aff7

Browse files
authored
feat: upgrade oxc (#121)
1 parent 2a77949 commit d69aff7

File tree

7 files changed

+48
-47
lines changed

7 files changed

+48
-47
lines changed

Cargo.lock

Lines changed: 38 additions & 38 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ crate-type = ["cdylib"]
1010
[dependencies]
1111
napi = { version = "3.0.0-alpha.33", default-features = false, features = ["serde-json", "napi3"] }
1212
napi-derive = { version = "3.0.0-alpha.29", default-features = false, features = ["type-def"] }
13-
oxc = { version = "0.67.0", features = ["codegen", "transformer", "semantic", "regular_expression"] }
13+
oxc = { version = "0.68.1", features = ["codegen", "transformer", "semantic", "regular_expression"] }
1414
oxc_resolver = { version = "8.0.0" }
1515
phf = "0.11"
1616
serde_json = "1"

dprint.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,8 @@
1414
"pnpm-lock.yaml",
1515
"packages/*/*.wasi.cjs",
1616
"packages/*/index.js",
17-
"packages/*/browser.js",
17+
"packages/*/oxc-node.wasi-browser.js",
18+
"packages/*/oxc-node.wasi.cjs",
1819
"packages/*/wasi-worker*",
1920
"packages/*/index.d.ts"
2021
],

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"name": "oxc-node",
33
"version": "0.0.0",
44
"private": true,
5-
"packageManager": "pnpm@10.9.0",
5+
"packageManager": "pnpm@10.10.0",
66
"devDependencies": {
77
"@napi-rs/cli": "3.0.0-alpha.78",
88
"@napi-rs/wasm-runtime": "^0.2.6",

packages/core/oxc-node.wasi-browser.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
import {
2-
createOnMessage as __wasmCreateOnMessageForFsProxy,
3-
getDefaultContext as __emnapiGetDefaultContext,
42
instantiateNapiModuleSync as __emnapiInstantiateNapiModuleSync,
3+
getDefaultContext as __emnapiGetDefaultContext,
54
WASI as __WASI,
5+
createOnMessage as __wasmCreateOnMessageForFsProxy,
66
} from '@napi-rs/wasm-runtime'
77

88
import __wasmUrl from './oxc-node.wasm32-wasi.wasm?url'
@@ -14,7 +14,7 @@ const __wasi = new __WASI({
1414
const __emnapiContext = __emnapiGetDefaultContext()
1515

1616
const __sharedMemory = new WebAssembly.Memory({
17-
initial: 4000,
17+
initial: 16384,
1818
maximum: 65536,
1919
shared: true,
2020
})

packages/core/oxc-node.wasi.cjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ const __wasi = new __nodeWASI({
2727
const __emnapiContext = __emnapiGetDefaultContext()
2828

2929
const __sharedMemory = new WebAssembly.Memory({
30-
initial: 4000,
30+
initial: 16384,
3131
maximum: 65536,
3232
shared: true,
3333
})

src/lib.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ use napi::bindgen_prelude::*;
1010
use napi_derive::napi;
1111
use oxc::{
1212
allocator::Allocator,
13-
codegen::{CodeGenerator, CodegenOptions, CodegenReturn},
13+
codegen::{Codegen, CodegenOptions, CodegenReturn},
1414
diagnostics::OxcDiagnostic,
1515
parser::{Parser, ParserReturn},
1616
semantic::SemanticBuilder,
@@ -349,7 +349,7 @@ fn oxc_transform<S: TryAsStr>(
349349
}
350350

351351
Ok(Output(
352-
CodeGenerator::new()
352+
Codegen::new()
353353
.with_options(CodegenOptions {
354354
source_map_path: Some(src_path.to_path_buf()),
355355
..Default::default()

0 commit comments

Comments
 (0)