@normed/bundle 4.6.0 → 4.6.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,10 @@ 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.6.1
10
+
11
+ * PATCH: Fix `pkg:` prefix to respect `assetNames` configuration. Package CSS files now correctly follow the configured output path (e.g., `assets/[name]-[hash]`) instead of being placed at the root.
12
+
9
13
  # 4.6.0
10
14
 
11
15
  * MINOR: Add `pkg:` prefix for referencing npm package files in pug templates. CSS files from packages (e.g., `pkg:normalize.css/normalize.css`) are processed through esbuild's CSS pipeline to properly handle `url()` references. Non-CSS files (JS, fonts, images) are copied with content hashing.
@@ -69397,8 +69397,9 @@ async function processPackageAsset(absoluteSource, packageSpecifier, pugFilePath
69397
69397
  const content = await import_fs4.default.promises.readFile(absoluteSource);
69398
69398
  const hash = computeContentHash(content);
69399
69399
  const filename = import_path5.default.basename(packageSpecifier);
69400
+ const packageAssetNames = assetNames.replace(/\[dir\]\/?/g, "");
69400
69401
  const hashedFilename = applyAssetNamesTemplate(
69401
- assetNames,
69402
+ packageAssetNames,
69402
69403
  filename,
69403
69404
  hash,
69404
69405
  ""
@@ -70168,7 +70169,7 @@ var esbuilder = {
70168
70169
  );
70169
70170
  for (const cssSourcePath of newEntryPoints) {
70170
70171
  processedPackageCssFiles.add(cssSourcePath);
70171
- const entryNames = "[name]-[hash]";
70172
+ const entryNames = (finalConfig.assetNames?.replace("[ext]", "") || "[name]-[hash]").replace(/\[dir\]\/?/g, "");
70172
70173
  const cssConfig = {
70173
70174
  ...finalConfig,
70174
70175
  entryPoints: [cssSourcePath],