@rolldown/binding-wasm32-wasi 1.0.0-beta.23 → 1.0.0-beta.25
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
|
@@ -66,12 +66,9 @@ export const ParseResult = __napiModule.exports.ParseResult
|
|
|
66
66
|
export const ExportExportNameKind = __napiModule.exports.ExportExportNameKind
|
|
67
67
|
export const ExportImportNameKind = __napiModule.exports.ExportImportNameKind
|
|
68
68
|
export const ExportLocalNameKind = __napiModule.exports.ExportLocalNameKind
|
|
69
|
-
export const getBufferOffset = __napiModule.exports.getBufferOffset
|
|
70
69
|
export const ImportNameKind = __napiModule.exports.ImportNameKind
|
|
71
70
|
export const parseAsync = __napiModule.exports.parseAsync
|
|
72
|
-
export const parseAsyncRaw = __napiModule.exports.parseAsyncRaw
|
|
73
71
|
export const parseSync = __napiModule.exports.parseSync
|
|
74
|
-
export const parseSyncRaw = __napiModule.exports.parseSyncRaw
|
|
75
72
|
export const rawTransferSupported = __napiModule.exports.rawTransferSupported
|
|
76
73
|
export const ResolverFactory = __napiModule.exports.ResolverFactory
|
|
77
74
|
export const EnforceExtension = __napiModule.exports.EnforceExtension
|
|
@@ -105,7 +102,7 @@ export const BindingWatcherEvent = __napiModule.exports.BindingWatcherEvent
|
|
|
105
102
|
export const ParallelJsPluginRegistry = __napiModule.exports.ParallelJsPluginRegistry
|
|
106
103
|
export const BindingAttachDebugInfo = __napiModule.exports.BindingAttachDebugInfo
|
|
107
104
|
export const BindingBuiltinPluginName = __napiModule.exports.BindingBuiltinPluginName
|
|
108
|
-
export const
|
|
105
|
+
export const BindingChunkModuleOrderBy = __napiModule.exports.BindingChunkModuleOrderBy
|
|
109
106
|
export const BindingJsx = __napiModule.exports.BindingJsx
|
|
110
107
|
export const BindingLogLevel = __napiModule.exports.BindingLogLevel
|
|
111
108
|
export const BindingPluginOrder = __napiModule.exports.BindingPluginOrder
|
|
@@ -65,6 +65,29 @@ const { instance: __napiInstance, module: __wasiModule, napiModule: __napiModule
|
|
|
65
65
|
worker.onmessage = ({ data }) => {
|
|
66
66
|
__wasmCreateOnMessageForFsProxy(__nodeFs)(data)
|
|
67
67
|
}
|
|
68
|
+
|
|
69
|
+
// The main thread of Node.js waits for all the active handles before exiting.
|
|
70
|
+
// But Rust threads are never waited without `thread::join`.
|
|
71
|
+
// So here we hack the code of Node.js to prevent the workers from being referenced (active).
|
|
72
|
+
// According to https://github.com/nodejs/node/blob/19e0d472728c79d418b74bddff588bea70a403d0/lib/internal/worker.js#L415,
|
|
73
|
+
// a worker is consist of two handles: kPublicPort and kHandle.
|
|
74
|
+
{
|
|
75
|
+
const kPublicPort = Object.getOwnPropertySymbols(worker).find(s =>
|
|
76
|
+
s.toString().includes("kPublicPort")
|
|
77
|
+
);
|
|
78
|
+
if (kPublicPort) {
|
|
79
|
+
worker[kPublicPort].ref = () => {};
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
const kHandle = Object.getOwnPropertySymbols(worker).find(s =>
|
|
83
|
+
s.toString().includes("kHandle")
|
|
84
|
+
);
|
|
85
|
+
if (kPublicPort) {
|
|
86
|
+
worker[kHandle].ref = () => {};
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
worker.unref();
|
|
90
|
+
}
|
|
68
91
|
return worker
|
|
69
92
|
},
|
|
70
93
|
overwriteImports(importObject) {
|
|
@@ -90,12 +113,9 @@ module.exports.ParseResult = __napiModule.exports.ParseResult
|
|
|
90
113
|
module.exports.ExportExportNameKind = __napiModule.exports.ExportExportNameKind
|
|
91
114
|
module.exports.ExportImportNameKind = __napiModule.exports.ExportImportNameKind
|
|
92
115
|
module.exports.ExportLocalNameKind = __napiModule.exports.ExportLocalNameKind
|
|
93
|
-
module.exports.getBufferOffset = __napiModule.exports.getBufferOffset
|
|
94
116
|
module.exports.ImportNameKind = __napiModule.exports.ImportNameKind
|
|
95
117
|
module.exports.parseAsync = __napiModule.exports.parseAsync
|
|
96
|
-
module.exports.parseAsyncRaw = __napiModule.exports.parseAsyncRaw
|
|
97
118
|
module.exports.parseSync = __napiModule.exports.parseSync
|
|
98
|
-
module.exports.parseSyncRaw = __napiModule.exports.parseSyncRaw
|
|
99
119
|
module.exports.rawTransferSupported = __napiModule.exports.rawTransferSupported
|
|
100
120
|
module.exports.ResolverFactory = __napiModule.exports.ResolverFactory
|
|
101
121
|
module.exports.EnforceExtension = __napiModule.exports.EnforceExtension
|
|
@@ -129,7 +149,7 @@ module.exports.BindingWatcherEvent = __napiModule.exports.BindingWatcherEvent
|
|
|
129
149
|
module.exports.ParallelJsPluginRegistry = __napiModule.exports.ParallelJsPluginRegistry
|
|
130
150
|
module.exports.BindingAttachDebugInfo = __napiModule.exports.BindingAttachDebugInfo
|
|
131
151
|
module.exports.BindingBuiltinPluginName = __napiModule.exports.BindingBuiltinPluginName
|
|
132
|
-
module.exports.
|
|
152
|
+
module.exports.BindingChunkModuleOrderBy = __napiModule.exports.BindingChunkModuleOrderBy
|
|
133
153
|
module.exports.BindingJsx = __napiModule.exports.BindingJsx
|
|
134
154
|
module.exports.BindingLogLevel = __napiModule.exports.BindingLogLevel
|
|
135
155
|
module.exports.BindingPluginOrder = __napiModule.exports.BindingPluginOrder
|
|
Binary file
|