@parcel/core
Advanced tools
Comparing version 2.0.0-nightly.212 to 2.0.0-nightly.217
@@ -27,6 +27,2 @@ "use strict"; | ||
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; } | ||
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; } | ||
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } | ||
@@ -106,6 +102,6 @@ | ||
// $FlowFixMe Added in Flow 0.121.0 upgrade in #4381 | ||
return _objectSpread({}, super.serialize(), { | ||
return { ...super.serialize(), | ||
incompleteNodeIds: this.incompleteNodeIds, | ||
hash: this.hash | ||
}); | ||
}; | ||
} | ||
@@ -112,0 +108,0 @@ |
@@ -487,14 +487,7 @@ "use strict"; | ||
} // Resolve the export `symbol` of `asset` to the source, | ||
// stopping at the first asset after leaving `bundle` (symbol is null in that case) | ||
// stopping at the first asset after leaving `bundle` (symbol is nullish in that case) | ||
resolveSymbol(asset, symbol, boundary) { | ||
if (boundary && !this.bundleHasAsset(boundary, asset)) { | ||
return { | ||
asset, | ||
exportSymbol: symbol, | ||
symbol: undefined | ||
}; | ||
} | ||
let assetOutside = boundary && !this.bundleHasAsset(boundary, asset); | ||
let identifier = asset.symbols.get(symbol); | ||
@@ -525,2 +518,7 @@ | ||
if (assetOutside) { | ||
// We found the symbol, but `asset` is outside, return `asset` and the original symbol | ||
break; | ||
} | ||
let { | ||
@@ -555,3 +553,8 @@ asset: resolvedAsset, | ||
if (result.symbol != null) { | ||
if (result.symbol != undefined) { | ||
if (assetOutside) { | ||
// We found the symbol, but `asset` is outside, return `asset` and the original symbol | ||
break; | ||
} | ||
return { | ||
@@ -558,0 +561,0 @@ asset: result.asset, |
@@ -13,12 +13,2 @@ "use strict"; | ||
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; } | ||
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; } | ||
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; } | ||
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; } | ||
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } | ||
function createDependency(opts) { | ||
@@ -34,3 +24,3 @@ var _opts$isAsync, _opts$isEntry, _opts$isOptional, _opts$isURL; | ||
}); | ||
return _objectSpread({}, opts, { | ||
return { ...opts, | ||
id, | ||
@@ -44,3 +34,3 @@ isAsync: (_opts$isAsync = opts.isAsync) !== null && _opts$isAsync !== void 0 ? _opts$isAsync : false, | ||
symbols: opts.symbols || new Map() | ||
}); | ||
}; | ||
} | ||
@@ -54,6 +44,5 @@ | ||
symbols, | ||
isWeak | ||
} = b, | ||
other = _objectWithoutProperties(b, ["meta", "symbols", "isWeak"]); | ||
isWeak, | ||
...other | ||
} = b; | ||
Object.assign(a, other); | ||
@@ -60,0 +49,0 @@ Object.assign(a.meta, meta); |
@@ -12,8 +12,2 @@ "use strict"; | ||
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; } | ||
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; } | ||
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } | ||
const DEFAULT_ENGINES = { | ||
@@ -116,3 +110,5 @@ browsers: ['> 0.25%'], | ||
return createEnvironment(_objectSpread({}, a, {}, b)); | ||
return createEnvironment({ ...a, | ||
...b | ||
}); | ||
} | ||
@@ -119,0 +115,0 @@ |
@@ -35,18 +35,12 @@ "use strict"; | ||
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; } | ||
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; } | ||
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } | ||
async function loadParcelConfig(options) { | ||
// Resolve plugins from cwd when a config is passed programmatically | ||
let parcelConfig = options.config ? await create(_objectSpread({}, options.config, { | ||
let parcelConfig = options.config ? await create({ ...options.config, | ||
resolveFrom: options.inputFS.cwd() | ||
}), options) : await resolveParcelConfig(options); | ||
}, options) : await resolveParcelConfig(options); | ||
if (!parcelConfig && options.defaultConfig) { | ||
parcelConfig = await create(_objectSpread({}, options.defaultConfig, { | ||
parcelConfig = await create({ ...options.defaultConfig, | ||
resolveFrom: options.inputFS.cwd() | ||
}), options); | ||
}, options); | ||
} | ||
@@ -164,5 +158,6 @@ | ||
let resolvedFile = processConfig(_objectSpread({ | ||
filePath | ||
}, configFile)); | ||
let resolvedFile = processConfig({ | ||
filePath, | ||
...configFile | ||
}); | ||
let config = new _ParcelConfig.default(resolvedFile, options.packageManager, options.autoinstall); | ||
@@ -169,0 +164,0 @@ let extendedFiles = []; |
@@ -55,8 +55,2 @@ "use strict"; | ||
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; } | ||
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; } | ||
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } | ||
function _classPrivateFieldGet(receiver, privateMap) { var descriptor = privateMap.get(receiver); if (!descriptor) { throw new TypeError("attempted to get private field on non-instance"); } if (descriptor.get) { return descriptor.get.call(receiver); } return descriptor.value; } | ||
@@ -523,5 +517,5 @@ | ||
function createWorkerFarm(options = {}) { | ||
return new _workers.default(_objectSpread({}, options, { | ||
return new _workers.default({ ...options, | ||
workerPath: require.resolve('./worker') | ||
})); | ||
}); | ||
} |
@@ -25,8 +25,2 @@ "use strict"; | ||
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; } | ||
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; } | ||
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } | ||
function _classPrivateFieldGet(receiver, privateMap) { var descriptor = privateMap.get(receiver); if (!descriptor) { throw new TypeError("attempted to get private field on non-instance"); } if (descriptor.get) { return descriptor.get.call(receiver); } return descriptor.value; } | ||
@@ -36,2 +30,3 @@ | ||
const inspect = Symbol.for('nodejs.util.inspect.custom'); | ||
const assetValueToAsset = new WeakMap(); | ||
@@ -70,2 +65,7 @@ const assetValueToMutableAsset = new WeakMap(); | ||
_assetToAssetValue.set(this, asset.value); | ||
} // $FlowFixMe | ||
[inspect]() { | ||
return `Asset(${this.filePath})`; | ||
} | ||
@@ -292,7 +292,9 @@ | ||
addURLDependency(url, opts) { | ||
return this.addDependency(_objectSpread({ | ||
return this.addDependency({ | ||
moduleSpecifier: url, | ||
isURL: true, | ||
isAsync: true | ||
}, opts)); | ||
isAsync: true, | ||
// The browser has native loaders for url dependencies | ||
...opts | ||
}); | ||
} | ||
@@ -299,0 +301,0 @@ |
@@ -72,3 +72,3 @@ "use strict"; | ||
getDependencyResolution(dep, bundle) { | ||
let resolution = _classPrivateFieldGet(this, _graph).getDependencyResolution((0, _Dependency.dependencyToInternalDependency)(dep), (0, _Bundle.bundleToInternalBundle)(bundle)); | ||
let resolution = _classPrivateFieldGet(this, _graph).getDependencyResolution((0, _Dependency.dependencyToInternalDependency)(dep), bundle && (0, _Bundle.bundleToInternalBundle)(bundle)); | ||
@@ -93,3 +93,3 @@ if (resolution) { | ||
resolveExternalDependency(dependency, bundle) { | ||
let resolved = _classPrivateFieldGet(this, _graph).resolveExternalDependency((0, _Dependency.dependencyToInternalDependency)(dependency), (0, _Bundle.bundleToInternalBundle)(bundle)); | ||
let resolved = _classPrivateFieldGet(this, _graph).resolveExternalDependency((0, _Dependency.dependencyToInternalDependency)(dependency), bundle && (0, _Bundle.bundleToInternalBundle)(bundle)); | ||
@@ -175,2 +175,6 @@ if (resolved == null) { | ||
findBundlesWithDependency(dependency) { | ||
return _classPrivateFieldGet(this, _graph).findBundlesWithDependency((0, _Dependency.dependencyToInternalDependency)(dependency)).map(bundle => new _Bundle.Bundle(bundle, _classPrivateFieldGet(this, _graph), _classPrivateFieldGet(this, _options))); | ||
} | ||
} | ||
@@ -177,0 +181,0 @@ |
@@ -21,2 +21,3 @@ "use strict"; | ||
const inspect = Symbol.for('nodejs.util.inspect.custom'); | ||
const internalDependencyToDependency = new WeakMap(); | ||
@@ -49,2 +50,7 @@ | ||
internalDependencyToDependency.set(dep, this); | ||
} // $FlowFixMe | ||
[inspect]() { | ||
return `Dependency(${String(this.sourcePath)} -> ${this.moduleSpecifier})`; | ||
} | ||
@@ -51,0 +57,0 @@ |
@@ -14,4 +14,6 @@ "use strict"; | ||
var _BundleGraph = _interopRequireDefault(require("../BundleGraph")); | ||
var _BundleGraph = _interopRequireDefault(require("./BundleGraph")); | ||
var _BundleGraph2 = _interopRequireDefault(require("../BundleGraph")); | ||
var _Bundle = require("./Bundle"); | ||
@@ -45,6 +47,8 @@ | ||
class MutableBundleGraph { | ||
class MutableBundleGraph extends _BundleGraph.default { | ||
// InternalBundleGraph | ||
// ParcelOptions | ||
constructor(graph, options) { | ||
super(graph, options); | ||
_graph.set(this, { | ||
@@ -135,17 +139,2 @@ writable: true, | ||
resolveExternalDependency(dependency, bundle) { | ||
let resolved = _classPrivateFieldGet(this, _graph).resolveExternalDependency((0, _Dependency.dependencyToInternalDependency)(dependency), bundle && (0, _Bundle.bundleToInternalBundle)(bundle)); | ||
if (resolved == null) { | ||
return; | ||
} else if (resolved.type === 'bundle_group') { | ||
return resolved; | ||
} | ||
return { | ||
type: 'asset', | ||
value: (0, _Asset.assetFromValue)(resolved.value, _classPrivateFieldGet(this, _options)) | ||
}; | ||
} | ||
internalizeAsyncDependency(bundle, dependency) { | ||
@@ -216,14 +205,2 @@ _classPrivateFieldGet(this, _graph).internalizeAsyncDependency((0, _Bundle.bundleToInternalBundle)(bundle), (0, _Dependency.dependencyToInternalDependency)(dependency)); | ||
getDependencyResolution(dependency) { | ||
let resolved = _classPrivateFieldGet(this, _graph).getDependencyResolution((0, _Dependency.dependencyToInternalDependency)(dependency)); | ||
if (resolved) { | ||
return (0, _Asset.assetFromValue)(resolved, _classPrivateFieldGet(this, _options)); | ||
} | ||
} | ||
getSiblingBundles(bundle) { | ||
return _classPrivateFieldGet(this, _graph).getSiblingBundles((0, _Bundle.bundleToInternalBundle)(bundle)).map(bundle => new _Bundle.Bundle(bundle, _classPrivateFieldGet(this, _graph), _classPrivateFieldGet(this, _options))); | ||
} | ||
traverse(visit) { | ||
@@ -247,10 +224,2 @@ return _classPrivateFieldGet(this, _graph)._graph.filteredTraverse(node => { | ||
findBundlesWithAsset(asset) { | ||
return _classPrivateFieldGet(this, _graph).findBundlesWithAsset((0, _Asset.assetToAssetValue)(asset)).map(bundle => new _Bundle.Bundle(bundle, _classPrivateFieldGet(this, _graph), _classPrivateFieldGet(this, _options))); | ||
} | ||
findBundlesWithDependency(dependency) { | ||
return _classPrivateFieldGet(this, _graph).findBundlesWithDependency((0, _Dependency.dependencyToInternalDependency)(dependency)).map(bundle => new _Bundle.Bundle(bundle, _classPrivateFieldGet(this, _graph), _classPrivateFieldGet(this, _options))); | ||
} | ||
getBundleGroupsContainingBundle(bundle) { | ||
@@ -280,6 +249,2 @@ return _classPrivateFieldGet(this, _graph).getBundleGroupsContainingBundle((0, _Bundle.bundleToInternalBundle)(bundle)); | ||
traverseBundles(visit) { | ||
return _classPrivateFieldGet(this, _graph).traverseBundles((0, _Graph.mapVisitor)(bundle => new _Bundle.Bundle(bundle, _classPrivateFieldGet(this, _graph), _classPrivateFieldGet(this, _options)), visit)); | ||
} | ||
traverseContents(visit) { | ||
@@ -286,0 +251,0 @@ return _classPrivateFieldGet(this, _graph).traverseContents((0, _Graph.mapVisitor)(node => node.type === 'asset' ? { |
@@ -30,6 +30,2 @@ "use strict"; | ||
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; } | ||
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; } | ||
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } | ||
@@ -57,5 +53,5 @@ | ||
(0, _assert.default)(bundleGraph instanceof _BundleGraph.default); | ||
this.report(_objectSpread({}, event, { | ||
this.report({ ...event, | ||
bundle: new _Bundle.NamedBundle(event.bundle, bundleGraph, this.options) | ||
})); | ||
}); | ||
return; | ||
@@ -101,6 +97,6 @@ } | ||
// easy serialization | ||
_workers.bus.emit('reporterEvent', _objectSpread({}, event, { | ||
_workers.bus.emit('reporterEvent', { ...event, | ||
bundle: (0, _Bundle.bundleToInternalBundle)(event.bundle), | ||
bundleGraphRef: workerApi.resolveSharedReference((0, _Bundle.bundleToInternalBundleGraph)(event.bundle)) | ||
})); | ||
}); | ||
@@ -107,0 +103,0 @@ return; |
@@ -21,6 +21,2 @@ "use strict"; | ||
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; } | ||
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; } | ||
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } | ||
@@ -75,3 +71,3 @@ | ||
serialize() { | ||
return _objectSpread({}, super.serialize(), { | ||
return { ...super.serialize(), | ||
invalidNodeIds: this.invalidNodeIds, | ||
@@ -81,3 +77,3 @@ incompleteNodeIds: this.incompleteNodeIds, | ||
unpredicatableNodeIds: this.unpredicatableNodeIds | ||
}); | ||
}; | ||
} | ||
@@ -84,0 +80,0 @@ |
@@ -22,8 +22,2 @@ "use strict"; | ||
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; } | ||
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; } | ||
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } | ||
// Default cache directory name | ||
@@ -79,3 +73,5 @@ const DEFAULT_CACHE_DIRNAME = '.parcel-cache'; | ||
patchConsole: (_initialOptions$patch = initialOptions.patchConsole) !== null && _initialOptions$patch !== void 0 ? _initialOptions$patch : process.env.NODE_ENV !== 'test', | ||
env: _objectSpread({}, initialOptions.env, {}, (await (0, _loadDotEnv.default)((_initialOptions$env = initialOptions.env) !== null && _initialOptions$env !== void 0 ? _initialOptions$env : {}, inputFS, _path.default.join(projectRoot, 'index')))), | ||
env: { ...initialOptions.env, | ||
...(await (0, _loadDotEnv.default)((_initialOptions$env = initialOptions.env) !== null && _initialOptions$env !== void 0 ? _initialOptions$env : {}, inputFS, _path.default.join(projectRoot, 'index'))) | ||
}, | ||
mode, | ||
@@ -82,0 +78,0 @@ minify, |
@@ -17,8 +17,2 @@ "use strict"; | ||
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; } | ||
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; } | ||
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } | ||
const nameToCtor = new Map(); | ||
@@ -188,3 +182,4 @@ const ctorToName = new Map(); | ||
$$raw: raw, | ||
value: _objectSpread({}, serialized) | ||
value: { ...serialized | ||
} | ||
}; | ||
@@ -191,0 +186,0 @@ } |
@@ -30,10 +30,2 @@ "use strict"; | ||
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; } | ||
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; } | ||
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; } | ||
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; } | ||
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } | ||
@@ -102,9 +94,8 @@ | ||
let _parseDescriptor = parseDescriptor(name, _descriptor, null, { | ||
let { | ||
distDir, | ||
...descriptor | ||
} = parseDescriptor(name, _descriptor, null, { | ||
targets: optionTargets | ||
}), | ||
{ | ||
distDir | ||
} = _parseDescriptor, | ||
descriptor = _objectWithoutProperties(_parseDescriptor, ["distDir"]); | ||
}); | ||
@@ -245,5 +236,5 @@ if (!distDir) { | ||
if (browserslistBrowsers) { | ||
pkgEngines = _objectSpread({}, pkgEngines, { | ||
pkgEngines = { ...pkgEngines, | ||
browsers: browserslistBrowsers | ||
}); | ||
}; | ||
} | ||
@@ -263,9 +254,9 @@ } | ||
if (context === 'browser' && pkgEngines.browsers == null) { | ||
pkgEngines = _objectSpread({}, pkgEngines, { | ||
pkgEngines = { ...pkgEngines, | ||
browsers: defaultEngines.browsers | ||
}); | ||
}; | ||
} else if (context === 'node' && pkgEngines.node == null) { | ||
pkgEngines = _objectSpread({}, pkgEngines, { | ||
pkgEngines = { ...pkgEngines, | ||
node: defaultEngines.node | ||
}); | ||
}; | ||
} | ||
@@ -300,5 +291,6 @@ | ||
distEntry = _path.default.basename(targetDist); | ||
loc = _objectSpread({ | ||
filePath: pkgFilePath | ||
}, (0, _diagnostic.getJSONSourceLocation)(pkgMap.pointers[pointer], 'value')); | ||
loc = { | ||
filePath: pkgFilePath, | ||
...(0, _diagnostic.getJSONSourceLocation)(pkgMap.pointers[pointer], 'value') | ||
}; | ||
} else { | ||
@@ -374,5 +366,6 @@ var _this$options$distDir; | ||
(0, _assert.default)(pkgMap != null); | ||
loc = _objectSpread({ | ||
filePath: pkgFilePath | ||
}, (0, _diagnostic.getJSONSourceLocation)(pkgMap.pointers[`/${targetName}`], 'value')); | ||
loc = { | ||
filePath: pkgFilePath, | ||
...(0, _diagnostic.getJSONSourceLocation)(pkgMap.pointers[`/${targetName}`], 'value') | ||
}; | ||
} | ||
@@ -379,0 +372,0 @@ |
@@ -26,10 +26,2 @@ "use strict"; | ||
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; } | ||
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; } | ||
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; } | ||
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; } | ||
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } | ||
@@ -221,11 +213,10 @@ | ||
env, | ||
target | ||
} = opts, | ||
rest = _objectWithoutProperties(opts, ["env", "target"]); | ||
let dep = (0, _Dependency.createDependency)(_objectSpread({}, rest, { | ||
target, | ||
...rest | ||
} = opts; | ||
let dep = (0, _Dependency.createDependency)({ ...rest, | ||
env: (0, _Environment.mergeEnvironments)(this.value.env, env), | ||
sourceAssetId: this.value.id, | ||
sourcePath: this.value.filePath | ||
})); | ||
}); | ||
let existing = this.value.dependencies.get(dep.id); | ||
@@ -271,3 +262,5 @@ | ||
includedFiles: new Map(this.value.includedFiles), | ||
meta: _objectSpread({}, this.value.meta, {}, result.meta), | ||
meta: { ...this.value.meta, | ||
...result.meta | ||
}, | ||
pipeline: (_result$pipeline = result.pipeline) !== null && _result$pipeline !== void 0 ? _result$pipeline : this.value.type === result.type ? this.value.pipeline : null, | ||
@@ -274,0 +267,0 @@ stats: { |
@@ -34,12 +34,3 @@ "use strict"; | ||
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; } | ||
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; } | ||
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } | ||
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; } | ||
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; } | ||
// register with serializer | ||
(0, _utils.registerCoreWithSerializer)(); // Remove the workerApi type from the TransformationOpts and ValidationOpts types: | ||
@@ -51,6 +42,5 @@ // https://github.com/facebook/flow/issues/2835 | ||
optionsRef, | ||
configRef | ||
} = opts, | ||
rest = _objectWithoutProperties(opts, ["optionsRef", "configRef"]); | ||
configRef, | ||
...rest | ||
} = opts; | ||
let options = workerApi.getSharedReference(optionsRef // $FlowFixMe | ||
@@ -61,8 +51,9 @@ ); | ||
let config = new _ParcelConfig.default(processedConfig, options.packageManager, options.autoinstall); | ||
return new _Transformation.default(_objectSpread({ | ||
return new _Transformation.default({ | ||
workerApi, | ||
report: _ReporterRunner.reportWorker.bind(null, workerApi), | ||
options, | ||
config | ||
}, rest)).run(); | ||
config, | ||
...rest | ||
}).run(); | ||
} | ||
@@ -73,6 +64,5 @@ | ||
optionsRef, | ||
configRef | ||
} = opts, | ||
rest = _objectWithoutProperties(opts, ["optionsRef", "configRef"]); | ||
configRef, | ||
...rest | ||
} = opts; | ||
let options = workerApi.getSharedReference(optionsRef // $FlowFixMe | ||
@@ -83,8 +73,9 @@ ); | ||
let config = new _ParcelConfig.default(processedConfig, options.packageManager, options.autoinstall); | ||
return new _Validation.default(_objectSpread({ | ||
return new _Validation.default({ | ||
workerApi, | ||
report: _ReporterRunner.reportWorker.bind(null, workerApi), | ||
options, | ||
config | ||
}, rest)).run(); | ||
config, | ||
...rest | ||
}).run(); | ||
} | ||
@@ -91,0 +82,0 @@ |
{ | ||
"name": "@parcel/core", | ||
"version": "2.0.0-nightly.212+52fd6741", | ||
"version": "2.0.0-nightly.217+f9f7320b", | ||
"license": "MIT", | ||
@@ -19,13 +19,13 @@ "publishConfig": { | ||
"dependencies": { | ||
"@parcel/cache": "2.0.0-nightly.214+52fd6741", | ||
"@parcel/diagnostic": "2.0.0-nightly.214+52fd6741", | ||
"@parcel/events": "2.0.0-nightly.214+52fd6741", | ||
"@parcel/fs": "2.0.0-nightly.214+52fd6741", | ||
"@parcel/logger": "2.0.0-nightly.214+52fd6741", | ||
"@parcel/package-manager": "2.0.0-nightly.214+52fd6741", | ||
"@parcel/plugin": "2.0.0-nightly.214+52fd6741", | ||
"@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/source-map": "^2.0.0-alpha.4.9", | ||
"@parcel/types": "2.0.0-nightly.214+52fd6741", | ||
"@parcel/utils": "2.0.0-nightly.214+52fd6741", | ||
"@parcel/workers": "2.0.0-nightly.214+52fd6741", | ||
"@parcel/types": "2.0.0-nightly.219+f9f7320b", | ||
"@parcel/utils": "2.0.0-nightly.219+f9f7320b", | ||
"@parcel/workers": "2.0.0-nightly.219+f9f7320b", | ||
"abortcontroller-polyfill": "^1.1.9", | ||
@@ -46,3 +46,3 @@ "browserslist": "^4.6.6", | ||
}, | ||
"gitHead": "52fd6741a0ea1f2e043c628cf6b7be0715b1c837" | ||
"gitHead": "f9f7320bed19a9a2a7d75d5c6da657272b4b44ef" | ||
} |
@@ -125,3 +125,3 @@ // @flow strict-local | ||
dependency: Dependency, | ||
bundle?: Bundle, | ||
bundle: ?Bundle, | ||
): ?( | ||
@@ -274,3 +274,3 @@ | {|type: 'bundle_group', value: BundleGroup|} | ||
getDependencyResolution(dep: Dependency, bundle?: Bundle): ?Asset { | ||
getDependencyResolution(dep: Dependency, bundle: ?Bundle): ?Asset { | ||
let depNode = this._graph.getNode(dep.id); | ||
@@ -544,3 +544,3 @@ if (!depNode) { | ||
visit: GraphVisitor<Bundle, TContext>, | ||
startBundle?: Bundle, | ||
startBundle: ?Bundle, | ||
): ?TContext { | ||
@@ -653,11 +653,5 @@ return this._graph.filteredTraverse( | ||
// Resolve the export `symbol` of `asset` to the source, | ||
// stopping at the first asset after leaving `bundle` (symbol is null in that case) | ||
// stopping at the first asset after leaving `bundle` (symbol is nullish in that case) | ||
resolveSymbol(asset: Asset, symbol: Symbol, boundary: ?Bundle) { | ||
if (boundary && !this.bundleHasAsset(boundary, asset)) { | ||
return { | ||
asset, | ||
exportSymbol: symbol, | ||
symbol: undefined, | ||
}; | ||
} | ||
let assetOutside = boundary && !this.bundleHasAsset(boundary, asset); | ||
@@ -683,2 +677,7 @@ let identifier = asset.symbols.get(symbol); | ||
if (assetOutside) { | ||
// We found the symbol, but `asset` is outside, return `asset` and the original symbol | ||
break; | ||
} | ||
let { | ||
@@ -709,3 +708,8 @@ asset: resolvedAsset, | ||
let result = this.resolveSymbol(resolved, symbol, boundary); | ||
if (result.symbol != null) { | ||
if (result.symbol != undefined) { | ||
if (assetOutside) { | ||
// We found the symbol, but `asset` is outside, return `asset` and the original symbol | ||
break; | ||
} | ||
return { | ||
@@ -712,0 +716,0 @@ asset: result.asset, |
@@ -23,3 +23,3 @@ // @flow strict-local | ||
Stats, | ||
Symbol, | ||
Symbol as ISymbol, | ||
} from '@parcel/types'; | ||
@@ -35,2 +35,4 @@ import type {Asset as AssetValue, ParcelOptions} from '../types'; | ||
const inspect = Symbol.for('nodejs.util.inspect.custom'); | ||
const assetValueToAsset: WeakMap<AssetValue, Asset> = new WeakMap(); | ||
@@ -81,2 +83,7 @@ const assetValueToMutableAsset: WeakMap< | ||
// $FlowFixMe | ||
[inspect]() { | ||
return `Asset(${this.filePath})`; | ||
} | ||
get id(): string { | ||
@@ -126,3 +133,3 @@ return this.#asset.value.id; | ||
get symbols(): Map<Symbol, Symbol> { | ||
get symbols(): Map<ISymbol, ISymbol> { | ||
return this.#asset.value.symbols; | ||
@@ -129,0 +136,0 @@ } |
@@ -9,3 +9,3 @@ // @flow strict-local | ||
Dependency as IDependency, | ||
GraphTraversalCallback, | ||
GraphVisitor, | ||
Symbol, | ||
@@ -21,3 +21,3 @@ SymbolResolution, | ||
import {assetFromValue, assetToAssetValue, Asset} from './Asset'; | ||
import {assetFromValue, assetToAssetValue} from './Asset'; | ||
import {Bundle, bundleToInternalBundle} from './Bundle'; | ||
@@ -59,6 +59,6 @@ import Dependency, {dependencyToInternalDependency} from './Dependency'; | ||
getDependencyResolution(dep: IDependency, bundle: IBundle): ?Asset { | ||
getDependencyResolution(dep: IDependency, bundle: ?IBundle): ?IAsset { | ||
let resolution = this.#graph.getDependencyResolution( | ||
dependencyToInternalDependency(dep), | ||
bundleToInternalBundle(bundle), | ||
bundle && bundleToInternalBundle(bundle), | ||
); | ||
@@ -90,3 +90,3 @@ if (resolution) { | ||
dependency: IDependency, | ||
bundle: IBundle, | ||
bundle: ?IBundle, | ||
): ?( | ||
@@ -98,3 +98,3 @@ | {|type: 'bundle_group', value: BundleGroup|} | ||
dependencyToInternalDependency(dependency), | ||
bundleToInternalBundle(bundle), | ||
bundle && bundleToInternalBundle(bundle), | ||
); | ||
@@ -198,4 +198,4 @@ | ||
traverseBundles<TContext>( | ||
visit: GraphTraversalCallback<IBundle, TContext>, | ||
startBundle?: IBundle, | ||
visit: GraphVisitor<IBundle, TContext>, | ||
startBundle: ?IBundle, | ||
): ?TContext { | ||
@@ -216,2 +216,8 @@ return this.#graph.traverseBundles( | ||
} | ||
findBundlesWithDependency(dependency: IDependency): Array<IBundle> { | ||
return this.#graph | ||
.findBundlesWithDependency(dependencyToInternalDependency(dependency)) | ||
.map(bundle => new Bundle(bundle, this.#graph, this.#options)); | ||
} | ||
} |
@@ -7,3 +7,3 @@ // @flow | ||
Meta, | ||
Symbol, | ||
Symbol as ISymbol, | ||
} from '@parcel/types'; | ||
@@ -15,2 +15,4 @@ import type {Dependency as InternalDependency} from '../types'; | ||
const inspect = Symbol.for('nodejs.util.inspect.custom'); | ||
const internalDependencyToDependency: WeakMap< | ||
@@ -44,2 +46,7 @@ InternalDependency, | ||
// $FlowFixMe | ||
[inspect]() { | ||
return `Dependency(${String(this.sourcePath)} -> ${this.moduleSpecifier})`; | ||
} | ||
get id(): string { | ||
@@ -104,3 +111,3 @@ return this.#dep.id; | ||
get symbols(): Map<Symbol, Symbol> { | ||
get symbols(): Map<ISymbol, ISymbol> { | ||
return this.#dep.symbols; | ||
@@ -107,0 +114,0 @@ } |
@@ -19,2 +19,3 @@ // @flow strict-local | ||
import {DefaultWeakMap, md5FromString} from '@parcel/utils'; | ||
import BundleGraph from './BundleGraph'; | ||
import InternalBundleGraph from '../BundleGraph'; | ||
@@ -35,3 +36,4 @@ import {Bundle, bundleToInternalBundle} from './Bundle'; | ||
export default class MutableBundleGraph implements IMutableBundleGraph { | ||
export default class MutableBundleGraph extends BundleGraph | ||
implements IMutableBundleGraph { | ||
#graph; // InternalBundleGraph | ||
@@ -41,2 +43,3 @@ #options; // ParcelOptions | ||
constructor(graph: InternalBundleGraph, options: ParcelOptions) { | ||
super(graph, options); | ||
let existing = internalMutableBundleGraphToMutableBundleGraph | ||
@@ -127,26 +130,2 @@ .get(options) | ||
resolveExternalDependency( | ||
dependency: IDependency, | ||
bundle?: IBundle, | ||
): ?( | ||
| {|type: 'bundle_group', value: BundleGroup|} | ||
| {|type: 'asset', value: IAsset|} | ||
) { | ||
let resolved = this.#graph.resolveExternalDependency( | ||
dependencyToInternalDependency(dependency), | ||
bundle && bundleToInternalBundle(bundle), | ||
); | ||
if (resolved == null) { | ||
return; | ||
} else if (resolved.type === 'bundle_group') { | ||
return resolved; | ||
} | ||
return { | ||
type: 'asset', | ||
value: assetFromValue(resolved.value, this.#options), | ||
}; | ||
} | ||
internalizeAsyncDependency(bundle: IBundle, dependency: IDependency): void { | ||
@@ -226,18 +205,2 @@ this.#graph.internalizeAsyncDependency( | ||
getDependencyResolution(dependency: IDependency): ?IAsset { | ||
let resolved = this.#graph.getDependencyResolution( | ||
dependencyToInternalDependency(dependency), | ||
); | ||
if (resolved) { | ||
return assetFromValue(resolved, this.#options); | ||
} | ||
} | ||
getSiblingBundles(bundle: IBundle): Array<IBundle> { | ||
return this.#graph | ||
.getSiblingBundles(bundleToInternalBundle(bundle)) | ||
.map(bundle => new Bundle(bundle, this.#graph, this.#options)); | ||
} | ||
traverse<TContext>( | ||
@@ -264,14 +227,2 @@ visit: GraphVisitor<BundlerBundleGraphTraversable, TContext>, | ||
findBundlesWithAsset(asset: IAsset): Array<IBundle> { | ||
return this.#graph | ||
.findBundlesWithAsset(assetToAssetValue(asset)) | ||
.map(bundle => new Bundle(bundle, this.#graph, this.#options)); | ||
} | ||
findBundlesWithDependency(dependency: IDependency): Array<IBundle> { | ||
return this.#graph | ||
.findBundlesWithDependency(dependencyToInternalDependency(dependency)) | ||
.map(bundle => new Bundle(bundle, this.#graph, this.#options)); | ||
} | ||
getBundleGroupsContainingBundle(bundle: IBundle): Array<BundleGroup> { | ||
@@ -313,11 +264,2 @@ return this.#graph.getBundleGroupsContainingBundle( | ||
traverseBundles<TContext>(visit: GraphVisitor<IBundle, TContext>): ?TContext { | ||
return this.#graph.traverseBundles( | ||
mapVisitor( | ||
bundle => new Bundle(bundle, this.#graph, this.#options), | ||
visit, | ||
), | ||
); | ||
} | ||
traverseContents<TContext>( | ||
@@ -324,0 +266,0 @@ visit: GraphVisitor<BundlerBundleGraphTraversable, TContext>, |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Manifest confusion
Supply chain riskThis package has inconsistent metadata. This could be malicious or caused by an error when publishing the package.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Manifest confusion
Supply chain riskThis package has inconsistent metadata. This could be malicious or caused by an error when publishing the package.
Found 1 instance in 1 package
700472
20536