@xnoxs/flux-lang 4.0.0 → 4.0.2
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 +25 -0
- package/dist/flux-cli.js +2 -2
- package/dist/flux.cjs.js +1 -1
- package/dist/flux.esm.js +1 -1
- package/dist/flux.min.js +1 -1
- package/dist/transpiler.js +4 -0
- package/package.json +2 -2
- package/scripts/build.js +0 -0
- package/src/config.js +0 -0
- package/src/self/bundler.flux +0 -0
- package/src/self/checker.flux +0 -0
- package/src/self/cli.flux +0 -0
- package/src/self/codegen.flux +0 -0
- package/src/self/codegen.js +799 -1
- package/src/self/config.flux +0 -0
- package/src/self/css-preprocessor.flux +0 -0
- package/src/self/formatter.flux +0 -0
- package/src/self/jsx.flux +0 -0
- package/src/self/lexer.flux +1 -1
- package/src/self/lexer.js +713 -1
- package/src/self/linter.flux +0 -0
- package/src/self/mangler.flux +0 -0
- package/src/self/parser.flux +0 -0
- package/src/self/parser.js +1620 -1
- package/src/self/pkg.flux +0 -0
- package/src/self/sourcemap.flux +0 -0
- package/src/self/stdlib.flux +0 -0
- package/src/self/test-runner.flux +0 -0
- package/src/self/transpiler.flux +1 -1
- package/src/self/transpiler.js +94 -1
- package/src/self/type-checker.flux +0 -0
- package/src/self/type-checker.js +1131 -1
- package/src/self/lexer.stage2.js +0 -700
package/CHANGELOG.md
CHANGED
|
@@ -7,6 +7,31 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
7
7
|
|
|
8
8
|
---
|
|
9
9
|
|
|
10
|
+
## [4.0.2] — 2026-06-28
|
|
11
|
+
|
|
12
|
+
### Fixed
|
|
13
|
+
- **CLI test runner — `dist/transpiler.js` shim**: The `flux test` command
|
|
14
|
+
failed with `Cannot find module 'dist/transpiler.js'` when installed from npm.
|
|
15
|
+
The CLI resolves its own module directory at runtime (`__dirname` inside
|
|
16
|
+
`dist/flux-cli.js`), expecting a sibling `transpiler.js`. Added a permanent
|
|
17
|
+
compatibility shim (`dist/transpiler.js`) that re-exports the main CJS bundle,
|
|
18
|
+
so `flux test` works correctly out of the box after `npm install`.
|
|
19
|
+
|
|
20
|
+
---
|
|
21
|
+
|
|
22
|
+
## [4.0.1] — 2026-06-28
|
|
23
|
+
|
|
24
|
+
### Fixed
|
|
25
|
+
- **Playground & Examples — all 19 code samples** now compile without errors (19/19 pass)
|
|
26
|
+
- `fn name(params): RetType:` → corrected to `fn name(params) -> RetType:` in Functions, Type Narrowing, and Type Annotations examples
|
|
27
|
+
- Parameter named `val` (Flux keyword) renamed to `x` in Type Narrowing example
|
|
28
|
+
- Parameter named `fn` (Flux keyword) renamed to `task` in Async/Await example
|
|
29
|
+
- `declare` example: `fn greet(name: String): String:` → `fn greet(name: String) -> String:`
|
|
30
|
+
- **Self-hosted lexer — `constructor` keyword bug**: `KEYWORDS['constructor']` was returning `Object` (JS prototype chain) instead of `undefined`, causing `fn constructor()` inside class bodies to fail when compiled via CLI. Fixed with `Object.prototype.hasOwnProperty.call(KEYWORDS, word)`
|
|
31
|
+
- **Playground syntax cheatsheet** (`📖 Syntax` button) — all syntax examples use correct `->` return type syntax
|
|
32
|
+
|
|
33
|
+
---
|
|
34
|
+
|
|
10
35
|
## [4.0.0] — 2026-06-27
|
|
11
36
|
|
|
12
37
|
### Added
|
package/dist/flux-cli.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
/*!
|
|
3
|
-
* flux-lang v4.0.
|
|
3
|
+
* flux-lang v4.0.1
|
|
4
4
|
* Flux — A modern language that transpiles to JavaScript. Python-clean syntax, TypeScript-level safety, Rust-inspired pattern matching.
|
|
5
5
|
* (c) 2026 Flux Lang Contributors
|
|
6
6
|
* Released under the MIT License
|
|
@@ -7306,7 +7306,7 @@ var require_package = __commonJS({
|
|
|
7306
7306
|
"package.json"(exports2, module2) {
|
|
7307
7307
|
module2.exports = {
|
|
7308
7308
|
name: "@xnoxs/flux-lang",
|
|
7309
|
-
version: "4.0.
|
|
7309
|
+
version: "4.0.1",
|
|
7310
7310
|
description: "Flux \u2014 A modern language that transpiles to JavaScript. Python-clean syntax, TypeScript-level safety, Rust-inspired pattern matching.",
|
|
7311
7311
|
main: "dist/flux.cjs.js",
|
|
7312
7312
|
module: "dist/flux.esm.js",
|
package/dist/flux.cjs.js
CHANGED
package/dist/flux.esm.js
CHANGED
package/dist/flux.min.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@xnoxs/flux-lang",
|
|
3
|
-
"version": "4.0.
|
|
3
|
+
"version": "4.0.2",
|
|
4
4
|
"description": "Flux — A modern language that transpiles to JavaScript. Python-clean syntax, TypeScript-level safety, Rust-inspired pattern matching.",
|
|
5
5
|
"main": "dist/flux.cjs.js",
|
|
6
6
|
"module": "dist/flux.esm.js",
|
|
@@ -84,4 +84,4 @@
|
|
|
84
84
|
"devDependencies": {
|
|
85
85
|
"esbuild": "^0.28.1"
|
|
86
86
|
}
|
|
87
|
-
}
|
|
87
|
+
}
|
package/scripts/build.js
CHANGED
|
File without changes
|
package/src/config.js
CHANGED
|
File without changes
|
package/src/self/bundler.flux
CHANGED
|
File without changes
|
package/src/self/checker.flux
CHANGED
|
File without changes
|
package/src/self/cli.flux
CHANGED
|
File without changes
|
package/src/self/codegen.flux
CHANGED
|
File without changes
|