bundlebee 1.0.0 → 1.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/index.js +4 -5
- package/package.json +1 -1
package/index.js
CHANGED
|
@@ -221,7 +221,7 @@ module.exports = class Bundlebee extends ReadyResource {
|
|
|
221
221
|
})
|
|
222
222
|
}
|
|
223
223
|
|
|
224
|
-
async add(root, entry, { skipModules = true, peerDependencies } = {}) {
|
|
224
|
+
async add(root, entry, { skipModules = true, peerDependencies, abi, dryRun = false } = {}) {
|
|
225
225
|
if (!this.opened) await this.ready()
|
|
226
226
|
if (!root.pathname.endsWith('/')) root = new URL('./', root)
|
|
227
227
|
if (peerDependencies) peerDependencies = new Set(peerDependencies)
|
|
@@ -268,7 +268,9 @@ module.exports = class Bundlebee extends ReadyResource {
|
|
|
268
268
|
|
|
269
269
|
bundle.resolutions = resolutions
|
|
270
270
|
|
|
271
|
-
|
|
271
|
+
if (dryRun) return bundle
|
|
272
|
+
|
|
273
|
+
await this._addBundle({ bundle, abi }, peerDependencies)
|
|
272
274
|
|
|
273
275
|
return bundle
|
|
274
276
|
}
|
|
@@ -286,9 +288,6 @@ module.exports = class Bundlebee extends ReadyResource {
|
|
|
286
288
|
|
|
287
289
|
const w = this._bee.write()
|
|
288
290
|
for (const f in data.bundle.files) {
|
|
289
|
-
// TODO: make a schema for resolutions value
|
|
290
|
-
// source + resolutions map
|
|
291
|
-
|
|
292
291
|
w.tryPut(
|
|
293
292
|
b4a.from(f),
|
|
294
293
|
c.encode(Entry, {
|