Skip to content

Commit

Permalink
Rename target nodejs-module to experimental-nodejs-module
Browse files Browse the repository at this point in the history
  • Loading branch information
Systemcluster committed Aug 3, 2024
1 parent f20ef0e commit 458a125
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
5 changes: 4 additions & 1 deletion crates/cli-support/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,10 @@ impl Bindgen {

pub fn nodejs_module(&mut self, node: bool) -> Result<&mut Bindgen, Error> {
if node {
self.switch_mode(OutputMode::Node { module: true }, "--target nodejs-module")?;
self.switch_mode(
OutputMode::Node { module: true },
"--target experimental-nodejs-module",
)?;
}
Ok(self)
}
Expand Down
4 changes: 2 additions & 2 deletions crates/cli/src/bin/wasm-bindgen.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ Options:
--out-dir DIR Output directory
--out-name VAR Set a custom output filename (Without extension. Defaults to crate name)
--target TARGET What type of output to generate, valid
values are [web, bundler, nodejs, nodejs-module, no-modules, deno],
values are [web, bundler, nodejs, no-modules, deno, experimental-nodejs-module],
and the default is [bundler]
--no-modules-global VAR Name of the global variable to initialize
--browser Hint that JS should only be compatible with a browser
Expand Down Expand Up @@ -108,8 +108,8 @@ fn rmain(args: &Args) -> Result<(), Error> {
"web" => b.web(true)?,
"no-modules" => b.no_modules(true)?,
"nodejs" => b.nodejs(true)?,
"nodejs-module" => b.nodejs_module(true)?,
"deno" => b.deno(true)?,
"experimental-nodejs-module" => b.nodejs_module(true)?,
s => bail!("invalid encode-into mode: `{}`", s),
};
}
Expand Down

0 comments on commit 458a125

Please sign in to comment.