@napi-rs/cli 3.4.1 → 3.5.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@napi-rs/cli",
3
- "version": "3.4.1",
3
+ "version": "3.5.0",
4
4
  "description": "Cli tools for napi-rs",
5
5
  "author": "LongYinan <lynweklm@gmail.com>",
6
6
  "homepage": "https://github.com/napi-rs/napi-rs",
@@ -60,45 +60,41 @@
60
60
  "url": "https://github.com/napi-rs/napi-rs/issues"
61
61
  },
62
62
  "dependencies": {
63
- "@inquirer/prompts": "^7.8.4",
63
+ "@inquirer/prompts": "^8.0.0",
64
64
  "@napi-rs/cross-toolchain": "^1.0.3",
65
65
  "@napi-rs/wasm-tools": "^1.0.1",
66
- "@octokit/rest": "^22.0.0",
66
+ "@octokit/rest": "^22.0.1",
67
67
  "clipanion": "^4.0.0-rc.4",
68
68
  "colorette": "^2.0.20",
69
- "debug": "^4.4.1",
70
- "emnapi": "^1.5.0",
71
- "es-toolkit": "^1.39.10",
69
+ "emnapi": "^1.7.1",
70
+ "es-toolkit": "^1.41.0",
72
71
  "js-yaml": "^4.1.0",
73
- "semver": "^7.7.2",
72
+ "obug": "^2.0.0",
73
+ "semver": "^7.7.3",
74
74
  "typanion": "^3.14.0"
75
75
  },
76
76
  "devDependencies": {
77
- "@emnapi/runtime": "^1.5.0",
78
- "@oxc-node/core": "^0.0.32",
79
- "@std/toml": "npm:@jsr/std__toml@^1.0.10",
80
- "@types/debug": "^4.1.12",
77
+ "@emnapi/runtime": "^1.7.1",
78
+ "@oxc-node/core": "^0.0.35",
79
+ "@std/toml": "npm:@jsr/std__toml@^1.0.11",
81
80
  "@types/inquirer": "^9.0.9",
82
81
  "@types/js-yaml": "^4.0.9",
83
- "@types/node": "^24.3.1",
82
+ "@types/node": "^24.10.0",
84
83
  "@types/semver": "^7.7.1",
85
84
  "ava": "^6.4.1",
86
85
  "empathic": "^2.0.0",
87
86
  "env-paths": "^3.0.0",
88
87
  "prettier": "^3.6.2",
89
- "tsdown": "^0.15.0",
88
+ "tsdown": "^0.16.1",
90
89
  "tslib": "^2.8.1",
91
- "typescript": "^5.9.2"
90
+ "typescript": "^5.9.3"
92
91
  },
93
92
  "peerDependencies": {
94
- "@emnapi/runtime": "^1.5.0"
93
+ "@emnapi/runtime": "^1.7.1"
95
94
  },
96
95
  "peerDependenciesMeta": {
97
96
  "@emnapi/runtime": {
98
97
  "optional": true
99
- },
100
- "emnapi": {
101
- "optional": true
102
98
  }
103
99
  },
104
100
  "funding": {
package/src/api/build.ts CHANGED
@@ -915,7 +915,7 @@ class Builder {
915
915
  jsBinding: this.options.jsBinding,
916
916
  esm: this.options.esm,
917
917
  binaryName: this.config.binaryName,
918
- packageName: this.config.packageName,
918
+ packageName: this.options.jsPackageName ?? this.config.packageName,
919
919
  version: process.env.npm_new_version ?? this.config.packageJson.version,
920
920
  outputDir: this.outputDir,
921
921
  })
package/src/utils/log.ts CHANGED
@@ -1,12 +1,7 @@
1
1
  import * as colors from 'colorette'
2
- import rawDebug from 'debug'
2
+ import { createDebug } from 'obug'
3
3
 
4
- // debug('%i', 'This is an info')
5
- rawDebug.formatters.i = (v) => {
6
- return colors.green(v)
7
- }
8
-
9
- declare module 'debug' {
4
+ declare module 'obug' {
10
5
  interface Debugger {
11
6
  info: typeof console.error
12
7
  warn: typeof console.error
@@ -15,7 +10,14 @@ declare module 'debug' {
15
10
  }
16
11
 
17
12
  export const debugFactory = (namespace: string) => {
18
- const debug = rawDebug(`napi:${namespace}`)
13
+ const debug = createDebug(`napi:${namespace}`, {
14
+ formatters: {
15
+ // debug('%i', 'This is an info')
16
+ i(v) {
17
+ return colors.green(v)
18
+ },
19
+ },
20
+ })
19
21
 
20
22
  debug.info = (...args: any[]) =>
21
23
  console.error(colors.black(colors.bgGreen(' INFO ')), ...args)