Skip to content

Commit

Permalink
Upgrade next-swc-napi to NAPI-RS v2 (#40094)
Browse files Browse the repository at this point in the history
  • Loading branch information
Brooooooklyn committed Oct 13, 2022
1 parent d8395e4 commit e505e75
Show file tree
Hide file tree
Showing 16 changed files with 224 additions and 512 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build_test_deploy.yml
Expand Up @@ -7,7 +7,7 @@ on:
name: Build, test, and deploy

env:
NAPI_CLI_VERSION: 2.7.0
NAPI_CLI_VERSION: 2.12.0
TURBO_VERSION: 1.3.2-canary.1
RUST_TOOLCHAIN: nightly-2022-09-23
PNPM_VERSION: 7.3.0
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/pull_request_stats.yml
Expand Up @@ -5,7 +5,7 @@ on:
name: Generate Pull Request Stats

env:
NAPI_CLI_VERSION: 2.7.0
NAPI_CLI_VERSION: 2.12.0
TURBO_VERSION: 1.3.2-canary.1
RUST_TOOLCHAIN: nightly-2022-09-23
PNPM_VERSION: 7.3.0
Expand Down Expand Up @@ -84,7 +84,7 @@ jobs:
# since the repo's dependencies aren't installed we need
# to install napi globally
- run: npm i -g @napi-rs/cli@2.7.0
- run: npm i -g @napi-rs/cli@${NAPI_CLI_VERSION}
- run: npm i -g turbo@${TURBO_VERSION} pnpm@${PNPM_VERSION}

- name: Build
Expand Down
58 changes: 49 additions & 9 deletions packages/next-swc/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 0 additions & 3 deletions packages/next-swc/crates/core/Cargo.toml
Expand Up @@ -4,9 +4,6 @@ name = "next-swc"
version = "0.0.0"
publish = false

[lib]
crate-type = ["cdylib", "rlib"]

[features]
plugin = [
"swc_core/plugin_transform_host_native"
Expand Down
11 changes: 6 additions & 5 deletions packages/next-swc/crates/napi/Cargo.toml
Expand Up @@ -24,15 +24,16 @@ sentry_rustls = ["_sentry_rustls"]
anyhow = "1.0"
backtrace = "0.3"
fxhash = "0.2.1"
napi = {version = "1", features = ["serde-json"]}
napi-derive = "1"
napi = {version = "2", default-features = false, features = ["napi3", "serde-json"]}
napi-derive = "2"
next-swc = {version = "0.0.0", path = "../core"}
once_cell = "1.13.0"
serde = "1"
serde_json = "1"
swc_core = { features = [
"allocator_node",
"base_concurrent", # concurrent?
"base_node",
"common_concurrent",
"ecma_ast",
"ecma_loader_node",
Expand All @@ -48,7 +49,7 @@ swc_core = { features = [
"ecma_transforms_react",
"ecma_transforms_typescript",
"ecma_utils",
"ecma_visit"
"ecma_visit",
], version = "0.32.8" }
tracing = { version = "0.1.32", features = ["release_max_level_info"] }
tracing-futures = "0.2.5"
Expand All @@ -68,6 +69,6 @@ _sentry_rustls = { package = "sentry", version = "0.27.0", default-features = fa
], optional = true }

[build-dependencies]
napi-build = "1"
napi-build = "2"
serde = "1"
serde_json = "1"
serde_json = "1"
212 changes: 0 additions & 212 deletions packages/next-swc/crates/napi/src/bundle/mod.rs

This file was deleted.

0 comments on commit e505e75

Please sign in to comment.