@neuralfog/elemix-analyzer 0.9.0-dev.10

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 ADDED
@@ -0,0 +1,89 @@
1
+ # Changelog
2
+
3
+ All notable changes to elemix and its companion packages are documented here. They
4
+ share one version and release together, so they share one changelog. The format
5
+ follows [Keep a Changelog](https://keepachangelog.com/en/1.1.0/)
6
+ and this project adheres to [Semantic Versioning](https://semver.org/).
7
+
8
+ > The [Roadmap](https://github.com/neuralfog/elemix/blob/main/ROADMAP.md) is the full
9
+ > log of development.
10
+
11
+ ## [0.9.0-dev.10] - 2026-06-30
12
+
13
+ ### Fixed
14
+
15
+ - Compiler: helper templates are now inlined inside a method-form `template()` (the splice pre-pass previously only saw the `template = () =>` arrow field, so helpers in a method template were left as runtime calls returning uncompiled `tpl` and threw)
16
+ - Compiler: a helper call nested inside another template (e.g. a `${cond ? tpl\`…${this.row(x)}…\` : tpl\`\`}` branch) is now inlined; the splice recurses into nested template holes instead of copying them verbatim
17
+
18
+ ## [0.9.0-dev.9] - 2026-06-30
19
+
20
+ ### Fixed
21
+
22
+ - Compiler: a `template()` method now lowers to `view()` like the `template = () =>` arrow field; previously only the arrow field was compiled, so the method form was left uncompiled and threw at runtime
23
+
24
+ ## [0.9.0-dev.8] - 2026-06-24
25
+
26
+ ### Added
27
+
28
+ - `@neuralfog/elemix-analyzer` — static analysis tool for elemix
29
+
30
+ ## [0.9.0-dev.7] - 2026-06-22
31
+
32
+ ### Changed
33
+
34
+ - WASM package ships its own README
35
+
36
+ ## [0.9.0-dev.6] - 2026-06-22
37
+
38
+ ### Added
39
+
40
+ - Prebuilt binaries attached to every GitHub release
41
+
42
+ ## [0.9.0-dev.5] - 2026-06-22
43
+
44
+ ### Fixed
45
+
46
+ - Compiler hint detection in the Vite plugin
47
+
48
+ ## [0.9.0-dev.4] - 2026-06-22
49
+
50
+ ### Added
51
+
52
+ - Compiler hints: `#component`/`#tag`/`#form`/`#no-shadow`/`#styles`/`#state`/`#effect` + lifecycle `#before-mount`/`#mount`/`#dispose`
53
+ - Reactive primitives in component `#state` (`count = 0` stays reactive)
54
+ - Component inheritance — hooks/effects chain through `super`, stylesheets merge
55
+ - Collections in reactive state (`Set`/`Map`/`WeakSet`/`WeakMap`), classes in state, `raw()` helper
56
+ - Source maps back to the original source
57
+ - Inlined compiler diagnostics with `--strict`; CLI version banner
58
+
59
+ ### Changed
60
+
61
+ - Performance optimisations
62
+
63
+ ### Fixed
64
+
65
+ - Nested arrays in deep state, template-less pragma components, statements before `return`, dangling `Cargo.lock`
66
+
67
+ ## [0.9.0-dev.3] - 2026-06-16
68
+
69
+ ### Added
70
+
71
+ - Comment pragmas, effects, source maps
72
+
73
+ ## [0.9.0-dev.2] - 2026-06-15
74
+
75
+ ### Added
76
+
77
+ - Compiler hints
78
+
79
+ ## [0.9.0-dev.1] - 2026-06-14
80
+
81
+ ### Added
82
+
83
+ - Optimisations
84
+
85
+ ## [0.9.0-dev.0] - 2026-06-14
86
+
87
+ ### Added
88
+
89
+ - Initial release: compiled renderer
package/README.md ADDED
@@ -0,0 +1,27 @@
1
+ # 🚦 Elemix Analyzer ⚠️ **Experimental**
2
+
3
+ The template **prop typechecker** for [Elemix](https://www.npmjs.com/package/@neuralfog/elemix). It resolves each `<tag>` in your `tpl` templates back to its `#component` class and type-checks every `:prop=${expr}` against that prop's type — the cross-component check `tsc` can't do on its own (a template hole is an opaque string to it).
4
+
5
+ This package ships a **prebuilt static binary** — no Rust toolchain required. It does need **node** + the project's **typescript**: type judgment is delegated to your own `tsc`, so verdicts match what your editor shows.
6
+
7
+ Installing pulls in exactly one platform binary via `optionalDependencies`:
8
+
9
+ | Platform | Package |
10
+ | --- | --- |
11
+ | linux x64 | `@neuralfog/elemix-analyzer-linux-x64` |
12
+ | linux arm64 | `@neuralfog/elemix-analyzer-linux-arm64` |
13
+ | macOS x64 | `@neuralfog/elemix-analyzer-darwin-x64` |
14
+ | macOS arm64 | `@neuralfog/elemix-analyzer-darwin-arm64` |
15
+ | Windows x64 | `@neuralfog/elemix-analyzer-win32-x64` |
16
+ | Windows arm64 | `@neuralfog/elemix-analyzer-win32-arm64` |
17
+
18
+ ## Usage
19
+
20
+ Installs two equivalent commands — `ea` (short) and `elemix-analyzer`:
21
+
22
+ ```sh
23
+ ea --dirs <dir|glob>... --root <project>
24
+ ea --dirs src --lsp # LSP-shaped JSON diagnostics
25
+ ```
26
+
27
+ Exits non-zero when a prop type error is found, so it drops straight into CI.
@@ -0,0 +1,34 @@
1
+ #!/usr/bin/env node
2
+ // Launcher: resolve the prebuilt binary for this host from the matching
3
+ // platform package (installed via optionalDependencies) and exec it,
4
+ // forwarding argv and the exit code untouched.
5
+ import { spawnSync } from 'node:child_process';
6
+ import { createRequire } from 'node:module';
7
+ import { dirname, join } from 'node:path';
8
+
9
+ const require = createRequire(import.meta.url);
10
+ const ext = process.platform === 'win32' ? '.exe' : '';
11
+ const pkg = `@neuralfog/elemix-analyzer-${process.platform}-${process.arch}`;
12
+
13
+ let bin;
14
+ try {
15
+ // Resolve the package.json (always present, no exports gate) and sit the
16
+ // binary next to it — the binary itself has no extension, so it cannot be
17
+ // require.resolve'd directly.
18
+ bin = join(dirname(require.resolve(`${pkg}/package.json`)), `elemix-analyzer${ext}`);
19
+ } catch {
20
+ console.error(
21
+ `elemix-analyzer: no prebuilt binary for ${process.platform}-${process.arch} ` +
22
+ `(missing optional dependency ${pkg}).`,
23
+ );
24
+ process.exit(1);
25
+ }
26
+
27
+ const { status, error } = spawnSync(bin, process.argv.slice(2), {
28
+ stdio: 'inherit',
29
+ });
30
+ if (error) {
31
+ console.error(`elemix-analyzer: failed to launch ${bin}: ${error.message}`);
32
+ process.exit(1);
33
+ }
34
+ process.exit(status ?? 1);
package/package.json ADDED
@@ -0,0 +1,29 @@
1
+ {
2
+ "name": "@neuralfog/elemix-analyzer",
3
+ "version": "0.9.0-dev.10",
4
+ "description": "Template prop typechecker for Elemix (ec-analyzer)",
5
+ "license": "MIT",
6
+ "author": "brownhounds",
7
+ "repository": {
8
+ "type": "git",
9
+ "url": "git+https://github.com/neuralfog/elemix.git"
10
+ },
11
+ "type": "module",
12
+ "bin": {
13
+ "ea": "bin/elemix-analyzer.mjs",
14
+ "elemix-analyzer": "bin/elemix-analyzer.mjs"
15
+ },
16
+ "files": [
17
+ "bin/elemix-analyzer.mjs",
18
+ "README.md",
19
+ "CHANGELOG.md"
20
+ ],
21
+ "optionalDependencies": {
22
+ "@neuralfog/elemix-analyzer-linux-x64": "0.9.0-dev.10",
23
+ "@neuralfog/elemix-analyzer-linux-arm64": "0.9.0-dev.10",
24
+ "@neuralfog/elemix-analyzer-darwin-x64": "0.9.0-dev.10",
25
+ "@neuralfog/elemix-analyzer-darwin-arm64": "0.9.0-dev.10",
26
+ "@neuralfog/elemix-analyzer-win32-x64": "0.9.0-dev.10",
27
+ "@neuralfog/elemix-analyzer-win32-arm64": "0.9.0-dev.10"
28
+ }
29
+ }