@nordicsemiconductor/pc-nrfconnect-shared 187.0.0 → 189.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.
Files changed (48) hide show
  1. package/Changelog.md +25 -0
  2. package/nrfutil/device/deviceInfo.ts +15 -1
  3. package/nrfutil/device/logLibVersions.ts +1 -1
  4. package/nrfutil/device/program.ts +2 -0
  5. package/nrfutil/device/setMcuState.ts +3 -2
  6. package/nrfutil/moduleVersion.ts +1 -1
  7. package/nrfutil/modules.ts +3 -3
  8. package/nrfutil/sandbox.ts +6 -4
  9. package/package.json +6 -6
  10. package/scripts/nordic-publish.js +25 -25
  11. package/src/About/SupportCard.tsx +2 -2
  12. package/src/Device/DeviceSelector/DeviceList/DeviceList.tsx +2 -2
  13. package/src/Device/DeviceSelector/DeviceSelector.test.tsx +3 -3
  14. package/src/Device/DeviceSelector/DeviceSelector.tsx +1 -1
  15. package/src/Device/deviceLister.ts +2 -2
  16. package/src/Device/deviceSetup.ts +6 -6
  17. package/src/Device/jprogOperations.ts +3 -3
  18. package/src/Device/sdfuOperations.ts +13 -11
  19. package/src/Dropdown/DropdownHelpers.test.ts +76 -0
  20. package/src/Dropdown/DropdownHelpers.ts +44 -0
  21. package/src/Log/logSlice.ts +1 -1
  22. package/src/Parsers/shellParser.ts +1 -1
  23. package/src/SerialPort/ConflictingSettingsDialog.tsx +2 -2
  24. package/src/index.ts +6 -0
  25. package/src/logging/index.ts +2 -2
  26. package/src/utils/persistentStore.ts +2 -2
  27. package/src/utils/systemReport.ts +1 -1
  28. package/typings/generated/ipc/schema/packageJson.d.ts +41 -20
  29. package/typings/generated/ipc/schema/packageJson.d.ts.map +1 -1
  30. package/typings/generated/ipc/schema/parseJson.d.ts +1 -0
  31. package/typings/generated/ipc/schema/parseJson.d.ts.map +1 -1
  32. package/typings/generated/nrfutil/device/device.d.ts +1 -1
  33. package/typings/generated/nrfutil/device/deviceInfo.d.ts +11 -0
  34. package/typings/generated/nrfutil/device/deviceInfo.d.ts.map +1 -1
  35. package/typings/generated/nrfutil/device/program.d.ts +1 -0
  36. package/typings/generated/nrfutil/device/program.d.ts.map +1 -1
  37. package/typings/generated/nrfutil/device/setMcuState.d.ts +1 -1
  38. package/typings/generated/nrfutil/device/setMcuState.d.ts.map +1 -1
  39. package/typings/generated/nrfutil/sandbox.d.ts.map +1 -1
  40. package/typings/generated/src/Device/sdfuOperations.d.ts.map +1 -1
  41. package/typings/generated/src/Dropdown/DropdownHelpers.d.ts +6 -0
  42. package/typings/generated/src/Dropdown/DropdownHelpers.d.ts.map +1 -0
  43. package/typings/generated/src/Dropdown/DropdownHelpers.test.d.ts +2 -0
  44. package/typings/generated/src/Dropdown/DropdownHelpers.test.d.ts.map +1 -0
  45. package/typings/generated/src/Parsers/shellParser.d.ts +1 -1
  46. package/typings/generated/src/Parsers/shellParser.d.ts.map +1 -1
  47. package/typings/generated/src/index.d.ts +1 -0
  48. package/typings/generated/src/index.d.ts.map +1 -1
package/Changelog.md CHANGED
@@ -7,6 +7,31 @@ 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
+ ## 189.0.0 - 2024-10-18
11
+
12
+ ### Added
13
+
14
+ - Dropdown helper functions which are used in `pc-nrfconnect-serial-terminal`
15
+ and `pc-nrfconnect-programmer`.
16
+ - Add nrfutil mcu-state-options for multi target support.
17
+
18
+ ### Steps to upgrade when using this package
19
+
20
+ - Minimum support version of nrfutil device is now 2.5.0
21
+
22
+ ## 188.0.0 - 2024-10-15
23
+
24
+ ### Changed
25
+
26
+ - Update JLink macOS install link pointing from `V794e` to `V794i`.
27
+ - Update `@xterm/headless`, `electron`, `serialport`, `applicationinsights`
28
+ dependencies.
29
+
30
+ ### Steps to upgrade when using this package
31
+
32
+ - Update imports of the `Terminal` from `xterm-headless` to `@xterm/headless`
33
+ if applicable.
34
+
10
35
  ## 187.0.0 - 2024-10-04
11
36
 
12
37
  ### Fixed
