eolang 0.15.0 → 0.16.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/eo-version.txt +1 -1
- package/mvnw/pom.xml +3 -3
- package/package.json +6 -5
- package/src/commands/assemble.js +4 -1
- package/src/commands/clean.js +4 -3
- package/src/commands/compile.js +2 -1
- package/src/commands/foreign.js +2 -1
- package/src/commands/link.js +3 -1
- package/src/commands/parse.js +3 -1
- package/src/commands/phi.js +9 -3
- package/src/commands/print.js +4 -3
- package/src/commands/register.js +2 -1
- package/src/commands/sodg.js +2 -1
- package/src/commands/transpile.js +2 -1
- package/src/commands/unphi.js +4 -3
- package/src/commands/verify.js +2 -1
- package/src/eoc.js +1 -1
- package/src/mvnw.js +7 -2
- package/src/version.js +2 -2
package/eo-version.txt
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
0.
|
|
1
|
+
0.35.1
|
package/mvnw/pom.xml
CHANGED
|
@@ -39,12 +39,12 @@ SOFTWARE.
|
|
|
39
39
|
<dependency>
|
|
40
40
|
<groupId>org.junit.jupiter</groupId>
|
|
41
41
|
<artifactId>junit-jupiter-api</artifactId>
|
|
42
|
-
<version>5.10.
|
|
42
|
+
<version>5.10.2</version>
|
|
43
43
|
</dependency>
|
|
44
44
|
<dependency>
|
|
45
45
|
<groupId>org.junit.jupiter</groupId>
|
|
46
46
|
<artifactId>junit-jupiter-engine</artifactId>
|
|
47
|
-
<version>5.10.
|
|
47
|
+
<version>5.10.2</version>
|
|
48
48
|
</dependency>
|
|
49
49
|
</dependencies>
|
|
50
50
|
<build>
|
|
@@ -87,7 +87,7 @@ SOFTWARE.
|
|
|
87
87
|
</plugin>
|
|
88
88
|
<plugin>
|
|
89
89
|
<artifactId>maven-surefire-plugin</artifactId>
|
|
90
|
-
<version>3.2.
|
|
90
|
+
<version>3.2.5</version>
|
|
91
91
|
<configuration>
|
|
92
92
|
<failIfNoTests>true</failIfNoTests>
|
|
93
93
|
</configuration>
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "eolang",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.16.0",
|
|
4
4
|
"author": "Yegor Bugayenko <yegor256@gmail.com> (https://www.yegor256.com/)",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": "objectionary/eoc",
|
|
@@ -31,9 +31,10 @@
|
|
|
31
31
|
],
|
|
32
32
|
"dependencies": {
|
|
33
33
|
"colors": "1.4.0",
|
|
34
|
-
"commander": "
|
|
35
|
-
"fast-xml-parser": "4.3.
|
|
36
|
-
"node": "21.
|
|
34
|
+
"commander": "12.0.0",
|
|
35
|
+
"fast-xml-parser": "4.3.4",
|
|
36
|
+
"node": "21.6.1",
|
|
37
|
+
"relative": "3.0.2",
|
|
37
38
|
"sync-request": "6.1.0",
|
|
38
39
|
"xmlhttprequest": "1.8.0"
|
|
39
40
|
},
|
|
@@ -44,7 +45,7 @@
|
|
|
44
45
|
"grunt-contrib-clean": "2.0.1",
|
|
45
46
|
"grunt-eslint": "24.3.0",
|
|
46
47
|
"grunt-mocha-cli": "^7.0.0",
|
|
47
|
-
"mocha": "^10.
|
|
48
|
+
"mocha": "^10.3.0"
|
|
48
49
|
},
|
|
49
50
|
"scripts": {
|
|
50
51
|
"test": "mocha --timeout 1200000"
|
package/src/commands/assemble.js
CHANGED
|
@@ -22,6 +22,7 @@
|
|
|
22
22
|
* SOFTWARE.
|
|
23
23
|
*/
|
|
24
24
|
|
|
25
|
+
const rel = require('relative');
|
|
25
26
|
const path = require('path');
|
|
26
27
|
const {mvnw, flags} = require('../mvnw');
|
|
27
28
|
|
|
@@ -31,8 +32,10 @@ const {mvnw, flags} = require('../mvnw');
|
|
|
31
32
|
* @return {Promise} of assemble task
|
|
32
33
|
*/
|
|
33
34
|
module.exports = function(opts) {
|
|
35
|
+
const target = path.resolve(opts.target);
|
|
36
|
+
console.info('Assembling into %s', rel(target));
|
|
34
37
|
return mvnw(['eo:assemble'].concat(flags(opts)), opts.target, opts.batch).then((r) => {
|
|
35
|
-
console.info('EO program assembled in %s',
|
|
38
|
+
console.info('EO program assembled in %s', rel(target));
|
|
36
39
|
return r;
|
|
37
40
|
});
|
|
38
41
|
};
|
package/src/commands/clean.js
CHANGED
|
@@ -22,6 +22,7 @@
|
|
|
22
22
|
* SOFTWARE.
|
|
23
23
|
*/
|
|
24
24
|
|
|
25
|
+
const rel = require('relative');
|
|
25
26
|
const fs = require('fs');
|
|
26
27
|
const path = require('path');
|
|
27
28
|
const os = require('os');
|
|
@@ -33,12 +34,12 @@ const os = require('os');
|
|
|
33
34
|
module.exports = function(opts) {
|
|
34
35
|
const home = path.resolve(opts.target);
|
|
35
36
|
fs.rmSync(home, {recursive: true, force: true});
|
|
36
|
-
console.info('The directory %s deleted', home);
|
|
37
|
-
if (opts.
|
|
37
|
+
console.info('The directory %s deleted', rel(home));
|
|
38
|
+
if (opts.global) {
|
|
38
39
|
const eo = path.join(os.homedir(), '.eo');
|
|
39
40
|
if (fs.existsSync(eo)) {
|
|
40
41
|
fs.rmSync(eo, {recursive: true});
|
|
41
|
-
console.info('The directory
|
|
42
|
+
console.info('The directory %s was deleted', eo);
|
|
42
43
|
}
|
|
43
44
|
}
|
|
44
45
|
};
|
package/src/commands/compile.js
CHANGED
|
@@ -22,6 +22,7 @@
|
|
|
22
22
|
* SOFTWARE.
|
|
23
23
|
*/
|
|
24
24
|
|
|
25
|
+
const rel = require('relative');
|
|
25
26
|
const {mvnw, flags} = require('../mvnw');
|
|
26
27
|
const path = require('path');
|
|
27
28
|
|
|
@@ -33,7 +34,7 @@ const path = require('path');
|
|
|
33
34
|
module.exports = function(opts) {
|
|
34
35
|
const target = path.resolve(opts.target);
|
|
35
36
|
return mvnw(['compiler:compile'].concat(flags(opts)), opts.target, opts.batch).then((r) => {
|
|
36
|
-
console.info('Java .class files compiled into %s', target);
|
|
37
|
+
console.info('Java .class files compiled into %s', rel(target));
|
|
37
38
|
return r;
|
|
38
39
|
});
|
|
39
40
|
};
|
package/src/commands/foreign.js
CHANGED
|
@@ -22,6 +22,7 @@
|
|
|
22
22
|
* SOFTWARE.
|
|
23
23
|
*/
|
|
24
24
|
|
|
25
|
+
const rel = require('relative');
|
|
25
26
|
const path = require('path');
|
|
26
27
|
const fs = require('fs');
|
|
27
28
|
|
|
@@ -32,7 +33,7 @@ const fs = require('fs');
|
|
|
32
33
|
module.exports = function(opts) {
|
|
33
34
|
const file = path.resolve(opts.target, 'eo-foreign.json');
|
|
34
35
|
const all = JSON.parse(fs.readFileSync(file, 'utf8'));
|
|
35
|
-
console.info('There are %d objects in %s:', all.length, file);
|
|
36
|
+
console.info('There are %d objects in %s:', all.length, rel(file));
|
|
36
37
|
all.forEach((obj) => {
|
|
37
38
|
console.info(' %s', obj['id']);
|
|
38
39
|
});
|
package/src/commands/link.js
CHANGED
|
@@ -22,6 +22,7 @@
|
|
|
22
22
|
* SOFTWARE.
|
|
23
23
|
*/
|
|
24
24
|
|
|
25
|
+
const rel = require('relative');
|
|
25
26
|
const {mvnw, flags} = require('../mvnw');
|
|
26
27
|
const path = require('path');
|
|
27
28
|
|
|
@@ -31,8 +32,9 @@ const path = require('path');
|
|
|
31
32
|
* @return {Promise} of link task
|
|
32
33
|
*/
|
|
33
34
|
module.exports = function(opts) {
|
|
35
|
+
const jar = path.resolve(opts.target, 'eoc.jar');
|
|
34
36
|
return mvnw(['jar:jar'].concat(flags(opts)), opts.target, opts.batch).then((r) => {
|
|
35
|
-
console.info('Executable JAR created at %s',
|
|
37
|
+
console.info('Executable JAR created at %s', rel(jar));
|
|
36
38
|
return r;
|
|
37
39
|
});
|
|
38
40
|
};
|
package/src/commands/parse.js
CHANGED
|
@@ -22,6 +22,7 @@
|
|
|
22
22
|
* SOFTWARE.
|
|
23
23
|
*/
|
|
24
24
|
|
|
25
|
+
const rel = require('relative');
|
|
25
26
|
const path = require('path');
|
|
26
27
|
const {mvnw, flags} = require('../mvnw');
|
|
27
28
|
|
|
@@ -31,8 +32,9 @@ const {mvnw, flags} = require('../mvnw');
|
|
|
31
32
|
* @return {Promise} of assemble task
|
|
32
33
|
*/
|
|
33
34
|
module.exports = function(opts) {
|
|
35
|
+
const target = path.resolve(opts.target);
|
|
34
36
|
return mvnw(['eo:parse'].concat(flags(opts)), opts.target, opts.batch).then((r) => {
|
|
35
|
-
console.info('EO sources parsed in %s',
|
|
37
|
+
console.info('EO sources parsed in %s', rel(target));
|
|
36
38
|
return r;
|
|
37
39
|
});
|
|
38
40
|
};
|
package/src/commands/phi.js
CHANGED
|
@@ -22,6 +22,7 @@
|
|
|
22
22
|
* SOFTWARE.
|
|
23
23
|
*/
|
|
24
24
|
|
|
25
|
+
const rel = require('relative');
|
|
25
26
|
const path = require('path');
|
|
26
27
|
const {mvnw, flags} = require('../mvnw');
|
|
27
28
|
|
|
@@ -31,18 +32,23 @@ const {mvnw, flags} = require('../mvnw');
|
|
|
31
32
|
* @return {Promise} of assemble task
|
|
32
33
|
*/
|
|
33
34
|
module.exports = function(opts) {
|
|
35
|
+
const target = path.resolve(opts.target);
|
|
36
|
+
const input = path.resolve(opts.target, '2-optimize');
|
|
37
|
+
console.debug('Reading .XMIR files from %s', rel(input));
|
|
38
|
+
const output = path.resolve(opts.target, 'phi');
|
|
39
|
+
console.debug('Writing .PHI files to %s', rel(output));
|
|
34
40
|
return mvnw(
|
|
35
41
|
['eo:xmir-to-phi']
|
|
36
42
|
.concat(flags(opts))
|
|
37
43
|
.concat(
|
|
38
44
|
[
|
|
39
|
-
`-DphiInputDir=${
|
|
40
|
-
`-DphiOutputDir=${
|
|
45
|
+
`-DphiInputDir=${input}`,
|
|
46
|
+
`-DphiOutputDir=${output}`,
|
|
41
47
|
]
|
|
42
48
|
),
|
|
43
49
|
opts.target, opts.batch
|
|
44
50
|
).then((r) => {
|
|
45
|
-
console.info('XMIR files converted into PHI files at %s',
|
|
51
|
+
console.info('XMIR files converted into PHI files at %s', rel(target));
|
|
46
52
|
return r;
|
|
47
53
|
});
|
|
48
54
|
};
|
package/src/commands/print.js
CHANGED
|
@@ -22,6 +22,7 @@
|
|
|
22
22
|
* SOFTWARE.
|
|
23
23
|
*/
|
|
24
24
|
|
|
25
|
+
const rel = require('relative');
|
|
25
26
|
const path = require('path');
|
|
26
27
|
const {mvnw, flags} = require('../mvnw');
|
|
27
28
|
|
|
@@ -32,9 +33,9 @@ const {mvnw, flags} = require('../mvnw');
|
|
|
32
33
|
*/
|
|
33
34
|
module.exports = function(opts) {
|
|
34
35
|
const input = path.resolve(opts.target, '2-optimize');
|
|
35
|
-
console.debug('Reading from %s', input);
|
|
36
|
+
console.debug('Reading from %s', rel(input));
|
|
36
37
|
const output = path.resolve(opts.target, 'print');
|
|
37
|
-
console.debug('Writing into %s', output);
|
|
38
|
+
console.debug('Writing into %s', rel(output));
|
|
38
39
|
return mvnw(
|
|
39
40
|
['eo:print']
|
|
40
41
|
.concat(flags(opts))
|
|
@@ -46,7 +47,7 @@ module.exports = function(opts) {
|
|
|
46
47
|
),
|
|
47
48
|
opts.target, opts.batch
|
|
48
49
|
).then((r) => {
|
|
49
|
-
console.info('XMIR files converted into EO files at %s', output);
|
|
50
|
+
console.info('XMIR files converted into EO files at %s', rel(output));
|
|
50
51
|
return r;
|
|
51
52
|
});
|
|
52
53
|
};
|
package/src/commands/register.js
CHANGED
|
@@ -22,6 +22,7 @@
|
|
|
22
22
|
* SOFTWARE.
|
|
23
23
|
*/
|
|
24
24
|
|
|
25
|
+
const rel = require('relative');
|
|
25
26
|
const {mvnw, flags} = require('../mvnw');
|
|
26
27
|
const path = require('path');
|
|
27
28
|
|
|
@@ -33,7 +34,7 @@ const path = require('path');
|
|
|
33
34
|
module.exports = function(opts) {
|
|
34
35
|
const foreign = path.resolve(opts.target, 'eo-foreign.json');
|
|
35
36
|
return mvnw(['eo:register'].concat(flags(opts)), opts.target, opts.batch).then((r) => {
|
|
36
|
-
console.info('EO objects registered in %s', foreign);
|
|
37
|
+
console.info('EO objects registered in %s', rel(foreign));
|
|
37
38
|
return r;
|
|
38
39
|
});
|
|
39
40
|
};
|
package/src/commands/sodg.js
CHANGED
|
@@ -22,6 +22,7 @@
|
|
|
22
22
|
* SOFTWARE.
|
|
23
23
|
*/
|
|
24
24
|
|
|
25
|
+
const rel = require('relative');
|
|
25
26
|
const path = require('path');
|
|
26
27
|
const {mvnw, flags} = require('../mvnw');
|
|
27
28
|
|
|
@@ -55,7 +56,7 @@ module.exports = function(opts) {
|
|
|
55
56
|
argv.push('-Deo.generateDotFiles');
|
|
56
57
|
}
|
|
57
58
|
return mvnw(argv, opts.target, opts.batch).then((r) => {
|
|
58
|
-
console.info('SODG files generated in %s', path.resolve(opts.target));
|
|
59
|
+
console.info('SODG files generated in %s', rel(path.resolve(opts.target)));
|
|
59
60
|
return r;
|
|
60
61
|
});
|
|
61
62
|
};
|
|
@@ -22,6 +22,7 @@
|
|
|
22
22
|
* SOFTWARE.
|
|
23
23
|
*/
|
|
24
24
|
|
|
25
|
+
const rel = require('relative');
|
|
25
26
|
const {mvnw, flags} = require('../mvnw');
|
|
26
27
|
const path = require('path');
|
|
27
28
|
|
|
@@ -33,7 +34,7 @@ const path = require('path');
|
|
|
33
34
|
module.exports = function(opts) {
|
|
34
35
|
const sources = path.resolve(opts.target, 'generated-sources');
|
|
35
36
|
return mvnw(['eo:transpile'].concat(flags(opts)), opts.target, opts.batch).then((r) => {
|
|
36
|
-
console.info('Java sources generated in %s', sources);
|
|
37
|
+
console.info('Java sources generated in %s', rel(sources));
|
|
37
38
|
return r;
|
|
38
39
|
});
|
|
39
40
|
};
|
package/src/commands/unphi.js
CHANGED
|
@@ -22,6 +22,7 @@
|
|
|
22
22
|
* SOFTWARE.
|
|
23
23
|
*/
|
|
24
24
|
|
|
25
|
+
const rel = require('relative');
|
|
25
26
|
const path = require('path');
|
|
26
27
|
const {mvnw, flags} = require('../mvnw');
|
|
27
28
|
|
|
@@ -32,9 +33,9 @@ const {mvnw, flags} = require('../mvnw');
|
|
|
32
33
|
*/
|
|
33
34
|
module.exports = function(opts) {
|
|
34
35
|
const input = path.resolve(opts.target, 'phi');
|
|
35
|
-
console.debug('Reading from %s', input);
|
|
36
|
+
console.debug('Reading .PHI files from %s', rel(input));
|
|
36
37
|
const output = path.resolve(opts.target, 'unphi');
|
|
37
|
-
console.debug('Writing
|
|
38
|
+
console.debug('Writing .XMIR files to %s', rel(output));
|
|
38
39
|
return mvnw(
|
|
39
40
|
['eo:phi-to-xmir']
|
|
40
41
|
.concat(flags(opts))
|
|
@@ -46,7 +47,7 @@ module.exports = function(opts) {
|
|
|
46
47
|
),
|
|
47
48
|
opts.target, opts.batch
|
|
48
49
|
).then((r) => {
|
|
49
|
-
console.info('PHI files converted into XMIR files at %s', output);
|
|
50
|
+
console.info('PHI files converted into XMIR files at %s', rel(output));
|
|
50
51
|
return r;
|
|
51
52
|
});
|
|
52
53
|
};
|
package/src/commands/verify.js
CHANGED
|
@@ -22,6 +22,7 @@
|
|
|
22
22
|
* SOFTWARE.
|
|
23
23
|
*/
|
|
24
24
|
|
|
25
|
+
const rel = require('relative');
|
|
25
26
|
const path = require('path');
|
|
26
27
|
const {mvnw, flags} = require('../mvnw');
|
|
27
28
|
|
|
@@ -32,7 +33,7 @@ const {mvnw, flags} = require('../mvnw');
|
|
|
32
33
|
*/
|
|
33
34
|
module.exports = function(opts) {
|
|
34
35
|
return mvnw(['eo:verify'].concat(flags(opts)), opts.target, opts.batch).then((r) => {
|
|
35
|
-
console.info('EO program verified in %s', path.resolve(opts.target));
|
|
36
|
+
console.info('EO program verified in %s', rel(path.resolve(opts.target)));
|
|
36
37
|
return r;
|
|
37
38
|
});
|
|
38
39
|
};
|
package/src/eoc.js
CHANGED
|
@@ -93,7 +93,7 @@ program.command('foreign')
|
|
|
93
93
|
|
|
94
94
|
program
|
|
95
95
|
.command('clean')
|
|
96
|
-
.option('--
|
|
96
|
+
.option('--global', 'delete ~/.eo directory')
|
|
97
97
|
.description('Delete all temporary files')
|
|
98
98
|
.action((str, opts) => {
|
|
99
99
|
clean({...program.opts(), ...str});
|
package/src/mvnw.js
CHANGED
|
@@ -24,6 +24,7 @@
|
|
|
24
24
|
|
|
25
25
|
const path = require('path');
|
|
26
26
|
const fs = require('fs');
|
|
27
|
+
const rel = require('relative');
|
|
27
28
|
const readline = require('readline');
|
|
28
29
|
const {spawn} = require('child_process');
|
|
29
30
|
const colors = require('colors');
|
|
@@ -49,14 +50,18 @@ let beginning;
|
|
|
49
50
|
* @return {Array} of Maven options
|
|
50
51
|
*/
|
|
51
52
|
module.exports.flags = function(opts) {
|
|
53
|
+
const sources = path.resolve(opts.sources);
|
|
54
|
+
console.debug('Sources in %s', rel(sources));
|
|
55
|
+
const target = path.resolve(opts.target);
|
|
56
|
+
console.debug('Target in %s', rel(target));
|
|
52
57
|
return [
|
|
53
58
|
'-Deo.version=' + opts.parser,
|
|
54
59
|
'-Deo.hash=' + (opts.hash ? opts.hash : opts.parser),
|
|
55
60
|
opts.verbose ? '--errors' : '',
|
|
56
61
|
opts.verbose ? '' : '--quiet',
|
|
57
62
|
opts.debug ? '--debug' : '',
|
|
58
|
-
`-Deo.sourcesDir=${
|
|
59
|
-
`-Deo.targetDir=${
|
|
63
|
+
`-Deo.sourcesDir=${sources}`,
|
|
64
|
+
`-Deo.targetDir=${target}`,
|
|
60
65
|
`-Deo.outputDir=${path.resolve(opts.target, 'classes')}`,
|
|
61
66
|
`-Deo.generatedDir=${path.resolve(opts.target, 'generated-sources')}`,
|
|
62
67
|
`-Deo.placed=${path.resolve(opts.target, 'eo-placed.csv')}`,
|
package/src/version.js
CHANGED