Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/master' into uglier-inline-sna…
Browse files Browse the repository at this point in the history
…pshots

* upstream/master: (225 commits)
  docs: add CLA link to contributing docs (jestjs#9789)
  chore: roll new version of docs
  v25.3.0
  chore: update changelog for release
  chore(jest-types): correct type testRegex for ProjectConfig (jestjs#9780)
  feat(circus): enable writing async test event handlers (jestjs#9397)
  feat: enable all babel syntax plugins (jestjs#9774)
  chore: add helper for getting Jest's config in e2e tests (jestjs#9770)
  feat: pass ESM options to transformers (jestjs#9597)
  chore: replace `any`s with `unknown`s (jestjs#9626)
  feat: pass ESM options to Babel (jestjs#9766)
  chore(website): add copy button the code blocks (jestjs#9750)
  chore: bump istanbul-reports for new uncovered lines design (jestjs#9758)
  chore: correct CHANGELOG.md (jestjs#9763)
  chore(jest-types): expose type `CacheKeyOptions` for `getCacheK… (jestjs#9762)
  docs: Fix simple typo, seperated -> separated (jestjs#9760)
  v25.2.7
  chore: update changelog for release
  fix: drop getters and setters when diffing objects for error (jestjs#9757)
  chore(jest-types): correct return type of shouldRunTestSuite fo… (jestjs#9753)
  ...
  • Loading branch information
jeysal committed Apr 10, 2020
2 parents 2bc8090 + 4caa7b5 commit 1b10dc8
Show file tree
Hide file tree
Showing 819 changed files with 19,538 additions and 14,873 deletions.
2 changes: 1 addition & 1 deletion .azure-pipelines.yml
Expand Up @@ -21,7 +21,7 @@ jobs:

- job: macOS
pool:
vmImage: macos-10.13
vmImage: macos-10.15
steps:
# This step can be removed once Mercurial gets installed on the macOS image. See https://github.com/Microsoft/azure-pipelines-image-generation/issues/604
- script: HOMEBREW_NO_AUTO_UPDATE=1 brew install mercurial
Expand Down
16 changes: 2 additions & 14 deletions .circleci/config.yml
Expand Up @@ -18,25 +18,14 @@ aliases:

version: 2
jobs:
lint-and-typecheck:
working_directory: ~/jest
docker:
- image: circleci/node:12
steps:
- checkout
- restore-cache: *restore-cache
- run: yarn --no-progress --frozen-lockfile
- save-cache: *save-cache
- run: yarn lint --format junit -o reports/junit/js-lint-results.xml && yarn lint-es5-build --format junit -o reports/junit/js-es5-lint-results.xml && yarn lint:prettier:ci && yarn check-copyright-headers
- store_test_results:
path: reports/junit

test-node-8:
working_directory: ~/jest
docker:
- image: circleci/node:8
steps:
- checkout
- run:
command: yarn remove-prettier-dep
- restore-cache: *restore-cache
- run: *install
- save-cache: *save-cache
Expand Down Expand Up @@ -131,7 +120,6 @@ workflows:
version: 2
build-and-deploy:
jobs:
- lint-and-typecheck
- test-node-8
- test-node-10
- test-node-12
Expand Down
6 changes: 3 additions & 3 deletions .circleci/website.sh
Expand Up @@ -3,7 +3,7 @@
set -e

git diff-tree --no-commit-id --name-only -r HEAD > files_changed.txt
if ! grep -E "(^docs\/.*)|(^website\/.*)" files_changed.txt; then
if ! grep -E "(^docs\/.*)|(^website\/.*)|(^\.circleci/website\.sh$)" files_changed.txt; then
echo "Skipping deploy & test. No relevant website files have changed"
else
echo "Relevant website files have changed"
Expand All @@ -13,7 +13,7 @@ else
git config --global user.name "Website Deployment Script"
echo "machine github.com login docusaurus-bot password $DOCUSAURUS_PUBLISH_TOKEN" > ~/.netrc
# install Docusaurus and generate file of English strings
yarn && cd website && yarn write-translations
yarn && cd website && node fetchSupporters.js && yarn write-translations
# crowdin install
sudo apt-get update
sudo apt-get install default-jre rsync
Expand All @@ -30,6 +30,6 @@ else
GIT_USER=docusaurus-bot USE_SSH=false yarn publish-gh-pages
else
echo "Skipping deploy. Test website build"
cd website && yarn && yarn build
cd website && yarn && node fetchSupporters.js && yarn build
fi
fi
1 change: 1 addition & 0 deletions .eslintignore
Expand Up @@ -10,4 +10,5 @@ website/build
website/node_modules
website/i18n/*.js
website/translated_docs
website/static
!.eslintrc.js
36 changes: 34 additions & 2 deletions .eslintrc.js
Expand Up @@ -12,6 +12,7 @@ module.exports = {
'plugin:import/typescript',
'prettier',
'prettier/flowtype',
'plugin:eslint-comments/recommended',
],
overrides: [
{
Expand Down Expand Up @@ -67,11 +68,41 @@ module.exports = {
},
},
{
files: ['packages/jest-types/**/*'],
files: 'packages/jest-types/**/*',
rules: {
'import/no-extraneous-dependencies': 0,
},
},
{
files: 'packages/**/*.ts',
rules: {
'@typescript-eslint/explicit-module-boundary-types': 2,
},
},
{
files: [
'**/__tests__/**',
'**/__mocks__/**',
'packages/jest-jasmine2/src/jasmine/**/*',
'packages/expect/src/jasmineUtils.ts',
'**/vendor/**/*',
],
rules: {
'@typescript-eslint/explicit-module-boundary-types': 0,
},
},
{
files: [
'packages/jest-jasmine2/src/jasmine/**/*',
'packages/expect/src/jasmineUtils.ts',
'e2e/browser-support/browserTest.js',
'**/vendor/**/*',
],
rules: {
'eslint-comments/disable-enable-pair': 0,
'eslint-comments/no-unlimited-disable': 0,
},
},
{
files: [
'website/**',
Expand All @@ -85,9 +116,10 @@ module.exports = {
},
],
parser: 'babel-eslint',
plugins: ['markdown', 'import', 'prettier'],
plugins: ['markdown', 'import', 'prettier', 'eslint-comments'],
rules: {
'arrow-body-style': 2,
'eslint-comments/no-unused-disable': 2,
'flowtype/boolean-style': 2,
'flowtype/no-primitive-constructor-types': 2,
'flowtype/require-valid-file-annotation': 2,
Expand Down
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/bug.md
Expand Up @@ -32,6 +32,6 @@ Run npx envinfo --preset jest
Paste the results here:
-->

```bash
```
```
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/regression.md
Expand Up @@ -34,6 +34,6 @@ Issues without a reproduction link are likely to stall.

Paste the results here:

```bash
```
```
93 changes: 93 additions & 0 deletions .github/workflows/nodejs.yml
@@ -0,0 +1,93 @@
name: Node CI

on:
push:
branches:
- master
pull_request:
branches:
- '**'

jobs:
cleanup-runs:
runs-on: ubuntu-latest
steps:
- uses: rokroskar/workflow-run-cleanup-action@master
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
if: "!startsWith(github.ref, 'refs/tags/') && github.ref != 'refs/heads/master'"

lint-and-typecheck:
name: Running TypeScript compiler & ESLint
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- name: Get yarn cache
id: yarn-cache
run: echo "::set-output name=dir::$(yarn cache dir)"
- uses: actions/cache@v1
with:
path: ${{ steps.yarn-cache.outputs.dir }}
key: ubuntu-latest-node-12.x-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
ubuntu-latest-node-12.x-yarn-
- uses: actions/setup-node@v1
with:
node-version: 12.x
- name: install
run: yarn install-no-ts-build
- name: build
run: node scripts/build.js
- name: run tsc
run: yarn build:ts
- name: verify ts 3.4 compatibility
run: yarn verify-old-ts
- name: run eslint
run: yarn lint
- name: run eslint on browser builds
run: yarn lint-es5-build
- name: run prettier
run: yarn lint:prettier:ci
- name: check copyright headers
run: yarn check-copyright-headers
test:
name: Node v${{ matrix.node-version }} on ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
# https://github.com/actions/setup-node/issues/27
node-version: [8.17.0, 10.x, 12.x, 13.x]
os: [ubuntu-latest, macOS-latest, windows-latest]
runs-on: ${{ matrix.os }}

steps:
- name: Set git config
shell: bash
run: |
git config --global core.autocrlf false
git config --global core.symlinks true
if: runner.os == 'Windows'
- uses: actions/checkout@v2
- name: Get yarn cache
id: yarn-cache
run: echo "::set-output name=dir::$(yarn cache dir)"
- uses: actions/cache@v1
with:
path: ${{ steps.yarn-cache.outputs.dir }}
key: ${{ runner.os }}-node-${{ matrix.node-version }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-node-${{ matrix.node-version }}-yarn-
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
- name: remove prettier dep
run: yarn remove-prettier-dep
if: matrix.node-version == '8.17.0'
- name: install
run: yarn install-no-ts-build
- name: run tests
run: yarn test-ci-partial
env:
CI: true
1 change: 1 addition & 0 deletions .gitignore
Expand Up @@ -4,6 +4,7 @@
*.swp
*~
/examples/*/node_modules/
/examples/mongodb/globalConfig.json

/e2e/*/node_modules
/e2e/*/.pnp
Expand Down
7 changes: 3 additions & 4 deletions .vscode/settings.json
Expand Up @@ -5,10 +5,9 @@
"**/node_modules": true,
"**/build": true
},
"editor.formatOnSave": true,
"flow.useNPMPackagedFlow": true,
"javascript.validate.enable": false,
"jest.pathToJest": "yarn jest --",
"prettier.eslintIntegration": true,
"typescript.format.insertSpaceAfterOpeningAndBeforeClosingNonemptyBraces": false
"editor.codeActionsOnSave": {
"source.fixAll.eslint": true
}
}

0 comments on commit 1b10dc8

Please sign in to comment.