feat(compartment-mapper): bundle should support tags
MODIFY
packages/compartment-mapper/src/bundle.js
packages/compartment-mapper/src/bundle.js
@@ -145,10 +145,13 @@ const sortedModules = (
* @param {Object} [options]
* @param {ModuleTransforms} [options.moduleTransforms]
* @param {boolean} [options.dev]
+ * @param {Set<string>} [options.tags]
* @returns {Promise<string>}
*/
export const makeBundle = async (read, moduleLocation, options) => {
- const { moduleTransforms, dev } = options || {};
+ const { moduleTransforms, dev, tags: tagsOption } = options || {};
+ const tags = new Set(tagsOption);
+
const {
packageLocation,
packageDescriptorText,
@@ -156,9 +159,6 @@ export const makeBundle = async (read, moduleLocation, options) => {
moduleSpecifier,
} = await search(read, moduleLocation);
- /** @type {Set<string>} */
- const tags = new Set();
-
const packageDescriptor = parseLocatedJson(
packageDescriptorText,
packageDescriptorLocation,

feat(compartment-mapper): bundle should support tags