Skip to content

Commit

Permalink
Merge branch 'master' into hmm
Browse files Browse the repository at this point in the history
  • Loading branch information
SimenB committed Mar 4, 2019
2 parents 25af98b + 5ba35be commit 1cb7665
Show file tree
Hide file tree
Showing 1,589 changed files with 91,724 additions and 114,032 deletions.
68 changes: 34 additions & 34 deletions .azure-pipelines-steps.yml
Original file line number Diff line number Diff line change
@@ -1,45 +1,45 @@
#
# Steps for building and testing Jest. See jobs defined in .azure-pipelines.yml
#
#

# Clones the repo
steps:
- checkout: self
- checkout: self

# Ensure Node.js 10 is active
- task: NodeTool@0
inputs:
versionSpec: '10.x'
displayName: 'Use Node.js 10'
# Ensure Node.js 10 is active
- task: NodeTool@0
inputs:
versionSpec: '10.x'
displayName: 'Use Node.js 10'

# Ensure Python 2.7 is active
- task: UsePythonVersion@0
inputs:
versionSpec: '2.7'
displayName: 'Use Python 2.7'
# Ensure Python 2.7 is active
- task: UsePythonVersion@0
inputs:
versionSpec: '2.7'
displayName: 'Use Python 2.7'

# Workaround to move source files under a "jest" folder (see .azure-pipelines.yml for details)
- script: |
cd /
mv $(Build.Repository.LocalPath) $(JEST_DIR)
mkdir $(Build.Repository.LocalPath)
displayName: 'Move source into jest folder'
# Workaround to move source files under a "jest" folder (see .azure-pipelines.yml for details)
- script: |
cd /
mv $(Build.Repository.LocalPath) $(JEST_DIR)
mkdir $(Build.Repository.LocalPath)
displayName: 'Move source into jest folder'
# Run yarn to install dependencies and build
- script: yarn
workingDirectory: $(JEST_DIR)
displayName: 'Install dependencies and build'
# Run yarn to install dependencies and build
- script: yarn --frozen-lockfile
workingDirectory: $(JEST_DIR)
displayName: 'Install dependencies and build'

# Run test-ci-partial
- script: yarn run test-ci-partial
workingDirectory: $(JEST_DIR)
displayName: 'Run tests'
# Run test-ci-partial
- script: yarn run test-ci-partial
workingDirectory: $(JEST_DIR)
displayName: 'Run tests'

# Publish CI test results
- task: PublishTestResults@2
inputs:
testResultsFiles: '**/reports/junit/*.xml'
searchFolder: $(JEST_DIR)
testRunTitle: 'CI Tests $(Agent.OS)'
displayName: 'Publish test results'
condition: succeededOrFailed()
# Publish CI test results
- task: PublishTestResults@2
inputs:
testResultsFiles: '**/reports/junit/*.xml'
searchFolder: $(JEST_DIR)
testRunTitle: 'CI Tests $(Agent.OS)'
displayName: 'Publish test results'
condition: succeededOrFailed()
46 changes: 23 additions & 23 deletions .azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,30 +3,30 @@
#

jobs:
- job: Linux
pool:
vmImage: ubuntu-16.04
steps:
- template: .azure-pipelines-steps.yml
- job: Linux
pool:
vmImage: ubuntu-16.04
steps:
- template: .azure-pipelines-steps.yml

- job: Windows
pool:
vmImage: vs2017-win2016
steps:
- script: |
git config --global core.autocrlf false
git config --global core.symlinks true
displayName: 'Preserve LF endings and symbolic links on check out'
- template: .azure-pipelines-steps.yml
- job: Windows
pool:
vmImage: vs2017-win2016
steps:
- script: |
git config --global core.autocrlf false
git config --global core.symlinks true
displayName: 'Preserve LF endings and symbolic links on check out'
- template: .azure-pipelines-steps.yml

- job: macOS
pool:
vmImage: macos-10.13
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
displayName: 'Install Mercurial'
- template: .azure-pipelines-steps.yml
- job: macOS
pool:
vmImage: macos-10.13
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
displayName: 'Install Mercurial'
- template: .azure-pipelines-steps.yml

variables:
# Used by chalk. Ensures output from Jest includes ANSI escape characters that are needed to match test snapshots.
Expand All @@ -35,6 +35,6 @@ variables:
# By default, Azure Pipelines clones to an "s" directory, which causes tests to fail due to assumption of Jest being run from a "jest" directory.
# See packages/jest-message-util/src/index.js PATH_JEST_PACKAGES for more details.
JEST_DIR: $(Agent.BuildDirectory)/jest

