Skip to content

Commit a99c89c

Browse files
committed
chore: add SWC and sync files
1 parent 4893cb9 commit a99c89c

File tree

5 files changed

+99
-18
lines changed

5 files changed

+99
-18
lines changed

.github/workflows/failureNotifications.yml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,22 +21,24 @@ jobs:
2121
SLACK_WEBHOOK_URL: ${{ secrets.CLI_ALERTS_SLACK_WEBHOOK }}
2222
SLACK_WEBHOOK_TYPE: INCOMING_WEBHOOK
2323
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
2426
payload: |
2527
{
26-
"text": "${{ github.event.workflow_run.name }} failed: ${{ github.event.workflow_run.repository.name }}",
28+
"text": "Workflow \"${{ github.event.workflow_run.name }}\" failed in ${{ github.event.workflow_run.repository.name }}",
2729
"blocks": [
2830
{
2931
"type": "header",
3032
"text": {
3133
"type": "plain_text",
32-
"text": ":bh-alert: `${{ github.event.workflow_run.name }}` failed: ${{ github.event.workflow_run.repository.name }} :bh-alert:"
34+
"text": ":bh-alert: Workflow \"${{ github.event.workflow_run.name }}\" failed in ${{ github.event.workflow_run.repository.name }} :bh-alert:"
3335
}
3436
},
3537
{
3638
"type": "section",
3739
"text": {
3840
"type": "mrkdwn",
39-
"text": "Repo: ${{ github.event.workflow_run.repository.html_url }}\nWorkflow name: `${{ github.event.workflow_run.name }}`\nJob url: ${{ github.event.workflow_run.html_url }}"
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 }}"
4042
}
4143
}
4244
]

.github/workflows/test.yml

Lines changed: 19 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,22 @@ on:
55
workflow_dispatch:
66

