taglib-wasm 1.5.2 → 1.5.3
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/dist/index.browser.js +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/simple.browser.js +1 -1
- package/dist/src/deno-compile.d.ts +12 -0
- package/dist/src/deno-compile.d.ts.map +1 -1
- package/dist/src/deno-compile.js +9 -8
- package/dist/src/version.d.ts +1 -1
- package/dist/src/version.js +1 -1
- package/dist/taglib-wasi.wasm +0 -0
- package/dist/taglib-web.wasm +0 -0
- package/package.json +6 -3
package/dist/index.browser.js
CHANGED
package/dist/index.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @fileoverview Main module exports for TagLib-Wasm
|
|
3
3
|
*
|
|
4
|
-
* TagLib v2.3 compiled to WebAssembly with TypeScript bindings
|
|
4
|
+
* TagLib v2.3.1 compiled to WebAssembly with TypeScript bindings
|
|
5
5
|
* for universal audio metadata handling across all JavaScript runtimes.
|
|
6
6
|
*
|
|
7
7
|
* @module TagLib-Wasm
|
package/dist/simple.browser.js
CHANGED
|
@@ -8,6 +8,18 @@
|
|
|
8
8
|
*/
|
|
9
9
|
import { TagLib } from "./taglib.js";
|
|
10
10
|
export { isDenoCompiled } from "./runtime/deno-detect.js";
|
|
11
|
+
/**
|
|
12
|
+
* Where {@link prepareWasmForEmbedding} looks for the Emscripten binary, in
|
|
13
|
+
* order, resolved relative to this module.
|
|
14
|
+
*
|
|
15
|
+
* `build/` comes first deliberately: it holds the committed, authoritative
|
|
16
|
+
* artifact, while `dist/` is gitignored scratch that only the npm chain
|
|
17
|
+
* (`build:copy-wasm`/`postbuild`) refreshes. A stale `dist/` in a working
|
|
18
|
+
* checkout would otherwise silently shadow a freshly built binary. Published
|
|
19
|
+
* packages ship no `build/` (it is absent from package.json's `files`), so
|
|
20
|
+
* resolution there falls through to `dist/` exactly as before.
|
|
21
|
+
*/
|
|
22
|
+
export declare const WASM_EMBED_SEARCH_PATHS: readonly string[];
|
|
11
23
|
/**
|
|
12
24
|
* Initialize TagLib with automatic handling for Deno compiled binaries.
|
|
13
25
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"deno-compile.d.ts","sourceRoot":"","sources":["../../src/deno-compile.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AAIrC,OAAO,EAAE,cAAc,EAAE,MAAM,0BAA0B,CAAC;AAE1D;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,wBAAsB,wBAAwB,CAC5C,gBAAgB,SAAsB,GACrC,OAAO,CAAC,MAAM,CAAC,CA8BjB;AAED;;;;;;;;;;;;;;GAcG;AACH,wBAAsB,uBAAuB,CAC3C,UAAU,SAAsB,GAC/B,OAAO,CAAC,IAAI,CAAC,
|
|
1
|
+
{"version":3,"file":"deno-compile.d.ts","sourceRoot":"","sources":["../../src/deno-compile.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AAIrC,OAAO,EAAE,cAAc,EAAE,MAAM,0BAA0B,CAAC;AAE1D;;;;;;;;;;GAUG;AACH,eAAO,MAAM,uBAAuB,EAAE,SAAS,MAAM,EAIpD,CAAC;AAEF;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,wBAAsB,wBAAwB,CAC5C,gBAAgB,SAAsB,GACrC,OAAO,CAAC,MAAM,CAAC,CA8BjB;AAED;;;;;;;;;;;;;;GAcG;AACH,wBAAsB,uBAAuB,CAC3C,UAAU,SAAsB,GAC/B,OAAO,CAAC,IAAI,CAAC,CAuCf"}
|
package/dist/src/deno-compile.js
CHANGED
|
@@ -3,6 +3,11 @@ import { FileOperationError } from "./errors/classes.js";
|
|
|
3
3
|
import { isDenoCompiled } from "./runtime/deno-detect.js";
|
|
4
4
|
import { fileUrlToPath } from "./utils/path.js";
|
|
5
5
|
import { isDenoCompiled as isDenoCompiled2 } from "./runtime/deno-detect.js";
|
|
6
|
+
const WASM_EMBED_SEARCH_PATHS = [
|
|
7
|
+
"../build/taglib-web.wasm",
|
|
8
|
+
"../dist/taglib-web.wasm",
|
|
9
|
+
"./node_modules/taglib-wasm/dist/taglib-web.wasm"
|
|
10
|
+
];
|
|
6
11
|
async function initializeForDenoCompile(embeddedWasmPath = "./taglib-web.wasm") {
|
|
7
12
|
if (isDenoCompiled()) {
|
|
8
13
|
const strategies = [
|
|
@@ -30,14 +35,9 @@ async function initializeForDenoCompile(embeddedWasmPath = "./taglib-web.wasm")
|
|
|
30
35
|
}
|
|
31
36
|
async function prepareWasmForEmbedding(outputPath = "./taglib-web.wasm") {
|
|
32
37
|
try {
|
|
33
|
-
const possiblePaths =
|
|
34
|
-
new URL(
|
|
35
|
-
|
|
36
|
-
new URL(
|
|
37
|
-
"./node_modules/taglib-wasm/dist/taglib-web.wasm",
|
|
38
|
-
import.meta.url
|
|
39
|
-
)
|
|
40
|
-
];
|
|
38
|
+
const possiblePaths = WASM_EMBED_SEARCH_PATHS.map(
|
|
39
|
+
(p) => new URL(p, import.meta.url)
|
|
40
|
+
);
|
|
41
41
|
let wasmData = null;
|
|
42
42
|
let sourcePath = null;
|
|
43
43
|
for (const path of possiblePaths) {
|
|
@@ -68,6 +68,7 @@ async function prepareWasmForEmbedding(outputPath = "./taglib-web.wasm") {
|
|
|
68
68
|
}
|
|
69
69
|
}
|
|
70
70
|
export {
|
|
71
|
+
WASM_EMBED_SEARCH_PATHS,
|
|
71
72
|
initializeForDenoCompile,
|
|
72
73
|
isDenoCompiled2 as isDenoCompiled,
|
|
73
74
|
prepareWasmForEmbedding
|
package/dist/src/version.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const VERSION = "1.5.
|
|
1
|
+
export declare const VERSION = "1.5.3";
|
|
2
2
|
//# sourceMappingURL=version.d.ts.map
|
package/dist/src/version.js
CHANGED
package/dist/taglib-wasi.wasm
CHANGED
|
Binary file
|
package/dist/taglib-web.wasm
CHANGED
|
Binary file
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "taglib-wasm",
|
|
3
|
-
"version": "1.5.
|
|
3
|
+
"version": "1.5.3",
|
|
4
4
|
"description": "TagLib-Wasm is the universal tagging library for TypeScript/JavaScript platforms: Browsers, Node.js, Deno, Bun, Cloudflare Workers, and Electron apps",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -74,11 +74,14 @@
|
|
|
74
74
|
"LICENSE"
|
|
75
75
|
],
|
|
76
76
|
"scripts": {
|
|
77
|
-
"build:wasm": "
|
|
77
|
+
"build:wasm": "npm run build:wasm:emscripten && npm run build:wasm:wasi",
|
|
78
|
+
"build:wasm:emscripten": "./build/build-wasm.sh",
|
|
79
|
+
"build:wasm:wasi": "./build/build-wasi.sh",
|
|
78
80
|
"build:ts": "tsc && deno run --allow-read --allow-write --allow-run --allow-env scripts/build-js.mjs",
|
|
79
81
|
"postbuild": "deno run --allow-read --allow-write --allow-run --allow-env scripts/postbuild.mjs",
|
|
80
82
|
"build:copy-wasm": "mkdir -p dist && cp build/taglib-web.wasm build/taglib-wasi.wasm build/taglib-wrapper.js build/taglib-wrapper.d.ts dist/",
|
|
81
|
-
"build": "
|
|
83
|
+
"build:clean": "mkdir -p dist && find dist -mindepth 1 -maxdepth 1 ! -name wasi -exec rm -rf {} +",
|
|
84
|
+
"build": "npm run build:clean && npm run build:wasm:emscripten && npm run build:copy-wasm && npm run build:ts && npm run postbuild",
|
|
82
85
|
"test": "deno test --allow-read --allow-write --allow-env tests/",
|
|
83
86
|
"test:all": "deno test --allow-read --allow-write --allow-env tests/index.test.ts",
|
|
84
87
|
"test:core": "deno test --allow-read --allow-write --allow-env tests/taglib.test.ts",
|