@xnoxs/flux-lang 3.4.8 → 3.4.9

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/dist/flux-cli.js CHANGED
@@ -1,6 +1,6 @@
1
1
  #!/usr/bin/env node
2
2
  /*!
3
- * flux-lang v3.4.8
3
+ * flux-lang v3.4.9
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
@@ -2258,6 +2258,10 @@ var require_parser = __commonJS({
2258
2258
  this.pos++;
2259
2259
  return { type: "TypeofExpr", operand: this.parseUnary() };
2260
2260
  }
2261
+ if (this.check(T.IDENT) && this.tokens[this.pos].value === "delete") {
2262
+ this.pos++;
2263
+ return { type: "UnaryExpr", op: "delete ", operand: this.parseUnary() };
2264
+ }
2261
2265
  return this.parseLambdaOrPostfix();
2262
2266
  }
2263
2267
  parseLambdaOrPostfix() {
@@ -7219,7 +7223,7 @@ var require_package = __commonJS({
7219
7223
  "package.json"(exports2, module2) {
7220
7224
  module2.exports = {
7221
7225
  name: "@xnoxs/flux-lang",
7222
- version: "3.4.8",
7226
+ version: "3.4.9",
7223
7227
  description: "Flux \u2014 A modern language that transpiles to JavaScript. Python-clean syntax, TypeScript-level safety, Rust-inspired pattern matching.",
7224
7228
  main: "dist/flux.cjs.js",
7225
7229
  module: "dist/flux.esm.js",
@@ -8575,7 +8579,7 @@ var require_pkg = __commonJS({
8575
8579
  var { readPackage, writeConfig, loadConfig: loadConfig2 } = require_config2();
8576
8580
  var REGISTRY_URL = "https://registry.npmjs.org";
8577
8581
  var PKG_FILE = "flux.json";
8578
- 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" };
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" };
8579
8583
  function clr2(c, s) {
8580
8584
  return c + s + C2.reset;
8581
8585
  }
@@ -8696,6 +8700,7 @@ var require_pkg = __commonJS({
8696
8700
  const { execSync } = require("child_process");
8697
8701
  const cwd = process.cwd();
8698
8702
  const pkg = ensureFluxJson(cwd);
8703
+ const fluxModDir = Path.join(cwd, "flux_modules");
8699
8704
  const deps = pkg.dependencies ?? {};
8700
8705
  const devDeps = pkg.devDependencies ?? {};
8701
8706
  const all = { ...deps, ...devDeps };
@@ -8710,11 +8715,12 @@ var require_pkg = __commonJS({
8710
8715
  console.log(clr2(C2.gray, " \u25CB ") + name + clr2(C2.gray, "@" + spec));
8711
8716
  }
8712
8717
  console.log();
8713
- const fluxModDir = Path.join(cwd, "flux_modules");
8714
- if (!Fs.existsSync(fluxModDir)) Fs.mkdirSync(fluxModDir, { recursive: true });
8718
+ if (!Fs.existsSync(fluxModDir)) {
8719
+ Fs.mkdirSync(fluxModDir, { recursive: true });
8720
+ }
8715
8721
  const fluxPkgFile = Path.join(fluxModDir, "package.json");
8716
8722
  if (!Fs.existsSync(fluxPkgFile)) {
8717
- const fluxPkg = { name: (pkg.name || "flux-project") + "-flux-modules", version: "1.0.0", private: true };
8723
+ const fluxPkg = { name: pkg.name + "-flux-modules", version: "1.0.0", private: true };
8718
8724
  Fs.writeFileSync(fluxPkgFile, JSON.stringify(fluxPkg, null, 2) + "\n", "utf8");
8719
8725
  }
8720
8726
  const prodNames = Object.keys(deps);
@@ -8862,80 +8868,6 @@ var require_pkg = __commonJS({
8862
8868
  console.log();
8863
8869
  }
8864
8870
  module2.exports.cmdPublish = cmdPublish2;
8865
- async function cmdUpgrade(opts) {
8866
- const check = opts && opts.check || false;
8867
- const cwd = process.cwd();
8868
- const pkg = readPackage(cwd);
8869
- if (!pkg) {
8870
- err("No flux.json found. Run: flux init");
8871
- return;
8872
- }
8873
- const allDeps = Object.assign({}, pkg.dependencies || {}, pkg.devDependencies || {});
8874
- const names = Object.keys(allDeps);
8875
- if (names.length === 0) {
8876
- info("No dependencies in flux.json");
8877
- return;
8878
- }
8879
- console.log();
8880
- console.log(clr2(C2.cyan, " Checking " + names.length + " package(s) for updates...\n"));
8881
- let updated = 0;
8882
- let upToDate = 0;
8883
- let failed = 0;
8884
- for (const name of names) {
8885
- const current = allDeps[name].replace(/^[\^~>=<\s]+/, "");
8886
- try {
8887
- const data = await fetchJson(REGISTRY_URL + "/" + name);
8888
- const latest = data["dist-tags"] && data["dist-tags"].latest;
8889
- if (!latest) {
8890
- err(name + " \u2014 could not resolve latest");
8891
- failed++;
8892
- continue;
8893
- }
8894
- const isDev = !!(pkg.devDependencies && pkg.devDependencies[name]);
8895
- const tag = isDev ? clr2(C2.blue, " (dev)") : "";
8896
- if (current === latest) {
8897
- console.log(" " + clr2(C2.gray, "\u2713") + " " + clr2(C2.bold, name) + clr2(C2.gray, "@" + current + " \u2014 up to date") + tag);
8898
- upToDate++;
8899
- } else {
8900
- console.log(" " + clr2(C2.yellow, "\u2191") + " " + clr2(C2.bold, name) + clr2(C2.gray, "@" + current) + " \u2192 " + clr2(C2.green, latest) + tag);
8901
- if (!check) {
8902
- if (isDev) {
8903
- if (!pkg.devDependencies) pkg.devDependencies = {};
8904
- pkg.devDependencies[name] = "^" + latest;
8905
- } else {
8906
- if (!pkg.dependencies) pkg.dependencies = {};
8907
- pkg.dependencies[name] = "^" + latest;
8908
- }
8909
- }
8910
- updated++;
8911
- }
8912
- } catch (e) {
8913
- err(name + " \u2014 " + e.message);
8914
- failed++;
8915
- }
8916
- }
8917
- console.log();
8918
- if (check) {
8919
- console.log(clr2(C2.cyan, " Check mode: no changes written."));
8920
- if (updated > 0) {
8921
- console.log(clr2(C2.yellow, " " + updated + " update(s) available. Run: flux upgrade"));
8922
- } else {
8923
- console.log(clr2(C2.green, " All packages are up to date."));
8924
- }
8925
- } else {
8926
- if (updated > 0) {
8927
- const pkgPath = Path.join(cwd, "flux.json");
8928
- Fs.writeFileSync(pkgPath, JSON.stringify(pkg, null, 2) + "\n", "utf8");
8929
- ok(updated + " package(s) updated in flux.json");
8930
- info("Run: flux install to apply changes");
8931
- } else {
8932
- console.log(clr2(C2.green, " \u2713 All packages are already up to date."));
8933
- }
8934
- if (failed > 0) info(failed + " package(s) could not be checked");
8935
- }
8936
- console.log();
8937
- }
8938
- module2.exports.cmdUpgrade = cmdUpgrade;
8939
8871
  }
8940
8872
  });
8941
8873
 
package/dist/flux.cjs.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * flux-lang v3.4.8
2
+ * flux-lang v3.4.9
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
@@ -2187,6 +2187,10 @@ var require_parser = __commonJS({
2187
2187
  this.pos++;
2188
2188
  return { type: "TypeofExpr", operand: this.parseUnary() };
2189
2189
  }
2190
+ if (this.check(T.IDENT) && this.tokens[this.pos].value === "delete") {
2191
+ this.pos++;
2192
+ return { type: "UnaryExpr", op: "delete ", operand: this.parseUnary() };
2193
+ }
2190
2194
  return this.parseLambdaOrPostfix();
2191
2195
  }
2192
2196
  parseLambdaOrPostfix() {
package/dist/flux.esm.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * flux-lang v3.4.8
2
+ * flux-lang v3.4.9
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
@@ -2192,6 +2192,10 @@ var require_parser = __commonJS({
2192
2192
  this.pos++;
2193
2193
  return { type: "TypeofExpr", operand: this.parseUnary() };
2194
2194
  }
2195
+ if (this.check(T.IDENT) && this.tokens[this.pos].value === "delete") {
2196
+ this.pos++;
2197
+ return { type: "UnaryExpr", op: "delete ", operand: this.parseUnary() };
2198
+ }
2195
2199
  return this.parseLambdaOrPostfix();
2196
2200
  }
2197
2201
  parseLambdaOrPostfix() {