@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 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.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.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
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * flux-lang v4.0.0
2
+ * flux-lang v4.0.1
3
3
  * Flux — A modern language that transpiles to JavaScript. Python-clean syntax, TypeScript-level safety, Rust-inspired pattern matching.
4
4
  * (c) 2026 Flux Lang Contributors
5
5
  * Released under the MIT License
package/dist/flux.esm.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * flux-lang v4.0.0
2
+ * flux-lang v4.0.1
3
3
  * Flux — A modern language that transpiles to JavaScript. Python-clean syntax, TypeScript-level safety, Rust-inspired pattern matching.
4
4
  * (c) 2026 Flux Lang Contributors
5
5
  * Released under the MIT License
package/dist/flux.min.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * flux-lang v4.0.0
2
+ * flux-lang v4.0.1
3
3
  * Flux — A modern language that transpiles to JavaScript. Python-clean syntax, TypeScript-level safety, Rust-inspired pattern matching.
4
4
  * (c) 2026 Flux Lang Contributors
5
5
  * Released under the MIT License
@@ -0,0 +1,4 @@
1
+ 'use strict';
2
+ // Compatibility shim — redirects require('./transpiler') to the main CJS bundle.
3
+ // Required by the CLI test-runner which resolves module paths from __dirname.
4
+ module.exports = require('./flux.cjs.js');
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xnoxs/flux-lang",
3
- "version": "4.0.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
File without changes
File without changes
package/src/self/cli.flux CHANGED
File without changes
File without changes