Skip to content

Commit 4d4b09e

Browse files
committed
chore: add SWC and sync files
1 parent 78000fb commit 4d4b09e

File tree

5 files changed

+145
-3
lines changed

5 files changed

+145
-3
lines changed
Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
name: failureNotifications
2+
3+
on:
4+
workflow_run:
5+
workflows:
6+
- version, tag and github release
7+
- publish
8+
types:
9+
- completed
10+
11+
jobs:
12+
failure-notify:
13+
runs-on: ubuntu-latest
14+
if: ${{ github.event.workflow_run.conclusion == 'failure' }}
15+
steps:
16+
- name: Announce Failure
17+
id: slack
18+
uses: slackapi/[email protected]
19+
env:
20+
# for non-CLI-team-owned plugins, you can send this anywhere you like
21+
SLACK_WEBHOOK_URL: ${{ secrets.CLI_ALERTS_SLACK_WEBHOOK }}
22+
SLACK_WEBHOOK_TYPE: INCOMING_WEBHOOK
23+
with:
24+
# Payload can be visually tested here: https://app.slack.com/block-kit-builder/T01GST6QY0G#%7B%22blocks%22:%5B%5D%7D
25+
# Only copy over the "blocks" array to the Block Kit Builder
26+
payload: |
27+
{
28+
"text": "Workflow \"${{ github.event.workflow_run.name }}\" failed in ${{ github.event.workflow_run.repository.name }}",
29+
"blocks": [
30+
{
31+
"type": "header",
32+
"text": {
33+
"type": "plain_text",
34+
"text": ":bh-alert: Workflow \"${{ github.event.workflow_run.name }}\" failed in ${{ github.event.workflow_run.repository.name }} :bh-alert:"
35+
}
36+
},
37+
{
38+
"type": "section",
39+
"text": {
40+
"type": "mrkdwn",
41+
"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 }}"
42+
}
43+
}
44+
]
45+
}

.github/workflows/test.yml

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
name: tests
2+
on:
3+
push:
4+
branches-ignore: [main]
5+
workflow_dispatch:
6+
7+
jobs:
8+
yarn-lockfile-check:
9+
uses: salesforcecli/github-workflows/.github/workflows/lockFileCheck.yml@main
10+
# 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
11+
linux-unit-tests:
12+
needs: yarn-lockfile-check
13+
uses: salesforcecli/github-workflows/.github/workflows/unitTestsLinux.yml@main
14+
windows-unit-tests:
15+
needs: linux-unit-tests
16+
uses: salesforcecli/github-workflows/.github/workflows/unitTestsWindows.yml@main
17+
nuts:
18+
needs: linux-unit-tests
19+
uses: salesforcecli/github-workflows/.github/workflows/nut.yml@main
20+
secrets: inherit
21+
strategy:
22+
matrix:
23+
os: [ubuntu-latest, windows-latest]
24+
fail-fast: false
25+
with:
26+
os: ${{ matrix.os }}

bin/dev

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,14 @@ const project = path.join(__dirname, '..', 'tsconfig.json');
88
// In dev mode -> use ts-node and dev plugins
99
process.env.NODE_ENV = 'development';
1010

11-
require('ts-node').register({ project });
11+
// Enable SWC for faster typescript compiling
12+
require('ts-node').register({ project, swc: true });
1213

1314
// In dev mode, always show stack traces
14-
oclif.settings.debug = true;
15+
const g = (global.oclif = global.oclif || {});
16+
17+
// In dev mode, always show stack traces
18+
global.oclif.debug = true;
1519

1620
// Start the CLI
17-
oclif.run().then(oclif.flush).catch(oclif.Errors.handle);
21+
oclif.run().then(require('@oclif/core/flush')).catch(require('@oclif/core/handle'));

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
"@salesforce/plugin-command-reference": "^1.3.16",
2222
"@salesforce/ts-sinon": "^1.1.2",
2323
"@salesforce/ts-types": "1.2.2",
24+
"@swc/core": "^1.3.21",
2425
"@types/chai": "^4",
2526
"@types/mkdirp": "0.5.2",
2627
"@types/mocha": "^5",

yarn.lock

Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -699,6 +699,72 @@
699699
resolved "https://registry.yarnpkg.com/@sinonjs/text-encoding/-/text-encoding-0.7.2.tgz#5981a8db18b56ba38ef0efb7d995b12aa7b51918"
700700
integrity sha512-sXXKG+uL9IrKqViTtao2Ws6dy0znu9sOaP1di/jKGW1M6VssO8vlpXCQcpZ+jisQ1tTFAC5Jo/EOzFbggBagFQ==
701701

