eolang 0.13.2 → 0.13.4

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "eolang",
3
- "version": "0.13.2",
3
+ "version": "0.13.4",
4
4
  "author": "Yegor Bugayenko <yegor256@gmail.com> (https://www.yegor256.com/)",
5
5
  "license": "MIT",
6
6
  "repository": "objectionary/eoc",
@@ -38,7 +38,7 @@
38
38
  "xmlhttprequest": "1.8.0"
39
39
  },
40
40
  "devDependencies": {
41
- "eslint": "8.41.0",
41
+ "eslint": "8.42.0",
42
42
  "eslint-config-google": "0.14.0",
43
43
  "grunt": "1.6.1",
44
44
  "grunt-contrib-clean": "2.0.1",
@@ -35,6 +35,7 @@ module.exports = function(opts) {
35
35
  'eo:assemble',
36
36
  '-Deo.version=' + opts.parser,
37
37
  '-Deo.hash=' + (opts.hash ? opts.hash : opts.parser),
38
+ opts.verbose ? '--errors' : '',
38
39
  opts.verbose ? '' : '--quiet',
39
40
  opts.trackOptimizationSteps ? '-Deo.trackOptimizationSteps' : '',
40
41
  `-Deo.targetDir=${path.resolve(opts.target)}`,
@@ -34,6 +34,7 @@ module.exports = function(opts) {
34
34
  const target = path.resolve(opts.target);
35
35
  return mvnw([
36
36
  'compiler:compile',
37
+ opts.verbose ? '--errors' : '',
37
38
  opts.verbose ? '' : '--quiet',
38
39
  `-Dmaven.compiler.source=1.8`,
39
40
  `-Dmaven.compiler.target=1.8`,
@@ -33,6 +33,7 @@ const path = require('path');
33
33
  module.exports = function(opts) {
34
34
  return mvnw([
35
35
  'jar:jar',
36
+ opts.verbose ? '--errors' : '',
36
37
  opts.verbose ? '' : '--quiet',
37
38
  `-Deo.targetDir=${path.resolve(opts.target)}`,
38
39
  '-Deo.version=' + opts.parser,
@@ -35,6 +35,7 @@ module.exports = function(opts) {
35
35
  'eo:parse',
36
36
  '-Deo.version=' + opts.parser,
37
37
  '-Deo.hash=' + (opts.hash ? opts.hash : opts.parser),
38
+ opts.verbose ? '--errors' : '',
38
39
  opts.verbose ? '' : '--quiet',
39
40
  `-Deo.targetDir=${path.resolve(opts.target)}`,
40
41
  `-Deo.outputDir=${path.resolve(opts.target, 'classes')}`,
@@ -35,6 +35,7 @@ module.exports = function(opts) {
35
35
  return mvnw([
36
36
  'eo:register',
37
37
  '-Deo.version=' + opts.parser,
38
+ opts.verbose ? '--errors' : '',
38
39
  opts.verbose ? '' : '--quiet',
39
40
  `-Deo.targetDir=${path.resolve(opts.target)}`,
40
41
  `-Deo.sourcesDir=${path.resolve(opts.sources)}`,
@@ -35,6 +35,7 @@ module.exports = function(opts) {
35
35
  'eo:sodg',
36
36
  '-Deo.version=' + opts.parser,
37
37
  opts.verbose ? '' : '--quiet',
38
+ opts.verbose ? '--errors' : '',
38
39
  `-Deo.targetDir=${path.resolve(opts.target)}`,
39
40
  ];
40
41
  argv.push('-Deo.sodgIncludes=' + opts.include);
@@ -33,6 +33,8 @@ const path = require('path');
33
33
  module.exports = function(opts) {
34
34
  return mvnw([
35
35
  'surefire:test',
36
+ opts.verbose ? '--errors' : '',
37
+ opts.verbose ? '' : '--quiet',
36
38
  '-Deo.version=' + opts.parser,
37
39
  `-Deo.targetDir=${path.resolve(opts.target)}`,
38
40
  ]);
@@ -35,6 +35,7 @@ module.exports = function(opts) {
35
35
  return mvnw([
36
36
  'eo:transpile',
37
37
  '-Deo.version=' + opts.parser,
38
+ opts.verbose ? '--errors' : '',
38
39
  opts.verbose ? '' : '--quiet',
39
40
  `-Deo.targetDir=${path.resolve(opts.target)}`,
40
41
  `-Deo.generatedDir=${sources}`,
package/src/eoc.js CHANGED
@@ -51,8 +51,11 @@ if (process.argv.includes('--latest')) {
51
51
  const version = require('./version');
52
52
  program
53
53
  .name('eoc')
54
- .description('EO command-line toolkit (' + version.what + ' ' + version.when + ')')
55
- .version(version.what);
54
+ .usage('[options] command')
55
+ .summary('EO command line toolkit')
56
+ .description('EO command-line toolkit (' + version.what + ' built on ' + version.when + ')')
57
+ .version(version.what, '-v, --version', 'Output the version number')
58
+ .helpOption('-?, --help', 'Print this help information');
56
59
 
57
60
  program
58
61
  .option('-s, --sources <path>', 'Directory with .EO sources', '.')
package/src/mvnw.js CHANGED
@@ -26,6 +26,7 @@ const path = require('path');
26
26
  const fs = require('fs');
27
27
  const readline = require('readline');
28
28
  const {spawn} = require('child_process');
29
+ const colors = require('colors');
29
30
 
30
31
  /**
31
32
  * The shell to use (depending on operating system).
@@ -123,15 +124,13 @@ function start() {
123
124
  */
124
125
  function stop() {
125
126
  running = false;
126
- process.stdout.write('\n');
127
+ readline.clearLine(process.stdout);
127
128
  }
128
129
 
129
130
  /**
130
131
  * Prints mvnw execution status.
131
132
  */
132
133
  function print() {
133
- readline.clearLine(process.stdout);
134
- readline.cursorTo(process.stdout, 0);
135
134
  const duration = Date.now() - beginning;
136
135
  /**
137
136
  * Recursively calculates number of files under a directory.
@@ -161,7 +160,9 @@ function print() {
161
160
  elapsed = `${Math.ceil(duration / 3600000)}min`;
162
161
  }
163
162
  process.stdout.write(
164
- `\x1b[33m[${phase}] ${elapsed}; ${count(target, 0)} files generated...\x1b[0m`
163
+ colors.yellow(`[${phase}] ${elapsed}; ${count(target, 0)} files generated so far...`)
165
164
  );
165
+ readline.clearLine(process.stdout, 1);
166
+ readline.cursorTo(process.stdout, 0);
166
167
  }
167
168
 
package/src/version.js CHANGED
@@ -25,6 +25,6 @@
25
25
  // The values here are replaced automatically by the .rultor.yml script,
26
26
  // at the "release" pipeline:
27
27
  module.exports = {
28
- what: '0.13.2',
29
- when: '2023-05-31'
28
+ what: '0.13.4',
29
+ when: '2023-06-03'
30
30
  };
package/CITATION.cff DELETED
@@ -1,11 +0,0 @@
1
- cff-version: 1.2.0
2
- message: "If you use this software, please cite it as below."
3
- authors:
4
- - family-names: "Bugayenko"
5
- given-names: "Yegor"
6
- orcid: "https://orcid.org/0000-0001-6370-0678"
7
- title: "EOLANG and 𝜑-calculus"
8
- version: 0.23.0
9
- doi: 10.48550/arXiv.2111.13384
10
- date-released: 2022-05-09
11
- url: "https://github.com/objectionary/eoc"
package/itest/README.md DELETED
@@ -1,16 +0,0 @@
1
- [![grunt](https://github.com/objectionary/eoc/actions/workflows/itest.yml/badge.svg)](https://github.com/objectionary/eoc/actions/workflows/itest.yml)
2
-
3
- There is a simple integration test here. Just run this to make sure
4
- it works:
5
-
6
- ```
7
- $ ../src/eoc.js dataize program
8
- ```
9
-
10
- Then, you can execute the unit tests too:
11
-
12
- ```
13
- $ ../src/eoc.js test
14
- ```
15
-
16
- If doesn't work, submit an issue.
package/itest/program.eo DELETED
@@ -1,27 +0,0 @@
1
- # The MIT License (MIT)
2
- #
3
- # Copyright (c) 2022-2023 Objectionary.com
4
- #
5
- # Permission is hereby granted, free of charge, to any person obtaining a copy
6
- # of this software and associated documentation files (the "Software"), to deal
7
- # in the Software without restriction, including without limitation the rights
8
- # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
- # copies of the Software, and to permit persons to whom the Software is
10
- # furnished to do so, subject to the following conditions:
11
- #
12
- # The above copyright notice and this permission notice shall be included
13
- # in all copies or substantial portions of the Software.
14
- #
15
- # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
- # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
- # FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL THE
18
- # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
- # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
- # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
- # SOFTWARE.
22
-
23
- +alias story
24
-
25
- [args...] > program
26
- QQ.io.stdout > @
27
- story
@@ -1,31 +0,0 @@
1
- # The MIT License (MIT)
2
- #
3
- # Copyright (c) 2022-2023 Objectionary.com
4
- #
5
- # Permission is hereby granted, free of charge, to any person obtaining a copy
6
- # of this software and associated documentation files (the "Software"), to deal
7
- # in the Software without restriction, including without limitation the rights
8
- # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
- # copies of the Software, and to permit persons to whom the Software is
10
- # furnished to do so, subject to the following conditions:
11
- #
12
- # The above copyright notice and this permission notice shall be included
13
- # in all copies or substantial portions of the Software.
14
- #
15
- # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
- # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
- # FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL THE
18
- # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
- # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
- # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
- # SOFTWARE.
22
-
23
- +junit
24
- +alias org.eolang.hamcrest.assert-that
25
- +alias story
26
-
27
- [] > story-is-long-enough
28
- assert-that > @
29
- story.length
30
- $.is
31
- $.greater-than 1
package/itest/story.eo DELETED
@@ -1,30 +0,0 @@
1
- # The MIT License (MIT)
2
- #
3
- # Copyright (c) 2022-2023 Objectionary.com
4
- #
5
- # Permission is hereby granted, free of charge, to any person obtaining a copy
6
- # of this software and associated documentation files (the "Software"), to deal
7
- # in the Software without restriction, including without limitation the rights
8
- # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
- # copies of the Software, and to permit persons to whom the Software is
10
- # furnished to do so, subject to the following conditions:
11
- #
12
- # The above copyright notice and this permission notice shall be included
13
- # in all copies or substantial portions of the Software.
14
- #
15
- # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
- # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
- # FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL THE
18
- # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
- # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
- # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
- # SOFTWARE.
22
-
23
- [] > story
24
- QQ.txt.sprintf > @
25
- "Hello, Mr. #%d!\n"
26
- as-int.
27
- QQ.math.number
28
- times.
29
- QQ.math.random.pseudo
30
- 100.0