Skip to content

Commit 3100e73

Browse files
committed
chore: removed legacy node wrapper
1 parent a0c0b50 commit 3100e73

6 files changed

Lines changed: 15 additions & 246 deletions

File tree

CHANGELOG.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,16 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
77

88
## [Unreleased]
99

10+
### Removed
11+
12+
- **napi: stop generating the legacy `packages/typescript` wrapper package.** The napi backend no
13+
longer emits the `packages/typescript/src/index.ts` re-export barrel or its `bridges/*.ts` files;
14+
the native package (`crates/{lib}-node`, published with its own `index.d.ts`) is the canonical
15+
TypeScript surface, and `packages/node` is the modern package directory. `generate_public_api` for
16+
the napi backend now falls back to the default (no-op), and the existing orphan sweep removes any
17+
previously generated `packages/typescript/` tree on the next run. Version sync/checks and the e2e
18+
node package fallback now reference `packages/node` instead of the legacy `packages/typescript`.
19+
1020
### Added
1121

1222
- **e2e: support typed JSON-object arguments and `$mock_url` placeholders inside request DTOs.**

src/backends/napi/gen_bindings/mod.rs

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ pub mod enums;
77
pub mod errors;
88
pub mod functions;
99
pub mod methods;
10-
mod public_api;
1110
pub mod service_api;
1211
mod support;
1312
mod type_stubs;
@@ -922,14 +921,6 @@ impl Backend for NapiBackend {
922921
type_stubs::generate(api, config)
923922
}
924923

925-
fn generate_public_api(
926-
&self,
927-
api: &ApiSurface,
928-
config: &ResolvedCrateConfig,
929-
) -> anyhow::Result<Vec<GeneratedFile>> {
930-
public_api::generate(api, config)
931-
}
932-
933924
fn generate_service_api(
934925
&self,
935926
api: &ApiSurface,

src/backends/napi/gen_bindings/public_api.rs

Lines changed: 0 additions & 227 deletions
This file was deleted.

src/cli/pipeline/version.rs

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -97,14 +97,9 @@ pub fn sync_versions(
9797
let python_version = to_pep440(&version);
9898
sync_python_versions(config, &version, &python_version, &mut updated)?;
9999

100-
// Node: package.json — use the configured Node package_dir, falling back
101-
// to "packages/node" (the modern default) and "packages/typescript" (legacy
102-
// path retained so older repos that still use the old default keep syncing).
100+
// Node: package.json — use the configured Node package_dir.
103101
let node_pkg_dir = config.package_dir(Language::Node);
104-
let mut node_paths: Vec<String> = vec![format!("{node_pkg_dir}/package.json")];
105-
if node_pkg_dir != "packages/typescript" {
106-
node_paths.push("packages/typescript/package.json".to_string());
107-
}
102+
let node_paths: Vec<String> = vec![format!("{node_pkg_dir}/package.json")];
108103
for node_path in node_paths {
109104
if let Ok(content) = std::fs::read_to_string(&node_path) {
110105
if let Some(new_content) = replace_version_pattern(&content, r#""version": "[^"]*""#, &version) {

src/cli/pipeline/version_core.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -329,10 +329,10 @@ pub fn verify_versions(config: &ResolvedCrateConfig) -> anyhow::Result<Vec<Strin
329329
}
330330

331331
// Node
332-
if let Some(found) = extract_version("packages/typescript/package.json", r#""version"\s*:\s*"([^"]*)""#) {
332+
if let Some(found) = extract_version("packages/node/package.json", r#""version"\s*:\s*"([^"]*)""#) {
333333
if found != expected {
334334
mismatches.push(format!(
335-
"packages/typescript/package.json: found {found}, expected {expected}"
335+
"packages/node/package.json: found {found}, expected {expected}"
336336
));
337337
}
338338
}

src/e2e/codegen/typescript/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ impl E2eCodegen for TypeScriptCodegen {
5656
.as_ref()
5757
.and_then(|p| p.path.as_ref())
5858
.cloned()
59-
.unwrap_or_else(|| "../../packages/typescript".to_string());
59+
.unwrap_or_else(|| "../../packages/node".to_string());
6060
let pkg_name = node_pkg
6161
.as_ref()
6262
.and_then(|p| p.name.as_ref())

0 commit comments

Comments
 (0)