From 9209dd8a790a5ef1252053afd187e0195444515c Mon Sep 17 00:00:00 2001 From: Eric Willhoit Date: Mon, 14 Nov 2022 10:21:16 -0600 Subject: [PATCH] chore: add SWC and sync files --- .github/workflows/failureNotifications.yml | 8 ++- .github/workflows/test.yml | 13 ++++- README.md | 2 +- bin/dev | 10 +++- package.json | 3 +- yarn.lock | 66 ++++++++++++++++++++++ 6 files changed, 91 insertions(+), 11 deletions(-) diff --git a/.github/workflows/failureNotifications.yml b/.github/workflows/failureNotifications.yml index 7f4ab9e3..3f7c0d44 100644 --- a/.github/workflows/failureNotifications.yml +++ b/.github/workflows/failureNotifications.yml @@ -21,22 +21,24 @@ jobs: SLACK_WEBHOOK_URL: ${{ secrets.CLI_ALERTS_SLACK_WEBHOOK }} SLACK_WEBHOOK_TYPE: INCOMING_WEBHOOK with: + # Payload can be visually tested here: https://app.slack.com/block-kit-builder/T01GST6QY0G#%7B%22blocks%22:%5B%5D%7D + # Only copy over the "blocks" array to the Block Kit Builder payload: | { - "text": "${{ github.event.workflow_run.name }} failed: ${{ github.event.workflow_run.repository.name }}", + "text": "Workflow \"${{ github.event.workflow_run.name }}\" failed in ${{ github.event.workflow_run.repository.name }}", "blocks": [ { "type": "header", "text": { "type": "plain_text", - "text": "${{ github.event.workflow_run.name }} failed: ${{ github.event.workflow_run.repository.name }}" + "text": ":bh-alert: Workflow \"${{ github.event.workflow_run.name }}\" failed in ${{ github.event.workflow_run.repository.name }} :bh-alert:" } }, { "type": "section", "text": { "type": "mrkdwn", - "text": "repo: ${{ github.event.workflow_run.repository.html_url }}\nworkflow name:${{ github.event.workflow_run.name }}\njob url: ${{ github.event.workflow_run.html_url }}" + "text": "*Repo:* ${{ github.event.workflow_run.repository.html_url }}\n*Workflow name:* `${{ github.event.workflow_run.name }}`\n*Job url:* ${{ github.event.workflow_run.html_url }}" } } ] diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 8aa44c70..04639c09 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -5,10 +5,17 @@ on: workflow_dispatch: jobs: - unit-tests: - uses: salesforcecli/github-workflows/.github/workflows/unitTest.yml@main + yarn-lockfile-check: + uses: salesforcecli/github-workflows/.github/workflows/lockFileCheck.yml@main + # Since the Windows unit tests take much longer, we run the linux unit tests first and then run the windows unit tests in parallel with NUTs + linux-unit-tests: + needs: yarn-lockfile-check + uses: salesforcecli/github-workflows/.github/workflows/unitTestsLinux.yml@main + windows-unit-tests: + needs: linux-unit-tests + uses: salesforcecli/github-workflows/.github/workflows/unitTestsWindows.yml@main nuts: - needs: unit-tests + needs: linux-unit-tests uses: salesforcecli/github-workflows/.github/workflows/nut.yml@main secrets: inherit strategy: diff --git a/README.md b/README.md index be5863c9..f1ce207a 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # plugin-auth -[![NPM](https://img.shields.io/npm/v/@salesforce/plugin-auth.svg?label=@salesforce/plugin-auth)](https://www.npmjs.com/package/@salesforce/plugin-auth) [![CircleCI](https://circleci.com/gh/salesforcecli/plugin-auth/tree/main.svg?style=shield)](https://circleci.com/gh/salesforcecli/plugin-auth/tree/main) [![Downloads/week](https://img.shields.io/npm/dw/@salesforce/plugin-auth.svg)](https://npmjs.org/package/@salesforce/plugin-auth) [![License](https://img.shields.io/badge/License-BSD%203--Clause-brightgreen.svg)](https://raw.githubusercontent.com/salesforcecli/plugin-auth/main/LICENSE.txt) +[![NPM](https://img.shields.io/npm/v/@salesforce/plugin-auth.svg?label=@salesforce/plugin-auth)](https://www.npmjs.com/package/@salesforce/plugin-auth) [![Downloads/week](https://img.shields.io/npm/dw/@salesforce/plugin-auth.svg)](https://npmjs.org/package/@salesforce/plugin-auth) [![License](https://img.shields.io/badge/License-BSD%203--Clause-brightgreen.svg)](https://raw.githubusercontent.com/salesforcecli/plugin-auth/main/LICENSE.txt) Auth commands for Salesforce CLI diff --git a/bin/dev b/bin/dev index 02b50d62..d88b6a38 100755 --- a/bin/dev +++ b/bin/dev @@ -8,10 +8,14 @@ const project = path.join(__dirname, '..', 'tsconfig.json'); // In dev mode -> use ts-node and dev plugins process.env.NODE_ENV = 'development'; -require('ts-node').register({ project }); +// Enable SWC for faster typescript compiling +require('ts-node').register({ project, swc: true }); // In dev mode, always show stack traces -oclif.settings.debug = true; +const g = (global.oclif = global.oclif || {}); + +// In dev mode, always show stack traces +global.oclif.debug = true; // Start the CLI -oclif.run().then(oclif.flush).catch(oclif.Errors.handle); +oclif.run().then(require('@oclif/core/flush')).catch(require('@oclif/core/handle')); diff --git a/package.json b/package.json index 3a037324..7b2d926b 100644 --- a/package.json +++ b/package.json @@ -24,6 +24,7 @@ "@salesforce/plugin-config": "^1.4.22", "@salesforce/prettier-config": "^0.0.2", "@salesforce/ts-sinon": "^1.4.2", + "@swc/core": "^1.3.16", "@types/fs-extra": "^9.0.13", "@types/graceful-fs": "^4.1.5", "@types/mkdirp": "^1.0.1", @@ -127,4 +128,4 @@ "publishConfig": { "access": "public" } -} \ No newline at end of file +} diff --git a/yarn.lock b/yarn.lock index 5f4c009f..658338a0 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1213,6 +1213,72 @@ resolved "https://registry.yarnpkg.com/@sinonjs/text-encoding/-/text-encoding-0.7.1.tgz#8da5c6530915653f3a1f38fd5f101d8c3f8079c5" integrity sha512-+iTbntw2IZPb/anVDbypzfQa+ay64MW0Zo8aJ8gZPWMMK6/OubMVb6lUPMagqjOPnmtauXnFCACVl3O7ogjeqQ== +"@swc/core-darwin-arm64@1.3.16": + version "1.3.16" + resolved "https://registry.yarnpkg.com/@swc/core-darwin-arm64/-/core-darwin-arm64-1.3.16.tgz#5d7d30dde35e2ca87ee67e12cbaf6613757048a7" + integrity sha512-tVhkffyl0UQELkz4tfIcBw4PahRTmeP72Yds1v2bvVpeH35i9SIYCsE9z6nH2uG5CwD+3OqvHZ47PNg3Shq+bw== + +"@swc/core-darwin-x64@1.3.16": + version "1.3.16" + resolved "https://registry.yarnpkg.com/@swc/core-darwin-x64/-/core-darwin-x64-1.3.16.tgz#a9e9ccf14be68591dc4e85829e5151f774bc9edf" + integrity sha512-5wFflU0G31TlTpgpGEmUxRvSVgRnMPGdbY/dCaGri8xIlE7jVm5lf9mGhdAAKtG+Y0gxmMtNzi2NLicOAfEKbw== + +"@swc/core-linux-arm-gnueabihf@1.3.16": + version "1.3.16" + resolved "https://registry.yarnpkg.com/@swc/core-linux-arm-gnueabihf/-/core-linux-arm-gnueabihf-1.3.16.tgz#662354d78c3ca7444686b1d177d35dc8bc605eb5" + integrity sha512-KxTs9/Qo45MazfVywsol+OQIUTutGSPY1GbmnfVAhYqrLDt0C21YnpV9+9tjvGNys77F2QdoZGOMJ+fBvr7AJw== + +"@swc/core-linux-arm64-gnu@1.3.16": + version "1.3.16" + resolved "https://registry.yarnpkg.com/@swc/core-linux-arm64-gnu/-/core-linux-arm64-gnu-1.3.16.tgz#09490c8eecc3e5fc23787d879102cf3c172d3cf7" + integrity sha512-K0F8KVZzHpPsiL3+x3XZBAlECnLn5+BsAa995KUmQ4ALMkOGfkXRVrqkPEpxOTMyjNMyQgIbo261gk7o13+ONg== + +"@swc/core-linux-arm64-musl@1.3.16": + version "1.3.16" + resolved "https://registry.yarnpkg.com/@swc/core-linux-arm64-musl/-/core-linux-arm64-musl-1.3.16.tgz#c80a074e10ef364e231eb1cb909e31fc4c3c86b4" + integrity sha512-tBZtiS2YmAgHNS6TxxUGc1Tn8HqL8XT3EbmyfewmJf8ALE5RcP12tMuXGJJr/9ac+QmwWaFMnXsmfu3hzdDdkQ== + +"@swc/core-linux-x64-gnu@1.3.16": + version "1.3.16" + resolved "https://registry.yarnpkg.com/@swc/core-linux-x64-gnu/-/core-linux-x64-gnu-1.3.16.tgz#541791237e5660730b566cf2ca3fed0bceccce80" + integrity sha512-G/opqijVDalDZ7XfQYFhMRK1o74y5ZMP0SAOAajZQUiYBjAYWphpIbPLGoM3g3sK0CA2khA/P+l9kjV7VSvgyA== + +"@swc/core-linux-x64-musl@1.3.16": + version "1.3.16" + resolved "https://registry.yarnpkg.com/@swc/core-linux-x64-musl/-/core-linux-x64-musl-1.3.16.tgz#fcd5706fb7b2e0d013b0dae376d8cd0b85f64560" + integrity sha512-eedKXdDV1SFMZ20lETf4Qz0zc+yYzsQ7pqQzT9qNQwh3fo1u/iPx55Aq9MO0CEN+w579WRwwANtSSsuT3yr0tA== + +"@swc/core-win32-arm64-msvc@1.3.16": + version "1.3.16" + resolved "https://registry.yarnpkg.com/@swc/core-win32-arm64-msvc/-/core-win32-arm64-msvc-1.3.16.tgz#83fce6117453d2abecf7e1c94f85b51af78c40d3" + integrity sha512-7mBA6aCtBWKQJ5teL+v8wHB4ShNCLQslzu5lso7fUH7mNViMl013X6HPV1umQLIM3f2tC+jMhSmtosxrRNiGDQ== + +"@swc/core-win32-ia32-msvc@1.3.16": + version "1.3.16" + resolved "https://registry.yarnpkg.com/@swc/core-win32-ia32-msvc/-/core-win32-ia32-msvc-1.3.16.tgz#dd47e4c3f3adb062d55e277ec5d4836d8552e285" + integrity sha512-if3fwUYrwmskEM9QyYdg4edx1dIXrUYvolszAxfMyUq1GqezkK5PmIO5IAazSZOk8QHaUIA0wcTNKkf8sVyLAw== + +"@swc/core-win32-x64-msvc@1.3.16": + version "1.3.16" + resolved "https://registry.yarnpkg.com/@swc/core-win32-x64-msvc/-/core-win32-x64-msvc-1.3.16.tgz#d4a2b2f11aaeb96026b4f078278ea17f279208b9" + integrity sha512-EaXXW0M4EoodsH1ftEaPzixF5nZYKyXk5Qnzqq6hDSOfYzoUOiJ8nBXTHF6xqDHIPVRS1OUDzBujhHsGhQcuPw== + +"@swc/core@^1.3.16": + version "1.3.16" + resolved "https://registry.yarnpkg.com/@swc/core/-/core-1.3.16.tgz#be9b42fe54f3ba73ba6a580f3ae024abcbd45c54" + integrity sha512-y6xxxampiKWNMGWnEAJktDwk/u9j0SApgJyjgi3LQv+OTtm2LiPS3wtfYnWWXtsuKkL1HCf/H2/NLOwO0WLaPw== + optionalDependencies: + "@swc/core-darwin-arm64" "1.3.16" + "@swc/core-darwin-x64" "1.3.16" + "@swc/core-linux-arm-gnueabihf" "1.3.16" + "@swc/core-linux-arm64-gnu" "1.3.16" + "@swc/core-linux-arm64-musl" "1.3.16" + "@swc/core-linux-x64-gnu" "1.3.16" + "@swc/core-linux-x64-musl" "1.3.16" + "@swc/core-win32-arm64-msvc" "1.3.16" + "@swc/core-win32-ia32-msvc" "1.3.16" + "@swc/core-win32-x64-msvc" "1.3.16" + "@tootallnate/once@1": version "1.1.2" resolved "https://registry.yarnpkg.com/@tootallnate/once/-/once-1.1.2.tgz#ccb91445360179a04e7fe6aff78c00ffc1eeaf82"