eolang 0.13.0 → 0.13.2

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.0",
3
+ "version": "0.13.2",
4
4
  "author": "Yegor Bugayenko <yegor256@gmail.com> (https://www.yegor256.com/)",
5
5
  "license": "MIT",
6
6
  "repository": "objectionary/eoc",
@@ -34,6 +34,7 @@
34
34
  "commander": "10.0.1",
35
35
  "fast-xml-parser": "4.2.2",
36
36
  "node": "20.2.0",
37
+ "sync-request": "6.1.0",
37
38
  "xmlhttprequest": "1.8.0"
38
39
  },
39
40
  "devDependencies": {
@@ -46,6 +47,6 @@
46
47
  "mocha": "^10.2.0"
47
48
  },
48
49
  "scripts": {
49
- "test": "mocha --timeout 120.13.0"
50
+ "test": "mocha --timeout 1200000"
50
51
  }
51
52
  }
package/src/eoc.js CHANGED
@@ -43,12 +43,9 @@ if (process.argv.includes('--verbose')) {
43
43
  console.debug('Debug output is turned ON');
44
44
  }
45
45
 
46
+ let parser = '0.29.4';
46
47
  if (process.argv.includes('--latest')) {
47
- const ver = require('./parser-version').get();
48
- process.argv.push('--parser');
49
- process.argv.push(ver);
50
- process.argv.push('--hash');
51
- process.argv.push(ver);
48
+ parser = require('./parser-version').get();
52
49
  }
53
50
 
54
51
  const version = require('./version');
@@ -57,7 +54,6 @@ program
57
54
  .description('EO command-line toolkit (' + version.what + ' ' + version.when + ')')
58
55
  .version(version.what);
59
56
 
60
- const parser = '0.29.4';
61
57
  program
62
58
  .option('-s, --sources <path>', 'Directory with .EO sources', '.')
63
59
  .option('-t, --target <path>', 'Directory with all generated files', '.eoc')
@@ -22,8 +22,8 @@
22
22
  * SOFTWARE.
23
23
  */
24
24
 
25
- const XMLHttpRequest = require('xmlhttprequest').XMLHttpRequest;
26
25
  const {XMLParser} = require('fast-xml-parser');
26
+ const request = require('sync-request');
27
27
 
28
28
  /**
29
29
  * Load the latest version from GitHub releases.
@@ -34,17 +34,14 @@ const version = module.exports = {
34
34
  get: function() {
35
35
  if (version.value === '') {
36
36
  const repo = 'org/eolang/eo-maven-plugin';
37
- const url = 'https://repo.maven.apache.org/maven2/' + repo + '/maven-metadata.xml';
38
- const xhr = new XMLHttpRequest();
39
- xhr.open('GET', url, false);
40
- xhr.send(null);
41
- if (xhr.status != 200) {
42
- throw new Error('Invalid response status ' + xhr.status + ' from ' + url);
37
+ const url = `https://repo.maven.apache.org/maven2/${repo}/maven-metadata.xml`;
38
+ const res = request('GET', url, {timeout: 100000, socketTimeout: 100000});
39
+ if (res.statusCode != 200) {
40
+ throw new Error(`Invalid response status #${res.statusCode} from ${url}: ${res.body}`);
43
41
  }
44
- const xml = new XMLParser().parse(xhr.responseText);
42
+ const xml = new XMLParser().parse(res.body);
45
43
  version.value = xml.metadata.versioning.release;
46
- console.debug('The latest version of %s at %s is %s', repo, url, version.value);
47
- console.info('EO version is %s', version.value);
44
+ console.info('The latest version of %s at %s is %s', repo, url, version.value);
48
45
  }
49
46
  return version.value;
50
47
  }
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.0',
29
- when: '00.13.00-00'
28
+ what: '0.13.2',
29
+ when: '2023-05-31'
30
30
  };