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

More cleanup as a result of dropping Node 12 #1505

Merged
merged 2 commits into from
Jan 23, 2023

Conversation

henrymercer
Copy link
Contributor

@henrymercer henrymercer commented Jan 23, 2023

Clean up a few things now that we no longer need to support Node 12.

Merge / deployment checklist

  • Confirm this change is backwards compatible with existing workflows.
  • Confirm the readme has been updated if necessary.
  • Confirm the changelog has been updated if necessary.

@henrymercer henrymercer requested a review from a team as a code owner January 23, 2023 18:22
@henrymercer henrymercer force-pushed the henrymercer/more-node-12-cleanup branch from 772a173 to 6291e94 Compare January 23, 2023 18:43
npm v9.3.0 is out, but seems to have a bug with `npm ci` on macOS
where it will complain that `node_modules/.bin` is a directory.

We specify an exact version for reproducibility of builds.
We don't need the import for Node 12 compat, but we do need it to make
the file compile.
@henrymercer henrymercer force-pushed the henrymercer/more-node-12-cleanup branch from 6291e94 to d5bb585 Compare January 23, 2023 19:16
@aeisenberg
Copy link
Contributor

Promise.race(x) will wait for either (a) one of the promises in x to resolve, or (b) all the promises in x to reject.

Do you have this reversed? That sounds like the behaviour of Promise.any.

Promise.any:

This returned promise fulfills when any of the input's promises fulfills, with this first fulfillment value. It rejects when all of the input's promises reject (including when an empty iterable is passed)

Promise.race:

This returned promise settles with the eventual state of the first promise that settles.

@henrymercer
Copy link
Contributor Author

You're completely right 🤦 Thanks for the catch, I'll drop that commit.

@henrymercer henrymercer force-pushed the henrymercer/more-node-12-cleanup branch from d5bb585 to ebdd5a0 Compare January 23, 2023 19:28
@aeisenberg
Copy link
Contributor

It's subtle. I had to read the docs a few times just to make sure.

@henrymercer henrymercer merged commit fa47d5a into main Jan 23, 2023
@henrymercer henrymercer deleted the henrymercer/more-node-12-cleanup branch January 23, 2023 20:11
@github-actions github-actions bot mentioned this pull request Jan 26, 2023
6 tasks
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.

2 participants