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
2
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-alpha.6 to 4.0.0-alpha.7

4

package.json
{
"name": "@cara/porter",
"description": "A middleware for web modules",
"version": "4.0.0-alpha.6",
"version": "4.0.0-alpha.7",
"main": "src/porter.js",

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

"license": "BSD-3-Clause",
"gitHead": "07bd222339d3f1f87da3486cc80dca9da0e2c277"
"gitHead": "53e2ae67804c5bba47b20360dae40a753520d96c"
}

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

const { init } = node.declarations[0];
if (t.isCallExpression(init) && init.callee.name === 'require' && init.arguments[0].value === 'heredoc') {
const expr = t.isMemberExpression(init) ? init.object : init;
if (t.isCallExpression(expr) && expr.callee.name === 'require' && expr.arguments[0].value === 'heredoc') {
path.remove();

@@ -33,0 +34,0 @@ }

@@ -6,2 +6,3 @@ 'use strict';

const Module = require('./module');
const { MODULE_LOADED } = require('./constants');

@@ -11,2 +12,3 @@ module.exports = class JsonModule extends Module {

// nothing to parse here, just pure json data
this.status = MODULE_LOADED;
}

@@ -13,0 +15,0 @@

@@ -483,2 +483,13 @@ 'use strict';

// the modules might not be fully parsed yet, the process returns early when parsing multiple times.
await new Promise(resolve => {
(function poll() {
if (Object.values(files).every(mod => mod.status >= MODULE_LOADED)) {
resolve();
} else {
setTimeout(poll, 10);
}
})();
});
for (const mod of Object.values(this.entries)) {

@@ -496,4 +507,2 @@ if (mod.isRootEntry) entries.push(mod.file);

});
// skip obtaining if packet modules aren't fully parsed
if (Object.values(files).some(mod => mod.status < MODULE_LOADED)) continue;
if (bundle.entries.length > 0) await bundle.obtain();

@@ -500,0 +509,0 @@ }

'use strict';
const { promises: { readFile } } = require('fs');
const { MODULE_LOADED } = require('./constants');
const Module = require('./module');

@@ -17,2 +18,3 @@

// unnecessary
this.status = MODULE_LOADED;
}

@@ -19,0 +21,0 @@

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