bump min node version to 0.10 and add CI testing
envgap__TritonDataCenter__node-http-signature-92
01 / FAILURE SIGNATURE
As reported upstream
SyntaxError: Unexpected token ,
Not a benchmark task.
- In a clean container the reported failure did not reproduce, or the known fix did not make the project run.
02 / ENVIRONMENT RECIPE
- Base commit
db839cd2ea2bb574e34d4d62e7c0c0daa5353222- Manifest
package.json- Reproduce
Awaiting issue-specific recipe- Run under trace
Awaiting a meaningful runtime command
03 / ORIGINAL ISSUE TEXT
TritonDataCenter/node-http-signature #92 · read the original issue
I ran into an issue today on my lab machine when trying to run the latest version of `buckets-mdplacement` (a freshly made image).
```
/opt/smartdc/electric-boray/node_modules/imgapi-cli/node_modules/sdc-clients/node_modules/smartdc-auth/node_modules/http-signature/lib/utils.js:62
HEADER,
^
SyntaxError: Unexpected token ,
at Module._compile (module.js:439:25)
at Object.Module._extensions..js (module.js:474:10)
at Module.load (module.js:356:32)
at Function.Module._load (module.js:312:12)
at Module.require (module.js:364:17)
at require (module.js:380:17)
at Object.<anonymous> (/opt/smartdc/electric-boray/node_modules/imgapi-cli/node_modules/sdc-clients/node_modules/smartdc-auth/node_modules/http-signature/lib/parser.js:5:13)
at Module._compile (module.js:456:26)
at Object.Module._extensions..js (module.js:474:10)
at Module.load (module.js:356:32)
```
```
$ /opt/smartdc/electric-boray/build/node/bin/node -v
v0.10.48
```
The shorthand property setting is what caused the issue:
``` js
var cat = 'pumpkin';
var obj = { cat };
// obj => { cat: 'pumpkin' }
```
Judging by https://node.green/#ES2015-syntax-object-literal-extensions-shorthand-properties it looks like this shorthand syntax was added in node 4.9, and doesn't exist in 0.8 or 0.10.
This specific issue will be fixed in v1.3.1 of this module, but going forward there are some things we may want to consider. As @trentm mentioned in an email:
> - add a Jenkinsfile a la https://github.com/joyent/node-sshpk/blob/master/Jenkinsfile that will run make check and make test against a few supported versions of node to ensure this doesn't happen again
> - bump the "engines" up to node >= 0.10 (we don't need 0.8 support anymore)
Though bumping the engine would have to go to at least 4.9 if what I mentioned above is correct. Ensuring we run `make check` on our changes in this repo should help identify this issue happening in the future as well.04 / LABELS
Labels from the report text only; not yet run
No supported category has been assigned.
Label rules and the text that matched
[]