@xnoxs/flux-lang 3.5.0 → 3.5.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,23 +7,6 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
7
7
 
8
8
  ---
9
9
 
10
- ## [3.5.0] — 2026-06-26
11
-
12
- ### Fixed
13
- - **ANSI color rendering** — warna CLI (`\u001b[32m` dll) tidak tampil di terminal karena Flux lexer tidak memproses `\u` dan `\x` escape sequences dalam string literal; akibatnya `\\u001b` (literal) masuk ke compiled output dan terminal melihat raw text bukan ESC character. Diperbaiki di semua 3 string parser (double-quote, single-quote, backtick) di `src/lexer.js`
14
- - **`TERM=dumb` color detection** — environment Replit punya `TERM=dumb` tapi `COLORTERM=truecolor`; color check sebelumnya hanya pakai `isTTY && TERM !== 'dumb'` sehingga warna selalu off. Fix: `hasColor = COLORTERM || FORCE_COLOR || (isTTY && TERM !== 'dumb')`
15
-
16
- ### Added
17
- - **Spinner animasi** di semua perintah async CLI:
18
- - `flux add <pkg>` — spinner resolving → ✓ nama@versi + deskripsi
19
- - `flux install` — daftar paket + spinner installing → ✓ N installed
20
- - `flux upgrade [--check]` — spinner per-paket, tampilkan `@lama → baru` atau `— up to date`
21
- - `flux search <query>` — spinner searching → ✓ Found N result(s)
22
- - `flux info <pkg>` — spinner fetching → ✓ nama@versi + detail lengkap
23
- - **`\u` dan `\x` escape support** di semua string literal Flux (termasuk string interpolation)
24
-
25
- ---
26
-
27
10
  ## [3.4.4] — 2026-06-26
28
11
 
29
12
  ### Added
package/bin/flux.js CHANGED
@@ -1,3 +1,3 @@
1
1
  #!/usr/bin/env node
2
2
  'use strict';
3
- require('../src/cli.js');
3
+ require('../dist/flux-cli.js');
package/dist/flux-cli.js CHANGED
@@ -1,6 +1,6 @@
1
1
  #!/usr/bin/env node
