Skip to content

Commit 6c1693e

Browse files
committed
Merge branch 'main' into refactor-use-testTimeoutSymbol
2 parents 4d175b4 + 2f5a93d commit 6c1693e

File tree

663 files changed

+31682
-15560
lines changed

Some content is hidden

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

663 files changed

+31682
-15560
lines changed

Diff for: .azure-pipelines-steps.yml

-46
This file was deleted.

Diff for: .azure-pipelines.yml

-36
This file was deleted.

Diff for: .circleci/config.yml

+3-5
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ aliases:
1212
app-dir: ~/jest
1313

1414
orbs:
15-
node: circleci/node@4.7.0
15+
node: circleci/node@5.0.0
1616

1717
jobs:
1818
test-node:
@@ -28,7 +28,6 @@ jobs:
2828
- checkout
2929
- node/install:
3030
node-version: << parameters.node-version >>
31-
install-npm: false
3231
- node/install-packages: *install
3332
- when:
3433
condition: << parameters.partial >>
@@ -49,8 +48,7 @@ jobs:
4948
steps:
5049
- checkout
5150
- node/install:
52-
node-version: '14'
53-
install-npm: false
51+
node-version: lts/*
5452
- node/install-packages: *install
5553
- run:
5654
command: JEST_JASMINE=1 yarn test-ci-partial && JEST_JASMINE=1 yarn test-leak
@@ -64,7 +62,7 @@ workflows:
6462
- test-node:
6563
matrix:
6664
parameters:
67-
node-version: ['14']
65+
node-version: ['lts/*']
6866
- test-node:
6967
name: test-node-partial-<< matrix.node-version >>
7068
partial: true

Diff for: .eslintignore

+1
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
bin/
44
flow-typed/**
55
packages/*/build/**
6+
packages/*/dist/**
67
packages/jest-diff/src/cleanupSemantic.ts
78
website/.docusaurus
89
website/blog

Diff for: .eslintrc.js

+29-10
Original file line numberDiff line numberDiff line change
@@ -5,15 +5,10 @@
55
* LICENSE file in the root directory of this source tree.
66
*/
77

8-
const {sync: readPkg} = require('read-pkg');
98
const {getPackages} = require('./scripts/buildUtils');
109

1110
const internalPackages = getPackages()
12-
.map(packageDir => {
13-
const pkg = readPkg({cwd: packageDir});
14-
15-
return pkg.name;
16-
})
11+
.map(({pkg}) => pkg.name)
1712
.sort();
1813

