@absolutejs/absolute 0.19.0-beta.841 → 0.19.0-beta.842

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/dist/cli/index.js CHANGED
@@ -951,7 +951,7 @@ var escapeRegex = (str) => str.replace(/[.*+?^${}()|[\]\\]/g, "\\$&"), jsRewrite
951
951
  const namedImportRe = new RegExp(`\\bimport\\s*\\{[^}]*\\b${ident}\\b[^}]*\\}\\s*from\\b`);
952
952
  if (namedImportRe.test(content))
953
953
  continue;
954
- const importPathRe = /from\s+["']([^"']+)["']/g;
954
+ const importPathRe = /(?:from\s+|import\s*)["']([^"']+)["']/g;
955
955
  let pathMatch;
956
956
  let sourcePath;
957
957
  while ((pathMatch = importPathRe.exec(content)) !== null) {
@@ -961,7 +961,8 @@ var escapeRegex = (str) => str.replace(/[.*+?^${}()|[\]\\]/g, "\\$&"), jsRewrite
961
961
  const base = p.split("/").pop()?.replace(/\.[mc]?js$/, "");
962
962
  if (!base)
963
963
  continue;
964
- if (base === ident || base.endsWith(`_${ident}`)) {
964
+ const normalized = base.startsWith("_") ? base.slice(1) : base;
965
+ if (normalized === ident || normalized.endsWith(`_${ident}`)) {
965
966
  sourcePath = p;
966
967
  break;
967
968
  }
@@ -190,9 +190,7 @@ const buildDiagnosticsSection = () => {
190
190
  lines.push(`Loaded chunks (${scripts.length}):`);
191
191
  for (const url of scripts) {
192
192
  // Strip origin so the chunk hash is the focal point.
193
- lines.push(
194
- ` ${url.replace(window.location.origin, '') || url}`
195
- );
193
+ lines.push(` ${url.replace(window.location.origin, '') || url}`);
196
194
  }
197
195
  }
198
196
 
@@ -222,7 +220,9 @@ const buildErrorMessageSection = (message: string) => {
222
220
 
223
221
  const formatErrorForCopy = (opts: ErrorOverlayOptions) => {
224
222
  const lines: string[] = [];
225
- lines.push(`# ${opts.kind === 'runtime' ? 'Runtime' : 'Compilation'} error`);
223
+ lines.push(
224
+ `# ${opts.kind === 'runtime' ? 'Runtime' : 'Compilation'} error`
225
+ );
226
226
  if (opts.framework) lines.push(`Framework: ${opts.framework}`);
227
227
  lines.push('');
228
228
  lines.push('## Message');
@@ -254,9 +254,7 @@ const formatErrorForCopy = (opts: ErrorOverlayOptions) => {
254
254
  lines.push('');
255
255
  lines.push(`Loaded chunks (${scripts.length}):`);
256
256
  for (const url of scripts) {
257
- lines.push(
258
- ` ${url.replace(window.location.origin, '') || url}`
259
- );
257
+ lines.push(` ${url.replace(window.location.origin, '') || url}`);
260
258
  }
261
259
  }
262
260
 
package/dist/index.js CHANGED
@@ -13777,7 +13777,7 @@ var escapeRegex2 = (str) => str.replace(/[.*+?^${}()|[\]\\]/g, "\\$&"), jsRewrit
13777
13777
  const namedImportRe = new RegExp(`\\bimport\\s*\\{[^}]*\\b${ident}\\b[^}]*\\}\\s*from\\b`);
13778
13778
  if (namedImportRe.test(content))
13779
13779
  continue;
13780
- const importPathRe = /from\s+["']([^"']+)["']/g;
13780
+ const importPathRe = /(?:from\s+|import\s*)["']([^"']+)["']/g;
13781
13781
  let pathMatch;
13782
13782
  let sourcePath;
13783
13783
  while ((pathMatch = importPathRe.exec(content)) !== null) {
@@ -13787,7 +13787,8 @@ var escapeRegex2 = (str) => str.replace(/[.*+?^${}()|[\]\\]/g, "\\$&"), jsRewrit
13787
13787
  const base = p2.split("/").pop()?.replace(/\.[mc]?js$/, "");
13788
13788
  if (!base)
13789
13789
  continue;
13790
- if (base === ident || base.endsWith(`_${ident}`)) {
13790
+ const normalized = base.startsWith("_") ? base.slice(1) : base;
13791
+ if (normalized === ident || normalized.endsWith(`_${ident}`)) {
13791
13792
  sourcePath = p2;
13792
13793
  break;
13793
13794
  }
@@ -18949,7 +18950,8 @@ var toSafeFileName6 = (specifier) => {
18949
18950
  await Bun.write(entryPath, await generateVendorEntrySource(specifier));
18950
18951
  return { entryPath, specifier };
18951
18952
  }));
18952
- const otherSpecsFor = (current) => specifiers.filter((spec) => spec !== current);
18953
+ const isPrefixOrEqual = (candidate, current) => current === candidate || current.startsWith(`${candidate}/`);
18954
+ const otherSpecsFor = (current) => specifiers.filter((spec) => !isPrefixOrEqual(spec, current));
18953
18955
  const results = await Promise.all(entries.map(({ entryPath, specifier }) => bunBuild9({
18954
18956
  entrypoints: [entryPath],
18955
18957
  external: [...FRAMEWORK_EXTERNALS, ...otherSpecsFor(specifier)],
@@ -27943,5 +27945,5 @@ export {
27943
27945
  ANGULAR_INIT_TIMEOUT_MS
27944
27946
  };
27945
27947
 
27946
- //# debugId=BBDA3F3D0AAAF6D064756E2164756E21
27948
+ //# debugId=3B75AB8D6F99C63464756E2164756E21
27947
27949
  //# sourceMappingURL=index.js.map