@absolutejs/absolute 0.19.0-beta.161 → 0.19.0-beta.164

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.
@@ -247,7 +247,13 @@
247
247
  "Bash(ALPN_BUN=~/alex/bun-alpn-patch/build/release/bun)",
248
248
  "Bash(__NEW_LINE_54a38eed241da675__ echo:*)",
249
249
  "Bash(__NEW_LINE_54a38eed241da675__ sleep:*)",
250
- "Bash(timeout 5 $ALPN_BUN -e \":*)"
250
+ "Bash(timeout 5 $ALPN_BUN -e \":*)",
251
+ "Bash(for dir:*)",
252
+ "Bash(do echo:*)",
253
+ "Bash(done)",
254
+ "mcp__playwright__browser_click",
255
+ "mcp__playwright__browser_wait_for",
256
+ "Bash(git status:*)"
251
257
  ]
252
258
  }
253
259
  }
@@ -0,0 +1,112 @@
1
+ # Refactor: Move Intermediate Build Files Out of Source Directories
2
+
3
+ ## Problem
4
+
5
+ The build pipeline generates intermediate files inside framework source directories:
6
+
7
+ - `react/indexes/` — generated hydration entry points (`.tsx`)
8
+ - `svelte/server/` and `svelte/client/` — compiled SSR and client variants
9
+ - `vue/server/` and `vue/client/` — compiled SSR and client variants
10
+ - `angular/compiled/` — Angular compiler output
11
+
12
+ This causes:
13
+ 1. Source directories polluted with build artifacts
14
+ 2. File watcher picks up generated files, causing cascading rebuilds
15
+ 3. `rmSync` on `react/indexes/` during rebuilds causes ENOENT when another rebuild runs concurrently
16
+ 4. Users must create `react/indexes/` directory manually
17
+ 5. `shouldSkipFilename` has a growing list of intermediate dirs to exclude
18
+ 6. Git ignore complexity — users need to ignore these dirs
19
+
20
+ ## Solution
21
+
22
+ Move all intermediate files to `.absolutejs/` — the existing framework-managed directory.
23
+
24
+ `.absolutejs/` already contains build caches (angular-linker, eslint, prettier, tsconfig),
25
+ HTTPS dev certs, and is already gitignored. Intermediate build files are the same category —
26
+ framework-managed artifacts that users shouldn't touch.
27
+
28
+ ```
29
+ .absolutejs/
30
+ cache/angular-linker/ ← already exists
31
+ cert.pem / key.pem ← already exists
32
+ eslint-cache ← already exists
33
+ prettier.cache.json ← already exists
34
+ tsconfig.tsbuildinfo ← already exists
35
+ generated/
36
+ react-indexes/ ← hydration entry points
37
+ svelte-server/ ← Svelte SSR output
38
+ svelte-client/ ← Svelte client output
39
+ vue-server/ ← Vue SSR output
40
+ vue-client/ ← Vue client output
41
+ angular/ ← Angular compiler output
42
+ ```
43
+
44
+ `build/` stays clean — only final deployable output.
45
+
46
+ ## Files to Change
47
+
48
+ ### Core Build (`src/core/build.ts`)
49
+ - `reactIndexesPath`: change from `join(reactDir, 'indexes')` to `join('.absolutejs', 'generated', 'react-indexes')`
50
+ - `serverDirMap`: change `{ dir: svelteDir, subdir: 'server' }` to use `join('.absolutejs', 'generated', 'svelte-server')`
51
+ - Vue: `join('.absolutejs', 'generated', 'vue-server')` and `vue-client`
52
+ - Angular: `join('.absolutejs', 'generated', 'angular')`
53
+ - Remove `rmSync` on `react/indexes` and `angular/indexes` — `.absolutejs/generated/` can be cleaned wholesale
54
+ - Update `clientRoot` computation — compiled paths are now outside source tree
55
+ - Update entry point scanning to look in `.absolutejs/generated/` for compiled outputs
56
+
57
+ ### React Index Generation (`src/build/generateReactIndexes.ts`)
58
+ - Change output directory from `react/indexes/` to `.absolutejs/generated/react-indexes/`
59
+
60
+ ### Svelte Compilation (`src/build/compileSvelte.ts`)
61
+ - Change output directories from `svelte/server/` and `svelte/client/` to `.absolutejs/generated/svelte-server/` and `svelte-client/`
62
+
63
+ ### Vue Compilation (`src/build/compileVue.ts`)
64
+ - Change output directories from `vue/server/` and `vue/client/` to `.absolutejs/generated/vue-server/` and `vue-client/`
65
+
66
+ ### Angular Compilation (`src/build/compileAngular.ts`)
67
+ - Change output directory from `angular/compiled/` to `.absolutejs/generated/angular/`
68
+
69
+ ### Manifest Generator (`src/build/generateManifest.ts`)
70
+ - Update framework detection — currently checks for `react`/`svelte`/`vue`/`angular` in path segments
71
+ - May need adjustment since intermediate paths have different structure
72
+
73
+ ### File Watcher (`src/dev/pathUtils.ts`)
74
+ - Remove `server`, `client`, `compiled`, `indexes` from `shouldSkipFilename` (they no longer exist in source)
75
+ - Remove from `SKIP_DIRS` in `build.ts` scanner
76
+ - `.absolutejs/` is already excluded from watching
77
+
78
+ ### Module Server (`src/dev/moduleServer.ts`)
79
+ - Update any path resolution that looks for compiled files in framework dirs
80
+
81
+ ### HMR Handlers (`src/dev/rebuildTrigger.ts`)
82
+ - Update paths that reference `compiled/`, `server/`, `client/`, `indexes/` within framework dirs
83
+ - Angular fast path uses `resolve(angularDir, 'compiled')` — needs update
84
+
85
+ ### Cleanup (`src/utils/cleanup.ts`)
86
+ - Add `rm -rf .absolutejs/generated/` to cleanup routine
87
+ - Or clean on full rebuild only (incremental rebuilds just overwrite)
88
+
89
+ ### Remove `preserveIntermediateFiles` flag
90
+ - Currently in `BuildConfig` and checked in `build.ts` to skip cleanup of `compiled/` dirs
91
+ - No longer needed — generated files live in `.absolutejs/generated/` which is always kept
92
+ - Remove from `types/build.ts`, `src/core/build.ts`, and any config references
93
+
94
+ ### DevBuild (`src/core/devBuild.ts`)
95
+ - Update pre-warm cache paths
96
+ - Update any intermediate dir references
97
+
98
+ ## Migration
99
+
100
+ - No user-facing config changes needed — config still points to `reactDirectory: './src/frontend/react'` etc.
101
+ - `.absolutejs/` is already gitignored
102
+ - Existing `react/indexes/`, `svelte/server/`, `svelte/client/`, `vue/server/`, `vue/client/`, `angular/compiled/` in user source dirs become stale and can be deleted
103
+ - Add a note in the changelog to delete these directories after updating
104
+
105
+ ## Benefits
106
+
107
+ - Clean source directories — no generated files mixed with user code
108
+ - No more ENOENT from concurrent `rmSync` — intermediates are outside the source tree
109
+ - File watcher is simpler — no need to skip intermediate dirs in source
110
+ - No new managed location — `.absolutejs/` already exists and is already gitignored
111
+ - Users don't need to create `react/indexes/` manually
112
+ - `build/` stays clean and deployable
package/README.md CHANGED
@@ -60,7 +60,6 @@ const manifest = await build({
60
60
  htmxDirectory: 'example/htmx',
61
61
  reactDirectory: 'example/react',
62
62
  svelteDirectory: 'example/svelte',
63
- options: { preserveIntermediateFiles: true }
64
63
  });