# Ensures the handful of tests that should be skipped during CI are
CI: true
17 changes: 9 additions & 8 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,9 @@ jobs:
steps:
- checkout
- restore-cache: *restore-cache
- run: yarn --no-progress
- run: yarn --no-progress --frozen-lockfile
- save-cache: *save-cache
- run: echo server.max_workers=1 >> .flowconfig
- run: yarn lint --format junit -o reports/junit/js-lint-results.xml && yarn typecheck && yarn lint-es5-build --format junit -o reports/junit/js-es5-lint-results.xml && yarn lint:md:ci && yarn check-copyright-headers
- store_test_results:
path: reports/junit
Expand All @@ -37,7 +38,7 @@ jobs:
steps:
- checkout
- restore-cache: *restore-cache
- run: yarn --no-progress --ignore-engines
- run: yarn --no-progress --frozen-lockfile --ignore-engines
- save-cache: *save-cache
- run:
# react-native does not work with node 6
Expand All @@ -52,7 +53,7 @@ jobs:
steps:
- checkout
- restore-cache: *restore-cache
- run: yarn --no-progress
- run: yarn --no-progress --frozen-lockfile
- save-cache: *save-cache
- run:
command: yarn test-ci-partial
Expand All @@ -66,7 +67,7 @@ jobs:
steps:
- checkout
- restore-cache: *restore-cache
- run: yarn --no-progress
- run: yarn --no-progress --frozen-lockfile
- save-cache: *save-cache
- run:
command: yarn test-ci
Expand All @@ -80,7 +81,7 @@ jobs:
steps:
- checkout
- restore-cache: *restore-cache
- run: yarn --no-progress
- run: yarn --no-progress --frozen-lockfile
- save-cache: *save-cache
- run:
command: JEST_CIRCUS=1 yarn test-ci-partial
Expand All @@ -94,7 +95,7 @@ jobs:
steps:
- checkout
- restore-cache: *restore-cache
- run: yarn --no-progress
- run: yarn --no-progress --frozen-lockfile
- save-cache: *save-cache
- run:
command: yarn test-ci-partial
Expand All @@ -108,7 +109,7 @@ jobs:
steps:
- checkout
- restore-cache: *restore-cache
- run: yarn --no-progress
- run: yarn --no-progress --frozen-lockfile
- save-cache: *save-cache
- run: yarn test-ci-es5-build-in-browser

Expand All @@ -120,7 +121,7 @@ jobs:
steps:
- checkout
- restore-cache: *restore-cache
- run: yarn --no-progress
- run: yarn --no-progress --frozen-lockfile
- save-cache: *save-cache
- run:
name: Test or Deploy Jest Website
Expand Down
23 changes: 19 additions & 4 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,7 @@
* LICENSE file in the root directory of this source tree.
*/

const path = require('path');
const customImportResolver = path.resolve('./eslintImportResolver');
const customImportResolver = require.resolve('./eslintImportResolver');

module.exports = {
extends: [
Expand All @@ -16,6 +15,21 @@ module.exports = {
'prettier/flowtype',
],
overrides: [
{
files: ['*.ts', '*.tsx'],
parser: '@typescript-eslint/parser',
plugins: ['@typescript-eslint/eslint-plugin'],
rules: {
'@typescript-eslint/array-type': ['error', 'generic'],
'@typescript-eslint/no-unused-vars': [
'error',
{argsIgnorePattern: '^_'},
],
'import/order': 'error',
'no-dupe-class-members': 'off',
'no-unused-vars': 'off',
},
},
// to make it more suitable for running on code examples in docs/ folder
{
files: ['*.md'],
Expand Down Expand Up @@ -51,14 +65,14 @@ module.exports = {
},
},
{
files: 'types/**/*',
files: ['types/**/*', 'packages/jest-types/**/*'],
rules: {
'import/no-extraneous-dependencies': 0,
},
},
{
files: [
'e2e/__tests__/**/*',
'e2e/__tests__/**/*.js',
'packages/babel-jest/**/*.test.js',
'packages/babel-plugin-jest-hoist/**/*.test.js',
'packages/babel-preset-jest/**/*.test.js',
Expand Down Expand Up @@ -123,6 +137,7 @@ module.exports = {
'^types/(.*)': './types/$1',
},
},
'eslint-import-resolver-typescript': true,
},
},
};
17 changes: 9 additions & 8 deletions .flowconfig
Original file line number Diff line number Diff line change
@@ -1,16 +1,10 @@
[ignore]
.*/examples/.*
.*/node_modules/metro-bundler/.*
.*/node_modules/metro-config/.*
.*/node_modules/metro/.*
.*/node_modules/module-deps/.*

[options]
module.name_mapper='^pretty-format$' -> '<PROJECT_ROOT>/packages/pretty-format/src/index.js'
module.name_mapper='^types/\(.*\)$' -> '<PROJECT_ROOT>/types/\1.js'
module.name_mapper='\(jest-[^/]*\)' -> '<PROJECT_ROOT>/packages/\1/src/index.js'
include_warnings=true
emoji=true

[strict]
nonstrict-import
unclear-type
Expand All @@ -19,4 +13,11 @@ untyped-import
untyped-type-import

[version]
^0.90.0
^0.93.0

[options]
module.name_mapper='^pretty-format$' -> '<PROJECT_ROOT>/packages/pretty-format/src/index.js'
module.name_mapper='^types/\(.*\)$' -> '<PROJECT_ROOT>/types/\1.js'
module.name_mapper='\(jest-[^/]*\)' -> '<PROJECT_ROOT>/packages/\1/src/index.js'
include_warnings=true
emoji=true
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/question.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ about: If you have questions, please check our Discord or StackOverflow

## 💬 Questions and Help

### Please note that this issue tracker is not a help form and this issue will be closed.
### Please note that this issue tracker is not a help forum and this issue will be closed.

For questions or help please see:

Expand Down
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@
/website/translated_docs
/website/i18n/*

/reports/*

coverage
lerna-debug.log
npm-debug.log
Expand Down
2 changes: 2 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ before_install:
- curl -o- -L https://yarnpkg.com/install.sh | bash
- export PATH="$HOME/.yarn/bin:$PATH"

install: yarn --frozen-lockfile

cache:
yarn: true
directories:
Expand Down
Loading

0 comments on commit 1cb7665

Please sign in to comment.