1914
module.exports = {
@@ -100,7 +95,6 @@ module.exports = {
10095
'packages/expect/src/matchers.ts',
10196
'packages/expect/src/print.ts',
10297
'packages/expect/src/toThrowMatchers.ts',
103-
'packages/expect/src/types.ts',
10498
'packages/expect/src/utils.ts',
10599
'packages/jest-core/src/ReporterDispatcher.ts',
106100
'packages/jest-core/src/TestScheduler.ts',
@@ -161,6 +155,17 @@ module.exports = {
161155
'sort-keys': 'off',
162156
},
163157
},
158+
// snapshots in examples plus inline snapshots need to keep backtick
159+
{
160+
files: ['*.md', 'e2e/custom-inline-snapshot-matchers/__tests__/*'],
161+
rules: {
162+
quotes: [
163+
'error',
164+
'single',
165+
{allowTemplateLiterals: true, avoidEscape: true},
166+
],
167+
},
168+
},
164169
{
165170
files: ['website/**/*'],
166171
rules: {
@@ -186,6 +191,18 @@ module.exports = {
186191
files: 'packages/**/*.ts',
187192
rules: {
188193
'@typescript-eslint/explicit-module-boundary-types': 'error',
194+
'import/no-anonymous-default-export': [
195+
'error',
196+
{
197+
allowAnonymousClass: false,
198+
allowAnonymousFunction: false,
199+
allowArray: false,
200+
allowArrowFunction: false,
201+
allowCallExpression: false,
202+
allowLiteral: false,
203+
allowObject: true,
204+
},
205+
],
189206
},
190207
},
191208
{
@@ -234,7 +251,7 @@ module.exports = {
234251
},
235252
},
236253
{
237-
files: ['**/__typechecks__/**', '*.md'],
254+
files: ['**/__typetests__/**', '*.md'],
238255
rules: {
239256
'jest/no-focused-tests': 'off',
240257
'jest/no-identical-title': 'off',
@@ -259,11 +276,13 @@ module.exports = {
259276
'website/**',
260277
'**/__mocks__/**',
261278
'**/__tests__/**',
279+
'**/__typetests__/**',
262280
'**/__performance_tests__/**',
263281
'packages/diff-sequences/perf/index.js',
264282
'packages/pretty-format/perf/test.js',
265283
],
266284
rules: {
285+
'@typescript-eslint/no-unused-vars': 'off',
267286
'import/no-unresolved': 'off',
268287
'no-console': 'off',
269288
'no-unused-vars': 'off',
@@ -303,7 +322,7 @@ module.exports = {
303322
devDependencies: [
304323
'**/__mocks__/**',
305324
'**/__tests__/**',
306-
'**/__typechecks__/**',
325+
'**/__typetests__/**',
307326
'**/?(*.)(spec|test).js?(x)',
308327
'scripts/**',
309328
'babel.config.js',
@@ -461,7 +480,7 @@ module.exports = {
461480
quotes: [
462481
'error',
463482
'single',
464-
{allowTemplateLiterals: true, avoidEscape: true},
483+
{allowTemplateLiterals: false, avoidEscape: true},
465484
],
466485
radix: 'warn',
467486
'require-jsdoc': 'off',

Diff for: .github/workflows/nodejs.yml

+4-4
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ jobs:
2626

2727
- uses: actions/setup-node@v2
2828
with:
29-
node-version: 14.x
29+
node-version: lts/*
3030
cache: yarn
3131

3232
- name: Validate cache
@@ -46,7 +46,7 @@ jobs:
4646
- uses: actions/checkout@v2
4747
- uses: actions/setup-node@v2
4848
with:
49-
node-version: 12.x
49+
node-version: lts/*
5050
cache: yarn
5151
- name: install
5252
run: yarn --immutable
@@ -114,10 +114,10 @@ jobs:
114114
git config --global core.symlinks true
115115
if: runner.os == 'Windows'
116116
- uses: actions/checkout@v2
117-
- name: Use Node.js 14.x
117+
- name: Use Node.js LTS
118118
uses: actions/setup-node@v2
119119
with:
120-
node-version: 14.x
120+
node-version: lts/*
121121
cache: yarn
122122
- name: install
123123
run: yarn --immutable

Diff for: .gitignore

+2
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
/node_modules
1818

1919
/packages/*/build/
20+
/packages/*/dist/
2021
/packages/*/coverage/
2122
/packages/*/node_modules/
2223

@@ -40,6 +41,7 @@ junit.xml
4041
package-lock.json
4142

4243
*.tsbuildinfo
44+
api-extractor.json
4345

4446
# https://yarnpkg.com/getting-started/qa#which-files-should-be-gitignored but nested for e2e directories
4547
**/.yarn/*

Diff for: .npmignore

-5
This file was deleted.

Diff for: .yarnrc.yml

+8
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,14 @@ enableGlobalCache: true
22

33
nodeLinker: node-modules
44

5+
packageExtensions:
6+
react-native@*:
7+
peerDependencies:
8+
"@babel/preset-env": "^7.1.6"
9+
react-native-codegen@*:
10+
peerDependencies:
11+
"@babel/preset-env": "^7.1.6"
12+
513
plugins:
614
- path: .yarn/plugins/@yarnpkg/plugin-interactive-tools.cjs
715
spec: "@yarnpkg/plugin-interactive-tools"

0 commit comments

Comments
 (0)