boneskull / rc-yaml

Extend the "rc" module with YAML parsing
2 stars 3 forks source link

rc-yaml fails with node < v6 #47

Closed megastef closed 7 years ago

megastef commented 7 years ago
$ node --version
v4.7.2
$ npm --version
2.15.11
$ nvm --version
0.32.0
install.1
0.01s$ export CXX=g++-4.8
install.2
0.02s$ $CXX --version
g++-4.8 (Ubuntu 4.8.1-2ubuntu1~12.04) 4.8.1
Copyright (C) 2013 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
install.3
18.59s$ npm i
....
1.19s$ npm test
> spm-agent-nodejs@1.30.4 test /home/travis/build/sematext/spm-agent-nodejs
> mocha test/test.js
/home/travis/build/sematext/spm-agent-nodejs/node_modules/spm-agent/node_modules/rc-yaml/lib/rc-yaml.js:22
function rcYaml (name, defaults, argv, parse = parser) {

SyntaxError: Unexpected token =
    at exports.runInThisContext (vm.js:53:16)
    at Module._compile (module.js:373:25)
    at Object.Module._extensions..js (module.js:416:10)
    at Module.load (module.js:343:32)
    at Function.Module._load (module.js:300:12)
    at Module.require (module.js:353:17)
    at require (internal/module.js:12:17)
    at Object.<anonymous> (/home/travis/build/sematext/spm-agent-nodejs/node_modules/spm-agent/lib/util/spmconfig.js:14:10)
megastef commented 7 years ago

See my PR https://github.com/boneskull/rc-yaml/pull/48

boneskull commented 7 years ago

closed via 4b2882ace2c5ea050f69dd506dac6a9543d7e36d and 83abd3b7048cd666aa04ba832f7be4d9de855603. thanks for bringing it to my attention. published as v2.0.0.