Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@parcel/core

Package Overview
Dependencies
Maintainers
1
Versions
888
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@parcel/core - npm Package Compare versions

Comparing version 2.0.0-nightly.217 to 2.0.0-nightly.220

20

lib/applyRuntimes.js

@@ -26,4 +26,2 @@ "use strict";

var _constants = require("./constants");
function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var cache = new WeakMap(); _getRequireWildcardCache = function () { return cache; }; return cache; }

@@ -43,3 +41,2 @@

let connections = [];
let bundleReferences = [];

@@ -69,4 +66,2 @@ for (let bundle of bundleGraph.getBundles()) {

} of runtimeAssets) {
var _code$match;
let assetRequest = {

@@ -83,10 +78,2 @@ code,

});
let hashRefs = (_code$match = code.match(_constants.HASH_REF_REGEX)) !== null && _code$match !== void 0 ? _code$match : [];
for (let hashRef of hashRefs) {
bundleReferences.push({
from: bundle.id,
to: hashRef.slice(_constants.HASH_REF_PREFIX.length)
});
}
}

@@ -161,9 +148,2 @@ }

}
for (let {
from,
to
} of bundleReferences) {
bundleGraph._graph.addEdge(from, to, 'references');
}
}

@@ -170,0 +150,0 @@

19

lib/BundleGraph.js

@@ -190,2 +190,6 @@ "use strict";