77
jobs:
8-
unit-tests:
9-
runs-on: ubuntu-latest
10-
steps:
11-
- uses: actions/checkout@v3
12-
- uses: actions/setup-node@v3
13-
with:
14-
node-version: lts/*
15-
cache: yarn
16-
- run: yarn install --network-timeout 600000
17-
- run: yarn build
18-
- run: yarn test
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: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222
"@salesforce/prettier-config": "^0.0.2",
2323
"@semantic-release/changelog": "^5.0.0",
2424
"@semantic-release/git": "^9.0.1",
25+
"@swc/core": "^1.3.14",
2526
"@types/shelljs": "^0.8.11",
2627
"@typescript-eslint/eslint-plugin": "^5.40.0",
2728
"@typescript-eslint/parser": "^5.42.0",
@@ -97,4 +98,4 @@
9798
"publishConfig": {
9899
"access": "public"
99100
}
100-
}
101+
}

yarn.lock

Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1333,6 +1333,72 @@
13331333
resolved "https://registry.yarnpkg.com/@sinonjs/text-encoding/-/text-encoding-0.7.1.tgz#8da5c6530915653f3a1f38fd5f101d8c3f8079c5"
13341334
integrity sha512-+iTbntw2IZPb/anVDbypzfQa+ay64MW0Zo8aJ8gZPWMMK6/OubMVb6lUPMagqjOPnmtauXnFCACVl3O7ogjeqQ==
13351335

1336+
1337+
version "1.3.14"
1338+
resolved "https://registry.yarnpkg.com/@swc/core-darwin-arm64/-/core-darwin-arm64-1.3.14.tgz#47350e5cc3807a44321e883b35516146747ce4d0"
1339+
integrity sha512-QFuUq3341uOCrJMIWGuo+CmRC5qZoM2lUo7o2lmv1FO1Dh9njTG85pLD83vz6y4j/F034DBGzvRgSti/Bsoccw==
1340+
1341+
1342+
version "1.3.14"
1343+
resolved "https://registry.yarnpkg.com/@swc/core-darwin-x64/-/core-darwin-x64-1.3.14.tgz#5028baa85f99e5fb65117a8413d6f0a000dfd136"
1344+
integrity sha512-fpAjbjXimJBmxCumRB8zjEtPc0lGUi9Uvu92XH6ww6AyXvg7KQmua5P2R9tnzAm6NwTCXKkgS86cgKysAbbObw==
1345+
1346+
1347+
version "1.3.14"
1348+
resolved "https://registry.yarnpkg.com/@swc/core-linux-arm-gnueabihf/-/core-linux-arm-gnueabihf-1.3.14.tgz#6c03573b9b4b53c2e2ebb9bb52e097649bc19c5b"
1349+
integrity sha512-3XSFlgIyDPS+x2c0IFr0AGj4NUbrWGKbkkUCpmAURII0n3YoDsYw8Ux73I8MkWxTTwDGkou8qQOXyA28kAUM4w==
1350+
1351+
1352+
version "1.3.14"
1353+
resolved "https://registry.yarnpkg.com/@swc/core-linux-arm64-gnu/-/core-linux-arm64-gnu-1.3.14.tgz#2dc7aa4b6c58be99061307fd06e56570f0f94e0e"
1354+
integrity sha512-r3fToDRYX76NEptAjvDg5aGrbitOgqooV37RpSTIGYd/CSNuin4cpCNFdca/Vh5lnNfal7mqdGDbG7gMruARtw==
1355+
1356+
1357+
version "1.3.14"
1358+
resolved "https://registry.yarnpkg.com/@swc/core-linux-arm64-musl/-/core-linux-arm64-musl-1.3.14.tgz#d9b8e6c91779fba0a1e8fc74f27848005516663d"
1359+
integrity sha512-IivEUC+3HNSsQNCfaCDzev2CpsvWpgFReitCmj0PKIdXFRsTi78jtJiraLWnYy956j4wwZbKN0OFGkS2ekKAVg==
1360+
1361+
1362+
version "1.3.14"
1363+
resolved "https://registry.yarnpkg.com/@swc/core-linux-x64-gnu/-/core-linux-x64-gnu-1.3.14.tgz#d00f39e8ab6b65761a9f6352520310154b01efbf"
1364+
integrity sha512-HtwwA1Z0tE2z9fgaR5ehgY5ULbnVLHj3tayyWhIElF4EWsi6aQfCyn/oCZAcjoPKfEnJiSNBYt5gMmfK8l4mJA==
1365+
1366+
1367+
version "1.3.14"
1368+
resolved "https://registry.yarnpkg.com/@swc/core-linux-x64-musl/-/core-linux-x64-musl-1.3.14.tgz#0868546ea3228795734e771a6835c3921864604b"
1369+
integrity sha512-RPXilkTD8IVgpou4TNuqZJOB7kMrVJ7sm7GgHF4v1eV3xdIyvy4w5FWjXZRdwMW6iunLgQEckuOmVx0I4mrdNg==
1370+
1371+
1372+
version "1.3.14"
1373+
resolved "https://registry.yarnpkg.com/@swc/core-win32-arm64-msvc/-/core-win32-arm64-msvc-1.3.14.tgz#398f6a0517b0e8bceb98680e7d2eaa9430a4df95"
1374+
integrity sha512-H8Ka/ahJRs84hQCHC5ndORujbLBmi1mv+Z/m4CXpOaEX7TmeAo8nA17rrRckNvVkud9fghsKQGjkBQvJ0v7mRw==
1375+
1376+
1377+
version "1.3.14"
1378+
resolved "https://registry.yarnpkg.com/@swc/core-win32-ia32-msvc/-/core-win32-ia32-msvc-1.3.14.tgz#be356a8fa3810e89d72bef57497aebdf03d64b7a"
1379+
integrity sha512-H3ZmDXrVxrqBzzCFodwYfcXfTHE0xGNLJlLGzJ4haV6RBM3ZYIvRzDtPivDzic/VQncmPj1WpLoEDfx/7KNC8Q==
1380+
1381+
1382+
version "1.3.14"
1383+
resolved "https://registry.yarnpkg.com/@swc/core-win32-x64-msvc/-/core-win32-x64-msvc-1.3.14.tgz#5d1dba5203030538d2c0161630068a17b5b4fd88"
1384+
integrity sha512-/D1lhWF/DQi2M7b6jWL35NmTY0mRJ5mwTXdmjqNNWOZ8h8TXQo1A3/FDFnfIIcRUeSNdF7IeB3xInT3BI34E1w==
1385+
1386+
"@swc/core@^1.3.14":
1387+
version "1.3.14"
1388+
resolved "https://registry.yarnpkg.com/@swc/core/-/core-1.3.14.tgz#596a0ba34ffd63eb87778eeffe9e97916a87af7d"
1389+
integrity sha512-LpTTrXOGS7vnbR/rHrAux7GykUWbyVmI5NbICl9iF9yeqFdGm6JjaGBhbanmG8zrQL5aFx2kMxxb92V9D1KUiw==
1390+
optionalDependencies:
1391+
"@swc/core-darwin-arm64" "1.3.14"
1392+
"@swc/core-darwin-x64" "1.3.14"
1393+
"@swc/core-linux-arm-gnueabihf" "1.3.14"
1394+
"@swc/core-linux-arm64-gnu" "1.3.14"
1395+
"@swc/core-linux-arm64-musl" "1.3.14"
1396+
"@swc/core-linux-x64-gnu" "1.3.14"
1397+
"@swc/core-linux-x64-musl" "1.3.14"
1398+
"@swc/core-win32-arm64-msvc" "1.3.14"
1399+
"@swc/core-win32-ia32-msvc" "1.3.14"
1400+
"@swc/core-win32-x64-msvc" "1.3.14"
1401+
13361402
"@szmarczak/http-timer@^4.0.5":
13371403
version "4.0.6"
13381404
resolved "https://registry.yarnpkg.com/@szmarczak/http-timer/-/http-timer-4.0.6.tgz#b4a914bb62e7c272d4e5989fe4440f812ab1d807"

0 commit comments

Comments
 (0)