@@ -41,11 +41,23 @@ export interface DfuTriggerVersion {
41
41
  semVer: string;
42
42
  }
43
43
 
44
+ export interface McuStateOption {
45
+ arguments?: {
46
+ target: string;
47
+ };
48
+ description: string;
49
+ name: string;
50
+ type: 'Programming' | 'Application';
51
+ value: 'NRFDL_MCU_STATE_PROGRAMMING';
52
+ }
53
+
44
54
  export interface DeviceInfo {
45
55
  hwInfo?: HwInfo;
46
56
  jlink?: JLinkDeviceInfo;
47
57
  dfuTriggerVersion?: DfuTriggerVersion;
48
58
  dfuTriggerInfo?: DfuTriggerInfo;
59
+ mcuStateOptions?: McuStateOption[];
60
+ supportedOptions?: string[];
49
61
  }
50
62
 
51
63
  export interface DeviceInfoRaw {
@@ -60,7 +72,9 @@ export default async (
60
72
  controller?: AbortController
61
73
  ) => {
62
74
  try {
63
- return device.traits.jlink || device.traits.nordicDfu
75
+ return device.traits.jlink ||
76
+ device.traits.nordicDfu ||
77
+ device.traits.mcuBoot
64
78
  ? (
65
79
  await deviceSingleTaskEndOperation<DeviceInfoRaw>(
66
80
  device,
@@ -108,7 +108,7 @@ export default async (moduleVersion: ModuleVersion) => {
108
108
  `It looks like you have installed JLink using ${JLinkInstallerVersion}, but currently we only support their Universal Installer for your system.`
109
109
  );
110
110
  logger?.warn(
111
- `Please install JLink: https://www.segger.com/downloads/jlink/JLink_MacOSX_V794e_universal.pkg`
111
+ `Please install JLink: https://www.segger.com/downloads/jlink/JLink_MacOSX_V794i_universal.pkg`
112
112
  );
113
113
  }
114
114
  }
@@ -35,6 +35,7 @@ export interface JLinkProgrammingOptions {
35
35
  export interface McuBootProgrammingOptions {
36
36
  mcuEndState?: 'NRFDL_MCU_STATE_APPLICATION' | 'NRFDL_MCU_STATE_PROGRAMMING';
37
37
  netCoreUploadDelay?: number;
38
+ target?: string;
38
39
  }
39
40
 
40
41
  export interface NordicDfuProgrammingOptions {
@@ -91,6 +92,7 @@ export const programmingOptionsToArgs = (options?: ProgrammingOptions) => {
91
92
  options.netCoreUploadDelay
92
93
  )}`
93
94
  );
95
+ if (options.target) args.push(`target=${options.target}`);
94
96
  } else if (isNordicDfuProgrammingOptions(options)) {
95
97
  if (options.mcuEndState)
96
98
  args.push(`mcu_end_state=${options.mcuEndState}`);
@@ -13,12 +13,13 @@ export default (
13
13
  device: NrfutilDevice,
14
14
  state: McuState,
15
15
  onProgress?: (progress: Progress) => void,
16
- controller?: AbortController
16
+ controller?: AbortController,
17
+ target?: string
17
18
  ) =>
18
19
  deviceSingleTaskEndOperationVoid(
19
20
  device,
20
21
  'mcu-state-set',
21
22
  onProgress,
22
23
  controller,
23
- [state]
24
+ [state, target ? `--target=${target}` : '']
24
25
  );
@@ -92,7 +92,7 @@ const versionFromPackageJson = (module: string) =>
92
92
  packageJsonApp().nrfConnectForDesktop.nrfutil?.[module][0];
93
93
 
94
94
  const failToDetermineVersion = (module: string) => {
95
- throw new Error(`No version specified for nrfutil-${module}`);
95
+ throw new Error(`No version specified for the bundled nrfutil ${module}`);
96
96
  };
97
97
 
98
98
  export const versionToInstall = (module: string, version?: string) =>
@@ -21,7 +21,7 @@ const logModuleVersions = (module: string, moduleSandbox: NrfutilSandbox) => {
21
21
  } else {
22
22
  moduleSandbox.getModuleVersion().then(moduleVersion => {
23
23
  getNrfutilLogger()?.info(
24
- `Using ${module} version: ${describeVersion(
24
+ `Using the bundled nrfutil ${module} version: ${describeVersion(
25
25
  moduleVersion.version
26
26
  )}`
27
27
  );
@@ -30,7 +30,7 @@ const logModuleVersions = (module: string, moduleSandbox: NrfutilSandbox) => {
30
30
 
31
31
  moduleSandbox.getCoreVersion().then(moduleVersion => {
32
32
  getNrfutilLogger()?.info(
33
- `Using nrfutil-${module} core version: ${describeVersion(
33
+ `Using the bundled core version for nrfutil ${module}: ${describeVersion(
34
34
  moduleVersion.version
35
35
  )}`
36
36
  );
@@ -78,7 +78,7 @@ const getModuleSandbox = (module: string) => {
78
78
  let promiseModuleSandbox: Promise<NrfutilSandbox> | undefined;
79
79
 
80
80
  const createModuleSandbox = async () => {
81
- getNrfutilLogger()?.info(`Initialising nrfutil module: ${module}`);
81
+ getNrfutilLogger()?.info(`Initialising the bundled nrfutil ${module}`);
82
82
  promiseModuleSandbox = sandbox(
83
83
  getUserDataDir(),
84
84
  module,
@@ -207,7 +207,7 @@ export class NrfutilSandbox {
207
207
  onProgress
208
208
  );
209
209
  getNrfutilLogger()?.info(
210
- `Successfully installed nrfutil-${this.module} version ${this.version}`
210
+ `Successfully installed nrfutil ${this.module} version: ${this.version}`
211
211
  );
212
212
  } catch (error) {
213
213
  if (this.env.NRFUTIL_HOME && fs.existsSync(this.env.NRFUTIL_HOME)) {
@@ -218,7 +218,7 @@ export class NrfutilSandbox {
218
218
  }
219
219
 
220
220
  getNrfutilLogger()?.error(
221
- `Error while installing nrfutil-${this.module} version: ${
221
+ `Error while installing nrfutil ${this.module} version: ${
222
222
  this.version
223
223
  }. describeError: ${describeError(error)}`
224
224
  );
@@ -233,7 +233,9 @@ export class NrfutilSandbox {
233
233
  await this.spawnNrfutil('self-upgrade', [], onProgress);
234
234
  } catch (error) {
235
235
  // User might not have internet hance fail silently
236
- getNrfutilLogger()?.error(`Error while updated nrfutil core`);
236
+ getNrfutilLogger()?.error(
237
+ `Error while updating the bundled core for nrfutil ${this.module}.`
238
+ );
237
239
  }
238
240
  };
239
241
 
@@ -574,7 +576,7 @@ export class NrfutilSandbox {
574
576
 
575
577
  const listener = () => {
576
578
  getNrfutilLogger()?.info(
577
- `Aborting ongoing nrfutil ${
579
+ `Aborting the ongoing command nrfutil ${
578
580
  this.module
579
581
  } ${command} ${JSON.stringify(args)}`
580
582
  );
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nordicsemiconductor/pc-nrfconnect-shared",
3
- "version": "187.0.0",
3
+ "version": "189.0.0",
4
4
  "description": "Shared commodities for developing pc-nrfconnect-* packages",
5
5
  "repository": {
6
6
  "type": "git",
@@ -33,7 +33,7 @@
33
33
  "@mdi/font": "7.2.96",
34
34
  "@mdi/js": "^7.2.96",
35
35
  "@mdi/react": "^1.6.1",
36
- "@microsoft/applicationinsights-web": "^3.0.4",
36
+ "@microsoft/applicationinsights-web": "^3.0.9",
37
37
  "@reduxjs/toolkit": "1.9.3",
38
38
  "@svgr/core": "^7.0.0",
39
39
  "@svgr/plugin-jsx": "7.0.0",
@@ -56,13 +56,14 @@
56
56
  "@types/uuid": "8.3.4",
57
57
  "@typescript-eslint/eslint-plugin": "5.57.1",
58
58
  "@typescript-eslint/parser": "5.57.1",
59
+ "@xterm/headless": "^5.5.0",
59
60
  "adm-zip": "^0.5.5",
60
- "applicationinsights": "^2.9.0",
61
+ "applicationinsights": "^2.9.6",
61
62
  "autoprefixer": "10.4.14",
62
63
  "bootstrap": "4.6.2",
63
64
  "commander": "10.0.0",
64
65
  "date-fns": "2.29.3",
65
- "electron": "^30.1.2",
66
+ "electron": "^32.1.2",
66
67
  "electron-store": "8.1.0",
67
68
  "esbuild": "0.19.2",
68
69
  "esbuild-sass-plugin": "2.13.0",
@@ -111,7 +112,7 @@
111
112
  "rimraf": "3.0.2",
112
113
  "roboto-fontface": "0.10.0",
113
114
  "semver": "7.3.8",
114
- "serialport": "^10.5.0",
115
+ "serialport": "^12.0.0",
115
116
  "shasum": "1.0.2",
116
117
  "systeminformation": "5.17.12",
117
118
  "tailwindcss": "3.3.2",
@@ -121,7 +122,6 @@
121
122
  "util": "0.12.5",
122
123
  "uuid": "8.3.2",
123
124
  "winston": "3.8.2",
124
- "xterm-headless": "^5.3.0",
125
125
  "zod": "^3.22.2",
126
126
  "zod-validation-error": "^1.5.0"
127
127
  },