@absolutejs/absolute 0.19.0-beta.65 → 0.19.0-beta.66
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/.absolutejs/tsconfig.tsbuildinfo +1 -1
- package/.claude/settings.local.json +3 -1
- package/dist/build.js +49 -12
- package/dist/build.js.map +5 -5
- package/dist/dev/client/handlers/react.ts +16 -41
- package/dist/index.js +49 -12
- package/dist/index.js.map +5 -5
- package/dist/src/dev/transformCache.d.ts +2 -1
- package/package.json +1 -1
|
@@ -222,7 +222,9 @@
|
|
|
222
222
|
"Bash(kill 892052)",
|
|
223
223
|
"Bash(sed -i 's/\"\"\"\"@absolutejs\\\\/absolute\"\"\"\": \"\"\"\"0.19.0-beta.62\"\"\"\"/\"\"\"\"@absolutejs\\\\/absolute\"\"\"\": \"\"\"\"0.19.0-beta.63\"\"\"\"/' package.json)",
|
|
224
224
|
"Bash(kill 895541)",
|
|
225
|
-
"Bash(sed -i 's/\"\"\"\"@absolutejs\\\\/absolute\"\"\"\": \"\"\"\"0.19.0-beta.63\"\"\"\"/\"\"\"\"@absolutejs\\\\/absolute\"\"\"\": \"\"\"\"0.19.0-beta.64\"\"\"\"/' package.json)"
|
|
225
|
+
"Bash(sed -i 's/\"\"\"\"@absolutejs\\\\/absolute\"\"\"\": \"\"\"\"0.19.0-beta.63\"\"\"\"/\"\"\"\"@absolutejs\\\\/absolute\"\"\"\": \"\"\"\"0.19.0-beta.64\"\"\"\"/' package.json)",
|
|
226
|
+
"Bash(kill 897850)",
|
|
227
|
+
"Bash(sed -i 's/\"\"\"\"@absolutejs\\\\/absolute\"\"\"\": \"\"\"\"0.19.0-beta.64\"\"\"\"/\"\"\"\"@absolutejs\\\\/absolute\"\"\"\": \"\"\"\"0.19.0-beta.65\"\"\"\"/' package.json)"
|
|
226
228
|
]
|
|
227
229
|
}
|
|
228
230
|
}
|
package/dist/build.js
CHANGED
|
@@ -202323,15 +202323,43 @@ var init_pageHandler = __esm(() => {
|
|
|
202323
202323
|
});
|
|
202324
202324
|
|
|
202325
202325
|
// src/dev/transformCache.ts
|
|
202326
|
-
var globalStore, cache, getTransformed = (filePath) => cache.get(filePath)?.content, setTransformed = (filePath, content, mtime) => {
|
|
202327
|
-
|
|
202328
|
-
|
|
202329
|
-
|
|
202326
|
+
var globalStore, cache, importers, getTransformed = (filePath) => cache.get(filePath)?.content, setTransformed = (filePath, content, mtime, imports) => {
|
|
202327
|
+
const resolvedImports = imports ?? [];
|
|
202328
|
+
cache.set(filePath, { content, imports: resolvedImports, mtime });
|
|
202329
|
+
for (const imp of resolvedImports) {
|
|
202330
|
+
if (!importers.has(imp)) {
|
|
202331
|
+
importers.set(imp, new Set);
|
|
202332
|
+
}
|
|
202333
|
+
importers.get(imp).add(filePath);
|
|
202334
|
+
}
|
|
202335
|
+
}, invalidationVersions, getInvalidationVersion = (filePath) => invalidationVersions.get(filePath) ?? 0, invalidate = (filePath) => {
|
|
202336
|
+
const queue = [filePath];
|
|
202337
|
+
const visited = new Set;
|
|
202338
|
+
while (queue.length > 0) {
|
|
202339
|
+
const current = queue.pop();
|
|
202340
|
+
if (visited.has(current))
|
|
202341
|
+
continue;
|
|
202342
|
+
visited.add(current);
|
|
202343
|
+
cache.delete(current);
|
|
202344
|
+
if (current !== filePath) {
|
|
202345
|
+
invalidationVersions.set(current, (invalidationVersions.get(current) ?? 0) + 1);
|
|
202346
|
+
}
|
|
202347
|
+
const parents = importers.get(current);
|
|
202348
|
+
if (parents) {
|
|
202349
|
+
for (const parent of parents) {
|
|
202350
|
+
queue.push(parent);
|
|
202351
|
+
}
|
|
202352
|
+
}
|
|
202353
|
+
}
|
|
202330
202354
|
};
|
|
202331
202355
|
var init_transformCache = __esm(() => {
|
|
202332
202356
|
globalStore = globalThis;
|
|
202333
202357
|
cache = globalStore.__transformCache ?? new Map;
|
|
202334
202358
|
globalStore.__transformCache = cache;
|
|
202359
|
+
importers = globalStore.__transformImporters ?? new Map;
|
|
202360
|
+
globalStore.__transformImporters = importers;
|
|
202361
|
+
invalidationVersions = globalStore.__transformInvalidationVersions ?? new Map;
|
|
202362
|
+
globalStore.__transformInvalidationVersions = invalidationVersions;
|
|
202335
202363
|
});
|
|
202336
202364
|
|
|
202337
202365
|
// src/dev/moduleServer.ts
|
|
@@ -202384,7 +202412,9 @@ ${stubs}
|
|
|
202384
202412
|
return base;
|
|
202385
202413
|
}
|
|
202386
202414
|
}
|
|
202387
|
-
|
|
202415
|
+
const iv = getInvalidationVersion(absPath);
|
|
202416
|
+
const version = iv > 0 ? `${mtime}.${iv}` : `${mtime}`;
|
|
202417
|
+
return `${base}?v=${version}`;
|
|
202388
202418
|
}, rewriteImports2 = (code, filePath, projectRoot, rewriter) => {
|
|
202389
202419
|
let result = code;
|
|
202390
202420
|
if (rewriter) {
|
|
@@ -202827,7 +202857,7 @@ export default {};
|
|
|
202827
202857
|
return jsResponse(cached2);
|
|
202828
202858
|
const stat3 = statSync(filePath);
|
|
202829
202859
|
const content2 = await transformSvelteFile(filePath, projectRoot, rewriter);
|
|
202830
|
-
setTransformed(filePath, content2, stat3.mtimeMs);
|
|
202860
|
+
setTransformed(filePath, content2, stat3.mtimeMs, extractImportedFiles(content2, projectRoot));
|
|
202831
202861
|
return jsResponse(content2);
|
|
202832
202862
|
}
|
|
202833
202863
|
if (ext === ".vue") {
|
|
@@ -202836,7 +202866,7 @@ export default {};
|
|
|
202836
202866
|
return jsResponse(cached2);
|
|
202837
202867
|
const stat3 = statSync(filePath);
|
|
202838
202868
|
const content2 = await transformVueFile(filePath, projectRoot, rewriter, frameworkDirs?.vue);
|
|
202839
|
-
setTransformed(filePath, content2, stat3.mtimeMs);
|
|
202869
|
+
setTransformed(filePath, content2, stat3.mtimeMs, extractImportedFiles(content2, projectRoot));
|
|
202840
202870
|
return jsResponse(content2);
|
|
202841
202871
|
}
|
|
202842
202872
|
if (!TRANSPILABLE.has(ext))
|
|
@@ -202846,7 +202876,7 @@ export default {};
|
|
|
202846
202876
|
return jsResponse(cached);
|
|
202847
202877
|
const stat2 = statSync(filePath);
|
|
202848
202878
|
const content = REACT_EXTENSIONS.has(ext) ? transformReactFile(filePath, projectRoot, rewriter) : transformPlainFile(filePath, projectRoot, rewriter);
|
|
202849
|
-
setTransformed(filePath, content, stat2.mtimeMs);
|
|
202879
|
+
setTransformed(filePath, content, stat2.mtimeMs, extractImportedFiles(content, projectRoot));
|
|
202850
202880
|
return jsResponse(content);
|
|
202851
202881
|
} catch (err) {
|
|
202852
202882
|
const errMsg = err instanceof Error ? err.message : String(err);
|
|
@@ -202856,6 +202886,15 @@ export default {};
|
|
|
202856
202886
|
});
|
|
202857
202887
|
}
|
|
202858
202888
|
};
|
|
202889
|
+
}, SRC_IMPORT_RE, extractImportedFiles = (content, projectRoot) => {
|
|
202890
|
+
const files = [];
|
|
202891
|
+
let match;
|
|
202892
|
+
SRC_IMPORT_RE.lastIndex = 0;
|
|
202893
|
+
while ((match = SRC_IMPORT_RE.exec(content)) !== null) {
|
|
202894
|
+
if (match[1])
|
|
202895
|
+
files.push(resolve17(projectRoot, match[1]));
|
|
202896
|
+
}
|
|
202897
|
+
return files;
|
|
202859
202898
|
}, invalidateModule = (filePath) => {
|
|
202860
202899
|
invalidate(filePath);
|
|
202861
202900
|
mtimeCache.delete(filePath);
|
|
@@ -202923,6 +202962,7 @@ var init_moduleServer = __esm(() => {
|
|
|
202923
202962
|
trimUnusedImports: true
|
|
202924
202963
|
});
|
|
202925
202964
|
svelteExternalCss = new Map;
|
|
202965
|
+
SRC_IMPORT_RE = /\/@src\/([^"'?\s]+)/g;
|
|
202926
202966
|
SRC_URL_PREFIX = SRC_PREFIX;
|
|
202927
202967
|
});
|
|
202928
202968
|
|
|
@@ -203449,16 +203489,13 @@ var moduleServerPromise, getModuleServer = () => moduleServerPromise, parseError
|
|
|
203449
203489
|
for (const file3 of reactFiles) {
|
|
203450
203490
|
invalidateModule2(file3);
|
|
203451
203491
|
}
|
|
203452
|
-
const isComponentFile = primaryFile.endsWith(".tsx") || primaryFile.endsWith(".jsx");
|
|
203453
203492
|
const pageModuleUrl = await getReactModuleUrl(primaryFile);
|
|
203454
|
-
const dataModuleUrl = isComponentFile ? undefined : pageModuleUrl;
|
|
203455
203493
|
if (pageModuleUrl) {
|
|
203456
203494
|
const serverDuration = Date.now() - startTime;
|
|
203457
203495
|
state.lastHmrPath = relative9(process.cwd(), primaryFile).replace(/\\/g, "/");
|
|
203458
203496
|
state.lastHmrFramework = "react";
|
|
203459
203497
|
broadcastToClients(state, {
|
|
203460
203498
|
data: {
|
|
203461
|
-
dataModuleUrl,
|
|
203462
203499
|
framework: "react",
|
|
203463
203500
|
hasComponentChanges: true,
|
|
203464
203501
|
hasCSSChanges: false,
|
|
@@ -204834,5 +204871,5 @@ export {
|
|
|
204834
204871
|
build
|
|
204835
204872
|
};
|
|
204836
204873
|
|
|
204837
|
-
//# debugId=
|
|
204874
|
+
//# debugId=B45A17BBFBB29B3764756E2164756E21
|
|
204838
204875
|
//# sourceMappingURL=build.js.map
|