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: jestjs/jest
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v27.4.0
Choose a base ref
...
head repository: jestjs/jest
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: v27.4.1
Choose a head ref
  • 6 commits
  • 56 files changed
  • 4 contributors

Commits on Nov 29, 2021

  1. Copy the full SHA
    eb5b7d3 View commit details
  2. Copy the full SHA
    40a9027 View commit details

Commits on Nov 30, 2021

  1. Copy the full SHA
    30a69fb View commit details
  2. Copy the full SHA
    7fead59 View commit details
  3. Copy the full SHA
    dfc63ce View commit details
  4. v27.4.1

    SimenB committed Nov 30, 2021
    Copy the full SHA
    fa4a398 View commit details
Showing with 573 additions and 549 deletions.
  1. +6 −3 .eslintrc.js
  2. +7 −0 CHANGELOG.md
  3. +2 −0 e2e/native-esm/__tests__/native-esm.test.js
  4. +1 −1 jest.config.js
  5. +3 −17 jest.config.types.js
  6. +1 −1 lerna.json
  7. +1 −1 package.json
  8. +4 −4 packages/babel-jest/package.json
  9. +2 −2 {test-types → packages/expect/__typechecks__}/expect.test.ts
  10. +7 −6 packages/expect/package.json
  11. +2 −2 packages/jest-changed-files/package.json
  12. +13 −13 packages/jest-circus/package.json
  13. +8 −8 packages/jest-cli/package.json
  14. +13 −13 packages/jest-config/package.json
  15. +5 −5 packages/jest-console/package.json
  16. +20 −20 packages/jest-core/package.json
  17. +3 −3 packages/jest-create-cache-key-function/package.json
  18. +3 −3 packages/jest-diff/package.json
  19. +4 −4 packages/jest-each/package.json
  20. +7 −7 packages/jest-environment-jsdom/package.json
  21. +7 −7 packages/jest-environment-node/package.json
  22. +4 −4 packages/jest-environment/package.json
  23. +5 −5 packages/jest-fake-timers/package.json
  24. +4 −4 packages/jest-globals/package.json
  25. +5 −5 packages/jest-haste-map/package.json
  26. +12 −12 packages/jest-jasmine2/package.json
  27. +2 −2 packages/jest-leak-detector/package.json
  28. +4 −4 packages/jest-matcher-utils/package.json
  29. +3 −3 packages/jest-message-util/package.json
  30. +2 −2 packages/jest-mock/package.json
  31. +2 −2 packages/jest-phabricator/package.json
  32. +10 −10 packages/jest-repl/package.json
  33. +10 −10 packages/jest-reporters/package.json
  34. +7 −7 packages/jest-resolve-dependencies/package.json
  35. +5 −5 packages/jest-resolve/package.json
  36. +16 −16 packages/jest-runner/package.json
  37. +17 −17 packages/jest-runtime/package.json
  38. +12 −12 packages/jest-snapshot/package.json
  39. +3 −3 packages/jest-test-result/package.json
  40. +4 −4 packages/jest-test-sequencer/package.json
  41. +5 −5 packages/jest-transform/package.json
  42. 0 test-types/top-level-config.test.ts → packages/jest-types/__typechecks__/config.test.ts
  43. 0 test-types/top-level-expect-namespace.test.ts → packages/jest-types/__typechecks__/expect.test.ts
  44. 0 test-types/top-level-globals.test.ts → packages/jest-types/__typechecks__/globals.test.ts
  45. 0 test-types/top-level-jest-namespace.test.ts → packages/jest-types/__typechecks__/jest.test.ts
  46. +4 −1 packages/jest-types/package.json
  47. +2 −2 packages/jest-util/package.json
  48. +3 −3 packages/jest-validate/package.json
  49. +4 −4 packages/jest-watcher/package.json
  50. +2 −2 packages/jest-worker/package.json
  51. +4 −1 packages/jest-worker/src/workers/NodeThreadsWorker.ts
  52. +3 −3 packages/jest/package.json
  53. +3 −3 packages/pretty-format/package.json
  54. +3 −3 packages/test-utils/package.json
  55. +2 −1 tsconfig.json
  56. +292 −274 yarn.lock
