@normed/bundle 4.2.0 → 4.2.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/CHANGELOG.md CHANGED
@@ -6,6 +6,17 @@ Given a version number MAJOR.MINOR.PATCH, increment the:
6
6
  2. MINOR version when you add functionality in a backwards compatible manner, and
7
7
  3. PATCH version when you make backwards compatible bug fixes.
8
8
 
9
+ # 4.2.2
10
+
11
+ * PATCH: Fixes bug where pug files will not build if they have a `script` element with no attributes.
12
+ * PATCH: Prints errors from the TS build.
13
+ * PATCH: Updates some dependencies.
14
+ * PATCH: Corrects internal collection SetMap to support the Disposable interface.
15
+
16
+ # 4.2.1
17
+
18
+ * PATCH: Fixes missing path in load_less.
19
+
9
20
  # 4.2.0
10
21
 
11
22
  * MINOR: supports a range of plugins, but these are undocumented.
@@ -13,11 +13,12 @@ export declare class SetMap<KT, V, K extends Set<KT> = Set<KT>> implements Map<K
13
13
  delete(key: K): boolean;
14
14
  get(key: K): V | undefined;
15
15
  has(key: K): boolean;
16
- keys(): IterableIterator<K>;
17
- values(): IterableIterator<V>;
18
- entries(): IterableIterator<[K, V]>;
19
- [Symbol.iterator](): IterableIterator<[K, V]>;
16
+ keys(): MapIterator<K>;
17
+ values(): MapIterator<V>;
18
+ entries(): MapIterator<[K, V]>;
19
+ [Symbol.iterator](): MapIterator<[K, V]>;
20
20
  [Symbol.toStringTag]: string;
21
+ [Symbol.dispose](): void;
21
22
  forEach(callbackfn: (value: V, key: K, map: SetMap<KT, V, K>) => void, thisArg?: any): void;
22
23
  /** Array likes */
23
24
  every(callbackfn: (value: V, key: K, map: SetMap<KT, V, K>) => boolean, thisArg?: any): boolean;
@@ -69080,14 +69080,20 @@ var plugin = {
69080
69080
  build2.onResolve(
69081
69081
  { filter: filter2 },
69082
69082
  async (args) => {
69083
- return {
69084
- sideEffects: false,
69085
- pluginData: Object.assign({}, args.pluginData, {
69086
- [name]: {
69087
- entrypoint: args.kind === "entry-point"
69088
- }
69089
- })
69090
- };
69083
+ const resolvedPath = import_path4.default.resolve(args.resolveDir, args.path);
69084
+ if (import_fs3.default.existsSync(resolvedPath)) {
69085
+ return {
69086
+ sideEffects: false,
69087
+ path: import_path4.default.resolve(args.resolveDir, args.path),
69088
+ pluginData: Object.assign({}, args.pluginData, {
69089
+ [name]: {
69090
+ entrypoint: args.kind === "entry-point"
69091
+ }
69092
+ })
69093
+ };
69094
+ } else {
69095
+ return {};
69096
+ }
69091
69097
  }
69092
69098
  );
69093
69099
  build2.onLoad(
@@ -69148,7 +69154,7 @@ function pugTransformer(test, onFound) {
69148
69154
  };
69149
69155
  }
69150
69156
  function isScriptNodeWithSrcAttr(node) {
69151
- return node.name === "script" && node.attrs.some((attr) => attr.name === "src");
69157
+ return node.name === "script" && node.attrs?.some((attr) => attr.name === "src");
69152
69158
  }
69153
69159
  async function loadAsText2(_filepath) {
69154
69160
  return {
@@ -69538,6 +69544,8 @@ var esbuilder = {
69538
69544
  log_default.error(
69539
69545
  `Build failed with ${errors.length} errors and ${warnings.length} warnings.`
69540
69546
  );
69547
+ log_default.error(`Errors:`, errors);
69548
+ log_default.warn(`Warnings:`, warnings);
69541
69549
  throw [...errors, ...warnings];
69542
69550
  }
69543
69551
  });
@@ -69968,6 +69976,9 @@ var SetMap = class _SetMap {
69968
69976
  return this.entries();
69969
69977
  }
69970
69978
  [Symbol.toStringTag] = "SetMap";
69979
+ [Symbol.dispose]() {
69980
+ this.clear();
69981
+ }
69971
69982
  forEach(callbackfn, thisArg) {
69972
69983
  for (const [key, value] of this.entries()) {
69973
69984
  callbackfn.call(thisArg, value, key, this);