@napi-rs/webcodecs 1.3.0 → 1.4.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.
Files changed (4) hide show
  1. package/README.md +17 -0
  2. package/index.d.ts +157 -129
  3. package/index.js +376 -106
  4. package/package.json +40 -62
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@napi-rs/webcodecs",
3
- "version": "1.3.0",
3
+ "version": "1.4.0",
4
4
  "description": "WebCodecs API implementation for Node.js using FFmpeg",
5
5
  "keywords": [
6
6
  "N-API",
@@ -32,7 +32,6 @@
32
32
  "require": "./polyfill.js"
33
33
  }
34
34
  },
35
- "browser": "browser.js",
36
35
  "types": "index.d.ts",
37
36
  "files": [
38
37
  "index.d.ts",
@@ -46,16 +45,15 @@
46
45
  "bench": "node --import @oxc-node/core/register benchmark/compare.ts",
47
46
  "build": "oxnode ./build.ts --platform --release",
48
47
  "build:debug": "oxnode ./build.ts --platform",
49
- "format": "run-p format:rs format:oxfmt format:prettier",
50
- "format:prettier": "prettier . \"!**/*.{js,jsx,ts,tsx}\" -w",
48
+ "format": "run-p format:rs format:oxfmt",
51
49
  "format:oxfmt": "oxfmt",
52
50
  "format:rs": "cargo fmt",
53
51
  "lint": "oxlint --type-aware",
54
52
  "prepublishOnly": "napi prepublish -t npm",
55
53
  "test": "ava",
56
54
  "demo": "cd example && vite",
57
- "typecheck": "tsc -b tsconfig.json && tsc ./index.d.ts",
58
- "preversion": "napi build --platform && git add .",
55
+ "typecheck": "tsc -b tsconfig.json && tsc --ignoreConfig ./index.d.ts",
56
+ "preversion": "oxnode ./build.ts --platform && git add .",
59
57
  "version": "napi version"
60
58
  },
61
59
  "lint-staged": {
@@ -64,31 +62,31 @@
64
62
  ]
65
63
  },
66
64
  "devDependencies": {
67
- "@emnapi/core": "^1.7.1",
68
- "@emnapi/runtime": "^1.7.1",
69
- "@napi-rs/canvas": "^0.1.88",
70
- "@napi-rs/cli": "^3.5.1",
71
- "@napi-rs/wasm-runtime": "^1.1.1",
72
- "@oxc-node/cli": "^0.0.35",
73
- "@oxc-node/core": "^0.0.35",
65
+ "@emnapi/core": "^1.11.3",
66
+ "@emnapi/runtime": "^1.11.3",
67
+ "@napi-rs/canvas": "^1.0.5",
68
+ "@napi-rs/cli": "^3.8.4",
69
+ "@napi-rs/wasm-runtime": "^1.2.2",
70
+ "@oxc-node/cli": "^0.1.0",
71
+ "@oxc-node/core": "^0.1.0",
74
72
  "@taplo/cli": "^0.7.0",
75
- "@tybys/wasm-util": "^0.10.1",
76
- "@types/node": "^25.0.3",
77
- "ava": "^6.4.1",
78
- "chalk": "^5.6.2",
79
- "emnapi": "^1.7.1",
73
+ "@tybys/wasm-util": "^0.10.3",
74
+ "@types/node": "^26.2.0",
75
+ "ava": "^8.0.1",
76
+ "chalk": "^6.0.0",
77
+ "emnapi": "^1.11.3",
80
78
  "husky": "^9.1.7",
81
- "lint-staged": "^16.2.7",
82
- "mediabunny": "1.27.3",
83
- "npm-run-all2": "^8.0.4",
84
- "oxfmt": "^0.21.0",
85
- "oxlint": "^1.36.0",
86
- "oxlint-tsgolint": "^0.10.0",
87
- "prettier": "^3.7.4",
88
- "tinybench": "^6.0.0",
89
- "typescript": "^5.9.3",
79
+ "lint-staged": "^17.3.0",
80
+ "mediabunny": "1.53.0",
81
+ "npm-run-all2": "^9.0.3",
82
+ "oxfmt": "^0.62.0",
83
+ "oxlint": "^1.77.0",
84
+ "oxlint-tsgolint": "^7.0.2001",
85
+ "prettier": "^3.9.6",
86
+ "tinybench": "^6.1.2",
87
+ "typescript": "^7.0.2",
90
88
  "webcodecs-polyfill": "^1.0.1",
91
- "vite-plugin-mkcert": "^1.17.9"
89
+ "vite-plugin-mkcert": "^2.1.0"
92
90
  },
