mnfst-publish 0.1.11 → 0.1.13

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.
@@ -222,9 +222,9 @@ export function makePublishIgnore(rawPatterns) {
222
222
  const pathScoped = anchored || p.includes('/');
223
223
  const body = p
224
224
  .replace(/[.+^${}()|[\]\\]/g, '\\$&')
225
- .replace(/\*\*/g, '')
225
+ .replace(/\*\*/g, '\u0000')
226
226
  .replace(/\*/g, '[^/]*')
227
- .replace(//g, '.*')
227
+ .replace(/\u0000/g, '.*')
228
228
  .replace(/\?/g, '[^/]');
229
229
  rules.push({ dirOnly, pathScoped, exact: new RegExp('^' + body + '$'), prefix: new RegExp('^' + body + '/') });
230
230
  }
@@ -532,11 +532,15 @@ export function stampManifests(root, rels) {
532
532
  continue; // invalid JSON — ship as-is
533
533
  }
534
534
  const dir = mfRel.includes('/') ? mfRel.slice(0, mfRel.lastIndexOf('/') + 1) : '';
535
- const paths = [...(mf.preloadedComponents || []), ...(mf.components || [])]
535
+ const listed = [...(mf.preloadedComponents || []), ...(mf.components || [])]
536
536
  .filter((p) => typeof p === 'string' && !p.startsWith('http'))
537
537
  .map((p) => dir + p.replace(/^\/+/, ''))
538
- .filter((p) => relSet.has(p))
539
- .sort();
538
+ .filter((p) => relSet.has(p));
539
+ // Convention components (components/<name>.html, unlisted) load with the
540
+ // same ?v= stamp — hash them too so their edits bust caches.
541
+ const conventionRe = new RegExp('^' + dir.replace(/[.*+?^${}()|[\]\\]/g, '\\$&') + 'components/[^/]+\\.html$');
542
+ const convention = [...relSet].filter((p) => conventionRe.test(p));
543
+ const paths = [...new Set([...listed, ...convention])].sort();
540
544
  if (!paths.length) continue;
541
545
  const hash = createHash('sha256');
542
546
  for (const p of paths) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mnfst-publish",
3
- "version": "0.1.11",
3
+ "version": "0.1.13",
4
4
  "description": "One-command managed publishing for Manifest projects — render, zip, upload, live URL.",
5
5
  "type": "module",
6
6
  "bin": {