Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bump min node version to 0.10 and add CI testing #92

Closed
bahamas10 opened this issue Nov 5, 2019 · 0 comments · Fixed by #93
Closed

bump min node version to 0.10 and add CI testing #92

bahamas10 opened this issue Nov 5, 2019 · 0 comments · Fixed by #93

Comments

@bahamas10
Copy link
Contributor

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:

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:

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.

@trentm trentm changed the title Node engine support bump min node version to 0.10 and add CI testing Nov 5, 2019
trentm added a commit that referenced this issue Nov 5, 2019
@trentm trentm closed this as completed in #93 Nov 5, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
1 participant