New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@cara/porter

Package Overview
Dependencies
Maintainers
3
Versions
154
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@cara/porter - npm Package Compare versions

Comparing version 4.0.0-beta.11 to 4.0.0-beta.12

6

loader.js

@@ -129,3 +129,3 @@ /* eslint-env browser */

function requestWasm(uri, callback) {
var id = uri.replace(basePath, '');
var id = uri.replace(basePath, '').replace(/\.[0-9a-f]{8}(\.\w+)$/, '$1');
var mod = registry[id];

@@ -261,4 +261,2 @@ var contextId = id.replace(rWasm, '.js');

if (rWasm.test(obj.file)) return basePath + resolve(name, version, obj.file);
// lock is empty if loader.js is loaded separately, e.g.

@@ -268,3 +266,3 @@ // `<script src="/loader.js" data-main="app.js"></script>`

var meta = lock[name][version];
var file = isRootEntry ? obj.file : (meta.main || 'index.js');
var file = isRootEntry || rWasm.test(obj.file) ? obj.file : (meta.main || 'index.js');
if (meta.manifest && meta.manifest[file]) {

@@ -271,0 +269,0 @@ return basePath + resolve(name, version, meta.manifest[file]);

{
"name": "@cara/porter",
"description": "A middleware for web modules",
"version": "4.0.0-beta.11",
"version": "4.0.0-beta.12",
"main": "src/porter.js",

@@ -43,3 +43,3 @@ "repository": {

"license": "BSD-3-Clause",
"gitHead": "faf7685cef9ab7dfcab4c383de0d86aa275d7fb2"
"gitHead": "352e6cafca7441bbbc71796aa5f7c2056bed5b14"
}

@@ -308,3 +308,9 @@ 'use strict';

if (format === '.wasm') {
for (const mod of this) return await mod.obtain();
for (const mod of this) {
const result = await mod.obtain();
this.#code = result.code;
this.#cacheKey = cacheKey;
this.updatedAt = new Date();
return result;
}
}

@@ -386,11 +392,6 @@

async exists({ loader, minify = true } = {}) {
const { app } = this;
if (typeof app.bundle.exists !== 'function') return false;
await this.fuzzyObtain({ loader, minify });
const { app, outputPath } = this;
if (typeof app.bundle.exists === 'function') {
return await app.bundle.exists(this);
}
// prevent the fuzzy obtained code from interfering future obtaining
// this.#cacheKey = null;
const fpath = path.join(app.output.path, outputPath);
return await fs.access(fpath).then(() => true).catch(() => false);
return await app.bundle.exists(this);
}

@@ -397,0 +398,0 @@

@@ -383,3 +383,4 @@ 'use strict';

async readWasm(id) {
async readWasm(outputPath) {
const id = outputPath.replace(/\.[a-f0-9]{8}\.wasm$/, '.wasm');
let [, name, version, file] = id.match(rModuleId);

@@ -386,0 +387,0 @@ let packet;

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc