eolang 0.33.4 → 0.34.0

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.
Files changed (57) hide show
  1. package/Formula/eolang.rb +3 -3
  2. package/Formula/eolang@0.32.0.rb +3 -3
  3. package/Formula/eolang@0.32.1.rb +3 -3
  4. package/Formula/eolang@0.33.0.rb +3 -3
  5. package/LICENSE.txt +1 -1
  6. package/LICENSES/MIT.txt +1 -1
  7. package/README.md +99 -7
  8. package/REUSE.toml +1 -0
  9. package/eo-version.txt +1 -1
  10. package/eslint.config.js +10 -2
  11. package/eslintPlugin/index.js +10 -0
  12. package/eslintPlugin/rules/noEmptyLinesInMethod.js +59 -0
  13. package/flake.lock +61 -0
  14. package/flake.nix +81 -0
  15. package/home-tag.txt +1 -1
  16. package/mvnw/.mvn/wrapper/maven-wrapper.properties +2 -2
  17. package/mvnw/dependency-reduced-pom.xml +123 -33
  18. package/mvnw/mvnw +1 -1
  19. package/mvnw/mvnw.cmd +1 -1
  20. package/mvnw/pom.xml +86 -49
  21. package/package.json +20 -4
  22. package/scripts/postinstall.js +1 -1
  23. package/src/commands/assemble.js +1 -1
  24. package/src/commands/audit.js +1 -1
  25. package/src/commands/clean.js +1 -1
  26. package/src/commands/docs.js +49 -46
  27. package/src/commands/foreign.js +1 -1
  28. package/src/commands/generate_comments.js +1 -1
  29. package/src/commands/java/compile.js +8 -9
  30. package/src/commands/java/dataize.js +1 -1
  31. package/src/commands/java/link.js +8 -5
  32. package/src/commands/java/resolve.js +12 -9
  33. package/src/commands/java/test.js +1 -1
  34. package/src/commands/java/transpile.js +8 -5
  35. package/src/commands/jeo/assemble.js +21 -19
  36. package/src/commands/jeo/disassemble.js +21 -19
  37. package/src/commands/js/compile.js +1 -1
  38. package/src/commands/js/dataize.js +1 -1
  39. package/src/commands/js/link.js +9 -6
  40. package/src/commands/js/resolve.js +1 -1
  41. package/src/commands/js/test.js +1 -1
  42. package/src/commands/js/transpile.js +8 -5
  43. package/src/commands/latex.js +8 -5
  44. package/src/commands/lint.js +23 -22
  45. package/src/commands/parse.js +8 -5
  46. package/src/commands/print.js +18 -15
  47. package/src/commands/register.js +8 -5
  48. package/src/commands/sodg.js +31 -28
  49. package/src/demand.js +1 -1
  50. package/src/elapsed.js +1 -3
  51. package/src/eo2jsw.js +1 -1
  52. package/src/eoc.js +32 -4
  53. package/src/mvnw.js +12 -1
  54. package/src/parser-version.js +24 -1
  55. package/src/resources/xmir-transformer.xsl +3 -3
  56. package/src/tinted-console.js +1 -1
  57. package/src/version.js +3 -3
package/Formula/eolang.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  #
2
- # SPDX-FileCopyrightText: Copyright (c) 2022-2025 Objectionary.com
2
+ # SPDX-FileCopyrightText: Copyright (c) 2022-2026 Objectionary.com
3
3
  # SPDX-License-Identifier: MIT
4
4
  #
5
5
 
@@ -7,9 +7,9 @@ require "language/node"
7
7
  class Eolang < Formula
8
8
  desc "Command-line Tool-Kit"
9
9
  homepage "https://github.com/objectionary/eoc"
10
- url "https://github.com/objectionary/eoc/archive/refs/tags/0.33.3.tar.gz"
10
+ url "https://github.com/objectionary/eoc/archive/refs/tags/0.33.5.tar.gz"
11
11
  version "0.33.1"
12
- sha256 "69054081fcc09f2efca424770a098acb19261e8a3c5b237e0dd66cfbd9e21bc9"
12
+ sha256 "f2a88bad46caa6a67d9058e8e7add2ff05f26959b08b3151c13f9178aab7e6a9"
13
13
  license "MIT"
14
14
 
15
15
  depends_on "node"
@@ -1,5 +1,5 @@
1
1
  #
2
- # SPDX-FileCopyrightText: Copyright (c) 2022-2025 Objectionary.com
2
+ # SPDX-FileCopyrightText: Copyright (c) 2022-2026 Objectionary.com
3
3
  # SPDX-License-Identifier: MIT
4
4
  #
5
5
 
@@ -7,9 +7,9 @@ require "language/node"
7
7
  class Eolang < Formula
8
8
  desc "Command-line Tool-Kit"
9
9
  homepage "https://github.com/objectionary/eoc"
10
- url "https://github.com/objectionary/eoc/archive/refs/tags/0.33.3.tar.gz"
10
+ url "https://github.com/objectionary/eoc/archive/refs/tags/0.33.5.tar.gz"
11
11
  version "0.32.0"
12
- sha256 "69054081fcc09f2efca424770a098acb19261e8a3c5b237e0dd66cfbd9e21bc9"
12
+ sha256 "f2a88bad46caa6a67d9058e8e7add2ff05f26959b08b3151c13f9178aab7e6a9"
13
13
  license "MIT"
14
14
 
15
15
  depends_on "node"
@@ -1,5 +1,5 @@
1
1
  #
2
- # SPDX-FileCopyrightText: Copyright (c) 2022-2025 Objectionary.com
2
+ # SPDX-FileCopyrightText: Copyright (c) 2022-2026 Objectionary.com
3
3
  # SPDX-License-Identifier: MIT
4
4
  #
5
5
 
@@ -7,9 +7,9 @@ require "language/node"
7
7
  class Eolang < Formula
8
8
  desc "Command-line Tool-Kit"
9
9
  homepage "https://github.com/objectionary/eoc"
10
- url "https://github.com/objectionary/eoc/archive/refs/tags/0.33.3.tar.gz"
10
+ url "https://github.com/objectionary/eoc/archive/refs/tags/0.33.5.tar.gz"
11
11
  version "0.32.1"
12
- sha256 "69054081fcc09f2efca424770a098acb19261e8a3c5b237e0dd66cfbd9e21bc9"
12
+ sha256 "f2a88bad46caa6a67d9058e8e7add2ff05f26959b08b3151c13f9178aab7e6a9"
13
13
  license "MIT"
14
14
 
15
15
  depends_on "node"
@@ -1,5 +1,5 @@
1
1
  #
2
- # SPDX-FileCopyrightText: Copyright (c) 2022-2025 Objectionary.com
2
+ # SPDX-FileCopyrightText: Copyright (c) 2022-2026 Objectionary.com
3
3
  # SPDX-License-Identifier: MIT
4
4
  #
5
5
 
@@ -7,9 +7,9 @@ require "language/node"
7
7
  class Eolang < Formula
8
8
  desc "Command-line Tool-Kit"
9
9
  homepage "https://github.com/objectionary/eoc"
10
- url "https://github.com/objectionary/eoc/archive/refs/tags/0.33.3.tar.gz"
10
+ url "https://github.com/objectionary/eoc/archive/refs/tags/0.33.5.tar.gz"
11
11
  version "0.33.0"
12
- sha256 "69054081fcc09f2efca424770a098acb19261e8a3c5b237e0dd66cfbd9e21bc9"
12
+ sha256 "f2a88bad46caa6a67d9058e8e7add2ff05f26959b08b3151c13f9178aab7e6a9"
13
13
  license "MIT"
14
14
 
15
15
  depends_on "node"
package/LICENSE.txt CHANGED
@@ -1,4 +1,4 @@
1
- Copyright (c) 2022-2025 Objectionary.com
1
+ Copyright (c) 2022-2026 Objectionary.com
2
2
 
3
3
  Permission is hereby granted, free of charge, to any person obtaining a copy
4
4
  of this software and associated documentation files (the "Software"), to deal
package/LICENSES/MIT.txt CHANGED
@@ -1,4 +1,4 @@
1
- Copyright (c) 2022-2025 Objectionary.com
1
+ Copyright (c) 2022-2026 Objectionary.com
2
2
 
3
3
  Permission is hereby granted, free of charge, to any person obtaining a copy
4
4
  of this software and associated documentation files (the "Software"), to deal
package/README.md CHANGED
@@ -6,6 +6,7 @@
6
6
  [![grunt](https://github.com/objectionary/eoc/actions/workflows/grunt.yml/badge.svg)](https://github.com/objectionary/eoc/actions/workflows/grunt.yml)
7
7
  [![node-current](https://img.shields.io/node/v/eolang)](https://www.npmjs.com/package/eolang)
8
8
  [![PDD status](https://www.0pdd.com/svg?name=objectionary/eoc)](https://www.0pdd.com/p?name=objectionary/eoc)
9
+ [![codecov](https://codecov.io/gh/objectionary/eoc/branch/master/graph/badge.svg)](https://codecov.io/gh/objectionary/eoc)
9
10
  [![Hits-of-Code](https://hitsofcode.com/github/objectionary/eoc)](https://hitsofcode.com/view/github/objectionary/eoc)
10
11
  [![License](https://img.shields.io/badge/license-MIT-green.svg)](https://github.com/objectionary/eoc/blob/master/LICENSE.txt)
11
12
 
@@ -18,14 +19,72 @@ First, you install [npm][npm-install] and [Java SE][java-se].
18
19
  Then, you install [eolang][npm] package, using [npm][npm-install]:
19
20
 
20
21
  ```bash
21
- npm install -g eolang@0.33.3
22
+ npm install -g eolang@0.33.5
22
23
  ```
23
24
 
24
25
  You can also use [Homebrew] (on macOS):
25
26
 
26
27
  ```bash
27
28
  brew tap objectionary/eoc https://github.com/objectionary/eoc
28
- brew install objectionary/eoc/eolang@0.33.3
29
+ brew install objectionary/eoc/eolang@0.33.5
30
+ ```
31
+
32
+ Or install it via [Nix flakes](https://nixos.wiki/wiki/Flakes):
33
+
34
+ ```bash
35
+ nix run github:objectionary/eoc
36
+ ```
37
+
38
+ You can also include EOLANG in your own flake:
39
+
40
+ ```nix
41
+ {
42
+ inputs = {
43
+ eoc.url = "github:objectionary/eoc";
44
+ nixpkgs.url = "github:nixos/nixpkgs/nixos-25.05";
45
+ };
46
+
47
+ outputs = { self, nixpkgs, eoc, ... }: {
48
+ nixConfigurations.<hostname> = nixpkgs.lib.nixosSystem {
49
+ modules = [
50
+ {
51
+ nixpkgs.config.packageOverrides = pkgs: {
52
+ eoc = eoc.packages.${system}.default;
53
+ };
54
+ }
55
+ ];
56
+ }
57
+ };
58
+ }
59
+ ```
60
+
61
+ After that, select one of the methods for installing the package:
62
+
63
+ ```nix
64
+ #configuration.nix (Global)
65
+ {
66
+ environment.systemPackages = with pkgs; [
67
+ eoc
68
+ ];
69
+ }
70
+ ```
71
+
72
+ ```nix
73
+ #configuration.nix (For user)
74
+ {
75
+ users.users.<your-user-name>.packages = with pkgs; [
76
+ eoc
77
+ ];
78
+ }
79
+ ```
80
+
81
+ ```nix
82
+ #home.nix (For home-manager)
83
+ {
84
+ home.packages = with pkgs; [
85
+ eoc
86
+ ];
87
+ }
29
88
  ```
30
89
 
31
90
  Then, you write a simple [EO](https://www.eolang.org) program in `hello.eo` file
@@ -88,17 +147,50 @@ There are also commands that help manipulate with XMIR and EO sources
88
147
  This command line toolkit simply integrates other tools available in
89
148
  the [@objectionary](https://github.com/objectionary) GitHub organization.
90
149
 
91
- ## How to Contribute
150
+ ## Linting
151
+
152
+ There are two ways to work with linting. The `--easy` option enables linting
153
+ but ignores warnings, while the `--blind` option completely disables linting.
92
154
 
93
- First, run `npm install`. Then, run `grunt`. All tests should pass.
155
+ ## How to Test
94
156
 
95
- If you want to run a single test:
157
+ To execute the project tests, use the following command:
96
158
 
97
159
  ```bash
98
- npm test -- test/test_mvnw.js
160
+ npx grunt
99
161
  ```
100
162
 
101
- Make your changes and then
163
+ This command will run all the testing steps, including tests, linting,
164
+ coverage, and more.
165
+ If you only need to run the tests, use:
166
+
167
+ ```bash
168
+ npm test
169
+ ```
170
+
171
+ To run a specific test based on its description, use the following command:
172
+
173
+ ```bash
174
+ npm test -- --grep="<test-description>"
175
+ ```
176
+
177
+ For example, to run a test with the description
178
+ "formats EO files according to expected patterns," execute:
179
+
180
+ ```bash
181
+ npm test -- --grep="formats EO files according to expected patterns"
182
+ ```
183
+
184
+ You can also run a specific test file using `npx grunt`:
185
+
186
+ ```bash
187
+ npx grunt --file=test/commands/test_fmt.js
188
+ ```
189
+
190
+ ## How to Contribute
191
+
192
+ First, run `npm install`.
193
+ Make your changes, run [tests](#how-to-test) and then
102
194
  [make](https://www.yegor256.com/2014/04/15/github-guidelines.html)
103
195
  a pull request.
104
196
 
package/REUSE.toml CHANGED
@@ -33,6 +33,7 @@ path = [
33
33
  "MANIFEST.MF",
34
34
  "README.md",
35
35
  "renovate.json",
36
+ "flake.lock"
36
37
  ]
37
38
  precedence = "override"
38
39
  SPDX-FileCopyrightText = "Copyright (c) 2025 Yegor Bugayenko"
package/eo-version.txt CHANGED
@@ -1 +1 @@
1
- 0.59.0
1
+ 0.59.5
package/eslint.config.js CHANGED
@@ -1,10 +1,16 @@
1
1
  /*
2
- * SPDX-FileCopyrightText: Copyright (c) 2022-2025 Objectionary.com
2
+ * SPDX-FileCopyrightText: Copyright (c) 2022-2026 Objectionary.com
3
3
  * SPDX-License-Identifier: MIT
4
4
  */
5
5
 
6
6
  const { configs } = require('@eslint/js');
7
7
  const promise = require('eslint-plugin-promise');
8
+ const noEmptyLinesInMethod = require('./eslintPlugin/rules/noEmptyLinesInMethod');
9
+
10
+ const localPlugin = {
11
+ rules: {
12
+ 'no-empty-lines-in-method': noEmptyLinesInMethod
13
+ }};
8
14
 
9
15
  module.exports = [
10
16
  {
@@ -19,6 +25,7 @@ module.exports = [
19
25
  },
20
26
  plugins: {
21
27
  promise,
28
+ local: localPlugin
22
29
  },
23
30
  rules: {
24
31
  ...configs.all.rules,
@@ -60,7 +67,8 @@ module.exports = [
60
67
  'require-unicode-regexp': 'off',
61
68
  'sort-keys': 'off',
62
69
  'sort-vars': 'off',
63
- "promise/prefer-await-to-then": "error"
70
+ 'promise/prefer-await-to-then': 'error',
71
+ 'local/no-empty-lines-in-method': 'error'
64
72
  }
65
73
  },
66
74
  ];
@@ -0,0 +1,10 @@
1
+ /*
2
+ * SPDX-FileCopyrightText: Copyright (c) 2022-2026 Objectionary.com
3
+ * SPDX-License-Identifier: MIT
4
+ */
5
+
6
+ module.exports = {
7
+ rules: {
8
+ "no-empty-lines-in-method": require("./rules/noEmptyLinesInMethod")
9
+ }
10
+ };
@@ -0,0 +1,59 @@
1
+ /*
2
+ * SPDX-FileCopyrightText: Copyright (c) 2022-2026 Objectionary.com
3
+ * SPDX-License-Identifier: MIT
4
+ */
5
+
6
+ module.exports = {
7
+ meta: {
8
+ type: "layout",
9
+ docs: {
10
+ description: "Disallow empty lines inside method or function bodies"
11
+ },
12
+ fixable: "whitespace",
13
+ schema: [],
14
+ messages: {
15
+ noEmptyLine: "Empty lines are not allowed inside a method or function body."
16
+ }
17
+ },
18
+
19
+ create(context) {
20
+ const sourceCode = context.getSourceCode();
21
+ function checkFunction(node) {
22
+ if (!node.body || node.body.type !== "BlockStatement") {
23
+ return;
24
+ }
25
+ const body = node.body;
26
+ const lines = sourceCode.lines;
27
+ const startLine = body.loc.start.line;
28
+ const endLine = body.loc.end.line;
29
+ for (let i = startLine; i < endLine - 1; i++) {
30
+ if (lines[i].trim() === "") {
31
+ context.report({
32
+ node: body,
33
+ loc: {
34
+ start: { line: i + 1, column: 0 },
35
+ end: { line: i + 1, column: lines[i].length }
36
+ },
37
+ messageId: "noEmptyLine",
38
+ fix(fixer) {
39
+ const rangeStart = sourceCode.getIndexFromLoc({
40
+ line: i + 1,
41
+ column: 0
42
+ });
43
+ const rangeEnd = rangeStart + lines[i].length + 1;
44
+ return fixer.removeRange([rangeStart, rangeEnd]);
45
+ }
46
+ });
47
+ }
48
+ }
49
+ }
50
+ return {
51
+ FunctionDeclaration: checkFunction,
52
+ FunctionExpression: checkFunction,
53
+ ArrowFunctionExpression: checkFunction,
54
+ MethodDefinition(node) {
55
+ checkFunction(node.value);
56
+ }
57
+ };
58
+ }
59
+ };
package/flake.lock ADDED
@@ -0,0 +1,61 @@
1
+ {
2
+ "nodes": {
3
+ "flake-utils": {
4
+ "inputs": {
5
+ "systems": "systems"
6
+ },
7
+ "locked": {
8
+ "lastModified": 1731533236,
9
+ "narHash": "sha256-l0KFg5HjrsfsO/JpG+r7fRrqm12kzFHyUHqHCVpMMbI=",
10
+ "owner": "numtide",
11
+ "repo": "flake-utils",
12
+ "rev": "11707dc2f618dd54ca8739b309ec4fc024de578b",
13
+ "type": "github"
14
+ },
15
+ "original": {
16
+ "owner": "numtide",
17
+ "repo": "flake-utils",
18
+ "type": "github"
19
+ }
20
+ },
21
+ "nixpkgs": {
22
+ "locked": {
23
+ "lastModified": 1760862643,
24
+ "narHash": "sha256-PXwG0TM7Ek87DNx4LbGWuD93PbFeKAJs4FfALtp7Wo0=",
25
+ "owner": "NixOS",
26
+ "repo": "nixpkgs",
27
+ "rev": "33c6dca0c0cb31d6addcd34e90a63ad61826b28c",
28
+ "type": "github"
29
+ },
30
+ "original": {
31
+ "owner": "NixOS",
32
+ "ref": "nixos-25.05",
33
+ "repo": "nixpkgs",
34
+ "type": "github"
35
+ }
36
+ },
37
+ "root": {
38
+ "inputs": {
39
+ "flake-utils": "flake-utils",
40
+ "nixpkgs": "nixpkgs"
41
+ }
42
+ },
43
+ "systems": {
44
+ "locked": {
45
+ "lastModified": 1681028828,
46
+ "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
47
+ "owner": "nix-systems",
48
+ "repo": "default",
49
+ "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
50
+ "type": "github"
51
+ },
52
+ "original": {
53
+ "owner": "nix-systems",
54
+ "repo": "default",
55
+ "type": "github"
56
+ }
57
+ }
58
+ },
59
+ "root": "root",
60
+ "version": 7
61
+ }
package/flake.nix ADDED
@@ -0,0 +1,81 @@
1
+ # SPDX-FileCopyrightText: Copyright (c) 2022-2026 Objectionary.com
2
+ # SPDX-License-Identifier: MIT
3
+ {
4
+ description = "Command-line toolkit for parsing, compiling, transpiling, optimizing, linking, dataizing, and running EOLANG programs";
5
+
6
+ inputs = {
7
+ nixpkgs.url = "github:NixOS/nixpkgs/nixos-25.05";
8
+ flake-utils.url = "github:numtide/flake-utils";
9
+ };
10
+
11
+ outputs = { nixpkgs, flake-utils, ... }:
12
+ flake-utils.lib.eachDefaultSystem (system:
13
+ let
14
+ pkgs = import nixpkgs { inherit system; };
15
+ srcPatched = pkgs.runCommand "patched-src" {} ''
16
+ cp -r ${./.} $out
17
+ substituteInPlace $out/package.json \
18
+ --replace-quiet "\"node\": \"^25.0.0\"," ""
19
+ '';
20
+ lockHash = builtins.hashFile "sha512" ./package-lock.json;
21
+ packageJson = builtins.fromJSON (builtins.readFile ./package.json);
22
+ eolangBase = pkgs.buildNpmPackage {
23
+ pname = packageJson.name;
24
+ version = packageJson.version;
25
+ src = srcPatched;
26
+
27
+ buildInputs = [ pkgs.nodejs ];
28
+ dontNpmBuild = true;
29
+
30
+ installPhase = ''
31
+ mkdir -p $out/lib
32
+ cp -r . $out/lib
33
+ mkdir -p $out/bin
34
+ ln -s $out/lib/src/eoc.js $out/bin/eoc
35
+ chmod +x $out/bin/eoc
36
+ '';
37
+
38
+ npmDeps = pkgs.importNpmLock {
39
+ npmRoot = srcPatched;
40
+ };
41
+
42
+ npmConfigHook = pkgs.importNpmLock.npmConfigHook;
43
+
44
+ meta = with pkgs.lib; {
45
+ description = packageJson.description;
46
+ homepage = packageJson.homepage;
47
+ license = licenses.mit;
48
+ author = packageJson.author;
49
+ };
50
+ };
51
+
52
+ eolangWrapped = pkgs.writeShellScriptBin "eoc" ''
53
+ set -euo pipefail
54
+
55
+ EOC_STORE="${eolangBase}/lib"
56
+ EOC_STATE="$HOME/.eoc/lib"
57
+ EOC_HASH="${lockHash}"
58
+
59
+ mkdir -p "$EOC_STATE"
60
+
61
+ if [ ! -f "$EOC_STATE/.hash" ] || [ "$(cat $EOC_STATE/.hash)" != "$EOC_HASH" ]; then
62
+ rm -rf "$EOC_STATE/"
63
+ cp -r "$EOC_STORE/" "$EOC_STATE/"
64
+ chmod -R 755 "$EOC_STATE/"
65
+ echo "$EOC_HASH" > "$EOC_STATE/.hash"
66
+ fi
67
+
68
+ exec "${pkgs.nodejs}/bin/node" "$EOC_STATE/src/eoc.js" "$@"
69
+ '';
70
+
71
+ in {
72
+ packages.default = eolangWrapped;
73
+ meta = with pkgs.lib; {
74
+ description = packageJson.description;
75
+ homepage = packageJson.homepage;
76
+ license = licenses.mit;
77
+ author = packageJson.author;
78
+ };
79
+ }
80
+ );
81
+ }
package/home-tag.txt CHANGED
@@ -1 +1 @@
1
- 0.58.6
1
+ 0.59.5
@@ -1,4 +1,4 @@
1
- # SPDX-FileCopyrightText: Copyright (c) 2022-2025 Objectionary.com
1
+ # SPDX-FileCopyrightText: Copyright (c) 2022-2026 Objectionary.com
2
2
  # SPDX-License-Identifier: MIT
3
3
 
4
- distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.9.11/apache-maven-3.9.11-bin.zip
4
+ distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.9.12/apache-maven-3.9.12-bin.zip