You're Invited:Meet the Socket Team at RSAC and BSidesSF 2026, March 23–26.RSVP
Socket
Book a DemoSign in
Socket

@parcel/rust

Package Overview
Dependencies
Maintainers
1
Versions
336
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@parcel/rust - npm Package Compare versions

Comparing version
2.14.5-canary.3441
to
2.14.5-canary.3442
+27
lib/index.js
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
var _index = require("../index");
Object.keys(_index).forEach(function (key) {
if (key === "default" || key === "__esModule") return;
if (key in exports && exports[key] === _index[key]) return;
Object.defineProperty(exports, key, {
enumerable: true,
get: function () {
return _index[key];
}
});
});
var _utils = require("./utils");
Object.keys(_utils).forEach(function (key) {
if (key === "default" || key === "__esModule") return;
if (key in exports && exports[key] === _utils[key]) return;
Object.defineProperty(exports, key, {
enumerable: true,
get: function () {
return _utils[key];
}
});
});
const {Environment, napi} = require('napi-wasm');
const utils = require('./utils');
let env;
module.exports.init = async function init(input) {
if (env) return;
input = input ?? new URL('parcel_node_bindings.wasm', import.meta.url);
const {instance} = await WebAssembly.instantiateStreaming(fetch(input), {
env: {
...napi,
__getrandom_custom: (ptr, len) => {
let buf = env.memory.subarray(ptr, ptr + len);
crypto.getRandomValues(buf);
},
log: (ptr, len) => {
// eslint-disable-next-line no-console
console.log(env.getString(ptr, len));
},
},
});
// input =
// input ?? require('path').join(__dirname, 'parcel_node_bindings.wasm');
// const {instance} = await WebAssembly.instantiate(
// require('fs').readFileSync(input),
// {
// env: napi,
// },
// );
for (let key in instance.exports) {
if (key.startsWith('__napi_register__')) {
instance.exports[key]();
}
}
env = new Environment(instance);
for (let key in env.exports) {
if (key !== 'transform') {
module.exports[key] = env.exports[key];
}
}
module.exports.transform = function (config) {
let result = env.exports.transform(config);
return {
...result,
// Hydrate Uint8Array into Buffer
code: Buffer.from(result.code),
};
};
Object.assign(module.exports, utils);
env.exports.initPanicHook();
};
+5
-4
{
"name": "@parcel/rust",
"version": "2.14.5-canary.3441+d0c8ddd99",
"version": "2.14.5-canary.3442+914335c16",
"license": "MIT",

@@ -16,4 +16,5 @@ "publishConfig": {

},
"main": "index.js",
"browser": "browser.js",
"source": "src/index.js",
"main": "lib/index.js",
"browser": "src/browser.js",
"napi": {

@@ -52,3 +53,3 @@ "name": "parcel-node-bindings"

},
"gitHead": "d0c8ddd99d1937e8e1d13043684a8a10617187a6"
"gitHead": "914335c16417ca54c31cda5875000fd5ea7c26a6"
}
const {Environment, napi} = require('napi-wasm');
let env;
module.exports.init = async function init(input) {
if (env) return;
input = input ?? new URL('parcel_node_bindings.wasm', import.meta.url);
const {instance} = await WebAssembly.instantiateStreaming(fetch(input), {
env: {
...napi,
__getrandom_custom: (ptr, len) => {
let buf = env.memory.subarray(ptr, ptr + len);
crypto.getRandomValues(buf);
},
log: (ptr, len) => {
// eslint-disable-next-line no-console
console.log(env.getString(ptr, len));
},
},
});
// input =
// input ?? require('path').join(__dirname, 'parcel_node_bindings.wasm');
// const {instance} = await WebAssembly.instantiate(
// require('fs').readFileSync(input),
// {
// env: napi,
// },
// );
for (let key in instance.exports) {
if (key.startsWith('__napi_register__')) {
instance.exports[key]();
}
}
env = new Environment(instance);
for (let key in env.exports) {
if (key !== 'transform') {
module.exports[key] = env.exports[key];
}
}
module.exports.transform = function (config) {
let result = env.exports.transform(config);
return {
...result,
// Hydrate Uint8Array into Buffer
code: Buffer.from(result.code),
};
};
env.exports.initPanicHook();
};

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet