Skip to content

ES2018 dependent code breaking on older versions of node #419

Description

@HoraceShmorace

RE: https://github.com/WP-API/node-wpapi/blob/master/wpapi.js#L218

Be careful of breaking changes between minor versions. The spreading of object properties wasn't supported until Node 8.2.1 (with the --harmony flag). Our project is on Node 7.2.1 (for reasons that would only elicit eye rolls), so the upgrade from wpapi 1.1.2 to 1.2x throws a runtime error. We had to switch the package.json semver entry from ^1.1.0 to strict 1.1.2.

For version 1.2.0, your changelog should reflect that the minimum supported Node version is now 8.2.1 (with the --harmony flag).

Activity

  1. changed the title [-]ES6 dependent code breaking on older versions of node[/-] [+]ES2018 dependent code breaking on older versions of node[/+] on Jan 24, 2019
  2. kadamwhite commented on Jan 24, 2019

    @kadamwhite
    Collaborator

    @HoraceShmorace That is good feedback, and I appreciate your saying something. This was a result of my desire to get out an API-compatible version of the library on the 1.x branch featuring some useful bug fixes, but I hear and acknowledge that the two breaking changes in 1.2 should have been left for 2.0. We will do better next time.

    The changelog does mention dropping support for Node <v8, but does not clarify the specifics of 8.2.1 vs 8.6. I will update the README and Changelog accordingly.

  3. added a commit that references this issue on Jan 24, 2019
    f6fe753
  4. kadamwhite commented on Jan 24, 2019

    @kadamwhite
    Collaborator

    README.d and CHANGELOG.md updated.

    Less helpfully to your situation, the damage is done so I will not be reverting the change; 1.2 and later will continue to require a minimum of Node 8.6/8.2.1 --harmony. (We've all been there with non-upgradable systems, good luck sorting out whatever reasons keep you on v7 and apologies that subsequent 1.x branch bug fixes won't be available to you!)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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