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

Update to node@16 and npm@8 #142

Merged

Conversation

deleonn
Copy link
Contributor

@deleonn deleonn commented May 18, 2022

Description

Makes the required changes so the library works with node@16x and npm@8.x. This PR also migrates from TravisCI to CircleCI and introduces the same automatic publishing flow as mongoose-models.

How to Test

  1. Pull the branch: feature/sc-102555/update-particle-api-js-to-node-js-v16-and
  2. Update your local node version to v16.x and npm to version to v8.x. Use nvm use 16 or equivalent.
  3. Verify your updates: node -v && npm -v
  4. Install dependencies: npm i
  5. Run the tests npm run test

Outcome
All tests should pass. npm i should run without issues.

Related / Discussions

Completeness

  • PR opened 🎉
  • Testing instructions have been provided
  • Tracking story is up to date (tasks are marked complete, state is "ready for review")
  • Docs have been updated
  • Branch is rebased against target (typically main)

Copy link

@hugomontero hugomontero left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@busticated
Copy link
Contributor

@deleonn i see this in the CI logs for the test step:

{
  error: Error: connect ECONNREFUSED 127.0.0.1:9090
      at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1187:16) {
    errno: -111,
    code: 'ECONNREFUSED',
    syscall: 'connect',
    address: '127.0.0.1',
    port: 9090
  },
  errorDescription: 'Network error from http://localhost:9090/v1/devices/events'
}

any ideas?

@deleonn deleonn force-pushed the feature/sc-102555/update-particle-api-js-to-node-js-v16-and branch from e434e6a to 46d10cc Compare May 23, 2022 13:45
@deleonn deleonn force-pushed the feature/sc-102555/update-particle-api-js-to-node-js-v16-and branch 4 times, most recently from 2cbe86c to 9f05407 Compare May 24, 2022 20:23
@deleonn deleonn force-pushed the feature/sc-102555/update-particle-api-js-to-node-js-v16-and branch from 9f05407 to 51337e7 Compare May 24, 2022 20:39
@deleonn deleonn merged commit e55ca60 into master May 30, 2022
@deleonn deleonn deleted the feature/sc-102555/update-particle-api-js-to-node-js-v16-and branch May 30, 2022 20:12
Comment on lines 16 to 19
- image: mongo:4.2
auth:
username: $DOCKERHUB_USERNAME
password: $DOCKERHUB_PASSWORD
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this can go away i think

Comment on lines 29 to 31
- run:
name: Run tests with browser
command: npm run test:browser
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok, i created a record in 1Password w/ the required API credentials. Pull those into CircleCI (make sure they are hidden from public view as this is a public repo) and wire up the node-side tests.

i don't think you need to run the browser tests across multiple versions of node since the runtime in that case is the browser itself and it will always be the same (at least as it is currently configured).

ideally, we'd run the node-side tests across multiple versions of node but the brower-side tests in a single version (presumably node@16)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants