Make stripped Node.js import more resilient

This commit is contained in:
Vanilagy
2025-09-24 11:41:48 +02:00
parent 1b1dd24959
commit 0878dd2ca9
4 changed files with 11 additions and 9 deletions
+6 -6
View File
@@ -1,12 +1,12 @@
{ {
"name": "mediabunny", "name": "mediabunny",
"version": "1.19.0", "version": "1.19.1",
"lockfileVersion": 3, "lockfileVersion": 3,
"requires": true, "requires": true,
"packages": { "packages": {
"": { "": {
"name": "mediabunny", "name": "mediabunny",
"version": "1.19.0", "version": "1.19.1",
"license": "MPL-2.0", "license": "MPL-2.0",
"workspaces": [ "workspaces": [
"packages/*" "packages/*"
@@ -7749,9 +7749,9 @@
} }
}, },
"node_modules/mediabunny": { "node_modules/mediabunny": {
"version": "1.18.1", "version": "1.19.0",
"resolved": "https://registry.npmjs.org/mediabunny/-/mediabunny-1.18.1.tgz", "resolved": "https://registry.npmjs.org/mediabunny/-/mediabunny-1.19.0.tgz",
"integrity": "sha512-ttnR9hPxewBwxRPs8ITJ5uHESTSZrkGk+blCSHhqrs6hx/Rvl8pZSwDBDsU+VlXEXJRAUxWc4JaXNugraUlGYg==", "integrity": "sha512-tqQqaqY/G8U+oa6NsgffxsBJnoYl8A6bMtHWVnvjyp1FAeBH7f5oZKQpRVGWMpRMd9EK852sFvOOq/dOmb+Mvg==",
"license": "MPL-2.0", "license": "MPL-2.0",
"peer": true, "peer": true,
"workspaces": [ "workspaces": [
@@ -12242,7 +12242,7 @@
}, },
"packages/mp3-encoder": { "packages/mp3-encoder": {
"name": "@mediabunny/mp3-encoder", "name": "@mediabunny/mp3-encoder",
"version": "1.19.0", "version": "1.19.1",
"license": "MPL-2.0", "license": "MPL-2.0",
"devDependencies": { "devDependencies": {
"@types/emscripten": "^1.40.1" "@types/emscripten": "^1.40.1"
+1 -1
View File
@@ -1,7 +1,7 @@
{ {
"name": "mediabunny", "name": "mediabunny",
"author": "Vanilagy", "author": "Vanilagy",
"version": "1.19.0", "version": "1.19.1",
"description": "Pure TypeScript media toolkit for reading, writing, and converting media files, directly in the browser.", "description": "Pure TypeScript media toolkit for reading, writing, and converting media files, directly in the browser.",
"type": "module", "type": "module",
"workspaces": [ "workspaces": [
+1 -1
View File
@@ -1,7 +1,7 @@
{ {
"name": "@mediabunny/mp3-encoder", "name": "@mediabunny/mp3-encoder",
"author": "Vanilagy", "author": "Vanilagy",
"version": "1.19.0", "version": "1.19.1",
"description": "MP3 encoder extension for Mediabunny, based on LAME.", "description": "MP3 encoder extension for Mediabunny, based on LAME.",
"main": "./dist/bundles/mediabunny-mp3-encoder.mjs", "main": "./dist/bundles/mediabunny-mp3-encoder.mjs",
"module": "./dist/bundles/mediabunny-mp3-encoder.mjs", "module": "./dist/bundles/mediabunny-mp3-encoder.mjs",
+3 -1
View File
@@ -21,7 +21,9 @@ import {
import * as nodeAlias from './node'; import * as nodeAlias from './node';
import { InputDisposedError } from './input'; import { InputDisposedError } from './input';
const node = nodeAlias; // Aliasing it prevents some bundler warnings const node = typeof nodeAlias !== 'undefined'
? nodeAlias // Aliasing it prevents some bundler warnings
: undefined!;
export type ReadResult = { export type ReadResult = {
bytes: Uint8Array; bytes: Uint8Array;