65
64
 
66
65
  if (!manifest) throw new Error('Manifest generation failed');
@@ -129,8 +128,7 @@ await build({
129
128
  svelteDirectory: 'src/svelte',
130
129
  htmlDirectory: 'src/html',
131
130
  htmxDirectory: 'src/htmx',
132
- assetsDirectory: 'public/assets',
133
- options: { preserveIntermediateFiles: false }
131
+ assetsDirectory: 'public/assets'
134
132
  });
135
133
  ```
136
134
 
package/eslint.config.mjs CHANGED
@@ -27,7 +27,8 @@ export default defineConfig([
27
27
  '.test-builds/**',
28
28
  'example/build/**',
29
29
  'example/dist/**',
30
- 'example/react/indexes/*'
30
+ 'example/react/indexes/*',
31
+ 'speed-test.ts'
31
32
  ]
32
33
  },
33
34
 
@@ -245,7 +246,8 @@ export default defineConfig([
245
246
  'tsconfig.json',
246
247
  'tsconfig.build.json',
247
248
  'package.json',
248
- '.prettierrc.json'
249
+ '.prettierrc.json',
250
+ 'native/packages/*/package.json'
249
251
  ],
250
252
  rules: {
251
253
  '@typescript-eslint/no-unused-expressions': 'off'
@@ -1,20 +1,20 @@
1
1
  {
2
- "name": "@absolutejs/native-darwin-arm64",
3
- "version": "0.19.0-beta.52",
4
- "description": "Native optimizations for AbsoluteJS (darwin arm64)",
5
- "license": "BSL-1.1",
6
- "os": [
7
- "darwin"
8
- ],
9
2
  "cpu": [
10
3
  "arm64"
11
4
  ],
5
+ "description": "Native optimizations for AbsoluteJS (darwin arm64)",
12
6
  "files": [
13
7
  "fast_ops.dylib"
14
8
  ],
9
+ "license": "BSL-1.1",
10
+ "name": "@absolutejs/native-darwin-arm64",
11
+ "os": [
12
+ "darwin"
13
+ ],
15
14
  "repository": {
15
+ "directory": "native/packages/darwin-arm64",
16
16
  "type": "git",
17
- "url": "https://github.com/absolutejs/absolutejs.git",
18
- "directory": "native/packages/darwin-arm64"
19
- }
17
+ "url": "https://github.com/absolutejs/absolutejs.git"
18
+ },
19
+ "version": "0.19.0-beta.52"
20
20
  }
@@ -1,20 +1,20 @@
1
1
  {
2
- "name": "@absolutejs/native-darwin-x64",
3
- "version": "0.19.0-beta.52",
4
- "description": "Native optimizations for AbsoluteJS (darwin x64)",
5
- "license": "BSL-1.1",
6
- "os": [
7
- "darwin"
8
- ],
9
2
  "cpu": [
10
3
  "x64"
11
4
  ],
5
+ "description": "Native optimizations for AbsoluteJS (darwin x64)",
12
6
  "files": [
13
7
  "fast_ops.dylib"
14
8
  ],
9
+ "license": "BSL-1.1",
10
+ "name": "@absolutejs/native-darwin-x64",
11
+ "os": [
12
+ "darwin"
13
+ ],
15
14
  "repository": {
15
+ "directory": "native/packages/darwin-x64",
16
16
  "type": "git",
17
- "url": "https://github.com/absolutejs/absolutejs.git",
18
- "directory": "native/packages/darwin-x64"
19
- }
17
+ "url": "https://github.com/absolutejs/absolutejs.git"
18
+ },
19
+ "version": "0.19.0-beta.52"
20
20
  }
@@ -1,20 +1,20 @@
1
1
  {
2
- "name": "@absolutejs/native-linux-arm64",
3
- "version": "0.19.0-beta.52",
4
- "description": "Native optimizations for AbsoluteJS (linux arm64)",
5
- "license": "BSL-1.1",
6
- "os": [
7
- "linux"
8
- ],
9
2
  "cpu": [
10
3
  "arm64"
11
4
  ],
5
+ "description": "Native optimizations for AbsoluteJS (linux arm64)",
12
6
  "files": [
13
7
  "fast_ops.so"
14
8
  ],
9
+ "license": "BSL-1.1",
10
+ "name": "@absolutejs/native-linux-arm64",
11
+ "os": [
12
+ "linux"
13
+ ],
15
14
  "repository": {
15
+ "directory": "native/packages/linux-arm64",
16
16
  "type": "git",
17
- "url": "https://github.com/absolutejs/absolutejs.git",
18
- "directory": "native/packages/linux-arm64"
19
- }
17
+ "url": "https://github.com/absolutejs/absolutejs.git"
18
+ },
19
+ "version": "0.19.0-beta.52"
20
20
  }
@@ -1,20 +1,20 @@
1
1
  {
2
- "name": "@absolutejs/native-linux-x64",
3
- "version": "0.19.0-beta.52",
4
- "description": "Native optimizations for AbsoluteJS (linux x64)",
5
- "license": "BSL-1.1",
6
- "os": [
7
- "linux"
8
- ],
9
2
  "cpu": [
10
3
  "x64"
11
4
  ],
5
+ "description": "Native optimizations for AbsoluteJS (linux x64)",
12
6
  "files": [
13
7
  "fast_ops.so"
14
8
  ],
9
+ "license": "BSL-1.1",
10
+ "name": "@absolutejs/native-linux-x64",
11
+ "os": [
12
+ "linux"
13
+ ],
15
14
  "repository": {
15
+ "directory": "native/packages/linux-x64",
16
16
  "type": "git",
17
- "url": "https://github.com/absolutejs/absolutejs.git",
18
- "directory": "native/packages/linux-x64"
19
- }
17
+ "url": "https://github.com/absolutejs/absolutejs.git"
18
+ },
19
+ "version": "0.19.0-beta.52"
20
20
  }
@@ -1,20 +1,20 @@
1
1
  {
2
- "name": "@absolutejs/native-windows-arm64",
3
- "version": "0.19.0-beta.52",
4
- "description": "Native optimizations for AbsoluteJS (windows arm64)",
5
- "license": "BSL-1.1",
6
- "os": [
7
- "win32"
8
- ],
9
2
  "cpu": [
10
3
  "arm64"
11
4
  ],
5
+ "description": "Native optimizations for AbsoluteJS (windows arm64)",
12
6
  "files": [
13
7
  "fast_ops.dll"
14
8
  ],
9
+ "license": "BSL-1.1",
10
+ "name": "@absolutejs/native-windows-arm64",
11
+ "os": [
12
+ "win32"
13
+ ],
15
14
  "repository": {
15
+ "directory": "native/packages/windows-arm64",
16
16
  "type": "git",
17
- "url": "https://github.com/absolutejs/absolutejs.git",
18
- "directory": "native/packages/windows-arm64"
19
- }
17
+ "url": "https://github.com/absolutejs/absolutejs.git"
18
+ },
19
+ "version": "0.19.0-beta.52"
20
20
  }
@@ -1,20 +1,20 @@
1
1
  {
2
- "name": "@absolutejs/native-windows-x64",
3
- "version": "0.19.0-beta.52",
4
- "description": "Native optimizations for AbsoluteJS (windows x64)",
5
- "license": "BSL-1.1",
6
- "os": [
7
- "win32"
8
- ],
9
2
  "cpu": [
10
3
  "x64"
11
4
  ],
5
+ "description": "Native optimizations for AbsoluteJS (windows x64)",
12
6
  "files": [
13
7
  "fast_ops.dll"
14
8
  ],
9
+ "license": "BSL-1.1",
10
+ "name": "@absolutejs/native-windows-x64",
11
+ "os": [
12
+ "win32"
13
+ ],
15
14
  "repository": {
15
+ "directory": "native/packages/windows-x64",
16
16
  "type": "git",
17
- "url": "https://github.com/absolutejs/absolutejs.git",
18
- "directory": "native/packages/windows-x64"
19
- }
17
+ "url": "https://github.com/absolutejs/absolutejs.git"
18
+ },
19
+ "version": "0.19.0-beta.52"
20
20
  }
package/package.json CHANGED
@@ -81,6 +81,14 @@
81
81
  "license": "BSL-1.1",
82
82
  "main": "./dist/index.js",
83
83
  "name": "@absolutejs/absolute",
84
+ "optionalDependencies": {
85
+ "@absolutejs/native-darwin-arm64": "0.19.0-beta.52",
86
+ "@absolutejs/native-darwin-x64": "0.19.0-beta.52",
87
+ "@absolutejs/native-linux-arm64": "0.19.0-beta.52",
88
+ "@absolutejs/native-linux-x64": "0.19.0-beta.52",
89
+ "@absolutejs/native-windows-arm64": "0.19.0-beta.52",
90
+ "@absolutejs/native-windows-x64": "0.19.0-beta.52"
91
+ },
84
92
  "overrides": {
85
93
  "@typescript-eslint/utils": "8.56.1"
86
94
  },
@@ -137,14 +145,6 @@
137
145
  "optional": true
138
146
  }
139
147
  },
140
- "optionalDependencies": {
141
- "@absolutejs/native-darwin-arm64": "0.19.0-beta.52",
142
- "@absolutejs/native-darwin-x64": "0.19.0-beta.52",
143
- "@absolutejs/native-linux-arm64": "0.19.0-beta.52",
144
- "@absolutejs/native-linux-x64": "0.19.0-beta.52",
145
- "@absolutejs/native-windows-arm64": "0.19.0-beta.52",
146
- "@absolutejs/native-windows-x64": "0.19.0-beta.52"
147
- },
148
148
  "repository": {
149
149
  "type": "git",
150
150
  "url": "https://github.com/absolutejs/absolutejs.git"
@@ -164,5 +164,5 @@
164
164
  "typecheck": "bun run vue-tsc --noEmit"
165
165
  },
166
166
  "types": "./dist/src/index.d.ts",
167
- "version": "0.19.0-beta.161"
167
+ "version": "0.19.0-beta.164"
168
168
  }
package/types/build.ts CHANGED
@@ -2,7 +2,6 @@ import { build } from '../src/core/build';
2
2
  import { devBuild } from '../src/core/devBuild';
3
3
 
4
4
  export type BuildOptions = {
5
- preserveIntermediateFiles?: boolean;
6
5
  /** When true, build() throws on error instead of exit(1) - used by HMR rebuilds */
7
6
  throwOnError?: boolean;
8
7
  /** When true, HMR client code is injected into built assets. Set by devBuild(). */
@@ -10,6 +10,11 @@ declare global {
10
10
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
11
11
  var __reactModuleRef: any;
12
12
  var __depVendorPaths: Record<string, string> | undefined;
13
+ var __transformCache:
14
+ | Map<string, { content: string; imports: string[]; mtime: number }>
15
+ | undefined;
16
+ var __transformImporters: Map<string, Set<string>> | undefined;
17
+ var __transformInvalidationVersions: Map<string, number> | undefined;
13
18
  var __http2Config:
14
19
  | {
15
20
  hmrState: import('../src/dev/clientManager').HMRState;
@@ -76,6 +81,12 @@ declare global {
76
81
  } & Record<string, unknown>)
77
82
  | null;
78
83
  __VUE_HMR_COMPONENTS__?: Record<string, unknown>;
84
+ __VUE_HMR_RUNTIME__?: {
85
+ createRecord: (id: string, component: unknown) => void;
86
+ reload: (id: string, component: unknown) => void;
87
+ rerender: (id: string, render: unknown) => void;
88
+ };
89
+ __REFRESH_BUFFER__?: Array<[unknown, string]>;
79
90
  htmx?: { process: (element: HTMLElement | Document) => void };
80
91
  }
81
92
  }