@nordicsemiconductor/pc-nrfconnect-shared 263.0.0 → 264.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 +59 -25
- package/config/tsconfig.json +2 -2
- package/config/versions.test.ts +115 -0
- package/config/versions.ts +53 -0
- package/dist/scripts/nordic-publish.js +21 -19
- package/dist/typings/config/versions.d.ts +17 -0
- package/dist/typings/config/versions.d.ts.map +1 -0
- package/dist/typings/ipc/device.d.ts +1 -1
- package/dist/typings/ipc/schema/packageJson.d.ts +9 -9
- package/dist/typings/scripts/check-app-properties.d.ts.map +1 -1
- package/dist/typings/scripts/esbuild-renderer.d.ts +2 -1
- package/dist/typings/scripts/esbuild-renderer.d.ts.map +1 -1
- package/dist/typings/scripts/set-minimal-launcher.d.ts +3 -0
- package/dist/typings/scripts/set-minimal-launcher.d.ts.map +1 -0
- package/dist/typings/src/utils/packageJson.d.ts +2 -2
- package/ipc/device.ts +1 -1
- package/package.json +8 -3
- package/release_notes.md +29 -1
- package/scripts/build-app.ts +16 -3
- package/scripts/build-shared.ts +2 -1
- package/scripts/check-app-properties.ts +38 -4
- package/scripts/check-versions.ts +53 -39
- package/scripts/esbuild-renderer.ts +9 -4
- package/scripts/set-minimal-launcher.ts +153 -0
- package/src/Device/deviceInfo/deviceInfo.ts +2 -2
- package/dist/typings/scripts/versions.d.ts +0 -5
- package/dist/typings/scripts/versions.d.ts.map +0 -1
- package/scripts/versions.ts +0 -12
package/Changelog.md
CHANGED
|
@@ -7,6 +7,40 @@ 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
|
+
## 264.0.0 - 2026-11-30
|
|
11
|
+
|
|
12
|
+
### Added
|
|
13
|
+
|
|
14
|
+
- Script `set-minimal-launcher`. Run `npx set-minimal-launcher [version]` in an
|
|
15
|
+
app to set `engines.nrfconnect` in `package.json` to that launcher version and
|
|
16
|
+
install the matching Electron version as a dev dependency. Without a version,
|
|
17
|
+
the version already in `engines.nrfconnect` is used, so the script only
|
|
18
|
+
installs the matching Electron version.
|
|
19
|
+
|
|
20
|
+
### Changed
|
|
21
|
+
|
|
22
|
+
- Updated Nordic Thingy:91 X PCA number.
|
|
23
|
+
- Bumped lib in TypeScript config to `ES2023`.
|
|
24
|
+
- Support multiple launcher and Electron versions:
|
|
25
|
+
|
|
26
|
+
Before, shared only defined a single Electron version, while in reality apps
|
|
27
|
+
may run with a launcher with an older Electron version. This is now
|
|
28
|
+
reflected by shared.
|
|
29
|
+
- Apps must now have a dev dependency on Electron, matching the version of
|
|
30
|
+
launcher they require. This is automatically checked, so when one runs
|
|
31
|
+
`npm run check` and it is not set correctly, the right invocation of
|
|
32
|
+
`npm install` is printed to fix the situation.
|
|
33
|
+
- Shared now defines a minimal launcher version. It is checked, that the app
|
|
34
|
+
has the same or a higher minimal launcher version (in `engines.nrfconnect`
|
|
35
|
+
in `package.json`). Before, this was just a convention.
|
|
36
|
+
- When building apps, they now target the Chrome version that corresponds
|
|
37
|
+
with the Electron version, defined by the minimal launcher version, the
|
|
38
|
+
app requires.
|
|
39
|
+
|
|
40
|
+
### Steps to upgrade when using this package
|
|
41
|
+
|
|
42
|
+
- Run `npx set-minimal-launcher` to add Electron as a dev dependency.
|
|
43
|
+
|
|
10
44
|
## 263.0.0 - 2026-11-03
|
|
11
45
|
|
|
12
46
|
### Changed
|
|
@@ -406,7 +440,7 @@ import { Card } from '@nordicsemiconductor/pc-nrfconnect-shared';
|
|
|
406
440
|
|
|
407
441
|
### Changed
|
|
408
442
|
|
|
409
|
-
- The required
|
|
443
|
+
- The required license file was slightly changed.
|
|
410
444
|
|
|
411
445
|
### Steps to upgrade when using this package
|
|
412
446
|
|
|
@@ -634,15 +668,15 @@ import { Card } from '@nordicsemiconductor/pc-nrfconnect-shared';
|
|
|
634
668
|
|
|
635
669
|
### Added
|
|
636
670
|
|
|
637
|
-
- `nrf-probe`
|
|
671
|
+
- `nrf-probe` version check for `nrfutil device`.
|
|
638
672
|
|
|
639
673
|
### Removed
|
|
640
674
|
|
|
641
|
-
- `nrfjprog`
|
|
675
|
+
- `nrfjprog` version check for `nrfutil device`.
|
|
642
676
|
|
|
643
677
|
### Changed
|
|
644
678
|
|
|
645
|
-
- Text in the Application card of the About tab can now be
|
|
679
|
+
- Text in the Application card of the About tab can now be highlighted and
|
|
646
680
|
copied.
|
|
647
681
|
- J-Link download URL for `JLink_MacOSX_V794i_universal.pkg` to
|
|
648
682
|
`JLink_MacOSX_V818_universal.pkg`
|
|
@@ -805,11 +839,11 @@ Overrides v202 as it was released a prerelease.
|
|
|
805
839
|
|
|
806
840
|
### Changed
|
|
807
841
|
|
|
808
|
-
- DeviceSelector Abort
|
|
842
|
+
- DeviceSelector Abort controller now aborts on the onDisconnected event
|
|
809
843
|
|
|
810
844
|
### Fixed
|
|
811
845
|
|
|
812
|
-
- Auto connecting from CLI when
|
|
846
|
+
- Auto connecting from CLI when multiple devices are connected now works as
|
|
813
847
|
expected.
|
|
814
848
|
|
|
815
849
|
## 185.0.0 - 2024-09-20
|
|
@@ -823,7 +857,7 @@ Overrides v202 as it was released a prerelease.
|
|
|
823
857
|
### Fixed
|
|
824
858
|
|
|
825
859
|
- Stop nRF Util sandbox from starting to run an aborted command.
|
|
826
|
-
- Device setup event call order when
|
|
860
|
+
- Device setup event call order when auto reconnecting at the same time as
|
|
827
861
|
selecting.
|
|
828
862
|
|
|
829
863
|
### Steps to upgrade when using this package
|
|
@@ -1082,7 +1116,7 @@ Overrides v202 as it was released a prerelease.
|
|
|
1082
1116
|
- `transparentButtonBg` parameter to `Dropdown` component.
|
|
1083
1117
|
- `NumberInput` component (provides text, input, optional unit, and slider).
|
|
1084
1118
|
- Common way to queue ongoing pending tasks. If an app is closed, a dialog is
|
|
1085
|
-
prompted to alert users before
|
|
1119
|
+
prompted to alert users before closing app. Redux states for this are:
|
|
1086
1120
|
- `addConfirmBeforeClose`
|
|
1087
1121
|
- `clearConfirmBeforeClose`
|
|
1088
1122
|
- `preventAppCloseUntilComplete` can be used to wrap some promise and secure
|
|
@@ -1344,7 +1378,7 @@ Overrides v202 as it was released a prerelease.
|
|
|
1344
1378
|
|
|
1345
1379
|
### Added
|
|
1346
1380
|
|
|
1347
|
-
- `jprogDeviceSetup` take in
|
|
1381
|
+
- `jprogDeviceSetup` take in an optional boolean to skip the device setup if
|
|
1348
1382
|
device is protected. Default remain to show dialog. Apps will need to opt-in
|
|
1349
1383
|
|
|
1350
1384
|
## 136.0.0 - 2023-12-01
|
|
@@ -1353,7 +1387,7 @@ Overrides v202 as it was released a prerelease.
|
|
|
1353
1387
|
|
|
1354
1388
|
- `useStopwatch` milliseconds was not correctly calculated
|
|
1355
1389
|
- External JLink devices would not connect to apps device list properly if
|
|
1356
|
-
selected before they are connected to the debug-in
|
|
1390
|
+
selected before they are connected to the debug-in header of the device
|
|
1357
1391
|
|
|
1358
1392
|
### Changed
|
|
1359
1393
|
|
|
@@ -1547,7 +1581,7 @@ render(<App panes={[]} />);
|
|
|
1547
1581
|
information to speed up enumeration and hotplug events.
|
|
1548
1582
|
- new optional property in device object named `devkit`
|
|
1549
1583
|
- `.jlink` property can be obtained by calling
|
|
1550
|
-
`NrfutilDeviceLib.deviceInfo().jlink` on a
|
|
1584
|
+
`NrfutilDeviceLib.deviceInfo().jlink` on a J-Link device
|
|
1551
1585
|
- `.hwInfo` property can be obtained by calling
|
|
1552
1586
|
`NrfutilDeviceLib.deviceInfo().hwInfo` on a device
|
|
1553
1587
|
- `.dfuTriggerVersion` property can be obtained by calling
|
|
@@ -1565,7 +1599,7 @@ render(<App panes={[]} />);
|
|
|
1565
1599
|
|
|
1566
1600
|
### Fixed
|
|
1567
1601
|
|
|
1568
|
-
- Check installed
|
|
1602
|
+
- Check installed J-Link version against expected version given by nrfutil
|
|
1569
1603
|
(previously this was the version bundled by the launcher).
|
|
1570
1604
|
|
|
1571
1605
|
### Steps to upgrade when using this package
|
|
@@ -1997,7 +2031,7 @@ declare module '!!@svgr!*.svg' {
|
|
|
1997
2031
|
- Re-added underline (mistakenly removed) on hover for `link` variant of
|
|
1998
2032
|
`Button` component.
|
|
1999
2033
|
- Apps now have to load themselves, i.e. there is no `ReactDOM.render` done from
|
|
2000
|
-
the launcher anymore. The app chooses which html-page will be the
|
|
2034
|
+
the launcher anymore. The app chooses which html-page will be the entry point.
|
|
2001
2035
|
- Passing devices of type nrf-device-lib-js `Device` to calls from
|
|
2002
2036
|
`deviceInfo.ts` is not allowed. Passing the nrf-device-lib-js version of
|
|
2003
2037
|
`Device` is now allowed.
|
|
@@ -2343,7 +2377,7 @@ module.exports = {
|
|
|
2343
2377
|
|
|
2344
2378
|
### Added
|
|
2345
2379
|
|
|
2346
|
-
- Exported `getWaitForDevice`
|
|
2380
|
+
- Exported `getWaitForDevice` hence allowing apps to resort previous state if
|
|
2347
2381
|
needed
|
|
2348
2382
|
|
|
2349
2383
|
### Added
|
|
@@ -2549,7 +2583,7 @@ module.exports = {
|
|
|
2549
2583
|
|
|
2550
2584
|
### Fixed
|
|
2551
2585
|
|
|
2552
|
-
- Feedback pane link to
|
|
2586
|
+
- Feedback pane link to Nordic DevZone did not open in the browser.
|
|
2553
2587
|
- Properly update package version when running the prepare script on windows.
|
|
2554
2588
|
|
|
2555
2589
|
### Changed
|
|
@@ -2691,14 +2725,14 @@ module.exports = {
|
|
|
2691
2725
|
|
|
2692
2726
|
### Fixed
|
|
2693
2727
|
|
|
2694
|
-
-
|
|
2728
|
+
- Auto reconnected devices were not passed with persisted data to the
|
|
2695
2729
|
`onDeviceSelected`/`onDeviceIsReady` callbacks.
|
|
2696
2730
|
|
|
2697
2731
|
### Removed
|
|
2698
2732
|
|
|
2699
|
-
- Support for
|
|
2700
|
-
you now have to provide the configuration and install the needed
|
|
2701
|
-
yourself.
|
|
2733
|
+
- Support for building apps with webpack. If you want to continue to use
|
|
2734
|
+
webpack, you now have to provide the configuration and install the needed
|
|
2735
|
+
dependencies yourself.
|
|
2702
2736
|
|
|
2703
2737
|
### Steps to upgrade when using this package
|
|
2704
2738
|
|
|
@@ -2783,7 +2817,7 @@ module.exports = {
|
|
|
2783
2817
|
|
|
2784
2818
|
### Fixed
|
|
2785
2819
|
|
|
2786
|
-
- Devices now receive persisted data on first
|
|
2820
|
+
- Devices now receive persisted data on first enumeration.
|
|
2787
2821
|
- Safe guard against retaining stale wait for device request if a new device is
|
|
2788
2822
|
selected
|
|
2789
2823
|
|
|
@@ -3046,7 +3080,7 @@ module.exports = {
|
|
|
3046
3080
|
|
|
3047
3081
|
### Changed
|
|
3048
3082
|
|
|
3049
|
-
- `PersistedSerialPort` takes app name
|
|
3083
|
+
- `PersistedSerialPort` takes app name from json
|
|
3050
3084
|
- `TerminalSettings` vCom Index is append with `vCom-` in persist store
|
|
3051
3085
|
|
|
3052
3086
|
## 6.18.4 - 2023-02-01
|
|
@@ -3339,13 +3373,13 @@ this:
|
|
|
3339
3373
|
|
|
3340
3374
|
- `NumberInlineInput` can opt to have step defined allowing only values that are
|
|
3341
3375
|
a factor of this step size.
|
|
3342
|
-
- `NumberInlineInput` can opt to have
|
|
3376
|
+
- `NumberInlineInput` can opt to have explicit ranges allowing for split ranges.
|
|
3343
3377
|
- `InlineInput` can opt to have support for up/down keyboard events to control
|
|
3344
3378
|
the value.
|
|
3345
3379
|
- `NumberInlineInput` support for up/down keyboard events to control the value.
|
|
3346
3380
|
- `Slider` can opt to have steps defined allowing allowing to increment the
|
|
3347
3381
|
value with the step size.
|
|
3348
|
-
- `Slider` can opt to have
|
|
3382
|
+
- `Slider` can opt to have explicit ranges allowing for split ranges. Ticks are
|
|
3349
3383
|
not yet supported on this mode.
|
|
3350
3384
|
- Warn in console if Min and Max are not factors of the optional step size.
|
|
3351
3385
|
|
|
@@ -3618,7 +3652,7 @@ this:
|
|
|
3618
3652
|
### Changed
|
|
3619
3653
|
|
|
3620
3654
|
- Move all devDependencies into dependencies and remove peer dependencies. The
|
|
3621
|
-
peer
|
|
3655
|
+
peer dependencies were use by all apps anyways, so moving them all into
|
|
3622
3656
|
dependencies will let the apps remove their own version of them.
|
|
3623
3657
|
|
|
3624
3658
|
## 6.3.2 - 2022-06-21
|
|
@@ -5096,7 +5130,7 @@ module.exports = require('pc-nrfconnect-shared/config/jest.config')();
|
|
|
5096
5130
|
|
|
5097
5131
|
### Fixed
|
|
5098
5132
|
|
|
5099
|
-
- The remote property on the electron mock was
|
|
5133
|
+
- The remote property on the electron mock was not mocked correctly.
|
|
5100
5134
|
|
|
5101
5135
|
### Changed
|
|
5102
5136
|
|
package/config/tsconfig.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"compilerOptions": {
|
|
3
|
-
"target": "
|
|
4
|
-
"lib": ["
|
|
3
|
+
"target": "es2023",
|
|
4
|
+
"lib": ["es2023", "dom", "dom.iterable", "dom.asynciterable"],
|
|
5
5
|
"moduleResolution": "node",
|
|
6
6
|
"esModuleInterop": true,
|
|
7
7
|
"jsx": "react",
|
|
@@ -0,0 +1,115 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright (c) 2026 Nordic Semiconductor ASA
|
|
3
|
+
*
|
|
4
|
+
* SPDX-License-Identifier: LicenseRef-Nordic-4-Clause
|
|
5
|
+
*/
|
|
6
|
+
|
|
7
|
+
import semver from 'semver';
|
|
8
|
+
|
|
9
|
+
import packageJson from '../package.json';
|
|
10
|
+
import {
|
|
11
|
+
minimalLauncherVersion,
|
|
12
|
+
versionsByLauncherVersion,
|
|
13
|
+
versionsForLauncherVersion,
|
|
14
|
+
} from './versions';
|
|
15
|
+
|
|
16
|
+
const lowestSemver = (semvers: string[]) => semvers.toSorted(semver.compare)[0];
|
|
17
|
+
|
|
18
|
+
describe('minimalLauncherVersion', () => {
|
|
19
|
+
it('should have versions described for it', () => {
|
|
20
|
+
expect(() =>
|
|
21
|
+
versionsForLauncherVersion(minimalLauncherVersion),
|
|
22
|
+
).not.toThrow();
|
|
23
|
+
});
|
|
24
|
+
|
|
25
|
+
it('must be the minimal version described in versionsByLauncherVersion', () => {
|
|
26
|
+
const minimalLauncherVersionInMapping = lowestSemver(
|
|
27
|
+
Object.keys(versionsByLauncherVersion).map(
|
|
28
|
+
range => semver.minVersion(range)!.version,
|
|
29
|
+
),
|
|
30
|
+
);
|
|
31
|
+
|
|
32
|
+
expect(minimalLauncherVersion).toBe(minimalLauncherVersionInMapping);
|
|
33
|
+
});
|
|
34
|
+
});
|
|
35
|
+
|
|
36
|
+
describe('versionsByLauncherVersion', () => {
|
|
37
|
+
const electronVersions = Object.values(versionsByLauncherVersion).map(
|
|
38
|
+
({ electron }) => electron,
|
|
39
|
+
);
|
|
40
|
+
|
|
41
|
+
it('does not have overlapping semver ranges', () => {
|
|
42
|
+
const launcherRanges = Object.keys(versionsByLauncherVersion);
|
|
43
|
+
|
|
44
|
+
const overlappingRangePairs = launcherRanges.flatMap((range, index) =>
|
|
45
|
+
launcherRanges
|
|
46
|
+
.slice(index + 1)
|
|
47
|
+
.filter(otherRange => semver.intersects(range, otherRange))
|
|
48
|
+
.map(otherRange => [range, otherRange]),
|
|
49
|
+
);
|
|
50
|
+
|
|
51
|
+
expect(overlappingRangePairs).toEqual([]);
|
|
52
|
+
});
|
|
53
|
+
|
|
54
|
+
it('has the same electron versions as in the peer dependencies', () => {
|
|
55
|
+
const electronPeerDependencies = packageJson.peerDependencies?.electron
|
|
56
|
+
?.split('||')
|
|
57
|
+
.map(version => version.trim());
|
|
58
|
+
|
|
59
|
+
expect(electronVersions).toEqual(
|
|
60
|
+
expect.arrayContaining(electronPeerDependencies),
|
|
61
|
+
);
|
|
62
|
+
expect(electronPeerDependencies).toEqual(
|
|
63
|
+
expect.arrayContaining(electronVersions),
|
|
64
|
+
);
|
|
65
|
+
});
|
|
66
|
+
|
|
67
|
+
it('its lowest electron version matches the dev dependency', () => {
|
|
68
|
+
expect(packageJson.devDependencies.electron).toBe(
|
|
69
|
+
lowestSemver(electronVersions),
|
|
70
|
+
);
|
|
71
|
+
});
|
|
72
|
+
});
|
|
73
|
+
|
|
74
|
+
describe('versionsForLauncherVersion', () => {
|
|
75
|
+
const exampleVersionsByLauncher = {
|
|
76
|
+
'>=5.1.0 <=5.3.99': {
|
|
77
|
+
electron: '32',
|
|
78
|
+
chrome: '',
|
|
79
|
+
node: '',
|
|
80
|
+
},
|
|
81
|
+
|
|
82
|
+
'>5.3.99': {
|
|
83
|
+
electron: '43',
|
|
84
|
+
chrome: '',
|
|
85
|
+
node: '',
|
|
86
|
+
},
|
|
87
|
+
};
|
|
88
|
+
|
|
89
|
+
it('returns the versions for a version within the Range', () => {
|
|
90
|
+
expect(
|
|
91
|
+
versionsForLauncherVersion('5.3.0', exampleVersionsByLauncher)
|
|
92
|
+
.electron,
|
|
93
|
+
).toEqual('32');
|
|
94
|
+
|
|
95
|
+
expect(
|
|
96
|
+
versionsForLauncherVersion(
|
|
97
|
+
semver.parse('5.3.0')!,
|
|
98
|
+
exampleVersionsByLauncher,
|
|
99
|
+
).electron,
|
|
100
|
+
).toEqual('32');
|
|
101
|
+
});
|
|
102
|
+
|
|
103
|
+
it('returns the right versions for pre-releases', () => {
|
|
104
|
+
expect(
|
|
105
|
+
versionsForLauncherVersion('5.4.0-pre1', exampleVersionsByLauncher)
|
|
106
|
+
.electron,
|
|
107
|
+
).toEqual('43');
|
|
108
|
+
});
|
|
109
|
+
|
|
110
|
+
it('throws when no matching launcher range exists', () => {
|
|
111
|
+
expect(() =>
|
|
112
|
+
versionsForLauncherVersion('5.0.9', exampleVersionsByLauncher),
|
|
113
|
+
).toThrow();
|
|
114
|
+
});
|
|
115
|
+
});
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright (c) 2025 Nordic Semiconductor ASA
|
|
3
|
+
*
|
|
4
|
+
* SPDX-License-Identifier: LicenseRef-Nordic-4-Clause
|
|
5
|
+
*/
|
|
6
|
+
|
|
7
|
+
import semver, { type SemVer } from 'semver';
|
|
8
|
+
|
|
9
|
+
export const minimalLauncherVersion = '5.2.0';
|
|
10
|
+
|
|
11
|
+
export const versionsByLauncherVersion: Record<
|
|
12
|
+
string,
|
|
13
|
+
{
|
|
14
|
+
electron: string;
|
|
15
|
+
chrome: string;
|
|
16
|
+
node: string;
|
|
17
|
+
}
|
|
18
|
+
> = {
|
|
19
|
+
'>=5.2.0 <5.4.0': {
|
|
20
|
+
electron: '32.1.2',
|
|
21
|
+
chrome: '128.0.6613',
|
|
22
|
+
node: '20.17.0',
|
|
23
|
+
},
|
|
24
|
+
|
|
25
|
+
'>=5.4.0 <5.4.1': {
|
|
26
|
+
electron: '43.4.0',
|
|
27
|
+
chrome: '150.0.7871',
|
|
28
|
+
node: '24.18.1',
|
|
29
|
+
},
|
|
30
|
+
|
|
31
|
+
'>=5.4.1': {
|
|
32
|
+
electron: '43.8.6',
|
|
33
|
+
chrome: '150.0.7871',
|
|
34
|
+
node: '24.22.1',
|
|
35
|
+
},
|
|
36
|
+
};
|
|
37
|
+
|
|
38
|
+
export const versionsForLauncherVersion = (
|
|
39
|
+
launcherVersion: string | SemVer,
|
|
40
|
+
versions = versionsByLauncherVersion,
|
|
41
|
+
) => {
|
|
42
|
+
const result = Object.entries(versions).find(([range]) =>
|
|
43
|
+
semver.satisfies(launcherVersion, range, { includePrerelease: true }),
|
|
44
|
+
);
|
|
45
|
+
|
|
46
|
+
if (result == null) {
|
|
47
|
+
throw new Error(
|
|
48
|
+
`No versions found for launcher version ${launcherVersion}. Please update config/versions.ts to include this version.`,
|
|
49
|
+
);
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
return result[1];
|
|
53
|
+
};
|