93
91
  "peerDependencies": {
94
92
  "@napi-rs/canvas": ">=0.1.0"
@@ -114,21 +112,14 @@
114
112
  "armv7-unknown-linux-gnueabihf"
115
113
  ]
116
114
  },
117
- "packageManager": "pnpm@10.27.0",
118
- "prettier": {
119
- "arrowParens": "always",
120
- "printWidth": 120,
121
- "semi": false,
122
- "singleQuote": true,
123
- "trailingComma": "all"
124
- },
115
+ "packageManager": "pnpm@11.21.0",
125
116
  "ava": {
126
117
  "environmentVariables": {
127
118
  "TS_NODE_PROJECT": "./tsconfig.json"
128
119
  },
129
- "extensions": {
130
- "ts": "module"
131
- },
120
+ "extensions": [
121
+ "ts"
122
+ ],
132
123
  "files": [
133
124
  "__test__/**/*.spec.ts"
134
125
  ],
@@ -140,34 +131,21 @@
140
131
  "workerThreads": false
141
132
  },
142
133
  "engines": {
143
- "node": ">= 10"
134
+ "node": "^22.20 || ^24.12 || >=25"
144
135
  },
145
136
  "publishConfig": {
146
137
  "access": "public",
147
138
  "registry": "https://registry.npmjs.org/"
148
139
  },
149
- "pnpm": {
150
- "onlyBuiltDependencies": [
151
- "node-av",
152
- "@seydx/node-av-darwin-arm64",
153
- "@seydx/node-av-darwin-x64",
154
- "@seydx/node-av-linux-arm64",
155
- "@seydx/node-av-linux-x64",
156
- "@seydx/node-av-win32-arm64-mingw",
157
- "@seydx/node-av-win32-arm64-msvc",
158
- "@seydx/node-av-win32-x64-mingw",
159
- "@seydx/node-av-win32-x64-msvc"
160
- ]
161
- },
162
140
  "optionalDependencies": {
163
- "@napi-rs/webcodecs-darwin-x64": "1.3.0",
164
- "@napi-rs/webcodecs-darwin-arm64": "1.3.0",
165
- "@napi-rs/webcodecs-linux-x64-gnu": "1.3.0",
166
- "@napi-rs/webcodecs-linux-x64-musl": "1.3.0",
167
- "@napi-rs/webcodecs-win32-x64-msvc": "1.3.0",
168
- "@napi-rs/webcodecs-linux-arm64-gnu": "1.3.0",
169
- "@napi-rs/webcodecs-linux-arm64-musl": "1.3.0",
170
- "@napi-rs/webcodecs-win32-arm64-msvc": "1.3.0",
171
- "@napi-rs/webcodecs-linux-arm-gnueabihf": "1.3.0"
141
+ "@napi-rs/webcodecs-darwin-x64": "1.4.0",
142
+ "@napi-rs/webcodecs-darwin-arm64": "1.4.0",
143
+ "@napi-rs/webcodecs-linux-x64-gnu": "1.4.0",
144
+ "@napi-rs/webcodecs-linux-x64-musl": "1.4.0",
145
+ "@napi-rs/webcodecs-win32-x64-msvc": "1.4.0",
146
+ "@napi-rs/webcodecs-linux-arm64-gnu": "1.4.0",
147
+ "@napi-rs/webcodecs-linux-arm64-musl": "1.4.0",
148
+ "@napi-rs/webcodecs-win32-arm64-msvc": "1.4.0",
149
+ "@napi-rs/webcodecs-linux-arm-gnueabihf": "1.4.0"
172
150
  }
173
151
  }