createBundleReference(from, to) {
this._graph.addEdge(from.id, to.id, 'references');
}
findBundlesWithAsset(asset) {

@@ -464,2 +468,17 @@ return this._graph.getNodesConnectedTo((0, _nullthrows.default)(this._graph.getNode(asset.id)), 'contains').filter(node => node.type === 'bundle').map(node => {

getReferencedBundles(bundle) {
let bundles = [];
this._graph.traverse((node, _, traversal) => {
if (node.type === 'bundle') {
bundles.push(node.value);
traversal.stop();
} else if (node.id !== bundle.id) {
traversal.skipChildren();
}
}, (0, _nullthrows.default)(this._graph.getNode(bundle.id)), 'references');
return bundles;
}
getIncomingDependencies(asset) {

@@ -466,0 +485,0 @@ let node = this._graph.getNode(asset.id);

4

lib/public/BundleGraph.js

@@ -91,2 +91,6 @@ "use strict";

getReferencedBundles(bundle) {
return _classPrivateFieldGet(this, _graph).getReferencedBundles((0, _Bundle.bundleToInternalBundle)(bundle)).map(bundle => new _Bundle.Bundle(bundle, _classPrivateFieldGet(this, _graph), _classPrivateFieldGet(this, _options)));
}
resolveExternalDependency(dependency, bundle) {

@@ -93,0 +97,0 @@ let resolved = _classPrivateFieldGet(this, _graph).resolveExternalDependency((0, _Dependency.dependencyToInternalDependency)(dependency), bundle && (0, _Bundle.bundleToInternalBundle)(bundle));

@@ -198,2 +198,6 @@ "use strict";

createBundleReference(from, to) {
return _classPrivateFieldGet(this, _graph).createBundleReference((0, _Bundle.bundleToInternalBundle)(from), (0, _Bundle.bundleToInternalBundle)(to));
}
getDependencyAssets(dependency) {

@@ -200,0 +204,0 @@ return _classPrivateFieldGet(this, _graph).getDependencyAssets((0, _Dependency.dependencyToInternalDependency)(dependency)).map(asset => (0, _Asset.assetFromValue)(asset, _classPrivateFieldGet(this, _options)));

{
"name": "@parcel/core",
"version": "2.0.0-nightly.217+f9f7320b",
"version": "2.0.0-nightly.220+8dd0e941",
"license": "MIT",

@@ -19,13 +19,13 @@ "publishConfig": {

"dependencies": {
"@parcel/cache": "2.0.0-nightly.219+f9f7320b",
"@parcel/diagnostic": "2.0.0-nightly.219+f9f7320b",
"@parcel/events": "2.0.0-nightly.219+f9f7320b",
"@parcel/fs": "2.0.0-nightly.219+f9f7320b",
"@parcel/logger": "2.0.0-nightly.219+f9f7320b",
"@parcel/package-manager": "2.0.0-nightly.219+f9f7320b",
"@parcel/plugin": "2.0.0-nightly.219+f9f7320b",
"@parcel/cache": "2.0.0-nightly.222+8dd0e941",
"@parcel/diagnostic": "2.0.0-nightly.222+8dd0e941",
"@parcel/events": "2.0.0-nightly.222+8dd0e941",
"@parcel/fs": "2.0.0-nightly.222+8dd0e941",
"@parcel/logger": "2.0.0-nightly.222+8dd0e941",
"@parcel/package-manager": "2.0.0-nightly.222+8dd0e941",
"@parcel/plugin": "2.0.0-nightly.222+8dd0e941",
"@parcel/source-map": "^2.0.0-alpha.4.9",
"@parcel/types": "2.0.0-nightly.219+f9f7320b",
"@parcel/utils": "2.0.0-nightly.219+f9f7320b",
"@parcel/workers": "2.0.0-nightly.219+f9f7320b",
"@parcel/types": "2.0.0-nightly.222+8dd0e941",
"@parcel/utils": "2.0.0-nightly.222+8dd0e941",
"@parcel/workers": "2.0.0-nightly.222+8dd0e941",
"abortcontroller-polyfill": "^1.1.9",

@@ -46,3 +46,3 @@ "browserslist": "^4.6.6",

},
"gitHead": "f9f7320bed19a9a2a7d75d5c6da657272b4b44ef"
"gitHead": "8dd0e94102e6bd8856b384fe04ce52e104df0e7e"
}

@@ -25,3 +25,2 @@ // @flow strict-local

import ThrowableDiagnostic, {errorToDiagnostic} from '@parcel/diagnostic';
import {HASH_REF_PREFIX, HASH_REF_REGEX} from './constants';

@@ -49,3 +48,2 @@ type RuntimeConnection = {|

let connections: Array<RuntimeConnection> = [];
let bundleReferences = [];

@@ -77,9 +75,2 @@ for (let bundle of bundleGraph.getBundles()) {

});
let hashRefs = code.match(HASH_REF_REGEX) ?? [];
for (let hashRef of hashRefs) {
bundleReferences.push({
from: bundle.id,
to: hashRef.slice(HASH_REF_PREFIX.length),
});
}
}

@@ -163,6 +154,2 @@ }

}
for (let {from, to} of bundleReferences) {
bundleGraph._graph.addEdge(from, to, 'references');
}
}

@@ -169,0 +156,0 @@

@@ -236,2 +236,6 @@ // @flow strict-local

createBundleReference(from: Bundle, to: Bundle): void {
this._graph.addEdge(from.id, to.id, 'references');
}
findBundlesWithAsset(asset: Asset): Array<Bundle> {

@@ -616,2 +620,19 @@ return this._graph

getReferencedBundles(bundle: Bundle): Array<Bundle> {
let bundles = [];
this._graph.traverse(
(node, _, traversal) => {
if (node.type === 'bundle') {
bundles.push(node.value);
traversal.stop();
} else if (node.id !== bundle.id) {
traversal.skipChildren();
}
},
nullthrows(this._graph.getNode(bundle.id)),
'references',
);
return bundles;
}
getIncomingDependencies(asset: Asset): Array<Dependency> {

@@ -618,0 +639,0 @@ let node = this._graph.getNode(asset.id);

@@ -85,2 +85,8 @@ // @flow strict-local

getReferencedBundles(bundle: IBundle): Array<IBundle> {
return this.#graph
.getReferencedBundles(bundleToInternalBundle(bundle))
.map(bundle => new Bundle(bundle, this.#graph, this.#options));
}
resolveExternalDependency(

@@ -87,0 +93,0 @@ dependency: IDependency,

@@ -195,2 +195,9 @@ // @flow strict-local

createBundleReference(from: IBundle, to: IBundle): void {
return this.#graph.createBundleReference(
bundleToInternalBundle(from),
bundleToInternalBundle(to),
);
}
getDependencyAssets(dependency: IDependency): Array<IAsset> {

@@ -197,0 +204,0 @@ return this.#graph

@@ -13,3 +13,3 @@ // @flow strict-local

import Config from './public/Config';
// $FlowFixMe this is untyped
// flowlint-next-line untyped-import:off
import packageJson from '../package.json';

@@ -16,0 +16,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