@absolutejs/absolute 0.20.0-beta.151 → 0.20.0-beta.153

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,18 @@ This file is generated by `absolute-changelog` from the entries in
6
6
  `changelog/`. Edit an entry, not this file — and add new ones under
7
7
  `changelog/unreleased/`.
8
8
 
9
+ ## 0.20.0-beta.153 — 2026-10-26
10
+
11
+ ### Fixed
12
+
13
+ - **Restart development after root dependency manifest and lockfile changes**
14
+
15
+ ## 0.20.0-beta.152 — 2026-10-26
16
+
17
+ ### Added
18
+
19
+ - **Control automatic project-root watching with dev.autoWatchDirectories** (`defineConfig`, `BaseBuildConfig`)
20
+
9
21
  ## 0.20.0-beta.151 — 2026-10-25
10
22
 
11
23
  ### Fixed
package/changelog.json CHANGED
@@ -2,6 +2,30 @@
2
2
  "contract": 1,
3
3
  "name": "@absolutejs/absolute",
4
4
  "releases": [
5
+ {
6
+ "changes": [
7
+ {
8
+ "kind": "fixed",
9
+ "summary": "Restart development after root dependency manifest and lockfile changes"
10
+ }
11
+ ],
12
+ "date": "2026-10-26",
13
+ "version": "0.20.0-beta.153"
14
+ },
15
+ {
16
+ "changes": [
17
+ {
18
+ "kind": "added",
19
+ "summary": "Control automatic project-root watching with dev.autoWatchDirectories",
20
+ "symbols": [
21
+ "defineConfig",
22
+ "BaseBuildConfig"
23
+ ]
24
+ }
25
+ ],
26
+ "date": "2026-10-26",
27
+ "version": "0.20.0-beta.152"
28
+ },
5
29
  {
6
30
  "changes": [
7
31
  {
@@ -1,5 +1,5 @@
1
1
  // @bun
2
- // .angular-partial-tmp-d9i2ix/src/core/streamingSlotRegistrar.ts
2
+ // .angular-partial-tmp-G0CYuD/src/core/streamingSlotRegistrar.ts
3
3
  var STREAMING_SLOT_REGISTRAR_KEY = Symbol.for("absolutejs.streamingSlotRegistrar");
4
4
  var STREAMING_SLOT_WARNING_STORAGE_KEY = Symbol.for("absolutejs.streamingSlotWarningController");
5
5
  var STREAMING_SLOT_COLLECTION_STORAGE_KEY = Symbol.for("absolutejs.streamingSlotCollectionController");
@@ -1,5 +1,5 @@
1
1
  // @bun
2
- // .angular-partial-tmp-d9i2ix/src/core/streamingSlotRegistrar.ts
2
+ // .angular-partial-tmp-G0CYuD/src/core/streamingSlotRegistrar.ts
3
3
  var STREAMING_SLOT_REGISTRAR_KEY = Symbol.for("absolutejs.streamingSlotRegistrar");
4
4
  var STREAMING_SLOT_WARNING_STORAGE_KEY = Symbol.for("absolutejs.streamingSlotWarningController");
5
5
  var STREAMING_SLOT_COLLECTION_STORAGE_KEY = Symbol.for("absolutejs.streamingSlotCollectionController");
@@ -46,7 +46,7 @@ var warnMissingStreamingSlotCollector = (primitiveName) => {
46
46
  getWarningController()?.maybeWarn(primitiveName);
47
47
  };
48
48
 
49
- // .angular-partial-tmp-d9i2ix/src/core/streamingSlotRegistry.ts
49
+ // .angular-partial-tmp-G0CYuD/src/core/streamingSlotRegistry.ts
50
50
  var STREAMING_SLOT_STORAGE_KEY = Symbol.for("absolutejs.streamingSlotAsyncLocalStorage");
51
51
  var isObjectRecord2 = (value) => Boolean(value) && typeof value === "object";
52
52
  var isAsyncLocalStorage = (value) => isObjectRecord2(value) && ("getStore" in value) && typeof value.getStore === "function" && ("run" in value) && typeof value.run === "function";
package/dist/build.js CHANGED
@@ -25605,21 +25605,23 @@ var STYLE_EXTENSION_PATTERN2, detectFramework = (filePath, resolved) => {
25605
25605
  if (existsSync38(abs) && !roots.includes(abs))
25606
25606
  roots.push(abs);
25607
25607
  }
25608
- try {
25609
- const entries = readdirSync8(cwd, { withFileTypes: true });
25610
- for (const entry of entries) {
25611
- if (!entry.isDirectory())
25612
- continue;
25613
- if (entry.name.startsWith("."))
25614
- continue;
25615
- const abs = normalizePath(resolve38(cwd, entry.name));
25616
- if (roots.includes(abs))
25617
- continue;
25618
- if (shouldIgnorePath(abs, resolved))
25619
- continue;
25620
- roots.push(abs);
25621
- }
25622
- } catch {}
25608
+ if (config.dev?.autoWatchDirectories !== false) {
25609
+ try {
25610
+ const entries = readdirSync8(cwd, { withFileTypes: true });
25611
+ for (const entry of entries) {
25612
+ if (!entry.isDirectory())
25613
+ continue;
25614
+ if (entry.name.startsWith("."))
25615
+ continue;
25616
+ const abs = normalizePath(resolve38(cwd, entry.name));
25617
+ if (roots.includes(abs))
25618
+ continue;
25619
+ if (shouldIgnorePath(abs, resolved))
25620
+ continue;
25621
+ roots.push(abs);
25622
+ }
25623
+ } catch {}
25624
+ }
25623
25625
  const extraDirs = config.dev?.watchDirs ?? [];
25624
25626
  for (const dir of extraDirs)
25625
25627
  push(dir);
@@ -25859,7 +25861,65 @@ var safeRemoveFromGraph = (graph, fullPath) => {
25859
25861
  const isStylesDir = Boolean(stylesDir && absolutePath.startsWith(stylesDir));
25860
25862
  setupWatcher(absolutePath, isStylesDir, state, onFileChange);
25861
25863
  });
25864
+ }, watchRootDependencies = (state, onFileChange) => {
25865
+ const root = process.cwd();
25866
+ const names = [
25867
+ "package.json",
25868
+ "bun.lock",
25869
+ "bun.lockb",
25870
+ "package-lock.json",
25871
+ "pnpm-lock.yaml",
25872
+ "yarn.lock"
25873
+ ];
25874
+ const fingerprint = (name) => {
25875
+ try {
25876
+ const value = statSync6(join50(root, name));
25877
+ return value.isFile() ? `${value.ino}:${value.size}:${value.mtimeMs}:${value.ctimeMs}` : null;
25878
+ } catch {
25879
+ return null;
25880
+ }
25881
+ };
25882
+ const previous = new Map(names.map((name) => [name, fingerprint(name)]));
25883
+ const scan = () => {
25884
+ for (const name of names) {
25885
+ const next = fingerprint(name);
25886
+ if (next === previous.get(name))
25887
+ continue;
25888
+ previous.set(name, next);
25889
+ onFileChange(join50(root, name).replace(/\\/g, "/"));
25890
+ }
25891
+ };
25892
+ const timers = new Map;
25893
+ const recover = (delay) => {
25894
+ if (timers.has(delay))
25895
+ return;
25896
+ const timer = setTimeout(() => {
25897
+ timers.delete(delay);
25898
+ scan();
25899
+ }, delay);
25900
+ timers.set(delay, timer);
25901
+ unrefTimer(timer);
25902
+ };
25903
+ const watcher = watch(root, { recursive: false }, (event, filename) => {
25904
+ if (!filename) {
25905
+ scan();
25906
+ return;
25907
+ }
25908
+ if (names.includes(filename))
25909
+ scan();
25910
+ if (event === "rename") {
25911
+ recover(25);
25912
+ recover(100);
25913
+ }
25914
+ });
25915
+ watcher.once("close", () => {
25916
+ for (const timer of timers.values())
25917
+ clearTimeout(timer);
25918
+ timers.clear();
25919
+ });
25920
+ state.watchers.push(watcher);
25862
25921
  }, startFileWatching = (state, config, onFileChange) => {
25922
+ watchRootDependencies(state, onFileChange);
25863
25923
  const watchPaths = getWatchPaths(config, state.resolvedPaths);
25864
25924
  const stylesDir = state.resolvedPaths?.stylesDir;
25865
25925
  watchPaths.forEach((path) => {
@@ -37871,5 +37931,5 @@ export {
37871
37931
  devBuild
37872
37932
  };
37873
37933
 
37874
- //# debugId=027C58792BBBCAC264756E2164756E21
37934
+ //# debugId=1F5037DC0C92ECA564756E2164756E21
37875
37935
  //# sourceMappingURL=build.js.map