@normed/bundle 4.5.0 → 4.5.1

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,11 @@ 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.5.1
10
+
11
+ * PATCH: Fixes discovered pug files being output with `.pug` extension instead of `.html`.
12
+ * PATCH: Fixes pug reference rewriting not detecting HTML outputs correctly.
13
+
9
14
  # 4.5.0
10
15
 
11
16
  * MINOR: Adds asset processing for pug entrypoints. Images, fonts, and other assets referenced in pug files are now hashed, copied to the output directory, and their paths rewritten automatically.
@@ -69734,7 +69734,11 @@ var esbuilder = {
69734
69734
  let transforms = [];
69735
69735
  const oFM_result = currentOutputFilesMap.get(relativeFilePath);
69736
69736
  if (oFM_result) {
69737
- relativeTarget = oFM_result.entrypoint?.outfile.relative ?? relativeFilePath;
69737
+ if (oFM_result.entrypoint) {
69738
+ relativeTarget = oFM_result.entrypoint.outfile.relative;
69739
+ } else if (relativeFilePath.endsWith(".pug")) {
69740
+ relativeTarget = relativeFilePath.replace(/\.pug$/, ".html");
69741
+ }
69738
69742
  oFM_result.present = true;
69739
69743
  if (expectingSourcemap && oFM_result.mapFileExpected) {
69740
69744
  }
@@ -69759,7 +69763,7 @@ var esbuilder = {
69759
69763
  `Correcting output file name "${relativeFilePath}" to be "${relativeTarget}".`
69760
69764
  );
69761
69765
  }
69762
- const isHtmlOutput = relativeFilePath.endsWith(".html");
69766
+ const isHtmlOutput = relativeTarget.endsWith(".html");
69763
69767
  const sourcePath = oFM_result?.sourcePath;
69764
69768
  if (isHtmlOutput && sourcePath) {
69765
69769
  const pugRefs = discoveredPugReferences.get(sourcePath) || [];
@@ -69843,8 +69847,7 @@ var esbuilder = {
69843
69847
  const discoveredOutputFilesMap = /* @__PURE__ */ new Map();
69844
69848
  for (const pugSourcePath of newEntryPoints) {
69845
69849
  const relativeSource = import_path7.default.relative(indir, pugSourcePath);
69846
- const expectedOutput = relativeSource.replace(/\.pug$/, ".html");
69847
- discoveredOutputFilesMap.set(expectedOutput, {
69850
+ discoveredOutputFilesMap.set(relativeSource, {
69848
69851
  entrypoint: void 0,
69849
69852
  sourcePath: pugSourcePath,
69850
69853
  present: false,