diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md index 8153cffe3e2decf6aba89822c219808e5f6a2579..0b399ec72bee5904cd43221803af728592c90c25 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.md +++ b/.github/ISSUE_TEMPLATE/bug_report.md @@ -103,9 +103,7 @@ labels: 'issue: bug report, needs triage' (Write your steps here:) -1. -2. -3. +1. 2. 3. ### Expected behavior diff --git a/.snyk b/.snyk new file mode 100644 index 0000000000000000000000000000000000000000..69df6e628224daed656d42918b2eaf564ffad7f5 --- /dev/null +++ b/.snyk @@ -0,0 +1 @@ +# Snyk file diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 3c89363208b7a2654b139f641634c4c81174609d..049e4696fd31a014996af8a591a49e3614ed7442 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: + - main + +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 e7eaac5d085c6deb3ee634d8c67eb1b3d1eac60f..5d87709bf018dfa7f849ad3784b1918dc8002b1a 100644 --- a/package.json +++ b/package.json @@ -30,7 +30,7 @@ "get-port": "^5.1.1", "globby": "^11.0.1", "husky": "^4.3.0", - "jest": "26.6.0", + "jest": "^25.0.0", "lerna": "3.22.1", "lerna-changelog": "~0.8.2", "lint-staged": "^10.4.2", diff --git a/packages/react-scripts/config/webpack.config.js b/packages/react-scripts/config/webpack.config.js index 26c2a65aad0111832edbfb122f920242e761962e..e27a3365cb15e568997a6e81b23c8a0df19393b6 100644 --- a/packages/react-scripts/config/webpack.config.js +++ b/packages/react-scripts/config/webpack.config.js @@ -449,6 +449,16 @@ module.exports = function (webpackEnv) { }, }, ], + // START: EVERLONG CHANGES + [ + require.resolve('babel-plugin-styled-components'), + { + fileName: false, + preprocess: false, + displayName: true, + }, + ], + // END: EVERLONG CHANGES isEnvDevelopment && shouldUseReactRefresh && require.resolve('react-refresh/babel'), diff --git a/packages/react-scripts/package.json b/packages/react-scripts/package.json index ffae0fa304b7035de64745e4a779c076c47e22ab..2742075743989e83e8ef45831f62cc6e4a800103 100644 --- a/packages/react-scripts/package.json +++ b/packages/react-scripts/package.json @@ -1,18 +1,19 @@ { - "name": "react-scripts", + "name": "@everlong/league-react-scripts", "version": "4.0.3", - "description": "Configuration and scripts for Create React App.", + "description": "Everlong configuration and scripts for Create React App.", "repository": { "type": "git", - "url": "https://github.com/facebook/create-react-app.git", + "url": "git@github.com:EverlongProject/create-react-app.git", "directory": "packages/react-scripts" }, + "private": false, "license": "MIT", "engines": { "node": "^10.12.0 || >=12.0.0" }, "bugs": { - "url": "https://github.com/facebook/create-react-app/issues" + "url": "git@github.com:EverlongProject/create-react-app/issues" }, "files": [ "bin", @@ -33,6 +34,7 @@ "@svgr/webpack": "5.5.0", "@typescript-eslint/eslint-plugin": "^4.5.0", "@typescript-eslint/parser": "^4.5.0", + "babel-plugin-styled-components": "1.10.6", "babel-eslint": "^10.1.0", "babel-jest": "^26.6.0", "babel-loader": "8.1.0", @@ -58,9 +60,9 @@ "fs-extra": "^9.0.1", "html-webpack-plugin": "4.5.0", "identity-obj-proxy": "3.0.0", - "jest": "26.6.0", - "jest-circus": "26.6.0", - "jest-resolve": "26.6.0", + "jest": "^25.0.0", + "jest-circus": "^25.0.0", + "jest-resolve": "^25.0.0", "jest-watch-typeahead": "0.6.1", "mini-css-extract-plugin": "0.11.3", "optimize-css-assets-webpack-plugin": "5.0.4", @@ -85,7 +87,8 @@ "webpack": "4.44.2", "webpack-dev-server": "3.11.1", "webpack-manifest-plugin": "2.2.0", - "workbox-webpack-plugin": "5.1.4" + "workbox-webpack-plugin": "5.1.4", + "typescript": "3.9.7" }, "devDependencies": { "react": "^17.0.1", diff --git a/packages/react-scripts/scripts/utils/createJestConfig.js b/packages/react-scripts/scripts/utils/createJestConfig.js index ca316aab5c54ca73fd65b4164fdd1e21e80dbe99..708aa2c21951f42693dbd2c76841cd002bf33af5 100644 --- a/packages/react-scripts/scripts/utils/createJestConfig.js +++ b/packages/react-scripts/scripts/utils/createJestConfig.js @@ -39,7 +39,9 @@ module.exports = (resolve, rootDir, isEjecting) => { '<rootDir>/src/**/*.{spec,test}.{js,jsx,ts,tsx}', ], testEnvironment: 'jsdom', - testRunner: require.resolve('jest-circus/runner'), + // START: EVERLONG CHANGES + // testRunner: require.resolve('jest-circus/runner'), + // END: EVERLONG CHANGES transform: { '^.+\\.(js|jsx|mjs|cjs|ts|tsx)$': resolve( 'config/jest/babelTransform.js' @@ -66,7 +68,9 @@ module.exports = (resolve, rootDir, isEjecting) => { 'jest-watch-typeahead/filename', 'jest-watch-typeahead/testname', ], - resetMocks: true, + // START: EVERLONG CHANGES + // resetMocks: true, + // END: EVERLONG CHANGES }; if (rootDir) { config.rootDir = rootDir;