2
2
  /*!
3
- * flux-lang v3.5.0
3
+ * flux-lang v3.5.2
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
@@ -153,8 +153,6 @@ var require_lexer = __commonJS({
153
153
  SATISFIES: "SATISFIES",
154
154
  IS: "IS",
155
155
  CONST: "CONST",
156
- // Keywords — property/object operators
157
- DELETE: "DELETE",
158
156
  // Operators
159
157
  PLUS: "PLUS",
160
158
  MINUS: "MINUS",
@@ -283,7 +281,6 @@ var require_lexer = __commonJS({
283
281
  satisfies: T.SATISFIES,
284
282
  is: T.IS,
285
283
  const: T.CONST,
286
- delete: T.DELETE,
287
284
  true: "__TRUE__",
288
285
  false: "__FALSE__",
289
286
  null: "__NULL__"
@@ -350,15 +347,7 @@ var require_lexer = __commonJS({
350
347
  if (this.ch() === "\\") {
351
348
  this.adv();
352
349
  const e = this.adv();
353
- if (e === "u") {
354
- const hex = this.adv() + this.adv() + this.adv() + this.adv();
355
- s += String.fromCodePoint(parseInt(hex, 16));
356
- } else if (e === "x") {
357
- const hex = this.adv() + this.adv();
358
- s += String.fromCodePoint(parseInt(hex, 16));
359
- } else {
360
- s += { n: "\n", t: " ", r: "\r", "`": "`", "\\": "\\" }[e] || "\\" + e;
361
- }
350
+ s += { n: "\n", t: " ", "`": "`", "\\": "\\" }[e] || "\\" + e;
362
351
  } else {
363
352
  s += this.adv();
364
353
  }
@@ -385,15 +374,7 @@ var require_lexer = __commonJS({
385
374
  if (this.ch() === "\\") {
386
375
  this.adv();
387
376
  const e = this.adv();
388
- if (e === "u") {
389
- const hex = this.adv() + this.adv() + this.adv() + this.adv();
390
- text += String.fromCodePoint(parseInt(hex, 16));
391
- } else if (e === "x") {
392
- const hex = this.adv() + this.adv();
393
- text += String.fromCodePoint(parseInt(hex, 16));
394
- } else {
395
- text += { n: "\n", t: " ", r: "\r", '"': '"', "'": "'", "\\": "\\", "{": "{", "}": "}" }[e] || "\\" + e;
396
- }
377
+ text += { n: "\n", t: " ", '"': '"', "'": "'", "\\": "\\", "{": "{", "}": "}" }[e] || "\\" + e;
397
378
  } else if (this.ch() === "{") {
398
379
  parts.push({ type: "text", value: text });
399
380
  text = "";
@@ -588,15 +569,7 @@ var require_lexer = __commonJS({
588
569
  if (this.ch() === "\\") {
589
570
  this.adv();
590
571
  const e = this.adv();
591
- if (e === "u") {
592
- const hex = this.adv() + this.adv() + this.adv() + this.adv();
593
- s += String.fromCodePoint(parseInt(hex, 16));
594
- } else if (e === "x") {
595
- const hex = this.adv() + this.adv();
596
- s += String.fromCodePoint(parseInt(hex, 16));
597
- } else {
598
- s += { n: "\n", t: " ", r: "\r", "'": "'", "\\": "\\" }[e] || "\\" + e;
599
- }
572
+ s += { n: "\n", t: " ", r: "\r", "'": "'", "\\": "\\" }[e] || "\\" + e;
600
573
  } else {
601
574
  s += this.adv();
602
575
  }
@@ -2285,9 +2258,9 @@ var require_parser = __commonJS({
2285
2258
  this.pos++;
2286
2259
  return { type: "TypeofExpr", operand: this.parseUnary() };
2287
2260
  }
2288
- if (this.check(T.DELETE)) {
2261
+ if (this.check(T.IDENT) && this.tokens[this.pos].value === "delete") {
2289
2262
  this.pos++;
2290
- return { type: "DeleteExpr", operand: this.parseUnary() };
2263
+ return { type: "UnaryExpr", op: "delete ", operand: this.parseUnary() };
2291
2264
  }
2292
2265
  return this.parseLambdaOrPostfix();
2293
2266
  }
@@ -3120,8 +3093,6 @@ function _fmt(v, s) {
3120
3093
  return `await ${this.genExpr(node.operand)}`;
3121
3094
  case "TypeofExpr":
3122
3095
  return `typeof ${this.genExpr(node.operand)}`;
3123
- case "DeleteExpr":
3124
- return `delete ${this.genExpr(node.operand)}`;
3125
3096
  case "SpreadExpr":
3126
3097
  return `...${this.genExpr(node.expr)}`;
3127
3098
  case "CallExpr": {
@@ -7252,7 +7223,7 @@ var require_package = __commonJS({
7252
7223
  "package.json"(exports2, module2) {
7253
7224
  module2.exports = {
7254
7225
  name: "@xnoxs/flux-lang",
7255
- version: "3.5.0",
7226
+ version: "3.5.2",
7256
7227
  description: "Flux \u2014 A modern language that transpiles to JavaScript. Python-clean syntax, TypeScript-level safety, Rust-inspired pattern matching.",
7257
7228
  main: "dist/flux.cjs.js",
7258
7229
  module: "dist/flux.esm.js",
@@ -8608,11 +8579,9 @@ var require_pkg = __commonJS({
8608
8579
  var { readPackage, writeConfig, loadConfig: loadConfig2 } = require_config2();
8609
8580
  var REGISTRY_URL = "https://registry.npmjs.org";
8610
8581
  var PKG_FILE = "flux.json";
8611
- var C2 = { reset: "\x1B[0m", bold: "\x1B[1m", dim: "\x1B[2m", red: "\x1B[31m", green: "\x1B[32m", yellow: "\x1B[33m", blue: "\x1B[34m", cyan: "\x1B[36m", gray: "\x1B[90m" };
8612
- var hasColor2 = process.env.COLORTERM || process.env.FORCE_COLOR || process.stdout.isTTY && process.env.TERM != "dumb";
8613
- var noColor2 = process.env.NO_COLOR || !hasColor2;
8582
+ var C2 = { reset: "\\u001b[0m", bold: "\\u001b[1m", dim: "\\u001b[2m", red: "\\u001b[31m", green: "\\u001b[32m", yellow: "\\u001b[33m", blue: "\\u001b[34m", cyan: "\\u001b[36m", gray: "\\u001b[90m" };
8614
8583
  function clr2(c, s) {
8615
- return noColor2 ? s : c + s + C2.reset;
8584
+ return c + s + C2.reset;
8616
8585
  }
8617
8586
  function ok(msg) {
8618
8587
  console.log(clr2(C2.green, "\u2713 ") + msg);
@@ -8623,29 +8592,6 @@ var require_pkg = __commonJS({
8623
8592
  function info(msg) {
8624
8593
  console.log(clr2(C2.cyan, " ") + msg);
8625
8594
  }
8626
- function createSpinner(msg) {
8627
- if (noColor2) {
8628
- let _stop2 = function(ok_, done) {
8629
- process.stdout.write(" " + (ok_ ? "\u2713" : "\u2717") + " " + done + "\n");
8630
- };
8631
- var _stop = _stop2;
8632
- process.stdout.write(" " + msg + " ...\n");
8633
- return { stop: _stop2 };
8634
- }
8635
- const frames = ["\u280B", "\u2819", "\u2839", "\u2838", "\u283C", "\u2834", "\u2826", "\u2827", "\u2807", "\u280F"];
8636
- let fi = 0;
8637
- function tick() {
8638
- process.stdout.write("\r " + clr2(C2.cyan, frames[fi % frames.length]) + " " + msg + " ");
8639
- fi = fi + 1;
8640
- }
8641
- const timer = setInterval(tick, 80);
8642
- function stop(ok_, done) {
8643
- clearInterval(timer);
8644
- const icon = ok_ ? clr2(C2.green, "\u2713") : clr2(C2.red, "\u2717");
8645
- process.stdout.write("\r " + icon + " " + done + " \n");
8646
- }
8647
- return { stop };
8648
- }
8649
8595
  async function fetchJson(url) {
8650
8596
  const mod = url.startsWith("https") ? Https : Http;
8651
8597
  function doRequest(resolve, reject) {
@@ -8695,17 +8641,15 @@ var require_pkg = __commonJS({
8695
8641
  const isDev = (opts == null ? void 0 : opts.dev) ?? false;
8696
8642
  const cwd = process.cwd();
8697
8643
  const pkg = ensureFluxJson(cwd);
8698
- let addedCount = 0;
8699
- console.log();
8700
8644
  for (const spec of specs) {
8701
8645
  const { name, version } = parsePackageSpec(spec);
8702
- const spinner = createSpinner(clr2(C2.bold, name) + clr2(C2.gray, "@" + version));
8646
+ console.log(clr2(C2.cyan, "\n Adding ") + clr2(C2.bold, name) + clr2(C2.gray, "@" + version) + " ...");
8703
8647
  try {
8704
8648
  const info_ = await fetchJson(REGISTRY_URL + "/" + name);
8705
8649
  const resolvedVersion = version == "latest" ? ((_a = info_["dist-tags"]) == null ? void 0 : _a.latest) ?? "1.0.0" : version;
8706
8650
  const versionInfo = (_b = info_.versions) == null ? void 0 : _b[resolvedVersion];
8707
8651
  if (!versionInfo) {
8708
- spinner.stop(false, clr2(C2.bold, name) + clr2(C2.gray, "@" + resolvedVersion) + " \u2014 version not found");
8652
+ err("Version " + resolvedVersion + " not found for " + name);
8709
8653
  continue;
8710
8654
  }
8711
8655
  const depKey = isDev ? "devDependencies" : "dependencies";
@@ -8714,18 +8658,16 @@ var require_pkg = __commonJS({
8714
8658
  }
8715
8659
  pkg[depKey][name] = "^" + resolvedVersion;
8716
8660
  saveFluxJson(pkg, cwd);
8717
- const shortDesc = versionInfo.description ? clr2(C2.gray, " \u2014 " + versionInfo.description.slice(0, 55)) : "";
8718
- spinner.stop(true, clr2(C2.bold, name) + clr2(C2.green, "@" + resolvedVersion) + shortDesc);
8719
- addedCount = addedCount + 1;
8661
+ const desc = versionInfo.description ? clr2(C2.gray, " \u2014 " + versionInfo.description) : "";
8662
+ ok(name + clr2(C2.green, "@" + resolvedVersion) + desc);
8663
+ info("Added to " + (isDev ? "devDependencies" : "dependencies"));
8720
8664
  } catch (e) {
8721
- spinner.stop(false, clr2(C2.bold, name) + " \u2014 " + e.message);
8665
+ err("Failed to fetch " + name + ": " + e.message);
8722
8666
  }
8723
8667
  }
8724
8668
  console.log();
8725
- if (addedCount > 0) {
8726
- console.log(" " + clr2(C2.gray, "Run ") + clr2(C2.yellow, "flux install") + clr2(C2.gray, " to install packages"));
8727
- console.log();
8728
- }
8669
+ console.log(clr2(C2.gray, " Run ") + clr2(C2.yellow, "flux install") + clr2(C2.gray, " to install packages"));
8670
+ console.log();
8729
8671
  }
8730
8672
  module2.exports.cmdAdd = cmdAdd;
8731
8673
  function cmdRemove(names, opts) {
@@ -8764,19 +8706,13 @@ var require_pkg = __commonJS({
8764
8706
  const all = { ...deps, ...devDeps };
8765
8707
  const names = Object.keys(all);
8766
8708
  if (names.length == 0) {
8767
- console.log();
8768
8709
  info("No dependencies found in flux.json");
8769
- console.log();
8770
8710
  return;
8771
8711
  }
8772
- console.log();
8773
- console.log(" " + clr2(C2.bold, pkg.name ?? "project") + clr2(C2.gray, " \u2014 " + names.length + " package(s)"));
8774
- console.log();
8712
+ console.log(clr2(C2.cyan, "\n Installing ") + names.length + " package(s) into flux_modules/...\n");
8775
8713
  for (const name of names) {
8776
8714
  const spec = all[name];
8777
- const isDev_ = Object.prototype.hasOwnProperty.call(devDeps, name);
8778
- const tag = isDev_ ? clr2(C2.gray, " dev") : "";
8779
- console.log(" " + clr2(C2.gray, "\u25CB") + " " + clr2(isDev_ ? C2.blue : C2.green, name) + clr2(C2.gray, "@" + spec) + tag);
8715
+ console.log(clr2(C2.gray, " \u25CB ") + name + clr2(C2.gray, "@" + spec));
8780
8716
  }
8781
8717
  console.log();
8782
8718
  if (!Fs.existsSync(fluxModDir)) {
@@ -8789,25 +8725,26 @@ var require_pkg = __commonJS({
8789
8725
  }
8790
8726
  const prodNames = Object.keys(deps);
8791
8727
  const devNames = Object.keys(devDeps);
8792
- const spinner = createSpinner("Installing packages into flux_modules/");
8793
8728
  try {
8794
8729
  if (prodNames.length > 0) {
8795
8730
  const prodPkgs = prodNames.map((n) => n + "@" + (deps[n] ?? "latest")).join(" ");
8796
8731
  const installCmd = "npm install --prefix " + fluxModDir + " " + prodPkgs;
8797
- execSync(installCmd, { cwd, stdio: "pipe" });
8732
+ info("Running: " + installCmd);
8733
+ execSync(installCmd, { cwd, stdio: "inherit" });
8798
8734
  }
8799
8735
  if (devNames.length > 0) {
8800
8736
  const devPkgs = devNames.map((n) => n + "@" + (devDeps[n] ?? "latest")).join(" ");
8801
8737
  const devCmd = "npm install --prefix " + fluxModDir + " --save-dev " + devPkgs;
8802
- execSync(devCmd, { cwd, stdio: "pipe" });
8738
+ info("Running: " + devCmd);
8739
+ execSync(devCmd, { cwd, stdio: "inherit" });
8803
8740
  }
8804
- spinner.stop(true, names.length + " package(s) installed into " + clr2(C2.gray, "flux_modules/"));
8805
8741
  console.log();
8806
- console.log(" " + clr2(C2.gray, "Packages resolve automatically when using: ") + clr2(C2.yellow, "flux run") + clr2(C2.gray, ", ") + clr2(C2.yellow, "flux bundle"));
8742
+ ok(names.length + " package(s) installed into flux_modules/node_modules/");
8743
+ info("Packages resolve automatically when using: flux run, flux bundle");
8807
8744
  } catch (e) {
8808
- spinner.stop(false, "Install failed: " + e.message);
8809
8745
  console.log();
8810
- console.log(" " + clr2(C2.gray, "Try: ") + clr2(C2.yellow, "npm install --prefix ./flux_modules <package>"));
8746
+ err("Install failed: " + e.message);
8747
+ info("Try manually: npm install --prefix ./flux_modules <package>");
8811
8748
  }
8812
8749
  console.log();
8813
8750
  }
@@ -8846,150 +8783,64 @@ var require_pkg = __commonJS({
8846
8783
  module2.exports.cmdList = cmdList;
8847
8784
  async function cmdSearch(query, opts) {
8848
8785
  var _a;
8849
- console.log();
8850
- const spinner = createSpinner("Searching for " + clr2(C2.bold, '"' + query + '"'));
8786
+ console.log(clr2(C2.cyan, "\n Searching for ") + clr2(C2.bold, '"' + query + '"') + " ...\n");
8851
8787
  try {
8852
- const url = REGISTRY_URL + "/-/v1/search?text=" + encodeURIComponent(query) + "&size=10";
8788
+ const url = REGISTRY_URL + "/-/v1/search?text=" + encodeURIComponent(query + " keywords:flux") + "&size=10";
8853
8789
  const results = await fetchJson(url);
8854
8790
  const objects = results.objects ?? [];
8855
8791
  if (objects.length == 0) {
8856
- spinner.stop(false, "No packages found for: " + query);
8792
+ info("No packages found for: " + query);
8857
8793
  console.log();
8858
8794
  return;
8859
8795
  }
8860
- spinner.stop(true, "Found " + objects.length + " result(s) for " + clr2(C2.bold, '"' + query + '"'));
8861
- console.log();
8862
8796
  for (const obj of objects) {
8863
8797
  const p = obj.package;
8864
8798
  console.log(" " + clr2(C2.bold, p.name) + clr2(C2.gray, " v" + p.version));
8865
8799
  if (p.description) {
8866
8800
  console.log(" " + clr2(C2.gray, p.description));
8867
8801
  }
8868
- if ((_a = p.links) == null ? void 0 : _a.npm) {
8869
- console.log(" " + clr2(C2.blue, p.links.npm));
8870
- }
8802
+ console.log(" " + clr2(C2.blue, ((_a = p.links) == null ? void 0 : _a.npm) ?? ""));
8871
8803
  console.log();
8872
8804
  }
8873
8805
  } catch (e) {
8874
- spinner.stop(false, "Search failed: " + e.message);
8875
- console.log();
8806
+ err("Search failed: " + e.message);
8876
8807
  }
8877
8808
  }
8878
8809
  module2.exports.cmdSearch = cmdSearch;
8879
8810
  async function cmdInfo(name, opts) {
8880
8811
  var _a, _b, _c, _d, _e;
8881
- console.log();
8882
- const spinner = createSpinner("Fetching info for " + clr2(C2.bold, name));
8812
+ console.log(clr2(C2.cyan, "\n Fetching info for ") + clr2(C2.bold, name) + " ...\n");
8883
8813
  try {
8884
8814
  const info_ = await fetchJson(REGISTRY_URL + "/" + name);
8885
8815
  const latest = ((_a = info_["dist-tags"]) == null ? void 0 : _a.latest) ?? "unknown";
8886
8816
  const ver = ((_b = info_.versions) == null ? void 0 : _b[latest]) ?? {};
8887
- spinner.stop(true, clr2(C2.bold, name) + clr2(C2.green, "@" + latest));
8888
- console.log();
8817
+ console.log(clr2(C2.bold, " " + name) + clr2(C2.gray, " v" + latest));
8889
8818
  if (ver.description) {
8890
- console.log(" " + clr2(C2.gray, ver.description));
8819
+ console.log(" " + ver.description);
8891
8820
  }
8892
8821
  console.log();
8893
- console.log(" " + clr2(C2.gray, "license:") + " " + (ver.license ?? "unknown"));
8894
- console.log(" " + clr2(C2.gray, "author: ") + " " + (((_c = ver.author) == null ? void 0 : _c.name) ?? ver.author ?? "unknown"));
8822
+ console.log(clr2(C2.gray, " license: ") + (ver.license ?? "unknown"));
8823
+ console.log(clr2(C2.gray, " author: ") + (((_c = ver.author) == null ? void 0 : _c.name) ?? ver.author ?? "unknown"));
8895
8824
  const homepage = ver.homepage ?? info_.homepage;
8896
8825
  if (homepage) {
8897
- console.log(" " + clr2(C2.gray, "home: ") + " " + clr2(C2.blue, homepage));
8826
+ console.log(clr2(C2.gray, " home: ") + clr2(C2.blue, homepage));
8898
8827
  }
8899
8828
  const repo = ((_d = ver.repository) == null ? void 0 : _d.url) ?? ((_e = info_.repository) == null ? void 0 : _e.url);
8900
8829
  if (repo) {
8901
- console.log(" " + clr2(C2.gray, "repo: ") + " " + clr2(C2.blue, repo.replace("git+", "").replace(".git", "")));
8830
+ console.log(clr2(C2.gray, " repo: ") + clr2(C2.blue, repo.replace("git+", "").replace(".git", "")));
8902
8831
  }
8903
8832
  const keywords = ver.keywords ?? [];
8904
8833
  if (keywords.length > 0) {
8905
- console.log(" " + clr2(C2.gray, "tags: ") + " " + keywords.slice(0, 8).join(", "));
8834
+ console.log(clr2(C2.gray, " tags: ") + keywords.slice(0, 8).join(", "));
8906
8835
  }
8907
8836
  console.log();
8908
- console.log(" " + clr2(C2.gray, "Install: ") + clr2(C2.yellow, "flux add " + name));
8837
+ console.log(clr2(C2.gray, " Install: ") + clr2(C2.yellow, "flux add " + name));
8909
8838
  console.log();
8910
8839
  } catch (e) {
8911
- spinner.stop(false, "Could not fetch info for " + name + ": " + e.message);
8912
- console.log();
8840
+ err("Could not fetch info for " + name + ": " + e.message);
8913
8841
  }
8914
8842
  }
8915
8843
  module2.exports.cmdInfo = cmdInfo;
8916
- async function cmdUpgrade(opts) {
8917
- var _a, _b;
8918
- const isCheck = (opts == null ? void 0 : opts.check) ?? false;
8919
- const cwd = process.cwd();
8920
- const pkg = ensureFluxJson(cwd);
8921
- const deps = pkg.dependencies ?? {};
8922
- const devDeps = pkg.devDependencies ?? {};
8923
- const allKeys = [...Object.keys(deps), ...Object.keys(devDeps)];
8924
- if (allKeys.length == 0) {
8925
- console.log();
8926
- info("No dependencies to upgrade");
8927
- console.log();
8928
- return;
8929
- }
8930
- console.log();
8931
- let updated = 0;
8932
- for (const name of Object.keys(deps)) {
8933
- const spinner = createSpinner(clr2(C2.green, name));
8934
- try {
8935
- const info_ = await fetchJson(REGISTRY_URL + "/" + name);
8936
- const latest = ((_a = info_["dist-tags"]) == null ? void 0 : _a.latest) ?? null;
8937
- if (!latest) {
8938
- spinner.stop(false, clr2(C2.green, name) + " \u2014 could not resolve latest version");
8939
- continue;
8940
- }
8941
- const current = deps[name].replace("^", "").replace("~", "");
8942
- if (latest == current) {
8943
- spinner.stop(true, clr2(C2.green, name) + clr2(C2.gray, "@" + current + " \u2014 up to date"));
8944
- } else {
8945
- spinner.stop(true, clr2(C2.green, name) + clr2(C2.gray, "@" + current) + " \u2192 " + clr2(C2.yellow, latest));
8946
- if (!isCheck) {
8947
- pkg.dependencies[name] = "^" + latest;
8948
- updated = updated + 1;
8949
- }
8950
- }
8951
- } catch (e) {
8952
- spinner.stop(false, clr2(C2.green, name) + " \u2014 " + e.message);
8953
- }
8954
- }
8955
- for (const name of Object.keys(devDeps)) {
8956
- const spinner = createSpinner(clr2(C2.blue, name) + clr2(C2.gray, " (dev)"));
8957
- try {
8958
- const info_ = await fetchJson(REGISTRY_URL + "/" + name);
8959
- const latest = ((_b = info_["dist-tags"]) == null ? void 0 : _b.latest) ?? null;
8960
- if (!latest) {
8961
- spinner.stop(false, clr2(C2.blue, name) + " \u2014 could not resolve latest version");
8962
- continue;
8963
- }
8964
- const current = devDeps[name].replace("^", "").replace("~", "");
8965
- if (latest == current) {
8966
- spinner.stop(true, clr2(C2.blue, name) + clr2(C2.gray, "@" + current + " \u2014 up to date"));
8967
- } else {
8968
- spinner.stop(true, clr2(C2.blue, name) + clr2(C2.gray, "@" + current) + " \u2192 " + clr2(C2.yellow, latest) + clr2(C2.gray, " (dev)"));
8969
- if (!isCheck) {
8970
- pkg.devDependencies[name] = "^" + latest;
8971
- updated = updated + 1;
8972
- }
8973
- }
8974
- } catch (e) {
8975
- spinner.stop(false, clr2(C2.blue, name) + " \u2014 " + e.message);
8976
- }
8977
- }
8978
- console.log();
8979
- if (isCheck) {
8980
- ok("Check complete \u2014 run " + clr2(C2.yellow, "flux upgrade") + " to apply upgrades");
8981
- } else {
8982
- if (updated > 0) {
8983
- saveFluxJson(pkg, cwd);
8984
- ok(updated + " package(s) updated in flux.json");
8985
- console.log(" " + clr2(C2.gray, "Run ") + clr2(C2.yellow, "flux install") + clr2(C2.gray, " to install upgraded packages"));
8986
- } else {
8987
- ok("All packages are already up to date");
8988
- }
8989
- }
8990
- console.log();
8991
- }
8992
- module2.exports.cmdUpgrade = cmdUpgrade;
8993
8844
  function cmdPublish2(opts) {
8994
8845
  const cwd = process.cwd();
8995
8846
  const pkg = readPackage(cwd);
@@ -9066,8 +8917,7 @@ var C = {
9066
8917
  gray: "\x1B[90m"
9067
8918
  };
9068
8919
  var colored = (c, s) => `${c}${s}${C.reset}`;
9069
- var hasColor = !!(process.env.COLORTERM || process.env.FORCE_COLOR || process.stdout.isTTY && process.env.TERM !== "dumb");
9070
- var noColor = !!(process.env.NO_COLOR || !hasColor);
8920
+ var noColor = process.env.NO_COLOR || !process.stdout.isTTY;
9071
8921
  var clr = (c, s) => noColor ? s : colored(c, s);
9072
8922
  function banner() {
9073
8923
  console.log(clr(C.cyan, C.bold + `
package/dist/flux.cjs.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * flux-lang v3.5.0
2
+ * flux-lang v3.5.2
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
@@ -82,8 +82,6 @@ var require_lexer = __commonJS({
82
82
  SATISFIES: "SATISFIES",
83
83
  IS: "IS",
84
84
  CONST: "CONST",
85
- // Keywords — property/object operators
86
- DELETE: "DELETE",
87
85
  // Operators
88
86
  PLUS: "PLUS",
89
87
  MINUS: "MINUS",
@@ -212,7 +210,6 @@ var require_lexer = __commonJS({
212
210
  satisfies: T.SATISFIES,
213
211
  is: T.IS,
214
212
  const: T.CONST,
215
- delete: T.DELETE,
216
213
  true: "__TRUE__",
217
214
  false: "__FALSE__",
218
215
  null: "__NULL__"
@@ -279,15 +276,7 @@ var require_lexer = __commonJS({
279
276
  if (this.ch() === "\\") {
280
277
  this.adv();
281
278
  const e = this.adv();
282
- if (e === "u") {
283
- const hex = this.adv() + this.adv() + this.adv() + this.adv();
284
- s += String.fromCodePoint(parseInt(hex, 16));
285
- } else if (e === "x") {
286
- const hex = this.adv() + this.adv();
287
- s += String.fromCodePoint(parseInt(hex, 16));
288
- } else {
289
- s += { n: "\n", t: " ", r: "\r", "`": "`", "\\": "\\" }[e] || "\\" + e;
290
- }
279
+ s += { n: "\n", t: " ", "`": "`", "\\": "\\" }[e] || "\\" + e;
291
280
  } else {
292
281
  s += this.adv();
293
282
  }
@@ -314,15 +303,7 @@ var require_lexer = __commonJS({
314
303
  if (this.ch() === "\\") {
315
304
  this.adv();
316
305
  const e = this.adv();
317
- if (e === "u") {
318
- const hex = this.adv() + this.adv() + this.adv() + this.adv();
319
- text += String.fromCodePoint(parseInt(hex, 16));
320
- } else if (e === "x") {
321
- const hex = this.adv() + this.adv();
322
- text += String.fromCodePoint(parseInt(hex, 16));
323
- } else {
324
- text += { n: "\n", t: " ", r: "\r", '"': '"', "'": "'", "\\": "\\", "{": "{", "}": "}" }[e] || "\\" + e;
325
- }
306
+ text += { n: "\n", t: " ", '"': '"', "'": "'", "\\": "\\", "{": "{", "}": "}" }[e] || "\\" + e;
326
307
  } else if (this.ch() === "{") {
327
308
  parts.push({ type: "text", value: text });
328
309
  text = "";
@@ -517,15 +498,7 @@ var require_lexer = __commonJS({
517
498
  if (this.ch() === "\\") {
518
499
  this.adv();
519
500
  const e = this.adv();
520
- if (e === "u") {
521
- const hex = this.adv() + this.adv() + this.adv() + this.adv();
522
- s += String.fromCodePoint(parseInt(hex, 16));
523
- } else if (e === "x") {
524
- const hex = this.adv() + this.adv();
525
- s += String.fromCodePoint(parseInt(hex, 16));
526
- } else {
527
- s += { n: "\n", t: " ", r: "\r", "'": "'", "\\": "\\" }[e] || "\\" + e;
528
- }
501
+ s += { n: "\n", t: " ", r: "\r", "'": "'", "\\": "\\" }[e] || "\\" + e;
529
502
  } else {
530
503
  s += this.adv();
531
504
  }
@@ -2214,9 +2187,9 @@ var require_parser = __commonJS({
2214
2187
  this.pos++;
2215
2188
  return { type: "TypeofExpr", operand: this.parseUnary() };
2216
2189
  }
2217
- if (this.check(T.DELETE)) {
2190
+ if (this.check(T.IDENT) && this.tokens[this.pos].value === "delete") {
2218
2191
  this.pos++;
2219
- return { type: "DeleteExpr", operand: this.parseUnary() };
2192
+ return { type: "UnaryExpr", op: "delete ", operand: this.parseUnary() };
2220
2193
  }
2221
2194
  return this.parseLambdaOrPostfix();
2222
2195
  }
@@ -3049,8 +3022,6 @@ function _fmt(v, s) {
3049
3022
  return `await ${this.genExpr(node.operand)}`;
3050
3023
  case "TypeofExpr":
3051
3024
  return `typeof ${this.genExpr(node.operand)}`;
3052
- case "DeleteExpr":
3053
- return `delete ${this.genExpr(node.operand)}`;
3054
3025
  case "SpreadExpr":
3055
3026
  return `...${this.genExpr(node.expr)}`;
3056
3027
  case "CallExpr": {
package/dist/flux.esm.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * flux-lang v3.5.0
2
+ * flux-lang v3.5.2
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
@@ -87,8 +87,6 @@ var require_lexer = __commonJS({
87
87
  SATISFIES: "SATISFIES",
88
88
  IS: "IS",
89
89
  CONST: "CONST",
90
- // Keywords — property/object operators
91
- DELETE: "DELETE",
92
90
  // Operators
93
91
  PLUS: "PLUS",
94
92
  MINUS: "MINUS",
@@ -217,7 +215,6 @@ var require_lexer = __commonJS({
217
215
  satisfies: T.SATISFIES,
218
216
  is: T.IS,
219
217
  const: T.CONST,
220
- delete: T.DELETE,
221
218
  true: "__TRUE__",
222
219
  false: "__FALSE__",
223
220
  null: "__NULL__"
@@ -284,15 +281,7 @@ var require_lexer = __commonJS({
284
281
  if (this.ch() === "\\") {
285
282
  this.adv();
286
283
  const e = this.adv();
287
- if (e === "u") {
288
- const hex = this.adv() + this.adv() + this.adv() + this.adv();
289
- s += String.fromCodePoint(parseInt(hex, 16));
290
- } else if (e === "x") {
291
- const hex = this.adv() + this.adv();
292
- s += String.fromCodePoint(parseInt(hex, 16));
293
- } else {
294
- s += { n: "\n", t: " ", r: "\r", "`": "`", "\\": "\\" }[e] || "\\" + e;
295
- }
284
+ s += { n: "\n", t: " ", "`": "`", "\\": "\\" }[e] || "\\" + e;
296
285
  } else {
297
286
  s += this.adv();
298
287
  }
@@ -319,15 +308,7 @@ var require_lexer = __commonJS({
319
308
  if (this.ch() === "\\") {
320
309
  this.adv();
321
310
  const e = this.adv();
322
- if (e === "u") {
323
- const hex = this.adv() + this.adv() + this.adv() + this.adv();
324
- text += String.fromCodePoint(parseInt(hex, 16));
325
- } else if (e === "x") {
326
- const hex = this.adv() + this.adv();
327
- text += String.fromCodePoint(parseInt(hex, 16));
328
- } else {
329
- text += { n: "\n", t: " ", r: "\r", '"': '"', "'": "'", "\\": "\\", "{": "{", "}": "}" }[e] || "\\" + e;
330
- }
311
+ text += { n: "\n", t: " ", '"': '"', "'": "'", "\\": "\\", "{": "{", "}": "}" }[e] || "\\" + e;
331
312
  } else if (this.ch() === "{") {
332
313
  parts.push({ type: "text", value: text });
333
314
  text = "";
@@ -522,15 +503,7 @@ var require_lexer = __commonJS({
522
503
  if (this.ch() === "\\") {
523
504
  this.adv();
524
505
  const e = this.adv();
525
- if (e === "u") {
526
- const hex = this.adv() + this.adv() + this.adv() + this.adv();
527
- s += String.fromCodePoint(parseInt(hex, 16));
528
- } else if (e === "x") {
529
- const hex = this.adv() + this.adv();
530
- s += String.fromCodePoint(parseInt(hex, 16));
531
- } else {
532
- s += { n: "\n", t: " ", r: "\r", "'": "'", "\\": "\\" }[e] || "\\" + e;
533
- }
506
+ s += { n: "\n", t: " ", r: "\r", "'": "'", "\\": "\\" }[e] || "\\" + e;
534
507
  } else {
535
508
  s += this.adv();
536
509
  }
@@ -2219,9 +2192,9 @@ var require_parser = __commonJS({
2219
2192
  this.pos++;
2220
2193
  return { type: "TypeofExpr", operand: this.parseUnary() };
2221
2194
  }
2222
- if (this.check(T.DELETE)) {
2195
+ if (this.check(T.IDENT) && this.tokens[this.pos].value === "delete") {
2223
2196
  this.pos++;
2224
- return { type: "DeleteExpr", operand: this.parseUnary() };
2197
+ return { type: "UnaryExpr", op: "delete ", operand: this.parseUnary() };
2225
2198
  }
2226
2199
  return this.parseLambdaOrPostfix();
2227
2200
  }
@@ -3054,8 +3027,6 @@ function _fmt(v, s) {
3054
3027
  return `await ${this.genExpr(node.operand)}`;
3055
3028
  case "TypeofExpr":
3056
3029
  return `typeof ${this.genExpr(node.operand)}`;
3057
- case "DeleteExpr":
3058
- return `delete ${this.genExpr(node.operand)}`;
3059
3030
  case "SpreadExpr":
3060
3031
  return `...${this.genExpr(node.expr)}`;
3061
3032
  case "CallExpr": {