Skip to content

Commit 03cf46e

Browse files
authored
Merge branch 'main' into dependabot/npm_and_yarn/types/node-20.17.46
2 parents 1eb6a09 + 2a1882b commit 03cf46e

File tree

11 files changed

+141
-17
lines changed

11 files changed

+141
-17
lines changed

.github/workflows/ci.yml

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,23 @@ on:
1212
release:
1313
types: [published]
1414

15+
concurrency:
16+
group: ${{ github.workflow }}-${{ github.ref }}
17+
cancel-in-progress: true
18+
19+
permissions:
20+
contents: read
21+
1522
jobs:
1623
build:
1724
name: Build and test
1825
runs-on: [ubuntu-latest]
1926
steps:
27+
- name: Harden the runner (Audit all outbound calls)
28+
uses: step-security/harden-runner@0634a2670c59f64b4a01f0f96f84700a4088b9f0 # v2.12.0
29+
with:
30+
egress-policy: audit
31+
2032
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
2133
with:
2234
fetch-depth: 0
@@ -111,6 +123,11 @@ jobs:
111123
- linux-arm64
112124
- darwin-arm64
113125
steps:
126+
- name: Harden the runner (Audit all outbound calls)
127+
uses: step-security/harden-runner@0634a2670c59f64b4a01f0f96f84700a4088b9f0 # v2.12.0
128+
with:
129+
egress-policy: audit
130+
114131
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
115132

116133
- uses: actions/setup-node@1d0ff469b7ec7b3cb9d8673fde0c81c44821de2a # v4.2.0
@@ -157,6 +174,11 @@ jobs:
157174
if: github.event_name == 'release'
158175
needs: package
159176
steps:
177+
- name: Harden the runner (Audit all outbound calls)
178+
uses: step-security/harden-runner@0634a2670c59f64b4a01f0f96f84700a4088b9f0 # v2.12.0
179+
with:
180+
egress-policy: audit
181+
160182
- name: Download packages
161183
uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4.3.0
162184
with:

.github/workflows/codeql.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,11 @@ jobs:
2424
runs-on: ubuntu-latest
2525

2626
steps:
27+
- name: Harden the runner (Audit all outbound calls)
28+
uses: step-security/harden-runner@0634a2670c59f64b4a01f0f96f84700a4088b9f0 # v2.12.0
29+
with:
30+
egress-policy: audit
31+
2732
- name: Checkout
2833
id: checkout
2934
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
name: 'Dependency Review'
2+
on: [pull_request]
3+
4+
permissions:
5+
contents: read
6+
7+
jobs:
8+
dependency-review:
9+
runs-on: ubuntu-latest
10+
steps:
11+
- name: Harden the runner (Audit all outbound calls)
12+
uses: step-security/harden-runner@0634a2670c59f64b4a01f0f96f84700a4088b9f0 # v2.12.0
13+
with:
14+
egress-policy: audit
15+
16+
- name: 'Checkout Repository'
17+
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
18+
- name: 'Dependency Review'
19+
uses: actions/dependency-review-action@38ecb5b593bf0eb19e335c03f97670f792489a8b # v4.7.0

.github/workflows/markdown.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,11 @@ jobs:
4343
name: Check Markdown Links
4444
runs-on: ubuntu-latest
4545
steps:
46+
- name: Harden the runner (Audit all outbound calls)
47+
uses: step-security/harden-runner@0634a2670c59f64b4a01f0f96f84700a4088b9f0 # v2.12.0
48+
with:
49+
egress-policy: audit
50+
4651
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
4752

4853
- name: Check Links

.github/workflows/mkdocs.yml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,9 @@ concurrency:
1616
group: ${{ github.workflow }}-${{ github.ref }}
1717
cancel-in-progress: true
1818

19+
permissions:
20+
contents: read
21+
1922
jobs:
2023
build:
2124
runs-on: ubuntu-latest
@@ -49,7 +52,14 @@ jobs:
4952
if: ${{ github.event_name == 'push' || github.event_name == 'workflow_dispatch' }}
5053
runs-on: ubuntu-latest
5154
needs: build
55+
permissions:
56+
contents: write # for Git to git push
5257
steps:
58+
- name: Harden the runner (Audit all outbound calls)
59+
uses: step-security/harden-runner@0634a2670c59f64b4a01f0f96f84700a4088b9f0 # v2.12.0
60+
with:
61+
egress-policy: audit
62+
5363
- name: Checkout vscode-cmsis-debugger
5464
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
5565
with:

