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

Fix the build for node 13.x, make travis test 10, 12, 13, stable #263

Merged
merged 10 commits into from Apr 20, 2020

Conversation

jlfwong
Copy link
Owner

@jlfwong jlfwong commented Apr 20, 2020

@JustinBeckwith pointed out in #262 that npm install was broken in node 13.x, and @DanielRuf pointed in #254 that test fail for node 11+ because of a change to stability of sorting.

This PR seeks to address both of those.

The installation issue was fixed by just regenerating package-lock.json without needing to bump any of the direct dependency versions. The test failure issue requires manual intervention.

To fix the sort stability issue, I updated the tests to use the stable sort values (these were all the correct values, though some of the test values were incorrect).

To make the suite still pass for node 10, I added a hack where I override Array.prototype.sort with a stable implementation that's only used in tests (See comments in code for a justification for why)

Test Plan

Before this PR: npm install on node 13.x fails & npm run jest results in test failures
After this PR: npm install on node 13.x passes & npm run jest passes for node 10, 12, and 13.

@coveralls
Copy link

coveralls commented Apr 20, 2020

Coverage Status

Coverage increased (+0.06%) to 46.923% when pulling c867b48 on jlfwong/bump-transitive-deps into fd4195d on master.

@@ -1,3 +1,5 @@
language: node_js
node_js:
- '9'
- '10'
- '12'
Copy link
Contributor

Choose a reason for hiding this comment

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

Maybe worth explicitly adding 13 as well?

Copy link
Owner Author

Choose a reason for hiding this comment

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

Sure

Choose a reason for hiding this comment

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

node or latest may be better than 13 (fail early).

Copy link
Owner Author

Choose a reason for hiding this comment

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

I added both

@jlfwong jlfwong force-pushed the jlfwong/bump-transitive-deps branch from d181274 to c867b48 Compare April 20, 2020 06:47
@jlfwong
Copy link
Owner Author

jlfwong commented Apr 20, 2020

This should be good to go, but Travis is down for scheduled maintenance, so I'm going to wait for it to come back up to make sure this gets through CI.

@jlfwong jlfwong changed the title Fix the build for node 13.x Fix the build for node 13.x, make travis test 10, 12, 13, stable Apr 20, 2020
@jlfwong jlfwong merged commit d30bb2e into master Apr 20, 2020
@jlfwong jlfwong deleted the jlfwong/bump-transitive-deps branch April 20, 2020 15:27
jackerghan pushed a commit to jackerghan/speedscope that referenced this pull request Jul 28, 2023
…wong#263)

@JustinBeckwith pointed out in jlfwong#262 that `npm install` was broken in node 13.x, and @DanielRuf pointed in jlfwong#254 that test fail for node 11+ because of a change to stability of sorting.

This PR seeks to address both of those.

The installation issue was fixed by just regenerating `package-lock.json` without needing to bump any of the direct dependency versions. The test failure issue requires manual intervention.

To fix the sort stability issue, I updated the tests to use the stable sort values (these were all the correct values, though some of the test values were incorrect).

To make the suite still pass for node 10, I added a hack where I override `Array.prototype.sort` with a stable implementation that's *only* used in tests (See comments in code for a justification for why)

## Test Plan

Before this PR: `npm install` on node 13.x fails & `npm run jest` results in test failures
After this PR: `npm install` on node 13.x passes & `npm run jest` passes for node 10, 12, and 13.
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.

None yet

4 participants