@nordicsemiconductor/pc-nrfconnect-shared 260.0.0 → 261.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/Changelog.md +14 -0
- package/config/tsconfig.json +1 -0
- package/dist/typings/nrfutil/device/__mocks__/device.d.ts +1 -0
- package/dist/typings/nrfutil/device/__mocks__/device.d.ts.map +1 -1
- package/dist/typings/nrfutil/device/common.d.ts +1 -0
- package/dist/typings/nrfutil/device/common.d.ts.map +1 -1
- package/dist/typings/nrfutil/device/device.d.ts +1 -0
- package/dist/typings/nrfutil/device/device.d.ts.map +1 -1
- package/dist/typings/nrfutil/device/programBoardController.d.ts +5 -0
- package/dist/typings/nrfutil/device/programBoardController.d.ts.map +1 -0
- package/dist/typings/nrfutil/version/jlinkVersion.d.ts.map +1 -1
- package/nrfutil/device/__mocks__/device.ts +2 -0
- package/nrfutil/device/common.ts +1 -0
- package/nrfutil/device/device.ts +2 -0
- package/nrfutil/device/programBoardController.ts +22 -0
- package/nrfutil/version/jlinkVersion.test.ts +26 -8
- package/nrfutil/version/jlinkVersion.ts +3 -2
- package/package.json +2 -3
- package/release_notes.md +9 -1
package/Changelog.md
CHANGED
|
@@ -7,6 +7,20 @@ This project does _not_ adhere to
|
|
|
7
7
|
[Semantic Versioning](https://semver.org/spec/v2.0.0.html) but contrary to it
|
|
8
8
|
every new version is a new major version.
|
|
9
9
|
|
|
10
|
+
## 261.0.0 - 2026-10-08
|
|
11
|
+
|
|
12
|
+
### Added
|
|
13
|
+
|
|
14
|
+
- Program board controller methods.
|
|
15
|
+
|
|
16
|
+
### Fixed
|
|
17
|
+
|
|
18
|
+
- Handling two-digit J-Link version numbers.
|
|
19
|
+
|
|
20
|
+
### Changed
|
|
21
|
+
|
|
22
|
+
- Updated dependency adm-zip because of security advisory.
|
|
23
|
+
|
|
10
24
|
## 260.0.0 - 2026-09-11
|
|
11
25
|
|
|
12
26
|
### Fixed
|
package/config/tsconfig.json
CHANGED
|
@@ -21,6 +21,7 @@ declare const _default: {
|
|
|
21
21
|
setLogLevel: jest.Mock<any, any, any>;
|
|
22
22
|
setVerboseLogging: jest.Mock<any, any, any>;
|
|
23
23
|
getModuleVersion: jest.Mock<any, any, any>;
|
|
24
|
+
programBoardController: jest.Mock<any, any, any>;
|
|
24
25
|
};
|
|
25
26
|
export default _default;
|
|
26
27
|
//# sourceMappingURL=device.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"device.d.ts","sourceRoot":"","sources":["../../../../../nrfutil/device/__mocks__/device.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"device.d.ts","sourceRoot":"","sources":["../../../../../nrfutil/device/__mocks__/device.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AA6BA,wBAoBE"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"common.d.ts","sourceRoot":"","sources":["../../../../nrfutil/device/common.ts"],"names":[],"mappings":"AAOA,OAAO,EAAE,KAAK,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAElD,eAAO,MAAM,kBAAkB,GAAI,QAAQ,YAAY,aAOtD,CAAC;AAEF,MAAM,MAAM,SAAS,GACf,eAAe,GACf,cAAc,GACd,YAAY,GACZ,aAAa,GACb,WAAW,CAAC;AAElB,MAAM,WAAW,kBAAkB;IAC/B,MAAM,EAAE,aAAa,CAAC;CACzB;AAED,MAAM,WAAW,eAAe;IAC5B,EAAE,EAAE,MAAM,CAAC;CACd;AAED,MAAM,WAAW,YAAY;IACzB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,YAAY,CAAC,EAAE,MAAM,CAAC;CACzB;AAED,MAAM,WAAW,aAAa;IAC1B,EAAE,EAAE,MAAM,CAAC;IACX,MAAM,CAAC,EAAE,YAAY,CAAC;IACtB,YAAY,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC7B,MAAM,EAAE,YAAY,CAAC;IACrB,GAAG,CA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IAC5B,OAAO,EAAE,MAAM,GAAG,IAAI,CAAC;IACvB,YAAY,EAAE,MAAM,GAAG,IAAI,CAAC;IAC5B,SAAS,EAAE,MAAM,GAAG,IAAI,CAAC;IACzB,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAC;IACxB,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,GAAG,IAAI,CAAC;CACvB;AAED,eAAO,MAAM,4BAA4B,GAAU,CAAC,GAAG,IAAI,EACvD,QAAQ,aAAa,EACrB,SAAS,MAAM,EACf,aAAa,UAAU,EACvB,aAAa,eAAe,EAC5B,OAAM,MAAM,EAAO,qCActB,CAAC;AAEF,eAAO,MAAM,gCAAgC,GACzC,QAAQ,aAAa,EACrB,SAAS,MAAM,EACf,aAAa,UAAU,EACvB,aAAa,eAAe,EAC5B,OAAM,MAAM,EAAO,kBAetB,CAAC;AAEF,eAAO,MAAM,OAAO,GAAI,OAAO,UAAU,aAAmC,CAAC"}
|
|
@@ -26,6 +26,7 @@ declare const _default: {
|
|
|
26
26
|
boardController: (device: import("./common").NrfutilDevice, data: object, onProgress?: import("../sandboxTypes").OnProgress, controller?: AbortController) => Promise<void>;
|
|
27
27
|
getBoardControllerVersion: (device: import("./common").NrfutilDevice, onProgress?: import("../sandboxTypes").OnProgress, controller?: AbortController) => Promise<import("./getBoardControllerVersion").BoardControllerVersion>;
|
|
28
28
|
getBoardControllerConfig: (device: import("./common").NrfutilDevice, onProgress?: import("../sandboxTypes").OnProgress, controller?: AbortController) => Promise<unknown[][]>;
|
|
29
|
+
programBoardController: (device: import("./common").NrfutilDevice, firmwarePath: string, onProgress?: import("../sandboxTypes").OnProgress, controller?: AbortController) => Promise<void>;
|
|
29
30
|
batch: () => Batch;
|
|
30
31
|
};
|
|
31
32
|
export default _default;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"device.d.ts","sourceRoot":"","sources":["../../../../nrfutil/device/device.ts"],"names":[],"mappings":"AAOA,OAAO,EAAE,KAAK,QAAQ,EAAE,KAAK,UAAU,EAAE,MAAM,iBAAiB,CAAC;AACjE,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"device.d.ts","sourceRoot":"","sources":["../../../../nrfutil/device/device.ts"],"names":[],"mappings":"AAOA,OAAO,EAAE,KAAK,QAAQ,EAAE,KAAK,UAAU,EAAE,MAAM,iBAAiB,CAAC;AACjE,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;;;;;;;;;;;;oJAaP,CAAC;;;;;;;;yBAIQ,CAAC,OAAO,EAAE,UAAU,KAAK,IAAI;yBAK7B,QAAQ;iCAKA,OAAO;;;;;;;;AAYjD,wBAqBE"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { type OnProgress } from '../sandboxTypes';
|
|
2
|
+
import { type NrfutilDevice } from './common';
|
|
3
|
+
declare const _default: (device: NrfutilDevice, firmwarePath: string, onProgress?: OnProgress, controller?: AbortController) => Promise<void>;
|
|
4
|
+
export default _default;
|
|
5
|
+
//# sourceMappingURL=programBoardController.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"programBoardController.d.ts","sourceRoot":"","sources":["../../../../nrfutil/device/programBoardController.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,KAAK,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAClD,OAAO,EAAoC,KAAK,aAAa,EAAE,MAAM,UAAU,CAAC;yBAG5E,QAAQ,aAAa,EACrB,cAAc,MAAM,EACpB,aAAa,UAAU,EACvB,aAAa,eAAe;AAJhC,wBAYM"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"jlinkVersion.d.ts","sourceRoot":"","sources":["../../../../nrfutil/version/jlinkVersion.ts"],"names":[],"mappings":"AAQA,OAAO,EACH,KAAK,UAAU,EAGf,KAAK,aAAa,EACrB,MAAM,iBAAiB,CAAC;AACzB,OAAO,EACH,KAAK,oBAAoB,EAG5B,MAAM,WAAW,CAAC;AAEnB,eAAO,MAAM,mBAAmB,GAAI,SAAS,oBAAoB,WACP,CAAC;AAE3D,eAAO,MAAM,wBAAwB,GACjC,YAAY,UAAU,GAAG,oBAAoB,EAC7C,oBAAiB,KAClB,UAAU,IAAI,oBAiBhB,CAAC;AAEF,eAAO,MAAM,eAAe,GAAI,SAAS,oBAAoB,WAS5D,CAAC;AAEF,eAAO,MAAM,2BAA2B,GACpC,wBAAwB,UAAU,YAarC,CAAC;
|
|
1
|
+
{"version":3,"file":"jlinkVersion.d.ts","sourceRoot":"","sources":["../../../../nrfutil/version/jlinkVersion.ts"],"names":[],"mappings":"AAQA,OAAO,EACH,KAAK,UAAU,EAGf,KAAK,aAAa,EACrB,MAAM,iBAAiB,CAAC;AACzB,OAAO,EACH,KAAK,oBAAoB,EAG5B,MAAM,WAAW,CAAC;AAEnB,eAAO,MAAM,mBAAmB,GAAI,SAAS,oBAAoB,WACP,CAAC;AAE3D,eAAO,MAAM,wBAAwB,GACjC,YAAY,UAAU,GAAG,oBAAoB,EAC7C,oBAAiB,KAClB,UAAU,IAAI,oBAiBhB,CAAC;AAEF,eAAO,MAAM,eAAe,GAAI,SAAS,oBAAoB,WAS5D,CAAC;AAEF,eAAO,MAAM,2BAA2B,GACpC,wBAAwB,UAAU,YAarC,CAAC;AAoBF,eAAO,MAAM,qBAAqB,GAAI,eAAe,aAAa;;;;;;;;;;;;;;;;CAsDjE,CAAC"}
|
|
@@ -25,6 +25,7 @@ const onLogging = jest.fn();
|
|
|
25
25
|
const setLogLevel = jest.fn();
|
|
26
26
|
const setVerboseLogging = jest.fn();
|
|
27
27
|
const getModuleVersion = jest.fn();
|
|
28
|
+
const programBoardController = jest.fn();
|
|
28
29
|
|
|
29
30
|
export default {
|
|
30
31
|
program,
|
|
@@ -45,4 +46,5 @@ export default {
|
|
|
45
46
|
setLogLevel,
|
|
46
47
|
setVerboseLogging,
|
|
47
48
|
getModuleVersion,
|
|
49
|
+
programBoardController,
|
|
48
50
|
};
|
package/nrfutil/device/common.ts
CHANGED
package/nrfutil/device/device.ts
CHANGED
|
@@ -17,6 +17,7 @@ import getFwInfo from './getFwInfo';
|
|
|
17
17
|
import getProtectionStatus from './getProtectionStatus';
|
|
18
18
|
import list from './list';
|
|
19
19
|
import program from './program';
|
|
20
|
+
import programBoardController from './programBoardController';
|
|
20
21
|
import recover from './recover';
|
|
21
22
|
import reset from './reset';
|
|
22
23
|
import setMcuState from './setMcuState';
|
|
@@ -63,5 +64,6 @@ export default {
|
|
|
63
64
|
boardController,
|
|
64
65
|
getBoardControllerVersion,
|
|
65
66
|
getBoardControllerConfig,
|
|
67
|
+
programBoardController,
|
|
66
68
|
batch: () => new Batch(),
|
|
67
69
|
};
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright (c) 2026 Nordic Semiconductor ASA
|
|
3
|
+
*
|
|
4
|
+
* SPDX-License-Identifier: LicenseRef-Nordic-4-Clause
|
|
5
|
+
*/
|
|
6
|
+
|
|
7
|
+
import { type OnProgress } from '../sandboxTypes';
|
|
8
|
+
import { deviceSingleTaskEndOperationVoid, type NrfutilDevice } from './common';
|
|
9
|
+
|
|
10
|
+
export default (
|
|
11
|
+
device: NrfutilDevice,
|
|
12
|
+
firmwarePath: string,
|
|
13
|
+
onProgress?: OnProgress,
|
|
14
|
+
controller?: AbortController,
|
|
15
|
+
) =>
|
|
16
|
+
deviceSingleTaskEndOperationVoid(
|
|
17
|
+
device,
|
|
18
|
+
'x-boardcontroller-program',
|
|
19
|
+
onProgress,
|
|
20
|
+
controller,
|
|
21
|
+
['--firmware', firmwarePath, '--traits', 'boardController'],
|
|
22
|
+
);
|
|
@@ -29,6 +29,12 @@ test('strippedVersionName', () => {
|
|
|
29
29
|
versionFormat: 'string',
|
|
30
30
|
}),
|
|
31
31
|
).toBe('7.96');
|
|
32
|
+
expect(
|
|
33
|
+
strippedVersionName({
|
|
34
|
+
version: '10.00b',
|
|
35
|
+
versionFormat: 'string',
|
|
36
|
+
}),
|
|
37
|
+
).toBe('10.00b');
|
|
32
38
|
});
|
|
33
39
|
|
|
34
40
|
describe('expectedFormat', () => {
|
|
@@ -102,6 +108,15 @@ describe('expectedFormat', () => {
|
|
|
102
108
|
false,
|
|
103
109
|
),
|
|
104
110
|
).toBe(true);
|
|
111
|
+
expect(
|
|
112
|
+
hasExpectedVersionFormat(
|
|
113
|
+
{
|
|
114
|
+
version: 'JLink_V10.00 ',
|
|
115
|
+
versionFormat: 'string',
|
|
116
|
+
},
|
|
117
|
+
false,
|
|
118
|
+
),
|
|
119
|
+
).toBe(true);
|
|
105
120
|
});
|
|
106
121
|
});
|
|
107
122
|
|
|
@@ -118,6 +133,9 @@ test('convertToSemver', () => {
|
|
|
118
133
|
expect(
|
|
119
134
|
convertToSemver({ version: 'JLink_V8.10b', versionFormat: 'string' }),
|
|
120
135
|
).toBe('8.10.2');
|
|
136
|
+
expect(
|
|
137
|
+
convertToSemver({ version: 'JLink_V10.10z', versionFormat: 'string' }),
|
|
138
|
+
).toBe('10.10.26');
|
|
121
139
|
});
|
|
122
140
|
|
|
123
141
|
describe('existingIsOlderThanExpected', () => {
|
|
@@ -133,8 +151,8 @@ describe('existingIsOlderThanExpected', () => {
|
|
|
133
151
|
version: 'JLink_V7.96 ',
|
|
134
152
|
versionFormat: 'string',
|
|
135
153
|
} as const;
|
|
136
|
-
const
|
|
137
|
-
version: '
|
|
154
|
+
const version1010b = {
|
|
155
|
+
version: 'JLink_V10.10b',
|
|
138
156
|
versionFormat: 'string',
|
|
139
157
|
} as const;
|
|
140
158
|
|
|
@@ -169,7 +187,7 @@ describe('existingIsOlderThanExpected', () => {
|
|
|
169
187
|
).toBe(false);
|
|
170
188
|
expect(
|
|
171
189
|
existingIsOlderThanExpected({
|
|
172
|
-
...
|
|
190
|
+
...version1010b,
|
|
173
191
|
name: 'JlinkARM',
|
|
174
192
|
expectedVersion: version794i,
|
|
175
193
|
}),
|
|
@@ -195,7 +213,7 @@ describe('existingIsOlderThanExpected', () => {
|
|
|
195
213
|
existingIsOlderThanExpected({
|
|
196
214
|
...version794i,
|
|
197
215
|
name: 'JlinkARM',
|
|
198
|
-
expectedVersion:
|
|
216
|
+
expectedVersion: version1010b,
|
|
199
217
|
}),
|
|
200
218
|
).toBe(true);
|
|
201
219
|
});
|
|
@@ -278,18 +296,18 @@ describe('getJlinkCompatibility', () => {
|
|
|
278
296
|
getJlinkCompatibility(
|
|
279
297
|
createModuleVersion({
|
|
280
298
|
name: 'JlinkARM',
|
|
281
|
-
version: '
|
|
299
|
+
version: 'JLink_V11.10f',
|
|
282
300
|
versionFormat: 'string',
|
|
283
301
|
expectedVersion: {
|
|
284
|
-
version: '
|
|
302
|
+
version: 'JLink_V10.94i',
|
|
285
303
|
versionFormat: 'string',
|
|
286
304
|
},
|
|
287
305
|
}),
|
|
288
306
|
),
|
|
289
307
|
).toEqual({
|
|
290
308
|
kind: 'Newer SEGGER J-Link is used',
|
|
291
|
-
requiredJlink: '
|
|
292
|
-
actualJlink: '
|
|
309
|
+
requiredJlink: '10.94i',
|
|
310
|
+
actualJlink: '11.10f',
|
|
293
311
|
});
|
|
294
312
|
});
|
|
295
313
|
|
|
@@ -45,7 +45,7 @@ export const hasExpectedVersionFormat = (
|
|
|
45
45
|
|
|
46
46
|
export const convertToSemver = (version: DiscriminatedVersion) => {
|
|
47
47
|
const [, majorMinor, patchLetter] =
|
|
48
|
-
strippedVersionName(version).match(/(\d
|
|
48
|
+
strippedVersionName(version).match(/(\d+\.\d+)(.)?/) ?? [];
|
|
49
49
|
|
|
50
50
|
const patch = patchLetter
|
|
51
51
|
? patchLetter.charCodeAt(0) - 'a'.charCodeAt(0) + 1
|
|
@@ -71,7 +71,8 @@ export const existingIsOlderThanExpected = (
|
|
|
71
71
|
};
|
|
72
72
|
|
|
73
73
|
const nrfutilDeviceToJLink = (nrfutilDeviceVersion: string) => {
|
|
74
|
-
// According to https://docs.nordicsemi.com/bundle/nrfutil/page/guides/installing.html
|
|
74
|
+
// According to https://docs.nordicsemi.com/r/bundle/nrfutil/page/guides/installing.html/prerequisites#:~:text=What%20J%2DLink%20version%20you%20need
|
|
75
|
+
// Since 2.7.0 nrfutil device reports the required J-Link version itself, so we do not need to hardcode it here for more versions.
|
|
75
76
|
if (semver.lt(nrfutilDeviceVersion, '2.0.0')) {
|
|
76
77
|
return '7.80c';
|
|
77
78
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nordicsemiconductor/pc-nrfconnect-shared",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "261.0.0",
|
|
4
4
|
"description": "Shared commodities for developing pc-nrfconnect-* packages",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -40,7 +40,6 @@
|
|
|
40
40
|
"@swc/jest": "0.2.37",
|
|
41
41
|
"@testing-library/jest-dom": "5.16.5",
|
|
42
42
|
"@testing-library/react": "^14.0.0",
|
|
43
|
-
"@types/adm-zip": "^0.5.0",
|
|
44
43
|
"@types/date-fns": "^2.6.0",
|
|
45
44
|
"@types/ftp": "0.3.33",
|
|
46
45
|
"@types/klaw": "3.0.3",
|
|
@@ -54,7 +53,7 @@
|
|
|
54
53
|
"@types/triple-beam": "1.3.2",
|
|
55
54
|
"@types/uuid": "8.3.4",
|
|
56
55
|
"@xterm/headless": "^5.5.0",
|
|
57
|
-
"adm-zip": "
|
|
56
|
+
"adm-zip": "0.6.1",
|
|
58
57
|
"applicationinsights": "^2.9.6",
|
|
59
58
|
"autoprefixer": "10.4.14",
|
|
60
59
|
"bootstrap": "4.6.2",
|
package/release_notes.md
CHANGED