.github/workflows/scorecard.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,6 @@ jobs:
7575
# Upload the results to GitHub's code scanning dashboard (optional).
7676
# Commenting out will disable the upload of results to your repo's Code Scanning dashboard
7777
- name: "Upload to code-scanning"
78-
uses: github/codeql-action/upload-sarif@v3
78+
uses: github/codeql-action/upload-sarif@60168efe1c415ce0f5521ea06d5c2062adbeed1b # v3.28.17
7979
with:
8080
sarif_file: results.sarif

.github/workflows/tpip.yml

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,16 +12,30 @@ on:
1212

1313
workflow_dispatch:
1414

15+
concurrency:
16+
group: ${{ github.workflow }}-${{ github.ref }}
17+
cancel-in-progress: true
18+
19+
permissions:
20+
contents: read
21+
1522
jobs:
1623
report:
24+
permissions:
25+
contents: write # for Git to git push
1726
name: Generate report
1827
runs-on: ubuntu-latest
1928
steps:
20-
- uses: actions/checkout@v4
29+
- name: Harden the runner (Audit all outbound calls)
30+
uses: step-security/harden-runner@0634a2670c59f64b4a01f0f96f84700a4088b9f0 # v2.12.0
31+
with:
32+
egress-policy: audit
33+
34+
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
2135
with:
2236
ref: ${{ github.head_ref }}
2337

24-
- uses: actions/setup-node@v4
38+
- uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0
2539
with:
2640
node-version: '20'
2741
cache: 'yarn'

docs/debug_views.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -168,7 +168,7 @@ Inline breakpoints are only hit when the execution reaches the column associated
168168
This is useful when debugging minified code, which contains multiple statements in a single line.
169169

170170
An inline breakpoint can be set using **Shift + F9** or through the context menu during a debug session.
171-
Inline breakpoint are shown inline in the editor.
171+
Inline breakpoints are shown inline in the editor.
172172

173173
Inline breakpoints can also have conditions. Editing multiple breakpoints on a line is possible through the
174174
context menu in the editor's left margin.

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -250,11 +250,11 @@
250250
"ts-jest": "29.3.2",
251251
"ts-loader": "^9.5.2",
252252
"ts-node": "^10.9.2",
253-
"type-fest": "^4.40.1",
253+
"type-fest": "^4.41.0",
254254
"typescript": "^5.8.3",
255255
"typescript-eslint": "8.32.0",
256256
"vscode-uri": "^3.1.0",
257-
"webpack": "^5.99.7",
257+
"webpack": "^5.99.8",
258258
"webpack-cli": "^6.0.1",
259259
"yargs": "^17.7.2"
260260
},

src/utils.test.ts

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
/**
2+
* Copyright 2025 Arm Limited
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License");
5+
* you may not use this file except in compliance with the License.
6+
* You may obtain a copy of the License at
7+
*
8+
* http://www.apache.org/licenses/LICENSE-2.0
9+
*
10+
* Unless required by applicable law or agreed to in writing, software
11+
* distributed under the License is distributed on an "AS IS" BASIS,
12+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
* See the License for the specific language governing permissions and
14+
* limitations under the License.
15+
*/
16+
17+
jest.mock('path');
18+
import * as os from 'os';
19+
import * as path from 'path';
20+
import { getCmsisPackRootPath, isWindows } from './utils';
21+
22+
const CMSIS_PACK_ROOT_DEFAULT = 'mock/path';
23+
describe('getCmsisPackRoot', () => {
24+
25+
afterEach(() => {
26+
jest.clearAllMocks();
27+
});
28+
29+
it('checks if CMSIS_PACK_ROOT already exists', () => {
30+
const originalProcessEnv = process.env;
31+
process.env = { ...originalProcessEnv, CMSIS_PACK_ROOT: CMSIS_PACK_ROOT_DEFAULT };
32+
const returnValue = getCmsisPackRootPath();
33+
expect(returnValue).toBe(CMSIS_PACK_ROOT_DEFAULT);
34+
process.env = originalProcessEnv;
35+
});
36+
37+
it('checks if CMSIS_PACK_ROOT has been added or not', () => {
38+
const originalProcessEnv = process.env;
39+
delete process.env['CMSIS_PACK_ROOT'];
40+
const spy = jest.spyOn(path, 'join');
41+
getCmsisPackRootPath();
42+
if (isWindows) {
43+
expect(spy).toHaveBeenCalledWith(process.env['LOCALAPPDATA'] ?? os.homedir(), 'Arm', 'Packs');
44+
} else {
45+
expect(spy).toHaveBeenCalledWith(os.homedir(), '.cache', 'arm', 'packs');
46+
}
47+
process.env = originalProcessEnv;
48+
});
49+
});

0 commit comments

Comments
 (0)