eolang 0.23.0 → 0.25.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/.yamllint.yml +31 -0
- package/README.md +1 -1
- package/eo-version.txt +1 -1
- package/home-tag.txt +1 -1
- package/mvnw/pom.xml +2 -2
- package/package.json +4 -4
- package/src/commands/assemble.js +0 -1
- package/src/commands/clean.js +1 -1
- package/src/commands/{verify.js → lint.js} +13 -5
- package/src/eo2jsw.js +24 -0
- package/src/eoc.js +10 -10
- package/src/version.js +2 -2
package/.yamllint.yml
ADDED
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
# The MIT License (MIT)
|
|
2
|
+
#
|
|
3
|
+
# Copyright (c) 2022-2024 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
|
+
extends: default
|
|
24
|
+
rules:
|
|
25
|
+
line-length: disable
|
|
26
|
+
brackets:
|
|
27
|
+
min-spaces-inside: 1
|
|
28
|
+
max-spaces-inside: 2
|
|
29
|
+
truthy:
|
|
30
|
+
level: warning
|
|
31
|
+
allowed-values: [ 'on', 'true', 'false', 'yes', 'no' ]
|
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
|
|
17
|
+
npm install -g eolang@0.24.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.
|
|
1
|
+
0.46.0
|
package/home-tag.txt
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
0.46.0
|
package/mvnw/pom.xml
CHANGED
|
@@ -29,7 +29,7 @@ SOFTWARE.
|
|
|
29
29
|
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
|
30
30
|
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
|
|
31
31
|
<eo.version>undefined</eo.version>
|
|
32
|
-
<jeo.version>0.6.
|
|
32
|
+
<jeo.version>0.6.22</jeo.version>
|
|
33
33
|
</properties>
|
|
34
34
|
<dependencies>
|
|
35
35
|
<dependency>
|
|
@@ -96,7 +96,7 @@ SOFTWARE.
|
|
|
96
96
|
</plugin>
|
|
97
97
|
<plugin>
|
|
98
98
|
<artifactId>maven-surefire-plugin</artifactId>
|
|
99
|
-
<version>3.5.
|
|
99
|
+
<version>3.5.2</version>
|
|
100
100
|
<configuration>
|
|
101
101
|
<failIfNoTests>true</failIfNoTests>
|
|
102
102
|
</configuration>
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "eolang",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.25.0",
|
|
4
4
|
"author": "Yegor Bugayenko <yegor256@gmail.com> (https://www.yegor256.com/)",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": "objectionary/eoc",
|
|
@@ -34,20 +34,20 @@
|
|
|
34
34
|
"commander": "12.1.0",
|
|
35
35
|
"eo2js": "0.0.7",
|
|
36
36
|
"fast-xml-parser": "4.5.0",
|
|
37
|
-
"node": "23.
|
|
37
|
+
"node": "23.2.0",
|
|
38
38
|
"relative": "3.0.2",
|
|
39
39
|
"semver": "7.6.3",
|
|
40
40
|
"sync-request": "6.1.0",
|
|
41
41
|
"xmlhttprequest": "1.8.0"
|
|
42
42
|
},
|
|
43
43
|
"devDependencies": {
|
|
44
|
-
"eslint": "9.
|
|
44
|
+
"eslint": "9.14.0",
|
|
45
45
|
"eslint-config-google": "0.14.0",
|
|
46
46
|
"grunt": "1.6.1",
|
|
47
47
|
"grunt-contrib-clean": "2.0.1",
|
|
48
48
|
"grunt-eslint": "24.3.0",
|
|
49
49
|
"grunt-mocha-cli": "^7.0.0",
|
|
50
|
-
"mocha": "^10.8.
|
|
50
|
+
"mocha": "^10.8.2"
|
|
51
51
|
},
|
|
52
52
|
"scripts": {
|
|
53
53
|
"test": "mocha --timeout 1200000"
|
package/src/commands/assemble.js
CHANGED
|
@@ -33,7 +33,6 @@ const {mvnw, flags} = require('../mvnw');
|
|
|
33
33
|
*/
|
|
34
34
|
module.exports = function(opts) {
|
|
35
35
|
const target = path.resolve(opts.target);
|
|
36
|
-
console.info('Assembling into %s', rel(target));
|
|
37
36
|
return mvnw(['eo:assemble'].concat(flags(opts)), opts.target, opts.batch).then((r) => {
|
|
38
37
|
console.info('EO program assembled in %s', rel(target));
|
|
39
38
|
return r;
|
package/src/commands/clean.js
CHANGED
|
@@ -33,8 +33,8 @@ const os = require('os');
|
|
|
33
33
|
*/
|
|
34
34
|
module.exports = function(opts) {
|
|
35
35
|
const home = path.resolve(opts.target);
|
|
36
|
-
fs.rmSync(home, {recursive: true, force: true});
|
|
37
36
|
if (fs.existsSync(home)) {
|
|
37
|
+
fs.rmSync(home, {recursive: true, force: true});
|
|
38
38
|
console.info('The directory %s deleted', rel(home));
|
|
39
39
|
} else {
|
|
40
40
|
console.info('The directory %s doesn\'t exist, no need to delete', rel(home));
|
|
@@ -25,15 +25,23 @@
|
|
|
25
25
|
const rel = require('relative');
|
|
26
26
|
const path = require('path');
|
|
27
27
|
const {mvnw, flags} = require('../mvnw');
|
|
28
|
+
const semver = require('semver');
|
|
28
29
|
|
|
29
30
|
/**
|
|
30
|
-
* Command to
|
|
31
|
+
* Command to lint .XMIR files.
|
|
31
32
|
* @param {Hash} opts - All options
|
|
32
33
|
* @return {Promise} of assemble task
|
|
33
34
|
*/
|
|
34
35
|
module.exports = function(opts) {
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
36
|
+
if (semver.gte(opts.parser, '0.45.0')) {
|
|
37
|
+
return mvnw(['eo:lint'].concat(flags(opts)), opts.target, opts.batch).then((r) => {
|
|
38
|
+
console.info('EO program linted in %s', rel(path.resolve(opts.target)));
|
|
39
|
+
return r;
|
|
40
|
+
});
|
|
41
|
+
} else {
|
|
42
|
+
return mvnw(['eo:verify'].concat(flags(opts)), opts.target, opts.batch).then((r) => {
|
|
43
|
+
console.info('EO program verified in %s', rel(path.resolve(opts.target)));
|
|
44
|
+
return r;
|
|
45
|
+
});
|
|
46
|
+
}
|
|
39
47
|
};
|
package/src/eo2jsw.js
CHANGED
|
@@ -1,3 +1,27 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* The MIT License (MIT)
|
|
3
|
+
*
|
|
4
|
+
* Copyright (c) 2022-2024 Objectionary.com
|
|
5
|
+
*
|
|
6
|
+
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
7
|
+
* of this software and associated documentation files (the "Software"), to deal
|
|
8
|
+
* in the Software without restriction, including without limitation the rights
|
|
9
|
+
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
10
|
+
* copies of the Software, and to permit persons to whom the Software is
|
|
11
|
+
* furnished to do so, subject to the following conditions:
|
|
12
|
+
*
|
|
13
|
+
* The above copyright notice and this permission notice shall be included
|
|
14
|
+
* in all copies or substantial portions of the Software.
|
|
15
|
+
*
|
|
16
|
+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
17
|
+
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
18
|
+
* FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL THE
|
|
19
|
+
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
20
|
+
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
21
|
+
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
22
|
+
* SOFTWARE.
|
|
23
|
+
*/
|
|
24
|
+
|
|
1
25
|
const path = require('path');
|
|
2
26
|
const {execSync} = require('child_process');
|
|
3
27
|
|
package/src/eoc.js
CHANGED
|
@@ -48,7 +48,7 @@ const common = {
|
|
|
48
48
|
register: require('./commands/register'),
|
|
49
49
|
sodg: require('./commands/sodg'),
|
|
50
50
|
unphi: require('./commands/unphi'),
|
|
51
|
-
|
|
51
|
+
lint: require('./commands/lint'),
|
|
52
52
|
jeo_disassemble: require('./commands/jeo/disassemble'),
|
|
53
53
|
jeo_assemble: require('./commands/jeo/assemble')
|
|
54
54
|
};
|
|
@@ -249,16 +249,16 @@ program.command('print')
|
|
|
249
249
|
coms().print({...program.opts(), ...str});
|
|
250
250
|
});
|
|
251
251
|
|
|
252
|
-
program.command('
|
|
253
|
-
.description('
|
|
252
|
+
program.command('lint')
|
|
253
|
+
.description('Lint XMIR files and fail if any issues inside')
|
|
254
254
|
.action((str, opts) => {
|
|
255
255
|
clear(str);
|
|
256
256
|
if (program.opts().alone == undefined) {
|
|
257
257
|
coms().register(program.opts())
|
|
258
258
|
.then((r) => coms().assemble(program.opts()))
|
|
259
|
-
.then((r) => coms().
|
|
259
|
+
.then((r) => coms().lint(program.opts()));
|
|
260
260
|
} else {
|
|
261
|
-
coms().
|
|
261
|
+
coms().lint(program.opts());
|
|
262
262
|
}
|
|
263
263
|
});
|
|
264
264
|
|
|
@@ -269,7 +269,7 @@ program.command('transpile')
|
|
|
269
269
|
if (program.opts().alone == undefined) {
|
|
270
270
|
coms().register(program.opts())
|
|
271
271
|
.then((r) => coms().assemble(program.opts()))
|
|
272
|
-
.then((r) => coms().
|
|
272
|
+
.then((r) => coms().lint(program.opts()))
|
|
273
273
|
.then((r) => coms().transpile(program.opts()));
|
|
274
274
|
} else {
|
|
275
275
|
coms().transpile(program.opts());
|
|
@@ -283,7 +283,7 @@ program.command('compile')
|
|
|
283
283
|
if (program.opts().alone == undefined) {
|
|
284
284
|
coms().register(program.opts())
|
|
285
285
|
.then((r) => coms().assemble(program.opts()))
|
|
286
|
-
.then((r) => coms().
|
|
286
|
+
.then((r) => coms().lint(program.opts()))
|
|
287
287
|
.then((r) => coms().transpile(program.opts()))
|
|
288
288
|
.then((r) => coms().compile(program.opts()));
|
|
289
289
|
} else {
|
|
@@ -298,7 +298,7 @@ program.command('link')
|
|
|
298
298
|
if (program.opts().alone == undefined) {
|
|
299
299
|
coms().register(program.opts())
|
|
300
300
|
.then((r) => coms().assemble(program.opts()))
|
|
301
|
-
.then((r) => coms().
|
|
301
|
+
.then((r) => coms().lint(program.opts()))
|
|
302
302
|
.then((r) => coms().transpile(program.opts()))
|
|
303
303
|
.then((r) => coms().compile(program.opts()))
|
|
304
304
|
.then((r) => coms().link(program.opts()));
|
|
@@ -316,7 +316,7 @@ program.command('dataize')
|
|
|
316
316
|
if (program.opts().alone == undefined) {
|
|
317
317
|
coms().register(program.opts())
|
|
318
318
|
.then((r) => coms().assemble(program.opts()))
|
|
319
|
-
.then((r) => coms().
|
|
319
|
+
.then((r) => coms().lint(program.opts()))
|
|
320
320
|
.then((r) => coms().transpile(program.opts()))
|
|
321
321
|
.then((r) => coms().compile(program.opts()))
|
|
322
322
|
.then((r) => coms().link(program.opts()))
|
|
@@ -337,7 +337,7 @@ program.command('test')
|
|
|
337
337
|
if (program.opts().alone == undefined) {
|
|
338
338
|
coms().register(program.opts())
|
|
339
339
|
.then((r) => coms().assemble(program.opts()))
|
|
340
|
-
.then((r) => coms().
|
|
340
|
+
.then((r) => coms().lint(program.opts()))
|
|
341
341
|
.then((r) => coms().transpile(program.opts()))
|
|
342
342
|
.then((r) => coms().compile(program.opts()))
|
|
343
343
|
.then((r) => coms().link(program.opts()))
|
package/src/version.js
CHANGED