@neuralfog/elemix-analyzer 0.9.0-dev.8
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 +76 -0
- package/README.md +27 -0
- package/bin/elemix-analyzer.mjs +34 -0
- package/package.json +29 -0
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,76 @@
|
|
|
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.8] - 2026-06-24
|
|
12
|
+
|
|
13
|
+
### Added
|
|
14
|
+
|
|
15
|
+
- `@neuralfog/elemix-analyzer` — static analysis tool for elemix
|
|
16
|
+
|
|
17
|
+
## [0.9.0-dev.7] - 2026-06-22
|
|
18
|
+
|
|
19
|
+
### Changed
|
|
20
|
+
|
|
21
|
+
- WASM package ships its own README
|
|
22
|
+
|
|
23
|
+
## [0.9.0-dev.6] - 2026-06-22
|
|
24
|
+
|
|
25
|
+
### Added
|
|
26
|
+
|
|
27
|
+
- Prebuilt binaries attached to every GitHub release
|
|
28
|
+
|
|
29
|
+
## [0.9.0-dev.5] - 2026-06-22
|
|
30
|
+
|
|
31
|
+
### Fixed
|
|
32
|
+
|
|
33
|
+
- Compiler hint detection in the Vite plugin
|
|
34
|
+
|
|
35
|
+
## [0.9.0-dev.4] - 2026-06-22
|
|
36
|
+
|
|
37
|
+
### Added
|
|
38
|
+
|
|
39
|
+
- Compiler hints: `#component`/`#tag`/`#form`/`#no-shadow`/`#styles`/`#state`/`#effect` + lifecycle `#before-mount`/`#mount`/`#dispose`
|
|
40
|
+
- Reactive primitives in component `#state` (`count = 0` stays reactive)
|
|
41
|
+
- Component inheritance — hooks/effects chain through `super`, stylesheets merge
|
|
42
|
+
- Collections in reactive state (`Set`/`Map`/`WeakSet`/`WeakMap`), classes in state, `raw()` helper
|
|
43
|
+
- Source maps back to the original source
|
|
44
|
+
- Inlined compiler diagnostics with `--strict`; CLI version banner
|
|
45
|
+
|
|
46
|
+
### Changed
|
|
47
|
+
|
|
48
|
+
- Performance optimisations
|
|
49
|
+
|
|
50
|
+
### Fixed
|
|
51
|
+
|
|
52
|
+
- Nested arrays in deep state, template-less pragma components, statements before `return`, dangling `Cargo.lock`
|
|
53
|
+
|
|
54
|
+
## [0.9.0-dev.3] - 2026-06-16
|
|
55
|
+
|
|
56
|
+
### Added
|
|
57
|
+
|
|
58
|
+
- Comment pragmas, effects, source maps
|
|
59
|
+
|
|
60
|
+
## [0.9.0-dev.2] - 2026-06-15
|
|
61
|
+
|
|
62
|
+
### Added
|
|
63
|
+
|
|
64
|
+
- Compiler hints
|
|
65
|
+
|
|
66
|
+
## [0.9.0-dev.1] - 2026-06-14
|
|
67
|
+
|
|
68
|
+
### Added
|
|
69
|
+
|
|
70
|
+
- Optimisations
|
|
71
|
+
|
|
72
|
+
## [0.9.0-dev.0] - 2026-06-14
|
|
73
|
+
|
|
74
|
+
### Added
|
|
75
|
+
|
|
76
|
+
- 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.8",
|
|
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.8",
|
|
23
|
+
"@neuralfog/elemix-analyzer-linux-arm64": "0.9.0-dev.8",
|
|
24
|
+
"@neuralfog/elemix-analyzer-darwin-x64": "0.9.0-dev.8",
|
|
25
|
+
"@neuralfog/elemix-analyzer-darwin-arm64": "0.9.0-dev.8",
|
|
26
|
+
"@neuralfog/elemix-analyzer-win32-x64": "0.9.0-dev.8",
|
|
27
|
+
"@neuralfog/elemix-analyzer-win32-arm64": "0.9.0-dev.8"
|
|
28
|
+
}
|
|
29
|
+
}
|