702+
703+
version "1.3.21"
704+
resolved "https://registry.yarnpkg.com/@swc/core-darwin-arm64/-/core-darwin-arm64-1.3.21.tgz#9fe6d5c4c3ca0854194ab7d3e42ac29cda422abf"
705+
integrity sha512-5dBrJyrCzdHOQ9evS9NBJm2geKcXffIuAvSrnwbMHkfTpl+pOM7crry2tolydFXdOE/Jbx8yyahAIXPne1fTHw==
706+
707+
708+
version "1.3.21"
709+
resolved "https://registry.yarnpkg.com/@swc/core-darwin-x64/-/core-darwin-x64-1.3.21.tgz#6fb005ff27c5521534dd75732973182f45836681"
710+
integrity sha512-CAtzfsRoVZr7DLKOOWPua6npFdj06wRuv1us275CY2QS3mg1bPl9BxA3c94q3mMcu5Bf06+dzUOjJSGrsBD7Ig==
711+
712+
713+
version "1.3.21"
714+
resolved "https://registry.yarnpkg.com/@swc/core-linux-arm-gnueabihf/-/core-linux-arm-gnueabihf-1.3.21.tgz#3c54f62c1718408993b82ae4726c081e3271f002"
715+
integrity sha512-oPO7oFr89pjDFlHJ2aZvzGR6hwy5nmQyeiuqpTgfn+RFFLLbipFawJe/2NBWyD35bxuguW6a3/w9I6edKTpLUw==
716+
717+
718+
version "1.3.21"
719+
resolved "https://registry.yarnpkg.com/@swc/core-linux-arm64-gnu/-/core-linux-arm64-gnu-1.3.21.tgz#7a4e17420ad98f35712cd2cbde46b8a78c39beb3"
720+
integrity sha512-cgPw35T8HO4gB/tvPJMwjJuNNpydmw6U5hkxZ+7jiE+qA8hN8a71i+BBfXeSzlo60t4c44+zK4t+gK7UacZg2w==
721+
722+
723+
version "1.3.21"
724+
resolved "https://registry.yarnpkg.com/@swc/core-linux-arm64-musl/-/core-linux-arm64-musl-1.3.21.tgz#2b98140cc6dcd23c28f823a8ab8d61df8f876aed"
725+
integrity sha512-kwH+HHtcakSqR3gF5QJ7N7SPs96ilFiXuauB02Ct3UflaGbVYVoeFYj/VEIJ+ZJvlvvOEDByOiLyrk2bw0bG7A==
726+
727+
728+
version "1.3.21"
729+
resolved "https://registry.yarnpkg.com/@swc/core-linux-x64-gnu/-/core-linux-x64-gnu-1.3.21.tgz#6dc8105f6a6252322010896e79ad8a12269862ed"
730+
integrity sha512-/kLQLNxwdX6kO2R751uUrxXZsAhOkA1EeQzAqj+5Y+bzt3hA5asH5evkY0w0Aj1zCofX4p4o/Q35mandUPxMlw==
731+
732+
733+
version "1.3.21"
734+
resolved "https://registry.yarnpkg.com/@swc/core-linux-x64-musl/-/core-linux-x64-musl-1.3.21.tgz#e94eeecf389b441f09cf2de712caf5c9d0a0d5da"
735+
integrity sha512-s+l3LqUzDli6rbmIPR3IfO23IOLYBVxk97CDdcJWrRTVtCwUKFhFVJVZyErveriqLXSGJhy5+UL+aOuxC4dk8g==
736+
737+
738+
version "1.3.21"
739+
resolved "https://registry.yarnpkg.com/@swc/core-win32-arm64-msvc/-/core-win32-arm64-msvc-1.3.21.tgz#07374179e0422ad7352430e8b8fd7fd0f92e099c"
740+
integrity sha512-59gWcdbZxvmyzh+J50yCCodKDYRUnMwNypzzfamF1Vusa4Np+IGMWEaE2KsZUq50OQIRo0PGHpBPMKVYkuGv8g==
741+
742+
743+
version "1.3.21"
744+
resolved "https://registry.yarnpkg.com/@swc/core-win32-ia32-msvc/-/core-win32-ia32-msvc-1.3.21.tgz#abc4aa533a21da7c0812698ba485314797032edf"
745+
integrity sha512-3gH86ffVAiCmeRy+xSxR5iWSbKy4nUddo4PIahD1zwGJx6LC5ahC/I6EpL1pvoX3KdJKVioUBn0KDfPDUYfqJw==
746+
747+
748+
version "1.3.21"
749+
resolved "https://registry.yarnpkg.com/@swc/core-win32-x64-msvc/-/core-win32-x64-msvc-1.3.21.tgz#2d5264370a737e0842434988f9afe9924cc0c4b6"
750+
integrity sha512-JKWLJdJ3oFc8fGBk4P6mGKhW8n+FmEjLLbsST+h94bZmelrSTeShBt3rr+pMMatFevlu/c9lM3OW2GHsZeZNkg==
751+
752+
"@swc/core@^1.3.21":
753+
version "1.3.21"
754+
resolved "https://registry.yarnpkg.com/@swc/core/-/core-1.3.21.tgz#5168604c9bcd81740d8aa3a602a2a64dbb9377d1"
755+
integrity sha512-RTmqkm5e5sb+Q+YbyqiE52xjvX+kcIVDgaSdSD7mNy2opgDfIdFMhExmB8UQStt3TLrlpAslWaFNWNmvaHP9rg==
756+
optionalDependencies:
757+
"@swc/core-darwin-arm64" "1.3.21"
758+
"@swc/core-darwin-x64" "1.3.21"
759+
"@swc/core-linux-arm-gnueabihf" "1.3.21"
760+
"@swc/core-linux-arm64-gnu" "1.3.21"
761+
"@swc/core-linux-arm64-musl" "1.3.21"
762+
"@swc/core-linux-x64-gnu" "1.3.21"
763+
"@swc/core-linux-x64-musl" "1.3.21"
764+
"@swc/core-win32-arm64-msvc" "1.3.21"
765+
"@swc/core-win32-ia32-msvc" "1.3.21"
766+
"@swc/core-win32-x64-msvc" "1.3.21"
767+
702768
"@tootallnate/once@1":
703769
version "1.1.2"
704770
resolved "https://registry.yarnpkg.com/@tootallnate/once/-/once-1.1.2.tgz#ccb91445360179a04e7fe6aff78c00ffc1eeaf82"

0 commit comments

Comments
 (0)