From 5e4c650dc33ec23fdedb41c71eee98c2240e5830 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 1 Jul 2021 15:58:24 +0000 Subject: [PATCH 01/12] Bump ws from 7.4.4 to 7.5.1 Bumps [ws](https://github.com/websockets/ws) from 7.4.4 to 7.5.1. - [Release notes](https://github.com/websockets/ws/releases) - [Commits](https://github.com/websockets/ws/compare/7.4.4...7.5.1) --- updated-dependencies: - dependency-name: ws dependency-type: indirect ... Signed-off-by: dependabot[bot] --- package-lock.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/package-lock.json b/package-lock.json index 36c5019e18e..4e6dfe588e8 100644 --- a/package-lock.json +++ b/package-lock.json @@ -9545,9 +9545,9 @@ "dev": true }, "ws": { - "version": "7.4.4", - "resolved": "https://registry.npmjs.org/ws/-/ws-7.4.4.tgz", - "integrity": "sha512-Qm8k8ojNQIMx7S+Zp8u/uHOx7Qazv3Yv4q68MiWWWOJhiwG5W3x7iqmRtJo8xxrciZUY4vRxUTJCKuRnF28ZZw==" + "version": "7.5.1", + "resolved": "https://registry.npmjs.org/ws/-/ws-7.5.1.tgz", + "integrity": "sha512-2c6faOUH/nhoQN6abwMloF7Iyl0ZS2E9HGtsiLrWn0zOOMWlhtDmdf/uihDt6jnuCxgtwGBNy6Onsoy2s2O2Ow==" }, "xml-name-validator": { "version": "3.0.0", From 71e7f125c65daf250c464f918dc689ce3948dc26 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 1 Jul 2021 15:58:25 +0000 Subject: [PATCH 02/12] Bump lodash from 4.17.19 to 4.17.21 Bumps [lodash](https://github.com/lodash/lodash) from 4.17.19 to 4.17.21. - [Release notes](https://github.com/lodash/lodash/releases) - [Commits](https://github.com/lodash/lodash/compare/4.17.19...4.17.21) --- updated-dependencies: - dependency-name: lodash dependency-type: indirect ... Signed-off-by: dependabot[bot] --- package-lock.json | 26 +++----------------------- 1 file changed, 3 insertions(+), 23 deletions(-) diff --git a/package-lock.json b/package-lock.json index 36c5019e18e..f79b424e616 100644 --- a/package-lock.json +++ b/package-lock.json @@ -184,12 +184,6 @@ "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.10.5.tgz", "integrity": "sha512-wfryxy4bE1UivvQKSQDU4/X6dr+i8bctjUjj8Zyt3DQy7NtPizJXT8M52nqpNKL+nq2PW8lxk4ZqLj0fD4B4hQ==", "dev": true - }, - "lodash": { - "version": "4.17.19", - "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.19.tgz", - "integrity": "sha512-JNvd8XER9GQX0v2qJgsaN/mzFCNA5BRe/j8JN9d+tWyGLSodKQHKFicdwNYzWwI3wjRnaKPsGj1XkBjx/F96DQ==", - "dev": true } } }, @@ -202,14 +196,6 @@ "@babel/helper-validator-identifier": "^7.10.4", "lodash": "^4.17.19", "to-fast-properties": "^2.0.0" - }, - "dependencies": { - "lodash": { - "version": "4.17.19", - "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.19.tgz", - "integrity": "sha512-JNvd8XER9GQX0v2qJgsaN/mzFCNA5BRe/j8JN9d+tWyGLSodKQHKFicdwNYzWwI3wjRnaKPsGj1XkBjx/F96DQ==", - "dev": true - } } }, "@blockly/block-test": { @@ -2239,12 +2225,6 @@ "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", "dev": true }, - "lodash": { - "version": "4.17.21", - "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz", - "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==", - "dev": true - }, "supports-color": { "version": "8.1.1", "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-8.1.1.tgz", @@ -5719,9 +5699,9 @@ } }, "lodash": { - "version": "4.17.19", - "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.19.tgz", - "integrity": "sha512-JNvd8XER9GQX0v2qJgsaN/mzFCNA5BRe/j8JN9d+tWyGLSodKQHKFicdwNYzWwI3wjRnaKPsGj1XkBjx/F96DQ==" + "version": "4.17.21", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz", + "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==" }, "lodash._reinterpolate": { "version": "3.0.0", From 5706ad600b06a8e1ba2656cccc440f6700ffcf9f Mon Sep 17 00:00:00 2001 From: Aaron Dodson Date: Wed, 7 Jul 2021 14:49:56 -0700 Subject: [PATCH 03/12] Added script and workflow to automatically update build artifact sizes in check_metadata.sh --- .github/workflows/update_metadata.yml | 39 +++++++++++++++++++++++++++ tests/scripts/update_metadata.sh | 20 ++++++++++++++ 2 files changed, 59 insertions(+) create mode 100644 .github/workflows/update_metadata.yml create mode 100755 tests/scripts/update_metadata.sh diff --git a/.github/workflows/update_metadata.yml b/.github/workflows/update_metadata.yml new file mode 100644 index 00000000000..6a1fb9b1dec --- /dev/null +++ b/.github/workflows/update_metadata.yml @@ -0,0 +1,39 @@ +# This workflow updates the check_metadata.sh script, which compares the current +# size of build artifacts against their size in the previous version of Blockly. + +name: Update Metadata + +on: [workflow_dispatch] + +jobs: + build: + runs-on: ${{ matrix.os }} + + strategy: + matrix: + os: [ubuntu-latest] + node-version: [16.x] + + steps: + - name: Check Out Blockly + - uses: actions/checkout@v2 + with: + ref: 'develop' + + - name: Use Node.js ${{ matrix.node-version }} + uses: actions/setup-node@v1 + with: + node-version: ${{ matrix.node-version }} + + - name: Update Metadata + run: source ./tests/scripts/update_metadata.sh + + - name: Create Pull Request + uses: peter-evans/create-pull-request@9825ae65b1cb54b543b938503728b432a0176d29 + with: + commit-message: Updated build artifact sizes in check_metadata.sh + delete-branch: true + title: Updated build artifact sizes in check_metadata.sh + + - name: View Pull Request + run: echo "View Pull Request: ${{ steps.cpr.outputs.pull-request-url }}" diff --git a/tests/scripts/update_metadata.sh b/tests/scripts/update_metadata.sh new file mode 100755 index 00000000000..7b901855a39 --- /dev/null +++ b/tests/scripts/update_metadata.sh @@ -0,0 +1,20 @@ +#!/bin/bash + +# Determines the size of generated files and updates check_metadata.sh to +# reflect the new values. + +blockly_size=$(wc -c < "blockly_compressed.js") +blocks_size=$(wc -c < "blocks_compressed.js") +blockly_gz_size=$(wc -c < "blockly_compressed.js.gz") +blocks_gz_size=$(wc -c < "blocks_compressed.js.gz") +quarter=$(date "+Q%q %Y") +version=$(npx -c 'echo "$npm_package_version"') + +replacement="# ${quarter} ${version} ${blockly_size}\nblockly_size_expected=${blockly_size}" +sed -ri "s/blockly_size_expected=[0-9]+/${replacement}/g" tests/scripts/check_metadata.sh +replacement="# ${quarter} ${version} ${blocks_size}\nblocks_size_expected=${blocks_size}" +sed -ri "s/blocks_size_expected=[0-9]+/${replacement}/g" tests/scripts/check_metadata.sh +replacement="# ${quarter} ${version} ${blockly_gz_size}\nblockly_gz_size_expected=${blockly_gz_size}" +sed -ri "s/blockly_gz_size_expected=[0-9]+/${replacement}/g" tests/scripts/check_metadata.sh +replacement="# ${quarter} ${version} ${blocks_gz_size}\nblocks_gz_size_expected=${blocks_gz_size}" +sed -ri "s/blocks_gz_size_expected=[0-9]+/${replacement}/g" tests/scripts/check_metadata.sh \ No newline at end of file From 6766156f3767409737fcf73e8db13c352cf21bbe Mon Sep 17 00:00:00 2001 From: Aaron Dodson Date: Wed, 7 Jul 2021 14:54:55 -0700 Subject: [PATCH 04/12] Fixed invalid update_metadata.yml file. --- .github/workflows/update_metadata.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/update_metadata.yml b/.github/workflows/update_metadata.yml index 6a1fb9b1dec..06e903d2c68 100644 --- a/.github/workflows/update_metadata.yml +++ b/.github/workflows/update_metadata.yml @@ -36,4 +36,4 @@ jobs: title: Updated build artifact sizes in check_metadata.sh - name: View Pull Request - run: echo "View Pull Request: ${{ steps.cpr.outputs.pull-request-url }}" + run: echo "View Pull Request - ${{ steps.cpr.outputs.pull-request-url }}" From 2a03fe931a49911754a278c0df7aeaaa0641173b Mon Sep 17 00:00:00 2001 From: Aaron Dodson Date: Wed, 7 Jul 2021 14:56:59 -0700 Subject: [PATCH 05/12] Fix additional error in update_metadata.yml. --- .github/workflows/update_metadata.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/update_metadata.yml b/.github/workflows/update_metadata.yml index 06e903d2c68..94f9277dcfe 100644 --- a/.github/workflows/update_metadata.yml +++ b/.github/workflows/update_metadata.yml @@ -16,7 +16,7 @@ jobs: steps: - name: Check Out Blockly - - uses: actions/checkout@v2 + uses: actions/checkout@v2 with: ref: 'develop' From ade970f016605430f12c183733a46cde3c01b458 Mon Sep 17 00:00:00 2001 From: Rachel Fenichel Date: Wed, 7 Jul 2021 17:57:48 -0700 Subject: [PATCH 06/12] Initial commit for appengine deploy action --- .github/workflows/appengine_deploy.yml | 54 ++++++++++++++++++++++++++ gulpfile.js | 1 + package.json | 1 + scripts/gulpfiles/appengine_tasks.js | 16 ++++---- 4 files changed, 65 insertions(+), 7 deletions(-) create mode 100644 .github/workflows/appengine_deploy.yml diff --git a/.github/workflows/appengine_deploy.yml b/.github/workflows/appengine_deploy.yml new file mode 100644 index 00000000000..b6a8e54411d --- /dev/null +++ b/.github/workflows/appengine_deploy.yml @@ -0,0 +1,54 @@ +# This is a basic workflow to help you get started with Actions + +name: Deploy to App Engine + +# Controls when the workflow will run +on: + # Allows you to run this workflow manually from the Actions tab + workflow_dispatch: + +# A workflow run is made up of one or more jobs that can run sequentially or in parallel +jobs: + prepare: + name: Prepare + # The type of runner that the job will run on + runs-on: ubuntu-latest + + # Steps represent a sequence of tasks that will be executed as part of the job + steps: + # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it + - uses: actions/checkout@v2 + + - name: Prepare demo files + run: | + npm install + npm run prepareDemos + + - name: Upload + uses: actions/upload-artifact@v2 + with: + name: appengine_files + path: _deploy/ + + deploy: + name: Deploy + runs-on: ubuntu-latest + needs: prepare + steps: + - name: Download prepared files + uses: actions/download-artifact@v2 + with: + name: appengine_files + path: _deploy/ + + - name: Deploy to App Engine + uses: google-github-actions/deploy-appengine@v0.2.0 + with: + deliverables: app.yaml + working_directory: _deploy/ + # TODO: Set up project id and credentials secrets + project_id: ${{ secrets.GCP_PROJECT }} + credentials: ${{ secrets.GCP_SA_KEY }} + promote: false + # TODO: Generate a version string based on package.json + version: vtest diff --git a/gulpfile.js b/gulpfile.js index 49621147278..3f0dc46a436 100644 --- a/gulpfile.js +++ b/gulpfile.js @@ -39,6 +39,7 @@ module.exports = { package: packageTasks.package, checkLicenses: licenseTasks.checkLicenses, recompile: releaseTasks.recompile, + prepareDemos: appengineTasks.prepareDemos, publish: releaseTasks.publish, publishBeta: releaseTasks.publishBeta, sortRequires: cleanupTasks.sortRequires, diff --git a/package.json b/package.json index 3e9a293f2c1..33ac9283502 100644 --- a/package.json +++ b/package.json @@ -36,6 +36,7 @@ "lint": "eslint .", "package": "gulp package", "prepare": "npm run package", + "prepareDemos": "gulp prepareDemos", "publish": "gulp publish", "publish:beta": "gulp publishBeta", "recompile": "gulp recompile", diff --git a/scripts/gulpfiles/appengine_tasks.js b/scripts/gulpfiles/appengine_tasks.js index 08fb3ea85ed..66573d3f52b 100644 --- a/scripts/gulpfiles/appengine_tasks.js +++ b/scripts/gulpfiles/appengine_tasks.js @@ -87,17 +87,19 @@ function deployAndClean(done) { done(); } +/** + * Prepares demos. + */ +const prepareDemos = gulp.series( + prepareDeployDir, copyStaticSrc, copyAppengineSrc, copyPlaygroundDeps); + + /** * Deploys demos. */ -const deployDemos = gulp.series( - prepareDeployDir, - copyStaticSrc, - copyAppengineSrc, - copyPlaygroundDeps, - deployAndClean -); +const deployDemos = gulp.series(prepareDemos, deployAndClean); module.exports = { deployDemos: deployDemos, + prepareDemos: prepareDemos } From c89d0c517e295212e48bf669a338146df6a107b6 Mon Sep 17 00:00:00 2001 From: Rachel Fenichel Date: Thu, 8 Jul 2021 19:05:56 -0700 Subject: [PATCH 07/12] Update comments to be more descriptive --- .github/workflows/appengine_deploy.yml | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/.github/workflows/appengine_deploy.yml b/.github/workflows/appengine_deploy.yml index b6a8e54411d..f768874a31e 100644 --- a/.github/workflows/appengine_deploy.yml +++ b/.github/workflows/appengine_deploy.yml @@ -1,4 +1,4 @@ -# This is a basic workflow to help you get started with Actions +# Workflow that prepares files and deploys to appengine name: Deploy to App Engine @@ -7,19 +7,18 @@ on: # Allows you to run this workflow manually from the Actions tab workflow_dispatch: -# A workflow run is made up of one or more jobs that can run sequentially or in parallel jobs: prepare: name: Prepare - # The type of runner that the job will run on runs-on: ubuntu-latest - # Steps represent a sequence of tasks that will be executed as part of the job steps: - # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it + # Checks-out the repository under $GITHUB_WORKSPACE. + # When running manually this checks out the master branch. - uses: actions/checkout@v2 - name: Prepare demo files + # Install all dependencies, then copy all the files needed for demos. run: | npm install npm run prepareDemos @@ -33,6 +32,7 @@ jobs: deploy: name: Deploy runs-on: ubuntu-latest + # The prepare step must succeed for this step to run. needs: prepare steps: - name: Download prepared files @@ -43,12 +43,12 @@ jobs: - name: Deploy to App Engine uses: google-github-actions/deploy-appengine@v0.2.0 + # For parameters see: + # https://github.com/google-github-actions/deploy-appengine#inputs with: - deliverables: app.yaml working_directory: _deploy/ - # TODO: Set up project id and credentials secrets + deliverables: app.yaml project_id: ${{ secrets.GCP_PROJECT }} credentials: ${{ secrets.GCP_SA_KEY }} promote: false - # TODO: Generate a version string based on package.json version: vtest From 615abab1ae82bb932d6bf8955b7b44dcba491d68 Mon Sep 17 00:00:00 2001 From: Rachel Fenichel Date: Fri, 9 Jul 2021 12:32:51 -0700 Subject: [PATCH 08/12] Get deploy files from the correct directory Previous path was `_deploy/`. New path is `../_deploy`. --- .github/workflows/appengine_deploy.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/appengine_deploy.yml b/.github/workflows/appengine_deploy.yml index f768874a31e..77567a8bef5 100644 --- a/.github/workflows/appengine_deploy.yml +++ b/.github/workflows/appengine_deploy.yml @@ -27,7 +27,7 @@ jobs: uses: actions/upload-artifact@v2 with: name: appengine_files - path: _deploy/ + path: ../_deploy/ deploy: name: Deploy From 8c635b5fbc576f5f8e72189bc679437fafd75cb9 Mon Sep 17 00:00:00 2001 From: Monica Kozbial <6621618+moniika@users.noreply.github.com> Date: Fri, 9 Jul 2021 13:21:22 -0700 Subject: [PATCH 09/12] Create Github Action to comment on PR while develop is frozen (#5006) * Create develop_freeze_comment.yml * Update comments * Fix typo and update uses * Add test message --- .github/workflows/develop_freeze_comment.yml | 28 ++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 .github/workflows/develop_freeze_comment.yml diff --git a/.github/workflows/develop_freeze_comment.yml b/.github/workflows/develop_freeze_comment.yml new file mode 100644 index 00000000000..19fd3219524 --- /dev/null +++ b/.github/workflows/develop_freeze_comment.yml @@ -0,0 +1,28 @@ +# This workflow will comment on pull requests that are submitted while develop +# is frozen during the week of release. Skips any pull requests that have the +# label 'ignore-freeze'. +# This workflow should be enabled only while develop is frozen. + +name: Develop Freeze PR Comment + +on: + # Trigger the workflow on pull request on develop branch + pull_request: + types: + - opened + - reopened + branches: + - develop + +jobs: + freeze-comment: + if: ${{ !contains(github.event.pull_request.labels.*.name, 'ignore-freeze') }} + runs-on: ubuntu-latest + steps: + - name: PR Comment + uses: github-actions-up-and-running/pr-comment@f1f8ab2bf00dce6880a369ce08758a60c61d6c0b + with: + repo-token: ${{ secrets.GITHUB_TOKEN }} + # TODO: Replace test message after testing workflow. + # message: "Thanks for the PR! The develop branch is currently frozen in preparation for the release so it may not be addressed until after release week." + message: "Thanks for the PR! This is a test message." From f25914382778a3d688f35d1a0236d5af5c62a141 Mon Sep 17 00:00:00 2001 From: Monica Kozbial <6621618+moniika@users.noreply.github.com> Date: Fri, 9 Jul 2021 15:08:52 -0700 Subject: [PATCH 10/12] Revert "Create Github Action to comment on PR while develop is frozen (#5006)" (#5013) This reverts commit 8c635b5fbc576f5f8e72189bc679437fafd75cb9. --- .github/workflows/develop_freeze_comment.yml | 28 -------------------- 1 file changed, 28 deletions(-) delete mode 100644 .github/workflows/develop_freeze_comment.yml diff --git a/.github/workflows/develop_freeze_comment.yml b/.github/workflows/develop_freeze_comment.yml deleted file mode 100644 index 19fd3219524..00000000000 --- a/.github/workflows/develop_freeze_comment.yml +++ /dev/null @@ -1,28 +0,0 @@ -# This workflow will comment on pull requests that are submitted while develop -# is frozen during the week of release. Skips any pull requests that have the -# label 'ignore-freeze'. -# This workflow should be enabled only while develop is frozen. - -name: Develop Freeze PR Comment - -on: - # Trigger the workflow on pull request on develop branch - pull_request: - types: - - opened - - reopened - branches: - - develop - -jobs: - freeze-comment: - if: ${{ !contains(github.event.pull_request.labels.*.name, 'ignore-freeze') }} - runs-on: ubuntu-latest - steps: - - name: PR Comment - uses: github-actions-up-and-running/pr-comment@f1f8ab2bf00dce6880a369ce08758a60c61d6c0b - with: - repo-token: ${{ secrets.GITHUB_TOKEN }} - # TODO: Replace test message after testing workflow. - # message: "Thanks for the PR! The develop branch is currently frozen in preparation for the release so it may not be addressed until after release week." - message: "Thanks for the PR! This is a test message." From 16ca378678c6979441170b1e07edf836452c627e Mon Sep 17 00:00:00 2001 From: Rachel Fenichel Date: Fri, 9 Jul 2021 15:26:39 -0700 Subject: [PATCH 11/12] Revert "Get deploy files from the correct directory" --- .github/workflows/appengine_deploy.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/appengine_deploy.yml b/.github/workflows/appengine_deploy.yml index 77567a8bef5..f768874a31e 100644 --- a/.github/workflows/appengine_deploy.yml +++ b/.github/workflows/appengine_deploy.yml @@ -27,7 +27,7 @@ jobs: uses: actions/upload-artifact@v2 with: name: appengine_files - path: ../_deploy/ + path: _deploy/ deploy: name: Deploy From bd46d8a0b3c9f203b392dd34371dff66d117d532 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 12 Jul 2021 09:17:19 -0700 Subject: [PATCH 12/12] Bump hosted-git-info from 2.8.4 to 2.8.9 (#4980) Bumps [hosted-git-info](https://github.com/npm/hosted-git-info) from 2.8.4 to 2.8.9. - [Release notes](https://github.com/npm/hosted-git-info/releases) - [Changelog](https://github.com/npm/hosted-git-info/blob/v2.8.9/CHANGELOG.md) - [Commits](https://github.com/npm/hosted-git-info/compare/v2.8.4...v2.8.9) --- updated-dependencies: - dependency-name: hosted-git-info dependency-type: indirect ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- package-lock.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/package-lock.json b/package-lock.json index cfd673c129e..12776ad56f1 100644 --- a/package-lock.json +++ b/package-lock.json @@ -4920,9 +4920,9 @@ } }, "hosted-git-info": { - "version": "2.8.4", - "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-2.8.4.tgz", - "integrity": "sha512-pzXIvANXEFrc5oFFXRMkbLPQ2rXRoDERwDLyrcUxGhaZhgP54BBSl9Oheh7Vv0T090cszWBxPjkQQ5Sq1PbBRQ==", + "version": "2.8.9", + "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-2.8.9.tgz", + "integrity": "sha512-mxIDAb9Lsm6DoOJ7xH+5+X4y1LU/4Hi50L9C5sIswK3JzULS4bwk1FvjdBgvYR4bzT4tuUQiC15FE2f5HbLvYw==", "dev": true }, "html-encoding-sniffer": {