Skip to content

Commit 319180c

Browse files
committed
Merge branch 'main' into improve-detect
2 parents 5732328 + ea685a5 commit 319180c

File tree

2,468 files changed

+49746
-50513
lines changed

Some content is hidden

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

2,468 files changed

+49746
-50513
lines changed

.circleci/config.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ aliases:
1212
app-dir: ~/jest
1313

1414
orbs:
15-
node: circleci/node@5.0.3
15+
node: circleci/node@5.1.0
1616

1717
jobs:
1818
test-node:
@@ -58,5 +58,6 @@ workflows:
5858
name: test-node-partial-<< matrix.node-version >>
5959
matrix:
6060
parameters:
61-
node-version: ['14', '16', '18']
61+
# For some reason, v20 fails to run yarn install…
62+
node-version: ['16', '18']
6263
- test-jest-jasmine

.eslintplugin/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/**
2-
* Copyright (c) 2016-present, Facebook, Inc. All rights reserved.
2+
* Copyright (c) Meta Platforms, Inc. and affiliates.
33
*
44
* This source code is licensed under the MIT license found in the
55
* LICENSE file in the root directory of this source tree.

.eslintrc.cjs

Lines changed: 19 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/**
2-
* Copyright (c) 2016-present, Facebook, Inc. All rights reserved.
2+
* Copyright (c) Meta Platforms, Inc. and affiliates.
33
*
44
* This source code is licensed under the MIT license found in the
55
* LICENSE file in the root directory of this source tree.
@@ -128,7 +128,7 @@ module.exports = {
128128
rules: {
129129
'@typescript-eslint/ban-types': [
130130
'error',
131-
// TODO: remove these overrides: https://github.com/facebook/jest/issues/10177
131+
// TODO: remove these overrides: https://github.com/jestjs/jest/issues/10177
132132
{types: {Function: false, object: false, '{}': false}},
133133
],
134134
'local/ban-types-eventually': [
@@ -235,6 +235,15 @@ module.exports = {
235235
'jest/prefer-to-have-length': 'off',
236236
},
237237
},
238+
// snapshot in an example needs to keep escapes
239+
{
240+
files: [
241+
'**/2017-02-21-jest-19-immersive-watch-mode-test-platform-improvements.md/**',
242+
],
243+
rules: {
244+
'no-useless-escape': 'off',
245+
},
246+
},
238247

239248
// snapshots in examples plus inline snapshots need to keep backtick
240249
{
@@ -348,7 +357,7 @@ module.exports = {
348357
files: [
349358
'scripts/*',
350359
'packages/*/__benchmarks__/test.js',
351-
'packages/jest-cli/src/init/index.ts',
360+
'packages/create-jest/src/runCreate.ts',
352361
'packages/jest-repl/src/cli/runtime-cli.ts',
353362
],
354363
rules: {
@@ -376,7 +385,7 @@ module.exports = {
376385
parserOptions: {
377386
sourceType: 'module',
378387
},
379-
plugins: ['import', 'jsdoc'],
388+
plugins: ['import', 'jsdoc', 'unicorn'],
380389
rules: {
381390
'accessor-pairs': ['warn', {setWithoutGet: true}],
382391
'block-scoped-var': 'off',
@@ -581,6 +590,12 @@ module.exports = {
581590
'wrap-iife': 'off',
582591
'wrap-regex': 'off',
583592
yoda: 'off',
593+
594+
'unicorn/explicit-length-check': 'error',
595+
'unicorn/no-negated-condition': 'error',
596+
'unicorn/prefer-default-parameters': 'error',
597+
'unicorn/prefer-includes': 'error',
598+
'unicorn/template-indent': 'error',
584599
},
585600
settings: {
586601
'import/ignore': ['react-native'],

.github/ISSUE_TEMPLATE.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
## 👉 [Please follow one of these issue templates](https://github.com/facebook/jest/issues/new/choose) 👈
1+
## 👉 [Please follow one of these issue templates](https://github.com/jestjs/jest/issues/new/choose) 👈
22

33
<!-- Love Jest? Please consider supporting our collective: 👉 https://opencollective.com/jest/donate -->
44

.github/ISSUE_TEMPLATE/bug.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ body:
4141
label: Version
4242
description: |
4343
The version of Jest you are using.
44-
Is it the [latest](https://github.com/facebook/jest/releases)? Test and see if the bug has already been fixed.
44+
Is it the [latest](https://github.com/jestjs/jest/releases)? Test and see if the bug has already been fixed.
4545
placeholder: ex. 27.0.6
4646
validations:
4747
required: true
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
name: Documentation 📖
2+
description: Submit a request to add or update documentation
3+
title: '[Docs]: '
4+
labels: ['Documentation :book:']
5+
body:
6+
- type: markdown
7+
attributes:
8+
value: |
9+
### Thank you for helping us improve our documentation!
10+
11+
Please be sure you are looking at [the latest version of the documentation](https://jestjs.io/docs) before opening an issue here.
12+
- type: textarea
13+
id: links
14+
attributes:
15+
label: Page(s)
16+
description: |
17+
Links to one or more documentation pages that should be modified.
18+
If you are reporting an issue with a specific section of a page, try to link directly to the nearest anchor.
19+
If you are suggesting that a new page be created, link to the parent of the proposed page.
20+
validations:
21+
required: true
22+
- type: textarea
23+
id: description
24+
attributes:
25+
label: Description
26+
description: |
27+
Describe the change you are requesting.
28+
If the issue pertains to a single function or matcher, be sure to specify the entire call signature.
29+
validations:
30+
required: true

.github/dependabot.yml

Lines changed: 0 additions & 6 deletions
This file was deleted.

.github/renovate.json

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
{
2+
"$schema": "https://docs.renovatebot.com/renovate-schema.json",
3+
"extends": ["config:base"],
4+
"lockFileMaintenance": {"enabled": true, "automerge": false},
5+
"rangeStrategy": "replace",
6+
"postUpdateOptions": ["yarnDedupeHighest"],
7+
"packageRules": [
8+
{
9+
"matchPackageNames": ["@tsd/typescript", "typescript"],
10+
"groupName": "typescript"
11+
},
12+
{
13+
"matchPackageNames": ["jest-runner-tsd", "tsd-lite"],
14+
"groupName": "tsd"
15+
}
16+
]
17+
}

.github/workflows/close-stale.yml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
name: 'Close stale issues and PRs'
22
on:
33
schedule:
4-
- cron: '*/10 * * * *'
4+
- cron: '0 * * * *'
55

66
permissions:
77
issues: write # to close stale issues (actions/stale)
@@ -12,7 +12,7 @@ jobs:
1212
name: 'Close month old issues and PRs'
1313
runs-on: ubuntu-latest
1414
steps:
15-
- uses: actions/stale@v6
15+
- uses: actions/stale@v8
1616
with:
1717
start-date: '2022-01-01T00:00:00Z'
1818
stale-issue-message: 'This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 30 days.'
@@ -25,13 +25,14 @@ jobs:
2525
days-before-pr-close: 30
2626
exempt-all-milestones: true
2727
exempt-issue-labels: Pinned
28+
exempt-pr-labels: Pinned
2829
exempt-draft-pr: true
2930
operations-per-run: 1750
3031
stale-legacy:
3132
name: 'Close year old issues and PRs'
3233
runs-on: ubuntu-latest
3334
steps:
34-
- uses: actions/stale@v6
35+
- uses: actions/stale@v8
3536
with:
3637
stale-issue-message: 'This issue is stale because it has been open for 1 year with no activity. Remove stale label or comment or this will be closed in 30 days.'
3738
stale-pr-message: 'This PR is stale because it has been open 1 year with no activity. Remove stale label or comment or this will be closed in 30 days.'
@@ -43,4 +44,5 @@ jobs:
4344
days-before-pr-close: 30
4445
exempt-all-milestones: true
4546
exempt-issue-labels: Pinned
47+
exempt-pr-labels: Pinned
4648
operations-per-run: 1750

.github/workflows/issues.yml

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -12,17 +12,17 @@ jobs:
1212
name: Questions
1313
runs-on: ubuntu-latest
1414
steps:
15-
- name: Close Issue
16-
uses: peter-evans/close-issue@v2
17-
if: "${{ github.event.label.name == ':speech_balloon: Question' }}"
18-
with:
19-
comment: Please note this issue tracker is not a help forum. We recommend using [StackOverflow](https://stackoverflow.com/questions/tagged/jestjs) or our [discord channel](https://discord.gg/j6FKKQQrW9) for questions.
15+
- if: "${{ github.event.label.name == ':speech_balloon: Question' }}"
16+
run: gh issue close $ISSUE --comment "Please note this issue tracker is not a help forum. We recommend using [StackOverflow](https://stackoverflow.com/questions/tagged/jestjs) or our [discord channel](https://discord.gg/j6FKKQQrW9) for questions."
17+
env:
18+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
19+
ISSUE: ${{ github.event.issue.html_url }}
2020
bug-without-repro:
2121
name: Bug reports without reproductions
2222
runs-on: ubuntu-latest
2323
steps:
24-
- name: Close Issue
25-
uses: peter-evans/close-issue@v2
26-
if: "${{ github.event.label.name == 'Needs Reproduction' }}"
27-
with:
28-
comment: As noted in the [Bug Report template](https://github.com/facebook/jest/blob/main/.github/ISSUE_TEMPLATE/bug.yml), all bug reports requires a minimal reproduction. Please open up a new issue providing one. Read more at https://stackoverflow.com/help/minimal-reproducible-example.
24+
- if: "${{ github.event.label.name == 'Needs Reproduction' }}"
25+
run: gh issue close $ISSUE --comment "As noted in the [Bug Report template](https://github.com/jestjs/jest/blob/main/.github/ISSUE_TEMPLATE/bug.yml), all bug reports requires a minimal reproduction. Please open up a new issue providing one. Read more at https://stackoverflow.com/help/minimal-reproducible-example."
26+
env:
27+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
28+
ISSUE: ${{ github.event.issue.html_url }}

0 commit comments

Comments
 (0)