Skip to content

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

Closed
@bahamas10

Description

@bahamas10

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions