Skip to content

Commit 51395f1

Browse files
BrooooooklynQard
authored andcommitted
migrate napi cli to v3 (#33)
1 parent e8e7d8f commit 51395f1

File tree

5 files changed

+1051
-25
lines changed

5 files changed

+1051
-25
lines changed

crates/php/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ hostname = "0.4.1"
1717
lang_handler = { path = "../lang_handler", features = ["c"] }
1818
libc = "0.2.171"
1919
once_cell = "1.21.0"
20-
ext-php-rs = { git = "ssh://git@github.com/platformatic/ext-php-rs.git" }
20+
ext-php-rs = { git = "https://github.com/platformatic/ext-php-rs.git" }
2121
# ext-php-rs = { path = "../../../ext-php-rs" }
2222

2323
[build-dependencies]

crates/php_node/Cargo.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@ path = "src/lib.rs"
99

1010
[dependencies]
1111
# Default enable napi4 feature, see https://nodejs.org/api/n-api.html#node-api-version-matrix
12-
napi = { version = "3.0.0-beta.3", default-features = false, features = ["napi4"] }
13-
napi-derive = "3.0.0-beta.3"
12+
napi = { version = "3.0.0-beta.5", default-features = false, features = ["napi4"] }
13+
napi-derive = "3.0.0-beta.5"
1414
php = { path = "../php" }
1515

1616
[build-dependencies]

index.d.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,6 @@ export interface PhpOptions {
5656
/** Throw request errors */
5757
throwRequestErrors?: boolean
5858
}
59-
undefinedundefined
6059
export type PhpHeaders = Headers
6160
/**
6261
* A multi-map of HTTP headers.
@@ -223,7 +222,7 @@ export declare class Headers {
223222
* }
224223
* ```
225224
*/
226-
entries(): Array<Entry<string, string>>
225+
entries(): Array<Entry>
227226
/**
228227
* Get an iterator over the header keys.
229228
*

package.json

Lines changed: 10 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -4,19 +4,17 @@
44
"main": "index.js",
55
"types": "index.d.ts",
66
"napi": {
7-
"name": "php",
8-
"triples": {
9-
"additional": [
10-
"aarch64-apple-darwin",
11-
"x86_64-apple-darwin",
12-
"x86_64-unknown-linux-gnu",
13-
"universal-apple-darwin"
14-
]
15-
}
7+
"binaryName": "php",
8+
"targets": [
9+
"aarch64-apple-darwin",
10+
"x86_64-apple-darwin",
11+
"x86_64-unknown-linux-gnu",
12+
"universal-apple-darwin"
13+
]
1614
},
1715
"license": "MIT",
1816
"devDependencies": {
19-
"@napi-rs/cli": "^2.18.4",
17+
"@napi-rs/cli": "^3.0.0-alpha.84",
2018
"@oxc-node/core": "^0.0.23",
2119
"ava": "^6.0.1",
2220
"oxlint": "^0.16.0"
@@ -28,8 +26,8 @@
2826
"node": ">= 10"
2927
},
3028
"scripts": {
31-
"build": "napi build --cargo-name php_node --platform --js false --release",
32-
"build:debug": "napi build --cargo-name php_node --platform --js false",
29+
"build": "napi build --manifest-path ./crates/php_node/Cargo.toml --platform --js false --release",
30+
"build:debug": "napi build --manifest-path ./crates/php_node/Cargo.toml --platform --js false",
3331
"lint": "oxlint",
3432
"test": "ava __test__/**.spec.mjs",
3533
"universal": "napi universal",

0 commit comments

Comments
 (0)