Skip to content

Commit 3e21fdc

Browse files
authored
feat!: deprecate Arduino IDE 2.x, require BoardLab (#50)
ESP Exception Decoder now targets Visual Studio Code and depends on BoardLab. Arduino IDE 2.x support is deprecated and maintained only in the 1.x release line with manual VSIX installation. BREAKING CHANGE: Version 2.x no longer runs in Arduino IDE 2.x. Arduino IDE users must stay on the 1.x releases. Signed-off-by: dankeboy36 <dankeboy36@gmail.com>
1 parent ec97957 commit 3e21fdc

27 files changed

+12189
-21157
lines changed

‎.eslintrc.json‎

Lines changed: 0 additions & 24 deletions
This file was deleted.

‎.github/workflows/build.yml‎

Lines changed: 106 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -12,61 +12,146 @@ on:
1212
branches:
1313
- main
1414

15+
concurrency:
16+
group: build-${{ github.event.pull_request.number || github.ref }}
17+
cancel-in-progress: true
18+
1519
jobs:
16-
build:
17-
name: test (${{ matrix.os }}, node-${{ matrix.node }})
20+
determine-version:
21+
name: Determine Version
22+
runs-on: ubuntu-latest
23+
outputs:
24+
version: ${{ steps.get_version.outputs.version }}
25+
short_sha: ${{ steps.get_sha.outputs.short_sha }}
26+
steps:
27+
- name: Checkout
28+
uses: actions/checkout@v4
29+
with:
30+
persist-credentials: false
31+
32+
- name: Use Node.js
33+
uses: actions/setup-node@v4
34+
with:
35+
node-version: 22.14.0
36+
37+
- name: Install Dependencies
38+
run: npm ci
39+
40+
- name: Get Next Version
41+
id: get_version
42+
run: |
43+
set -euo pipefail
44+
OUTPUT="$(npx semantic-release --dry-run --no-ci 2>/dev/null || true)"
45+
VERSION="$(echo "$OUTPUT" | awk '/next release version is/ {print $5}' | tail -n1)"
46+
if [ -z "$VERSION" ]; then
47+
VERSION="$(node -p "require('./package.json').version")"
48+
fi
49+
echo "version=$VERSION" >> "$GITHUB_OUTPUT"
50+
51+
- name: Get Short SHA
52+
id: get_sha
53+
run: echo "short_sha=${GITHUB_SHA::7}" >> "$GITHUB_OUTPUT"
54+
55+
test:
56+
name: Test (${{ matrix.os }}, node-${{ matrix.node }})
1857
strategy:
1958
fail-fast: false
2059
matrix:
21-
os: [windows-latest, ubuntu-latest, macos-latest]
22-
node: [20.x]
60+
os: [windows-latest, ubuntu-latest, macos-latest, macos-15-intel]
61+
node: [22.14.0]
2362
runs-on: ${{ matrix.os }}
2463
steps:
2564
- name: Checkout
26-
uses: actions/checkout@v3
65+
uses: actions/checkout@v4
2766
with:
2867
token: ${{ secrets.GITHUB_TOKEN }}
68+
2969
- name: Use Node.js
30-
uses: actions/setup-node@v3
70+
uses: actions/setup-node@v4
3171
with:
3272
node-version: ${{ matrix.node }}
33-
- name: Use Python
34-
uses: actions/setup-python@v4
35-
with:
36-
python-version: '3.x'
73+
3774
- name: Install Dependencies
3875
run: npm ci
76+
3977
- name: Check Format
4078
run: npm run format && git diff --exit-code
79+
80+
- name: Lint
81+
run: npm run lint
82+
4183
- name: Test
42-
uses: coactions/setup-xvfb@v1
43-
with:
44-
run: npm test
84+
run: ${{ matrix.os == 'ubuntu-latest' && 'xvfb-run' || '' }} npm test
4585
env:
4686
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
4787

88+
package:
89+
name: Package VSIX
90+
if: ${{ github.ref != 'refs/heads/main' }}
91+
runs-on: ubuntu-latest
92+
needs: [test, determine-version]
93+
steps:
94+
- name: Checkout
95+
uses: actions/checkout@v4
96+
with:
97+
persist-credentials: false
98+
99+
- name: Use Node.js
100+
uses: actions/setup-node@v4
101+
with:
102+
node-version: 22.14.0
103+
104+
- name: Install Dependencies
105+
run: npm ci
106+
107+
- name: Set Version
108+
run: npm pkg set version="${{ needs.determine-version.outputs.version }}-preview-${{ needs.determine-version.outputs.short_sha }}"
109+
110+
- name: Package
111+
run: npm run package
112+
113+
- name: Upload Artifact
114+
uses: actions/upload-artifact@v4
115+
with:
116+
if-no-files-found: error
117+
name: esp-exception-decoder-${{ needs.determine-version.outputs.version }}-preview-${{ needs.determine-version.outputs.short_sha }}
118+
path: '*.vsix'
119+
48120
release:
121+
name: Release
49122
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' }}
50123
runs-on: ubuntu-latest
51-
needs: [build]
124+
needs: [test]
52125
steps:
53126
- name: Checkout
54-
uses: actions/checkout@v3
127+
uses: actions/checkout@v4
55128
with:
56129
persist-credentials: false
130+
57131
- name: Use Node.js
58-
uses: actions/setup-node@v1
132+
uses: actions/setup-node@v4
59133
with:
60-
node-version: 20.x
134+
node-version: 22.14.0
135+
61136
- name: Install Dependencies
62137
run: npm ci
63-
- name: Build
64-
run: npm run build
138+
139+
- name: Package
140+
run: npm run package
141+
142+
- name: Load secrets from 1Password
143+
id: load_secrets
144+
uses: 1password/load-secrets-action@v3
145+
env:
146+
OP_SERVICE_ACCOUNT_TOKEN: ${{ secrets.OP_SERVICE_ACCOUNT_TOKEN }}
147+
GH_TOKEN: op://cicd_dankeboy36/GITHUB_TOKEN/credential
148+
VSCE_PAT: op://cicd_dankeboy36/VSCE_TOKEN/credential
149+
65150
- name: Release
66151
id: release
67152
run: npm run release
68153
env:
69-
GITHUB_TOKEN: ${{ secrets.ADMIN_TOKEN }}
70-
OVSX_PAT: ${{ secrets.OVSX_PAT }}
154+
GITHUB_TOKEN: ${{ steps.load_secrets.outputs.GITHUB_TOKEN }}
155+
VSCE_PAT: ${{ steps.load_secrets.outputs.VSCE_PAT }}
71156
outputs:
72157
release_version: ${{ steps.release.outputs.release_version }}

‎.prettierrc.json‎

Lines changed: 0 additions & 16 deletions
This file was deleted.

‎.vscode/extensions.json‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
"recommendations": [
33
"dbaeumer.vscode-eslint",
44
"amodio.tsl-problem-matcher",
5-
"streetsidesoftware.code-spell-checker"
5+
"streetsidesoftware.code-spell-checker",
6+
"esbenp.prettier-vscode"
67
]
78
}