9 changes: 6 additions & 3 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -234,7 +234,7 @@ module.exports = {
},
},
{
files: ['test-types/*.test.ts', '*.md'],
files: ['**/__typechecks__/**', '*.md'],
rules: {
'jest/no-focused-tests': 'off',
'jest/no-identical-title': 'off',
@@ -301,9 +301,9 @@ module.exports = {
'error',
{
devDependencies: [
'/test-types/**',
'**/__tests__/**',
'**/__mocks__/**',
'**/__tests__/**',
'**/__typechecks__/**',
'**/?(*.)(spec|test).js?(x)',
'scripts/**',
'babel.config.js',
@@ -485,5 +485,8 @@ module.exports = {
'import/internal-regex': new RegExp(
internalPackages.map(pkg => `^${pkg}$`).join('|'),
).source,
'import/resolver': {
typescript: {},
},
},
};
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -8,6 +8,12 @@

### Performance

## 27.4.1

### Fixes

- `[jest-worker]` Filter `execArgv` correctly ([#12097](https://github.com/facebook/jest/pull/12097))

## 27.4.0

### Features
@@ -27,6 +33,7 @@
- `[jest-environment-jsdom]` Add `@types/jsdom` dependency ([#11999](https://github.com/facebook/jest/pull/11999))
- `[jest-environment-jsdom]` Do not reset the global.document too early on teardown ([#11871](https://github.com/facebook/jest/pull/11871))
- `[jest-transform]` Improve error and warning messages ([#11998](https://github.com/facebook/jest/pull/11998))
- `[jest-worker]` Pass `execArgv` correctly to `worker_threads` worker ([#12069](https://github.com/facebook/jest/pull/12069))

### Chore & Maintenance

2 changes: 2 additions & 0 deletions e2e/native-esm/__tests__/native-esm.test.js
Original file line number Diff line number Diff line change
@@ -18,9 +18,11 @@ import staticImportedStatefulFromCjs from '../fromCjs.mjs';
import {double} from '../index';
import defaultFromCjs, {half, namedFunction} from '../namedExport.cjs';
import {bag} from '../namespaceExport.js';
/* eslint-disable import/no-duplicates */
import staticImportedStateful from '../stateful.mjs';
import staticImportedStatefulWithQuery from '../stateful.mjs?query=1';
import staticImportedStatefulWithAnotherQuery from '../stateful.mjs?query=2';
/* eslint-enable import/no-duplicates */

test('should have correct import.meta', () => {
expect(typeof require).toBe('undefined');
2 changes: 1 addition & 1 deletion jest.config.js
Original file line number Diff line number Diff line change
@@ -35,8 +35,8 @@ module.exports = {
require.resolve('jest-snapshot-serializer-raw'),
],
testPathIgnorePatterns: [
'/test-types/',
'/__arbitraries__/',
'/__typechecks__/',
'/node_modules/',
'/examples/',
'/e2e/.*/__tests__',
20 changes: 3 additions & 17 deletions jest.config.types.js
Original file line number Diff line number Diff line change
@@ -7,29 +7,15 @@

'use strict';

const assert = require('assert');
const baseConfig = require('./jest.config');

const {
modulePathIgnorePatterns,
testPathIgnorePatterns,
watchPathIgnorePatterns,
} = baseConfig;

assert.strictEqual(
testPathIgnorePatterns[0],
'/test-types/',
'First entry must be types',
);
const {modulePathIgnorePatterns} = require('./jest.config');

module.exports = {
displayName: {
color: 'blue',
name: 'types',
},
modulePathIgnorePatterns,
roots: ['<rootDir>/packages'],
runner: 'jest-runner-tsd',
testMatch: ['<rootDir>/test-types/*.test.ts'],
testPathIgnorePatterns: testPathIgnorePatterns.slice(1),
watchPathIgnorePatterns,
testMatch: ['**/__typechecks__/**/*.ts'],
};
2 changes: 1 addition & 1 deletion lerna.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"version": "27.4.0",
"version": "27.4.1",
"npmClient": "yarn",
"packages": [
"packages/*"
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -33,6 +33,7 @@
"dedent": "^0.7.0",
"eslint": "^7.7.0",
"eslint-config-prettier": "^8.1.0",
"eslint-import-resolver-typescript": "^2.5.0",
"eslint-plugin-eslint-comments": "^3.1.2",
"eslint-plugin-import": "^2.6.0",
"eslint-plugin-jest": "^24.0.0",
@@ -61,7 +62,6 @@
"jquery": "^3.2.1",
"lerna": "^4.0.0",
"micromatch": "^4.0.4",
"mlh-tsd": "^0.14.1",
"mock-fs": "^4.4.1",
"netlify-plugin-cache": "^1.0.3",
"node-notifier": "^10.0.0",
8 changes: 4 additions & 4 deletions packages/babel-jest/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "babel-jest",
"description": "Jest plugin to use babel for transformation.",
"version": "27.4.0",
"version": "27.4.1",
"repository": {
"type": "git",
"url": "https://github.com/facebook/jest.git",
@@ -18,8 +18,8 @@
"./package.json": "./package.json"
},
"dependencies": {
"@jest/transform": "^27.4.0",
"@jest/types": "^27.4.0",
"@jest/transform": "^27.4.1",
"@jest/types": "^27.4.1",
"@types/babel__core": "^7.1.14",
"babel-plugin-istanbul": "^6.0.0",
"babel-preset-jest": "^27.4.0",
@@ -29,7 +29,7 @@
},
"devDependencies": {
"@babel/core": "^7.1.0",
"@jest/test-utils": "^27.4.0",
"@jest/test-utils": "^27.4.1",
"@types/graceful-fs": "^4.1.3"
},
"peerDependencies": {
Original file line number Diff line number Diff line change
@@ -9,5 +9,5 @@ import type * as expect from 'expect';

export type M = expect.Matchers<void, unknown>;
export type N = expect.Matchers<void>;
// @ts-expect-error
export type E = expect.Matchers<>;
// @ts-expect-error: Generic type 'Matchers<R, T>' requires between 1 and 2 type arguments.
export type E = expect.Matchers;
13 changes: 7 additions & 6 deletions packages/expect/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "expect",
"version": "27.4.0",
"version": "27.4.1",
"repository": {
"type": "git",
"url": "https://github.com/facebook/jest.git",
@@ -19,18 +19,19 @@
"./build/matchers": "./build/matchers.js"
},
"dependencies": {
"@jest/types": "^27.4.0",
"@jest/types": "^27.4.1",
"ansi-styles": "^5.0.0",
"jest-get-type": "^27.4.0",
"jest-matcher-utils": "^27.4.0",
"jest-message-util": "^27.4.0",
"jest-matcher-utils": "^27.4.1",
"jest-message-util": "^27.4.1",
"jest-regex-util": "^27.4.0"
},
"devDependencies": {
"@jest/test-utils": "^27.4.0",
"@jest/test-utils": "^27.4.1",
"chalk": "^4.0.0",
"fast-check": "^2.0.0",
"immutable": "^4.0.0-rc.12"
"immutable": "^4.0.0-rc.12",
"mlh-tsd": "^0.14.1"
},
"engines": {
"node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0"
4 changes: 2 additions & 2 deletions packages/jest-changed-files/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "jest-changed-files",
"version": "27.4.0",
"version": "27.4.1",
"repository": {
"type": "git",
"url": "https://github.com/facebook/jest.git",
@@ -17,7 +17,7 @@
"./package.json": "./package.json"
},
"dependencies": {
"@jest/types": "^27.4.0",
"@jest/types": "^27.4.1",
"execa": "^5.0.0",
"throat": "^6.0.1"
},
26 changes: 13 additions & 13 deletions packages/jest-circus/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "jest-circus",
"version": "27.4.0",
"version": "27.4.1",
"repository": {
"type": "git",
"url": "https://github.com/facebook/jest.git",
@@ -18,30 +18,30 @@
"./runner": "./runner.js"
},
"dependencies": {
"@jest/environment": "^27.4.0",
"@jest/test-result": "^27.4.0",
"@jest/types": "^27.4.0",
"@jest/environment": "^27.4.1",
"@jest/test-result": "^27.4.1",
"@jest/types": "^27.4.1",
"@types/node": "*",
"chalk": "^4.0.0",
"co": "^4.6.0",
"dedent": "^0.7.0",
"expect": "^27.4.0",
"expect": "^27.4.1",
"is-generator-fn": "^2.0.0",
"jest-each": "^27.4.0",
"jest-matcher-utils": "^27.4.0",
"jest-message-util": "^27.4.0",
"jest-runtime": "^27.4.0",
"jest-snapshot": "^27.4.0",
"jest-util": "^27.4.0",
"pretty-format": "^27.4.0",
"jest-each": "^27.4.1",
"jest-matcher-utils": "^27.4.1",
"jest-message-util": "^27.4.1",
"jest-runtime": "^27.4.1",
"jest-snapshot": "^27.4.1",
"jest-util": "^27.4.1",
"pretty-format": "^27.4.1",
"slash": "^3.0.0",
"stack-utils": "^2.0.3",
"throat": "^6.0.1"
},
"devDependencies": {
"@babel/core": "^7.1.0",
"@babel/register": "^7.0.0",
"@jest/test-utils": "^27.4.0",
"@jest/test-utils": "^27.4.1",
"@types/co": "^4.6.0",
"@types/dedent": "^0.7.0",
"@types/graceful-fs": "^4.1.3",
16 changes: 8 additions & 8 deletions packages/jest-cli/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "jest-cli",
"description": "Delightful JavaScript Testing.",
"version": "27.4.0",
"version": "27.4.1",
"main": "./build/index.js",
"types": "./build/index.d.ts",
"exports": {
@@ -13,21 +13,21 @@
"./bin/jest": "./bin/jest.js"
},
"dependencies": {
"@jest/core": "^27.4.0",
"@jest/test-result": "^27.4.0",
"@jest/types": "^27.4.0",
"@jest/core": "^27.4.1",
"@jest/test-result": "^27.4.1",
"@jest/types": "^27.4.1",
"chalk": "^4.0.0",
"exit": "^0.1.2",
"graceful-fs": "^4.2.4",
"import-local": "^3.0.2",
"jest-config": "^27.4.0",
"jest-util": "^27.4.0",
"jest-validate": "^27.4.0",
"jest-config": "^27.4.1",
"jest-util": "^27.4.1",
"jest-validate": "^27.4.1",
"prompts": "^2.0.1",
"yargs": "^16.2.0"
},
"devDependencies": {
"@jest/test-utils": "^27.4.0",
"@jest/test-utils": "^27.4.1",
"@types/exit": "^0.1.30",
"@types/graceful-fs": "^4.1.3",
"@types/prompts": "^2.0.1",
26 changes: 13 additions & 13 deletions packages/jest-config/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "jest-config",
"version": "27.4.0",
"version": "27.4.1",
"repository": {
"type": "git",
"url": "https://github.com/facebook/jest.git",
@@ -26,26 +26,26 @@
},
"dependencies": {
"@babel/core": "^7.1.0",
"@jest/test-sequencer": "^27.4.0",
"@jest/types": "^27.4.0",
"babel-jest": "^27.4.0",
"@jest/test-sequencer": "^27.4.1",
"@jest/types": "^27.4.1",
"babel-jest": "^27.4.1",
"chalk": "^4.0.0",
"ci-info": "^3.2.0",
"deepmerge": "^4.2.2",
"glob": "^7.1.1",
"graceful-fs": "^4.2.4",
"jest-circus": "^27.4.0",
"jest-environment-jsdom": "^27.4.0",
"jest-environment-node": "^27.4.0",
"jest-circus": "^27.4.1",
"jest-environment-jsdom": "^27.4.1",
"jest-environment-node": "^27.4.1",
"jest-get-type": "^27.4.0",
"jest-jasmine2": "^27.4.0",
"jest-jasmine2": "^27.4.1",
"jest-regex-util": "^27.4.0",
"jest-resolve": "^27.4.0",
"jest-runner": "^27.4.0",
"jest-util": "^27.4.0",
"jest-validate": "^27.4.0",
"jest-resolve": "^27.4.1",
"jest-runner": "^27.4.1",
"jest-util": "^27.4.1",
"jest-validate": "^27.4.1",
"micromatch": "^4.0.4",
"pretty-format": "^27.4.0",
"pretty-format": "^27.4.1",
"slash": "^3.0.0"
},
"devDependencies": {
10 changes: 5 additions & 5 deletions packages/jest-console/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@jest/console",
"version": "27.4.0",
"version": "27.4.1",
"repository": {
"type": "git",
"url": "https://github.com/facebook/jest.git",
@@ -17,15 +17,15 @@
"./package.json": "./package.json"
},
"dependencies": {
"@jest/types": "^27.4.0",
"@jest/types": "^27.4.1",
"@types/node": "*",
"chalk": "^4.0.0",
"jest-message-util": "^27.4.0",
"jest-util": "^27.4.0",
"jest-message-util": "^27.4.1",
"jest-util": "^27.4.1",
"slash": "^3.0.0"
},
"devDependencies": {
"@jest/test-utils": "^27.4.0",
"@jest/test-utils": "^27.4.1",
"@types/node": "*"
},
"engines": {
Loading