Skip to content

💥 Only support node>=8 and ES2017+ #748

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

Merged
merged 1 commit into from
Jul 12, 2020
Merged

💥 Only support node>=8 and ES2017+ #748

merged 1 commit into from
Jul 12, 2020

Conversation

dubzzz
Copy link
Owner

@dubzzz dubzzz commented Jul 12, 2020

Merge of PR #515 to master


Why is this PR for?

Remove support for old versions of Node.

Removing the support brings a clear uplift in terms of performances, here are the results we measured on RunKit by running the same code against fast-check@1.26.0 and fast-check@2.0.0-alpha.1.26.0.0:

  • synchronous property: from 0.30ms to 0.26ms (-14% on median time)
  • asynchronous property: from 0.54ms to 0.36ms (-34% on median time)
// synchronous property
(fc, seed) => {
  const start = performance.now();
  fc.assert(fc.property(fc.nat(), fc.nat(), (a, b) => true), {seed});
  return performance.now() - start;
}
// asynchrounous property
async (fc, seed) => {
  const start = performance.now();
  await fc.assert(fc.asyncProperty(fc.nat(), fc.nat(), async (a, b) => true), {seed});
  return performance.now() - start;
}

Most of the uplift might be related to the fact that neither yield nor async/await need to be transpiled if we drop support for older releases on nodes.

In a nutshell

❌ New feature
❌ Fix an issue
❌ Documentation improvement
✔️ Other: remove support

(✔️: yes, ❌: no)

Potential impacts

Code will no longer run on old versions of node.

@codesandbox-ci
Copy link

codesandbox-ci bot commented Jul 12, 2020

This pull request is automatically built and testable in CodeSandbox.

To see build info of the built libraries, click here or the icon next to each commit SHA.

Latest deployment of this branch, based on commit cc846ab:

Sandbox Source
Vanilla Configuration
dubzzz/fast-check: example Configuration

@coveralls
Copy link

Coverage Status

Coverage decreased (-0.2%) to 95.579% when pulling cc846ab on support-node-8 into 84aa5a7 on master.

@dubzzz dubzzz merged commit a1e15f5 into master Jul 12, 2020
@dubzzz dubzzz deleted the support-node-8 branch July 12, 2020 20:41
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

2 participants