Skip to content

Commit 13c960e

Browse files
committed
Merge branch 'master' into uglier-inline-snapshots
* master: (398 commits) chore(breaking): remove undocumented `enabledTestsMap` config (jestjs#10787) Change expect.not.objectContaining() to match documentation (jestjs#10708) chore: add name to root project (jestjs#10782) Added explanation on how to use custom @jest-environment to docs (jestjs#10783) fix: remove deprecated functions from the jest object (jestjs#9853) chore: convert jest-runtime to ESM (jestjs#10325) fix(resolve): use escalade to find package.json (jestjs#10781) feat(jest-runner): set exit code to 1 if test logs after teardown (jestjs#10728) chore: add `exports` field to all `package.json`s (jestjs#9921) fix: do not inject `global` variable into module wrapper (jestjs#10644) chore: migrate jest-resolve to ESM (jestjs#10688) chore(transform): refactor API to pass an options bag around rather than multiple boolean options (jestjs#10753) chore: default to node test env rather than browser (jestjs#9874) fix: drop support for node 13 (jestjs#10685) chore: show enhanced syntax error for all syntax errors (jestjs#10749) chore: update lockfile after publish v26.6.3 chore: update changelog for release Don't throw an error if mock dependency can't be found (jestjs#10779) chore: bump babel core types (jestjs#10772) ...
2 parents 7efccac + 4f84f61 commit 13c960e

File tree

1,003 files changed

+55391
-175473
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

1,003 files changed

+55391
-175473
lines changed

Diff for: .azure-pipelines-steps.yml

+11-9
Original file line numberDiff line numberDiff line change
@@ -6,31 +6,33 @@ steps:
66
- checkout: self
77
path: jest
88

9-
# Ensure Node.js 12 is active
9+
# Ensure Node.js 14 is active
1010
- task: NodeTool@0
1111
inputs:
12-
versionSpec: '12.x'
13-
displayName: 'Use Node.js 12'
12+
versionSpec: '14.x'
13+
displayName: 'Use Node.js 14'
1414

1515
# Ensure Python 2.7 is active
1616
- task: UsePythonVersion@0
1717
inputs:
1818
versionSpec: '2.7'
1919
displayName: 'Use Python 2.7'
2020

21-
# Run yarn to install dependencies and build
22-
- script: node scripts/remove-postinstall
23-
displayName: 'Remove postinstall script'
21+
- bash: echo "##vso[task.setvariable variable=folder;isOutput=true]$(yarn config get cacheFolder)"
22+
name: yarnCache
2423

25-
- task: CacheBeta@0
24+
- task: Cache@2
2625
inputs:
2726
key: yarn | $(Agent.OS) | yarn.lock
28-
path: $(YARN_CACHE_FOLDER)
27+
path: $(yarnCache.folder)
2928
displayName: Cache Yarn packages
3029

31-
- script: yarn install-no-ts-build
30+
- script: yarn install --immutable
3231
displayName: 'Install dependencies'
3332

33+
- script: yarn build:js
34+
displayName: 'Transpile TypeScript'
35+
3436
# Run test-ci-partial
3537
- script: yarn run test-ci-partial
3638
displayName: 'Run tests'

Diff for: .azure-pipelines.yml

-2
Original file line numberDiff line numberDiff line change
@@ -34,5 +34,3 @@ variables:
3434

3535
# Ensures the handful of tests that should be skipped during CI are
3636
CI: true
37-
38-
YARN_CACHE_FOLDER: $(Pipeline.Workspace)/.yarn

Diff for: .circleci/config.yml

+46-80
Original file line numberDiff line numberDiff line change
@@ -1,130 +1,98 @@
11
aliases:
2-
- &restore-cache
3-
keys:
4-
- v2-dependencies-{{ .Branch }}-{{ checksum "yarn.lock" }}
5-
# Fallback in case checksum fails
6-
- v2-dependencies-{{ .Branch }}-
7-
8-
- &save-cache
9-
paths:
10-
- node_modules
11-
- website/node_modules
12-
key: v2-dependencies-{{ .Branch }}-{{ checksum "yarn.lock" }}
13-
142
- &filter-ignore-gh-pages
153
branches:
164
ignore: gh-pages
17-
- &install yarn install-no-ts-build
5+
- &install
6+
pkg-manager: yarn
7+
override-ci-command: yarn install --immutable && yarn build:js
8+
cache-path: ~/.yarn/berry/cache
9+
include-branch-in-cache-key: false
10+
app-dir: ~/jest
1811

19-
version: 2
12+
orbs:
13+
node: circleci/[email protected]
14+
version: 2.1
2015
jobs:
21-
test-node-8:
22-
working_directory: ~/jest
23-
docker:
24-
- image: circleci/node:8
25-
steps:
26-
- checkout
27-
- run:
28-
command: yarn remove-prettier-dep
29-
- restore-cache: *restore-cache
30-
- run: *install
31-
- save-cache: *save-cache
32-
- run:
33-
command: yarn test-ci-partial
34-
- store_test_results:
35-
path: reports/junit
36-
3716
test-node-10:
3817
working_directory: ~/jest
39-
docker:
40-
- image: circleci/node:10
18+
executor: node/default
4119
steps:
4220
- checkout
43-
- restore-cache: *restore-cache
44-
- run: *install
45-
- save-cache: *save-cache
21+
- node/install:
22+
node-version: '10'
23+
install-npm: false
24+
- node/install-packages: *install
4625
- run:
4726
command: yarn test-ci-partial
4827
- store_test_results:
4928
path: reports/junit
5029

5130
test-jest-circus:
5231
working_directory: ~/jest
53-
docker:
54-
- image: circleci/node:12
32+
executor: node/default
5533
steps:
5634
- checkout
57-
- restore-cache: *restore-cache
58-
- run: *install
59-
- save-cache: *save-cache
35+
- node/install:
36+
lts: true
37+
install-npm: false
38+
- node/install-packages: *install
6039
- run:
61-
command: JEST_CIRCUS=1 yarn test-ci-partial
40+
command: JEST_CIRCUS=1 yarn test-ci-partial && JEST_CIRCUS=1 yarn test-leak
6241
- store_test_results:
6342
path: reports/junit
6443

6544
test-node-12:
6645
working_directory: ~/jest
67-
docker:
68-
- image: circleci/node:12
46+
executor: node/default
6947
steps:
7048
- checkout
71-
- restore-cache: *restore-cache
72-
- run: *install
73-
- save-cache: *save-cache
49+
- node/install:
50+
node-version: '12'
51+
install-npm: false
52+
- node/install-packages: *install
7453
- run:
75-
command: yarn test-ci
54+
command: yarn test-ci-partial
7655
- store_test_results:
7756
path: reports/junit
7857

79-
test-node-13:
58+
test-node-14:
8059
working_directory: ~/jest
81-
docker:
82-
- image: circleci/node:13
60+
executor: node/default
8361
steps:
8462
- checkout
85-
- restore-cache: *restore-cache
86-
- run: *install
87-
- save-cache: *save-cache
63+
- node/install:
64+
node-version: '14'
65+
install-npm: false
66+
- node/install-packages: *install
8867
- run:
89-
command: yarn test-ci-partial
68+
command: yarn test-ci
9069
- store_test_results:
9170
path: reports/junit
9271

93-
test-node-14:
72+
test-node-15:
9473
working_directory: ~/jest
95-
docker:
96-
- image: circleci/node:14
74+
executor: node/default
9775
steps:
9876
- checkout
99-
- restore-cache: *restore-cache
100-
- run: *install
101-
- save-cache: *save-cache
77+
- node/install:
78+
node-version: '15'
79+
install-npm: false
80+
- node/install-packages: *install
10281
- run:
10382
command: yarn test-ci-partial
10483
- store_test_results:
10584
path: reports/junit
10685

107-
test-browser:
108-
working_directory: ~/jest
109-
docker:
110-
- image: circleci/node:12-browsers
111-
steps:
112-
- checkout
113-
- restore-cache: *restore-cache
114-
- run: *install
115-
- save-cache: *save-cache
116-
- run: yarn test-ci-es5-build-in-browser
117-
11886
test-or-deploy-website:
11987
working_directory: ~/jest
120-
docker:
121-
- image: circleci/node:12
88+
executor: node/default
12289
resource_class: large
12390
steps:
12491
- checkout
125-
- restore-cache: *restore-cache
126-
- run: *install
127-
- save-cache: *save-cache
92+
- node/install:
93+
lts: true
94+
install-npm: false
95+
- node/install-packages: *install
12896
- run:
12997
name: Test or Deploy Jest Website
13098
command: ./.circleci/website.sh
@@ -134,12 +102,10 @@ workflows:
134102
version: 2
135103
build-and-deploy:
136104
jobs:
137-
- test-node-8
138105
- test-node-10
139106
- test-node-12
140-
- test-node-13
141-
- test-node-14 # current
107+
- test-node-14
108+
- test-node-15 # current
142109
- test-jest-circus
143-
- test-browser
144110
- test-or-deploy-website:
145111
filters: *filter-ignore-gh-pages

Diff for: .circleci/website.sh

+2-2
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ else
1313
git config --global user.name "Website Deployment Script"
1414
echo "machine github.com login docusaurus-bot password $DOCUSAURUS_PUBLISH_TOKEN" > ~/.netrc
1515
# install Docusaurus and generate file of English strings
16-
yarn && cd website && node fetchSupporters.js && yarn write-translations
16+
yarn --immutable && cd website && node fetchSupporters.js && yarn write-translations
1717
# crowdin install
1818
sudo apt-get update
1919
sudo apt-get install default-jre rsync
@@ -30,6 +30,6 @@ else
3030
GIT_USER=docusaurus-bot USE_SSH=false yarn publish-gh-pages
3131
else
3232
echo "Skipping deploy. Test website build"
33-
cd website && yarn && node fetchSupporters.js && yarn build
33+
yarn --immutable && cd website && node fetchSupporters.js && yarn build
3434
fi
3535
fi

Diff for: .eslintignore

-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
bin/
44
flow-typed/**
55
packages/*/build/**
6-
packages/*/build-es5/**
76
packages/jest-diff/src/cleanupSemantic.ts
87
website/blog
98
website/build

Diff for: .eslintplugin/index.js

+14
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
/**
2+
* Copyright (c) 2016-present, Facebook, Inc. All rights reserved.
3+
*
4+
* This source code is licensed under the MIT license found in the
5+
* LICENSE file in the root directory of this source tree.
6+
*/
7+
8+
exports.rules = {
9+
'ban-types-eventually': require('@typescript-eslint/eslint-plugin').rules[
10+
'ban-types'
11+
],
12+
'prefer-rest-params-eventually': require('eslint/lib/rules/prefer-rest-params'),
13+
'prefer-spread-eventually': require('eslint/lib/rules/prefer-spread'),
14+
};

0 commit comments

Comments
 (0)