Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: dubzzz/fast-check
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v2.6.1
Choose a base ref
...
head repository: dubzzz/fast-check
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: v2.7.0
Choose a head ref
Loading
Showing with 4,267 additions and 7,709 deletions.
  1. +35 −0 .github/actions/install-deps-with-current-fc/action.yml
  2. +14 −0 .github/actions/install-deps-with-current-fc/check-hash.cjs
  3. +350 −0 .github/workflows/build-status.yml
  4. +0 −106 .travis.yml
  5. +71 −0 CHANGELOG.md
  6. +1 −1 README.md
  7. +241 −229 documentation/Arbitraries.md
  8. +1 −1 documentation/HandsOnPropertyBased.md
  9. +1 −1 documentation/Tips.md
  10. +5 −5 example/package.json
  11. +404 −358 example/yarn.lock
  12. +3 −3 jest.config.cjs
  13. +6 −12 package.json
  14. +34 −8 postbuild/main.cjs
  15. +41 −8 src/check/arbitrary/ArrayArbitrary.ts
  16. +21 −11 src/check/arbitrary/BigIntArbitrary.ts
  17. +2 −2 src/check/arbitrary/DateArbitrary.ts
  18. +10 −6 src/check/arbitrary/EmailArbitrary.ts
  19. +21 −8 src/check/arbitrary/HostArbitrary.ts
  20. +14 −6 src/check/arbitrary/IntegerArbitrary.ts
  21. +2 −1 src/check/arbitrary/RecordArbitrary.ts
  22. +1 −31 src/check/arbitrary/SetArbitrary.ts
  23. +35 −9 src/check/arbitrary/helpers/BiasNumeric.ts
  24. +37 −0 src/check/arbitrary/helpers/BuildCompareFilter.ts
  25. +6 −0 src/fast-check-default.ts
  26. +1,205 −1,406 test/e2e/__snapshots__/NoRegression.spec.ts.snap
  27. +784 −695 test/e2e/__snapshots__/NoRegressionBigInt.spec.ts.snap
  28. +5 −9 test/e2e/arbitraries/ArrayArbitrary.spec.ts
  29. +30 −0 test/e2e/arbitraries/BigIntArbitrary.spec.ts
  30. +3 −3 test/esm/rollup-with-import/package.json
  31. +12 −12 test/esm/rollup-with-import/yarn.lock
  32. +3 −3 test/esm/rollup-with-require/package.json
  33. +12 −12 test/esm/rollup-with-require/yarn.lock
  34. +0 −16 test/esm/run.sh
  35. +2 −2 test/esm/webpack-with-import/package.json
  36. +74 −81 test/esm/webpack-with-import/yarn.lock
  37. +2 −2 test/esm/webpack-with-require/package.json
  38. +111 −4,040 test/esm/webpack-with-require/yarn.lock
  39. +1 −1 test/legacy/{ → node-8}/main.js
  40. +10 −0 test/legacy/node-8/package.json
  41. +15 −0 test/legacy/node-8/yarn.lock
  42. +0 −2 test/rollup/esm/main.js
  43. +0 −15 test/rollup/esm/rollup.config.js
  44. +4 −0 test/type/index.test-d.ts
  45. +12 −0 test/unit/check/arbitrary/EmailArbitrary.spec.ts
  46. +13 −3 test/unit/check/arbitrary/IntegerArbitrary.spec.ts
  47. +1 −13 test/unit/check/arbitrary/SetArbitrary.spec.ts
  48. +19 −0 test/unit/check/arbitrary/helpers/BuildCompareFilter.spec.ts
  49. +593 −588 yarn.lock
35 changes: 35 additions & 0 deletions .github/actions/install-deps-with-current-fc/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: 'Install dependencies but use current build for fast-check'
description: 'Install dependencies but use current build for fast-check'
inputs:
path:
description: 'Directory path'
required: true
runs:
using: 'composite'
steps:
- run: |
PROJECT_ROOT_PATH="$(pwd)"
cd "${{inputs.path}}"
echo "ℹ️ Clean yarn cache entry for fast-check (if any)..."
yarn cache clean fast-check
echo "ℹ️ Install dependencies..."
yarn --frozen-lockfile
echo "ℹ️ Clean yarn cache entry for fast-check..."
yarn cache clean fast-check
echo "ℹ️ Install current build for fast-check..."
yarn add "file:$PROJECT_ROOT_PATH/fast-check.tgz"
echo "ℹ️ Clean yarn cache entry for fast-check..."
yarn cache clean fast-check
echo "ℹ️ Revert local changes..."
git checkout -- package.json
git checkout -- yarn.lock
shell: bash
- run: |
echo "ℹ️ Copy script..."
cp .github/actions/install-deps-with-current-fc/check-hash.cjs "${{inputs.path}}/check-hash-$GITHUB_SHA.cjs"
echo "ℹ️ Check version of fast-check..."
cd "${{inputs.path}}"
node check-hash-*.cjs
echo "ℹ️ Remove script..."
rm "check-hash-$GITHUB_SHA.cjs"
shell: bash
14 changes: 14 additions & 0 deletions .github/actions/install-deps-with-current-fc/check-hash.cjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
const process = require('process');
const { __commitHash } = require('fast-check');

const expectedCommitHash = process.env.GITHUB_SHA;
if (!expectedCommitHash) {
console.error('No GITHUB_SHA specified');
process.exit(1);
}
if (expectedCommitHash !== __commitHash) {
console.error('Expected: ' + expectedCommitHash + ', got: ' + __commitHash);
process.exit(2);
}
console.log('✔️ Referencing the correct version of fast-check');
console.log('✔️ Commit hash matches expected one: ' + expectedCommitHash);
Loading