From e2303c15e4219a01468b72b6b133cd618312a885 Mon Sep 17 00:00:00 2001 From: Supriya S Date: Wed, 26 May 2021 10:14:52 +0530 Subject: [PATCH 01/10] change workflows --- .github/workflows/build.yml | 12 +++++++++++ .github/workflows/integration.yml | 36 ------------------------------- .github/workflows/lint.yml | 13 ----------- 3 files changed, 12 insertions(+), 49 deletions(-) delete mode 100644 .github/workflows/integration.yml delete mode 100644 .github/workflows/lint.yml diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 7b94526e804..968d684fa08 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -7,6 +7,18 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v1 + - name: Cache node modules + uses: actions/cache@v2 + env: + cache-name: cache-node-modules + with: + # npm cache files are stored in `~/.npm` on Linux/macOS + path: ~/.npm + key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }} + restore-keys: | + ${{ runner.os }}-build-${{ env.cache-name }}- + ${{ runner.os }}-build- + ${{ runner.os }}- - name: Install run: yarn --no-progress --non-interactive --no-lockfile - name: Build diff --git a/.github/workflows/integration.yml b/.github/workflows/integration.yml deleted file mode 100644 index 1249f20532f..00000000000 --- a/.github/workflows/integration.yml +++ /dev/null @@ -1,36 +0,0 @@ -name: Integration Tests - -on: - push: - branches: - - master - pull_request: - branches: - - master - -jobs: - job: - runs-on: ${{ matrix.os }} - strategy: - matrix: - os: ['ubuntu-latest', 'macos-latest', 'windows-latest'] - node: ['10', '12', '14'] - steps: - - uses: actions/checkout@v2 - - name: Setup node - uses: actions/setup-node@v1 - with: - node-version: ${{ matrix.node }} - - name: Cache dependencies - id: cache - uses: actions/cache@v2 - with: - path: | - node_modules - */*/node_modules - key: ${{ runner.os }}-${{ hashFiles('**/yarn.lock', './yarn.lock') }} - - name: Install packages - if: steps.cache.outputs.cache-hit != 'true' - run: yarn --frozen-lockfile --prefer-offline - - name: Run integration tests - run: yarn test:integration diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml deleted file mode 100644 index a2e7567d1e1..00000000000 --- a/.github/workflows/lint.yml +++ /dev/null @@ -1,13 +0,0 @@ -name: Lint - -on: [push] - -jobs: - lint: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v1 - - name: Install - run: yarn --no-progress --non-interactive --no-lockfile - - name: Alex - run: yarn alex From b3caa1d9b059706c441bf81da6ab1c95f4138ce3 Mon Sep 17 00:00:00 2001 From: Supriya S Date: Wed, 26 May 2021 10:20:47 +0530 Subject: [PATCH 02/10] log env --- packages/react-scripts/bin/react-scripts.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/packages/react-scripts/bin/react-scripts.js b/packages/react-scripts/bin/react-scripts.js index 09604f6a03f..2f3eac578cc 100755 --- a/packages/react-scripts/bin/react-scripts.js +++ b/packages/react-scripts/bin/react-scripts.js @@ -24,6 +24,8 @@ const scriptIndex = args.findIndex( const script = scriptIndex === -1 ? args[0] : args[scriptIndex]; const nodeArgs = scriptIndex > 0 ? args.slice(0, scriptIndex) : []; +console.log(process.env); + if (['build', 'eject', 'start', 'test'].includes(script)) { const result = spawn.sync( process.execPath, From 62c669bdab75ccbf4a2b0df57b8998725eb8c787 Mon Sep 17 00:00:00 2001 From: Supriya S Date: Wed, 26 May 2021 15:01:10 +0530 Subject: [PATCH 03/10] testing build --- .github/workflows/build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 968d684fa08..831d58b807b 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -1,4 +1,4 @@ -name: Build +name: Testing Build on: [push] From 8e2b4bb99274a6d1fae11f9f8d25fac2bba5cf15 Mon Sep 17 00:00:00 2001 From: Supriya S Date: Wed, 26 May 2021 15:13:12 +0530 Subject: [PATCH 04/10] add asset compare plugin --- .github/workflows/build.yml | 2 ++ package.json | 1 + packages/react-scripts/bin/react-scripts.js | 2 -- packages/react-scripts/config/webpack.config.js | 4 ++++ 4 files changed, 7 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 831d58b807b..f7caf7df5d4 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -23,3 +23,5 @@ jobs: run: yarn --no-progress --non-interactive --no-lockfile - name: Build run: yarn build + env: + GITHUB_PERSONAL_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/package.json b/package.json index a5c093bf32e..43c08aaea45 100644 --- a/package.json +++ b/package.json @@ -25,6 +25,7 @@ "@testing-library/react": "^11.1.0", "@testing-library/user-event": "^12.1.10", "alex": "^8.2.0", + "asset-compare-git-webpack-plugin": "https://github.com/supriya-raj/asset-compare-git-webpack-plugin#948ea4be2398351ff2fab233e83fa0ff7c465a8f", "eslint": "^7.11.0", "execa": "1.0.0", "fs-extra": "^9.0.1", diff --git a/packages/react-scripts/bin/react-scripts.js b/packages/react-scripts/bin/react-scripts.js index 2f3eac578cc..09604f6a03f 100755 --- a/packages/react-scripts/bin/react-scripts.js +++ b/packages/react-scripts/bin/react-scripts.js @@ -24,8 +24,6 @@ const scriptIndex = args.findIndex( const script = scriptIndex === -1 ? args[0] : args[scriptIndex]; const nodeArgs = scriptIndex > 0 ? args.slice(0, scriptIndex) : []; -console.log(process.env); - if (['build', 'eject', 'start', 'test'].includes(script)) { const result = spawn.sync( process.execPath, diff --git a/packages/react-scripts/config/webpack.config.js b/packages/react-scripts/config/webpack.config.js index 5e5f87f3ce9..6c3c6ab1c39 100644 --- a/packages/react-scripts/config/webpack.config.js +++ b/packages/react-scripts/config/webpack.config.js @@ -8,6 +8,7 @@ // @remove-on-eject-end 'use strict'; +const AssetComparePlugin = require('asset-compare-git-webpack-plugin'); const fs = require('fs'); const path = require('path'); const webpack = require('webpack'); @@ -788,6 +789,9 @@ module.exports = function (webpackEnv) { }, }, }), + new AssetComparePlugin({ + gist_id: '3372502a4187b06e810e07f1b20b6d24', + }), ].filter(Boolean), // Some libraries import Node modules but don't use them in the browser. // Tell webpack to provide empty mocks for them so importing them works. From 34d01a4c96cbfb356fe33f39b024d67a56b546b2 Mon Sep 17 00:00:00 2001 From: Supriya S Date: Wed, 26 May 2021 16:24:00 +0530 Subject: [PATCH 05/10] try with fixes --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 43c08aaea45..64c35d098a6 100644 --- a/package.json +++ b/package.json @@ -25,7 +25,7 @@ "@testing-library/react": "^11.1.0", "@testing-library/user-event": "^12.1.10", "alex": "^8.2.0", - "asset-compare-git-webpack-plugin": "https://github.com/supriya-raj/asset-compare-git-webpack-plugin#948ea4be2398351ff2fab233e83fa0ff7c465a8f", + "asset-compare-git-webpack-plugin": "https://github.com/supriya-raj/asset-compare-git-webpack-plugin#484cb890592caad60a2bbdb0ed046b04275f6bb3 ", "eslint": "^7.11.0", "execa": "1.0.0", "fs-extra": "^9.0.1", From 4271c4c0cba00c1d182b2f10c80a670be59567e9 Mon Sep 17 00:00:00 2001 From: Supriya S Date: Wed, 26 May 2021 16:26:10 +0530 Subject: [PATCH 06/10] remove space --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 64c35d098a6..f03b1035b27 100644 --- a/package.json +++ b/package.json @@ -25,7 +25,7 @@ "@testing-library/react": "^11.1.0", "@testing-library/user-event": "^12.1.10", "alex": "^8.2.0", - "asset-compare-git-webpack-plugin": "https://github.com/supriya-raj/asset-compare-git-webpack-plugin#484cb890592caad60a2bbdb0ed046b04275f6bb3 ", + "asset-compare-git-webpack-plugin": "https://github.com/supriya-raj/asset-compare-git-webpack-plugin#484cb890592caad60a2bbdb0ed046b04275f6bb3", "eslint": "^7.11.0", "execa": "1.0.0", "fs-extra": "^9.0.1", From 413cad1c6ab8366dcb21305868ef046d88048382 Mon Sep 17 00:00:00 2001 From: Supriya S Date: Wed, 26 May 2021 17:33:51 +0530 Subject: [PATCH 07/10] feat: Update assets --- webpack-asset-stats.json | 1 + 1 file changed, 1 insertion(+) create mode 100644 webpack-asset-stats.json diff --git a/webpack-asset-stats.json b/webpack-asset-stats.json new file mode 100644 index 00000000000..8b242d2f37f --- /dev/null +++ b/webpack-asset-stats.json @@ -0,0 +1 @@ +[{"name":"index.html","size":3034},{"name":"main","size":943},{"name":"static/js/2.49c628d1.chunk.js","size":131280},{"name":"static/js/2.49c628d1.chunk.js.LICENSE.txt","size":1043},{"name":"static/js/3.4fd48114.chunk.js","size":4398},{"name":"main","size":1047},{"name":"runtime-main","size":2374}] \ No newline at end of file From 70b5b8db7922852c45a0b90c64fac12c500ff7b3 Mon Sep 17 00:00:00 2001 From: Supriya S Date: Wed, 26 May 2021 17:47:13 +0530 Subject: [PATCH 08/10] feat: Update assets --- webpack-asset-sizes.json | 1 + 1 file changed, 1 insertion(+) create mode 100644 webpack-asset-sizes.json diff --git a/webpack-asset-sizes.json b/webpack-asset-sizes.json new file mode 100644 index 00000000000..8b242d2f37f --- /dev/null +++ b/webpack-asset-sizes.json @@ -0,0 +1 @@ +[{"name":"index.html","size":3034},{"name":"main","size":943},{"name":"static/js/2.49c628d1.chunk.js","size":131280},{"name":"static/js/2.49c628d1.chunk.js.LICENSE.txt","size":1043},{"name":"static/js/3.4fd48114.chunk.js","size":4398},{"name":"main","size":1047},{"name":"runtime-main","size":2374}] \ No newline at end of file From 65b84ff30613f967d137403a12a2b46bfbe99cdb Mon Sep 17 00:00:00 2001 From: Supriya S Date: Wed, 26 May 2021 18:17:13 +0530 Subject: [PATCH 09/10] feat: Update assets From 933e46b530a8a2227d179dec03a6bdc0c2cd39f2 Mon Sep 17 00:00:00 2001 From: Supriya S Date: Thu, 27 May 2021 08:39:37 +0530 Subject: [PATCH 10/10] jasf --- .github/workflows/build.yml | 7 ++++++- package.json | 2 +- packages/react-scripts/bin/react-scripts.js | 2 ++ 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index f7caf7df5d4..7708819066a 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -1,6 +1,11 @@ name: Testing Build -on: [push] +on: + pull_request: + types: + - opened + - synchronize + - closed jobs: build: diff --git a/package.json b/package.json index f03b1035b27..bcb0ddf266d 100644 --- a/package.json +++ b/package.json @@ -25,7 +25,7 @@ "@testing-library/react": "^11.1.0", "@testing-library/user-event": "^12.1.10", "alex": "^8.2.0", - "asset-compare-git-webpack-plugin": "https://github.com/supriya-raj/asset-compare-git-webpack-plugin#484cb890592caad60a2bbdb0ed046b04275f6bb3", + "asset-compare-git-webpack-plugin": "https://github.com/supriya-raj/asset-compare-git-webpack-plugin#1a8c2fe3acbb049b050fae9deb5ab3733af3791d", "eslint": "^7.11.0", "execa": "1.0.0", "fs-extra": "^9.0.1", diff --git a/packages/react-scripts/bin/react-scripts.js b/packages/react-scripts/bin/react-scripts.js index 09604f6a03f..dc3894a1733 100755 --- a/packages/react-scripts/bin/react-scripts.js +++ b/packages/react-scripts/bin/react-scripts.js @@ -15,6 +15,8 @@ process.on('unhandledRejection', err => { throw err; }); +console.log(process.env); + const spawn = require('react-dev-utils/crossSpawn'); const args = process.argv.slice(2);