From ce67d02965f74a7cde280b7b1f44aec645152981 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C3=ABl=20De=20Boey?= Date: Mon, 14 Sep 2020 05:26:35 +0200 Subject: [PATCH] fix: Fix azure-pipelines' endOfLine (#9258) --- .gitattributes | 1 + .github/stale.yml | 28 +++---- azure-pipelines-test-job.yml | 76 ++++++++--------- azure-pipelines.yml | 154 +++++++++++++++++------------------ package.json | 6 +- 5 files changed, 133 insertions(+), 132 deletions(-) create mode 100644 .gitattributes diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 00000000000..6313b56c578 --- /dev/null +++ b/.gitattributes @@ -0,0 +1 @@ +* text=auto eol=lf diff --git a/.github/stale.yml b/.github/stale.yml index 9dafb647ef1..91807e989b9 100644 --- a/.github/stale.yml +++ b/.github/stale.yml @@ -9,20 +9,20 @@ daysUntilClose: 5 # Issues or Pull Requests with these labels will never be considered stale. Set to `[]` to disable exemptLabels: - - "contributions: claimed" - - "contributions: up for grabs!" - - "good first issue" - - "issue: announcement" - - "issue: bug" - - "issue: needs investigation" - - "issue: proposal" - - "tag: breaking change" - - "tag: bug fix" - - "tag: documentation" - - "tag: enhancement" - - "tag: internal" - - "tag: new feature" - - "tag: underlying tools" + - 'contributions: claimed' + - 'contributions: up for grabs!' + - 'good first issue' + - 'issue: announcement' + - 'issue: bug' + - 'issue: needs investigation' + - 'issue: proposal' + - 'tag: breaking change' + - 'tag: bug fix' + - 'tag: documentation' + - 'tag: enhancement' + - 'tag: internal' + - 'tag: new feature' + - 'tag: underlying tools' # Set to true to ignore issues in a project (defaults to false) exemptProjects: true diff --git a/azure-pipelines-test-job.yml b/azure-pipelines-test-job.yml index e035e141c91..116d2f87e23 100644 --- a/azure-pipelines-test-job.yml +++ b/azure-pipelines-test-job.yml @@ -1,38 +1,38 @@ -# -# Azure Pipelines job for building and testing create-react-app on Linux, Windows, and macOS. -# - -parameters: - name: '' - testScript: '' - configurations: - LinuxNode10: { vmImage: 'ubuntu-16.04', nodeVersion: 10.x } - LinuxNode12: { vmImage: 'ubuntu-16.04', nodeVersion: 12.x } - -jobs: - - job: ${{ parameters.name }} - strategy: - matrix: - ${{ insert }}: ${{ parameters.configurations }} - pool: - vmImage: $(vmImage) - steps: - - script: | - git config --global core.autocrlf false - git config --global user.name "Create React App" - git config --global user.email "cra@email.com" - displayName: 'Initialize Git config' - - - checkout: self - path: create-react-app - - - task: NodeTool@0 - inputs: - versionSpec: $(nodeVersion) - displayName: 'Install Node.js' - - - script: yarn --frozen-lockfile - displayName: 'Run yarn' - - - bash: ${{ parameters.testScript }} - displayName: 'Run tests' +# +# Azure Pipelines job for building and testing create-react-app on Linux, Windows, and macOS. +# + +parameters: + name: '' + testScript: '' + configurations: + LinuxNode10: { vmImage: 'ubuntu-16.04', nodeVersion: 10.x } + LinuxNode12: { vmImage: 'ubuntu-16.04', nodeVersion: 12.x } + +jobs: + - job: ${{ parameters.name }} + strategy: + matrix: + ${{ insert }}: ${{ parameters.configurations }} + pool: + vmImage: $(vmImage) + steps: + - script: | + git config --global core.autocrlf false + git config --global user.name "Create React App" + git config --global user.email "cra@email.com" + displayName: 'Initialize Git config' + + - checkout: self + path: create-react-app + + - task: NodeTool@0 + inputs: + versionSpec: $(nodeVersion) + displayName: 'Install Node.js' + + - script: yarn --frozen-lockfile + displayName: 'Run yarn' + + - bash: ${{ parameters.testScript }} + displayName: 'Run tests' diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 3b7d9669e57..3c89363208b 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -1,77 +1,77 @@ -# -# Azure Pipelines configuration for building and testing create-react-app on Linux, Windows, and macOS. -# - -trigger: - - master - -variables: - CI: true - # Overrides the Yarn and NPM cache directories so they are on the same drive as the source. This helps improve build performance on Windows hosted agents. - YARN_CACHE_FOLDER: $(Build.SourcesDirectory)/../yarn-cache - NPM_CONFIG_CACHE: $(Build.SourcesDirectory)/../npm-cache - # Sets TEMP to be on the same drive as the cloned source on Windows. This avoids test scripts that "cd" into a directory under TEMP from failing because this directory is on a different drive from the current directory. - VSTS_OVERWRITE_TEMP: True - CRA_INTERNAL_TEST: true - -# ****************************************************************************** -# Simple test suite -# ****************************************************************************** -jobs: - - template: azure-pipelines-test-job.yml - parameters: - name: Simple - testScript: tasks/e2e-simple.sh - - # ****************************************************************************** - # Installs test suite - # ****************************************************************************** - - template: azure-pipelines-test-job.yml - parameters: - name: Installs - testScript: tasks/e2e-installs.sh - - # ****************************************************************************** - # Kitchensink test suite - # ****************************************************************************** - - template: azure-pipelines-test-job.yml - parameters: - name: Kitchensink - testScript: tasks/e2e-kitchensink.sh - - # ****************************************************************************** - # Kitchensink Eject test suite - # ****************************************************************************** - - template: azure-pipelines-test-job.yml - parameters: - name: KitchensinkEject - testScript: tasks/e2e-kitchensink-eject.sh - - # ****************************************************************************** - # Behavior test suite - # ****************************************************************************** - - template: azure-pipelines-test-job.yml - parameters: - name: Behavior - testScript: tasks/e2e-behavior.sh - configurations: - LinuxNode10: { vmImage: 'ubuntu-16.04', nodeVersion: 10.x } - LinuxNode12: { vmImage: 'ubuntu-16.04', nodeVersion: 12.x } - WindowsNode10: { vmImage: 'windows-2019', nodeVersion: 10.x } - WindowsNode12: { vmImage: 'windows-2019', nodeVersion: 12.x } - MacNode10: { vmImage: 'macOS-10.15', nodeVersion: 10.x } - MacNode12: { vmImage: 'macOS-10.15', nodeVersion: 12.x } - - # ****************************************************************************** - # Old Node test suite - # ****************************************************************************** - - job: OldNode - pool: - vmImage: ubuntu-latest - steps: - - task: NodeTool@0 - inputs: - versionSpec: 8.x - displayName: 'Install Node.js 8.x' - - bash: tasks/e2e-old-node.sh - displayName: 'Run tests' +# +# Azure Pipelines configuration for building and testing create-react-app on Linux, Windows, and macOS. +# + +trigger: + - master + +variables: + CI: true + # Overrides the Yarn and NPM cache directories so they are on the same drive as the source. This helps improve build performance on Windows hosted agents. + YARN_CACHE_FOLDER: $(Build.SourcesDirectory)/../yarn-cache + NPM_CONFIG_CACHE: $(Build.SourcesDirectory)/../npm-cache + # Sets TEMP to be on the same drive as the cloned source on Windows. This avoids test scripts that "cd" into a directory under TEMP from failing because this directory is on a different drive from the current directory. + VSTS_OVERWRITE_TEMP: True + CRA_INTERNAL_TEST: true + +# ****************************************************************************** +# Simple test suite +# ****************************************************************************** +jobs: + - template: azure-pipelines-test-job.yml + parameters: + name: Simple + testScript: tasks/e2e-simple.sh + + # ****************************************************************************** + # Installs test suite + # ****************************************************************************** + - template: azure-pipelines-test-job.yml + parameters: + name: Installs + testScript: tasks/e2e-installs.sh + + # ****************************************************************************** + # Kitchensink test suite + # ****************************************************************************** + - template: azure-pipelines-test-job.yml + parameters: + name: Kitchensink + testScript: tasks/e2e-kitchensink.sh + + # ****************************************************************************** + # Kitchensink Eject test suite + # ****************************************************************************** + - template: azure-pipelines-test-job.yml + parameters: + name: KitchensinkEject + testScript: tasks/e2e-kitchensink-eject.sh + + # ****************************************************************************** + # Behavior test suite + # ****************************************************************************** + - template: azure-pipelines-test-job.yml + parameters: + name: Behavior + testScript: tasks/e2e-behavior.sh + configurations: + LinuxNode10: { vmImage: 'ubuntu-16.04', nodeVersion: 10.x } + LinuxNode12: { vmImage: 'ubuntu-16.04', nodeVersion: 12.x } + WindowsNode10: { vmImage: 'windows-2019', nodeVersion: 10.x } + WindowsNode12: { vmImage: 'windows-2019', nodeVersion: 12.x } + MacNode10: { vmImage: 'macOS-10.15', nodeVersion: 10.x } + MacNode12: { vmImage: 'macOS-10.15', nodeVersion: 12.x } + + # ****************************************************************************** + # Old Node test suite + # ****************************************************************************** + - job: OldNode + pool: + vmImage: ubuntu-latest + steps: + - task: NodeTool@0 + inputs: + versionSpec: 8.x + displayName: 'Install Node.js 8.x' + - bash: tasks/e2e-old-node.sh + displayName: 'Run tests' diff --git a/package.json b/package.json index b23e1b7c31d..4188b28368a 100644 --- a/package.json +++ b/package.json @@ -16,7 +16,7 @@ "screencast:error": "svg-term --cast jyu19xGl88FQ3poMY8Hbmfw8y --out screencast-error.svg --window --at 12000 --no-cursor", "alex": "alex .", "test": "cd packages/react-scripts && node bin/react-scripts.js test", - "format": "prettier --trailing-comma es5 --single-quote --write 'packages/*/*.js' 'packages/*/!(node_modules)/**/*.js'", + "format": "prettier --write 'packages/*/*.js' 'packages/*/!(node_modules)/**/*.js'", "compile:lockfile": "node tasks/compile-lockfile.js" }, "devDependencies": { @@ -50,8 +50,8 @@ } }, "lint-staged": { - "*.{js,md,css,html}": [ - "prettier --trailing-comma es5 --single-quote --write" + "*.{js,json,yml,yaml,css,scss,ts,tsx,md}": [ + "prettier --write" ] } }