eolang 0.26.0 → 0.27.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.
- package/README.md +1 -1
- package/eo-version.txt +1 -1
- package/home-tag.txt +1 -1
- package/mvnw/pom.xml +2 -0
- package/package.json +1 -1
- package/src/commands/lint.js +11 -2
- package/src/eoc.js +5 -5
- package/src/mvnw.js +2 -2
- package/src/version.js +2 -2
package/README.md
CHANGED
|
@@ -14,7 +14,7 @@ First, you install [npm][npm-install] and [Java SE][java-se].
|
|
|
14
14
|
Then, you install [eolang][npm] package:
|
|
15
15
|
|
|
16
16
|
```bash
|
|
17
|
-
npm install -g eolang@0.
|
|
17
|
+
npm install -g eolang@0.26.0
|
|
18
18
|
```
|
|
19
19
|
|
|
20
20
|
Then, you write a simple [EO](https://www.eolang.org) program in `hello.eo` file
|
package/eo-version.txt
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
0.48.
|
|
1
|
+
0.48.2
|
package/home-tag.txt
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
0.48.
|
|
1
|
+
0.48.2
|
package/mvnw/pom.xml
CHANGED
package/package.json
CHANGED
package/src/commands/lint.js
CHANGED
|
@@ -33,13 +33,22 @@ const semver = require('semver');
|
|
|
33
33
|
* @return {Promise} of assemble task
|
|
34
34
|
*/
|
|
35
35
|
module.exports = function(opts) {
|
|
36
|
+
const extra = [
|
|
37
|
+
`-Deo.failOnWarning=${opts.easy ? 'false' : 'true'}`,
|
|
38
|
+
];
|
|
36
39
|
if (semver.gte(opts.parser, '0.45.0')) {
|
|
37
|
-
return mvnw(
|
|
40
|
+
return mvnw(
|
|
41
|
+
['eo:lint'].concat(flags(opts)).concat(extra),
|
|
42
|
+
opts.target, opts.batch
|
|
43
|
+
).then((r) => {
|
|
38
44
|
console.info('EO program linted in %s', rel(path.resolve(opts.target)));
|
|
39
45
|
return r;
|
|
40
46
|
});
|
|
41
47
|
} else {
|
|
42
|
-
return mvnw(
|
|
48
|
+
return mvnw(
|
|
49
|
+
['eo:verify'].concat(flags(opts)).concat(extra),
|
|
50
|
+
opts.target, opts.batch
|
|
51
|
+
).then((r) => {
|
|
43
52
|
console.info('EO program verified in %s', rel(path.resolve(opts.target)));
|
|
44
53
|
return r;
|
|
45
54
|
});
|
package/src/eoc.js
CHANGED
|
@@ -91,7 +91,7 @@ if (process.argv.includes('--latest')) {
|
|
|
91
91
|
// latest hash of the objectionary/home repository, and then
|
|
92
92
|
// set it to the "hash" variable?
|
|
93
93
|
} else {
|
|
94
|
-
console.debug(
|
|
94
|
+
console.debug(`EO parser ${parser}; use the --latest flag if you need a freshier one`);
|
|
95
95
|
}
|
|
96
96
|
|
|
97
97
|
const version = require('./version');
|
|
@@ -100,17 +100,17 @@ program
|
|
|
100
100
|
.usage('[options] command')
|
|
101
101
|
.summary('EO command line toolkit')
|
|
102
102
|
.description(
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
'): https://github.com/objectionary/eoc'
|
|
103
|
+
`EO command-line toolkit (${version.what}) ` +
|
|
104
|
+
`built on ${version.when}): https://github.com/objectionary/eoc`
|
|
106
105
|
)
|
|
107
|
-
.version(version.what, '-v, --version',
|
|
106
|
+
.version(version.what, '-v, --version', `Just print the number of the version (${version.what})`)
|
|
108
107
|
.helpOption('-?, --help', 'Print this help information')
|
|
109
108
|
.configureHelp({sortOptions: true, sortSubcommands: true});
|
|
110
109
|
|
|
111
110
|
program
|
|
112
111
|
.option('-s, --sources <path>', 'Directory with .EO sources', '.')
|
|
113
112
|
.option('-t, --target <path>', 'Directory with all generated files', '.eoc')
|
|
113
|
+
.option('--easy', 'Ignore "warnings" and only fail if there are "errorst" or "criticals"')
|
|
114
114
|
.option('--home-tag <version>', 'Git tag in objectionary/home to compile against', tag)
|
|
115
115
|
.option('--parser <version>', 'Set the version of EO parser to use', parser)
|
|
116
116
|
.option('--latest', 'Use the latest parser version from Maven Central')
|
package/src/mvnw.js
CHANGED
|
@@ -55,8 +55,8 @@ module.exports.flags = function(opts) {
|
|
|
55
55
|
const target = path.resolve(opts.target);
|
|
56
56
|
console.debug('Target in %s', rel(target));
|
|
57
57
|
return [
|
|
58
|
-
|
|
59
|
-
|
|
58
|
+
`-Deo.version=${opts.parser}`,
|
|
59
|
+
`-Deo.tag=${opts.homeTag ? opts.homeTag : opts.parser}`,
|
|
60
60
|
opts.verbose ? '--errors' : '',
|
|
61
61
|
opts.verbose ? '' : '--quiet',
|
|
62
62
|
opts.debug ? '--debug' : '',
|
package/src/version.js
CHANGED