‎.vscode/launch.json‎

Lines changed: 0 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -27,26 +27,6 @@
2727
"${workspaceFolder}/dist/**/*.js"
2828
],
2929
"preLaunchTask": "tasks: watch-tests"
30-
},
31-
{
32-
"name": "Extension Tests (Slow)",
33-
"type": "extensionHost",
34-
"request": "launch",
35-
"args": [
36-
"--extensionDevelopmentPath=${workspaceFolder}",
37-
"--extensionTestsPath=${workspaceFolder}/out/test/suite/index"
38-
],
39-
"env": {
40-
"CLI_TEST_CONTEXT": "slow",
41-
"NO_TEST_TIMEOUT": "true",
42-
"NO_TEST_COVERAGE": "true",
43-
"TEST_DEBUG": "espExceptionDecoder*"
44-
},
45-
"outFiles": [
46-
"${workspaceFolder}/out/**/*.js",
47-
"${workspaceFolder}/dist/**/*.js"
48-
],
49-
"preLaunchTask": "tasks: watch-tests"
5030
}
5131
]
5232
}

‎.vscode/settings.json‎

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,23 @@
11
{
22
"files.exclude": {
33
"out": false,
4-
"dist": false
4+
"dir": false
55
},
66
"search.exclude": {
77
"out": true,
8-
"dist": true
8+
"dir": true
99
},
1010
"typescript.tsc.autoDetect": "off",
1111
"typescript.tsdk": "./node_modules/typescript/lib",
1212
"editor.codeActionsOnSave": {
1313
"source.fixAll.eslint": "explicit"
14-
}
14+
},
15+
"[javascript][javascriptreact][json][typescript][typescriptreact][css]": {
16+
"editor.defaultFormatter": "esbenp.prettier-vscode",
17+
"editor.formatOnPaste": true,
18+
"editor.formatOnSave": true
19+
},
20+
"eslint.format.enable": true,
21+
"js/ts.implicitProjectConfig.checkJs": true,
22+
"js/ts.implicitProjectConfig.module": "NodeNext"
1523
}

‎.vscodeignore‎

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,10 @@ vsc-extension-quickstart.md
1111
**/.eslintrc.json
1212
**/*.map
1313
**/*.ts
14-
.prettier*
14+
prettier.config.*
15+
.prettierignore
16+
eslint.config.*
1517
.github/**
16-
images/**
1718
release.config.js
1819
CHANGELOG.md
1920
.nyc_output

0 commit comments

Comments
 (0)