@absolutejs/absolute 0.19.0-beta.53 → 0.19.0-beta.54

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.
@@ -200,7 +200,9 @@
200
200
  "Bash(./scripts/use-patched-bun.sh bun:*)",
201
201
  "Bash(find native:*)",
202
202
  "Bash(PLAYWRIGHT_BROWSERS_PATH=/tmp/pw-browsers bun /tmp/docs-hmr-test.mjs 2>&1)",
203
- "Bash(PLAYWRIGHT_BROWSERS_PATH=/tmp/pw-browsers bun /tmp/docs-hmr-test2.mjs 2>&1)"
203
+ "Bash(PLAYWRIGHT_BROWSERS_PATH=/tmp/pw-browsers bun /tmp/docs-hmr-test2.mjs 2>&1)",
204
+ "Bash(npm version:*)",
205
+ "Bash(npm publish:*)"
204
206
  ]
205
207
  }
206
208
  }
package/dist/build.js CHANGED
@@ -202353,7 +202353,7 @@ __export(exports_moduleServer, {
202353
202353
  });
202354
202354
  import { existsSync as existsSync13, readFileSync as readFileSync9, statSync } from "fs";
202355
202355
  import { basename as basename7, dirname as dirname7, extname as extname3, resolve as resolve17, relative as relative7 } from "path";
202356
- var SRC_PREFIX = "/@src/", jsTranspiler2, tsTranspiler2, TRANSPILABLE, ALL_EXPORTS_RE, preserveTypeExports = (originalSource, transpiled, valueExports) => {
202356
+ var SRC_PREFIX = "/@src/", jsTranspiler2, tsTranspiler2, tsxTranspiler, TRANSPILABLE, ALL_EXPORTS_RE, preserveTypeExports = (originalSource, transpiled, valueExports) => {
202357
202357
  const allExports = [];
202358
202358
  let match;
202359
202359
  ALL_EXPORTS_RE.lastIndex = 0;
@@ -202504,7 +202504,7 @@ ${stubs}
202504
202504
  ` + code;
202505
202505
  }, reactTranspiler, transformReactFile = (filePath, projectRoot, rewriter) => {
202506
202506
  const raw = readFileSync9(filePath, "utf-8");
202507
- const valueExports = tsTranspiler2.scan(raw).exports;
202507
+ const valueExports = tsxTranspiler.scan(raw).exports;
202508
202508
  let transpiled = reactTranspiler.transformSync(raw);
202509
202509
  transpiled = preserveTypeExports(raw, transpiled, valueExports);
202510
202510
  transpiled = addJsxImport(transpiled);
@@ -202521,7 +202521,8 @@ ${stubs}
202521
202521
  const raw = readFileSync9(filePath, "utf-8");
202522
202522
  const ext = extname3(filePath);
202523
202523
  const isTS = ext === ".ts" || ext === ".tsx";
202524
- const transpiler3 = isTS ? tsTranspiler2 : jsTranspiler2;
202524
+ const isTSX = ext === ".tsx" || ext === ".jsx";
202525
+ const transpiler3 = isTSX ? tsxTranspiler : isTS ? tsTranspiler2 : jsTranspiler2;
202525
202526
  const valueExports = isTS ? transpiler3.scan(raw).exports : [];
202526
202527
  let transpiled = transpiler3.transformSync(raw);
202527
202528
  if (isTS) {
@@ -202881,6 +202882,10 @@ var init_moduleServer = __esm(() => {
202881
202882
  trimUnusedImports: true
202882
202883
  });
202883
202884
  tsTranspiler2 = new Bun.Transpiler({
202885
+ loader: "ts",
202886
+ trimUnusedImports: true
202887
+ });
202888
+ tsxTranspiler = new Bun.Transpiler({
202884
202889
  loader: "tsx",
202885
202890
  trimUnusedImports: true
202886
202891
  });
@@ -203172,19 +203177,19 @@ var parseErrorLocationFromMessage = (msg) => {
203172
203177
  const DEBOUNCE_MS = config.options?.hmr?.debounceMs ?? DEFAULT_DEBOUNCE_MS;
203173
203178
  state.rebuildTimeout = setTimeout(async () => {
203174
203179
  for (let i = 0;i < 5; i++) {
203175
- let anyChanged = false;
203180
+ let stable = true;
203176
203181
  for (const files of state.fileChangeQueue.values()) {
203177
203182
  for (const file3 of files) {
203178
- const fresh = computeFileHash(file3);
203179
- const stored = state.fileHashes.get(file3.replace(/\\/g, "/"));
203180
- if (stored === undefined || fresh !== stored) {
203181
- anyChanged = true;
203183
+ const hash1 = computeFileHash(file3);
203184
+ await Bun.sleep(10);
203185
+ const hash2 = computeFileHash(file3);
203186
+ if (hash1 !== hash2) {
203187
+ stable = false;
203182
203188
  }
203183
203189
  }
203184
203190
  }
203185
- if (anyChanged)
203191
+ if (stable)
203186
203192
  break;
203187
- await Bun.sleep(10);
203188
203193
  }
203189
203194
  const filesToProcess = buildFilesToProcess(state);
203190
203195
  state.fileChangeQueue.clear();
@@ -204820,5 +204825,5 @@ export {
204820
204825
  build
204821
204826
  };
204822
204827
 
204823
- //# debugId=2E953D5D3F1D08AA64756E2164756E21
204828
+ //# debugId=2CCB65B1380E953664756E2164756E21
204824
204829
  //# sourceMappingURL=build.js.map