eolang 0.4.0 → 0.4.1

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 CHANGED
@@ -28,6 +28,8 @@ $ eoc dataize hello
28
28
 
29
29
  That's it.
30
30
 
31
+ ## Commands
32
+
31
33
  You can also do many other things with `eoc` commands
32
34
  (the flow is explained in [this blog post](https://www.yegor256.com/2021/10/21/objectionary.html)):
33
35
 
package/mvnw/pom.xml CHANGED
@@ -27,6 +27,10 @@ SOFTWARE.
27
27
  <groupId>org.eolang</groupId>
28
28
  <artifactId>eoc</artifactId>
29
29
  <version>1.0-SNAPSHOT</version>
30
+ <properties>
31
+ <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
32
+ <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
33
+ </properties>
30
34
  <dependencies>
31
35
  <dependency>
32
36
  <groupId>org.junit.jupiter</groupId>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "eolang",
3
- "version": "0.4.0",
3
+ "version": "0.4.1",
4
4
  "author": "Yegor Bugayenko <yegor256@gmail.com> (https://www.yegor256.com/)",
5
5
  "license": "MIT",
6
6
  "repository": "objectionary/eoc",
@@ -1,4 +1,3 @@
1
- #! /usr/bin/env node
2
1
  /*
3
2
  * The MIT License (MIT)
4
3
  *
@@ -1,4 +1,3 @@
1
- #! /usr/bin/env node
2
1
  /*
3
2
  * The MIT License (MIT)
4
3
  *
@@ -1,4 +1,3 @@
1
- #! /usr/bin/env node
2
1
  /*
3
2
  * The MIT License (MIT)
4
3
  *
@@ -1,4 +1,3 @@
1
- #! /usr/bin/env node
2
1
  /*
3
2
  * The MIT License (MIT)
4
3
  *
@@ -1,4 +1,3 @@
1
- #! /usr/bin/env node
2
1
  /*
3
2
  * The MIT License (MIT)
4
3
  *
@@ -34,7 +33,11 @@ const path = require('path');
34
33
  module.exports = function dataize(obj, opts) {
35
34
  spawn(
36
35
  `java`,
37
- ['-jar', path.resolve(opts.target, 'eoc.jar'), obj],
36
+ [
37
+ '-Dfile.encoding=UTF-8',
38
+ '-jar', path.resolve(opts.target, 'eoc.jar'),
39
+ obj,
40
+ ],
38
41
  {stdio: 'inherit'}
39
42
  );
40
43
  };
@@ -1,4 +1,3 @@
1
- #! /usr/bin/env node
2
1
  /*
3
2
  * The MIT License (MIT)
4
3
  *
@@ -1,4 +1,3 @@
1
- #! /usr/bin/env node
2
1
  /*
3
2
  * The MIT License (MIT)
4
3
  *
@@ -1,4 +1,3 @@
1
- #! /usr/bin/env node
2
1
  /*
3
2
  * The MIT License (MIT)
4
3
  *
@@ -1,4 +1,3 @@
1
- #! /usr/bin/env node
2
1
  /*
3
2
  * The MIT License (MIT)
4
3
  *
package/src/mvnw.js CHANGED
@@ -1,4 +1,3 @@
1
- #! /usr/bin/env node
2
1
  /*
3
2
  * The MIT License (MIT)
4
3
  *
@@ -58,7 +57,7 @@ function latest() {
58
57
  */
59
58
  module.exports = function mvnwSync(args) {
60
59
  const home = path.resolve(__dirname, '../mvnw');
61
- const bin = path.resolve(home, 'mvnw');
60
+ const bin = path.resolve(home, 'mvnw') + (process.platform == 'win32' ? '.cmd' : '');
62
61
  const params = args.filter(function(t) {
63
62
  return t != '';
64
63
  }).concat([
@@ -70,7 +69,21 @@ module.exports = function mvnwSync(args) {
70
69
  ]);
71
70
  const cmd = bin + ' ' + params.join(' ');
72
71
  console.debug('+ %s', cmd);
73
- const result = spawnSync(bin, params, {cwd: home, stdio: 'inherit'});
72
+ const result = spawnSync(
73
+ bin,
74
+ process.platform == 'win32' ? params.map((p) => `"${p}"`) : params,
75
+ {
76
+ cwd: home,
77
+ stdio: 'inherit',
78
+ shell: (
79
+ process.platform == 'win32'
80
+ ?
81
+ 'C:\\Windows\\SysWOW64\\WindowsPowerShell\\v1.0\\powershell.exe'
82
+ :
83
+ undefined
84
+ ),
85
+ }
86
+ );
74
87
  if (result.status != 0) {
75
88
  throw new Error('The command "' + cmd + '" exited with #' + result.status + ' code');
76
89
  }
@@ -1,4 +1,3 @@
1
- #! /usr/bin/env node
2
1
  /*
3
2
  * The MIT License (MIT)
4
3
  *
package/src/version.js CHANGED
@@ -1,4 +1,3 @@
1
- #! /usr/bin/env node
2
1
  /*
3
2
  * The MIT License (MIT)
4
3
  *
@@ -23,4 +22,4 @@
23
22
  * SOFTWARE.
24
23
  */
25
24
 
26
- module.exports = '0.4.0';
25
+ module.exports = '0.4.1';