@nordicsemiconductor/pc-nrfconnect-shared 136.0.0 → 138.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 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
+ ## 138.0.0 - 2023-12-04
11
+
12
+ ### Fixed
13
+
14
+ - `nrfutil sandbox` `execCommand` did not escape executable path leading to
15
+ failure when path has whitespace
16
+
17
+ ## 137.0.0 - 2023-12-04
18
+
19
+ ### Added
20
+
21
+ - `jprogDeviceSetup` take in aan optional boolean to skip the device setup if
22
+ device is protected. Default remain to show dialog. Apps will need to opt-in
23
+
10
24
  ## 136.0.0 - 2023-12-01
11
25
 
12
26
  ### Fixed
@@ -517,7 +517,7 @@ export class NrfutilSandbox {
517
517
  exec: command,
518
518
  });
519
519
 
520
- const nrfutil = exec(`${command} ${args.join(' ')}`, {
520
+ const nrfutil = exec(`"${command}" ${args.join(' ')}`, {
521
521
  env: editEnv(this.env),
522
522
  });
523
523
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nordicsemiconductor/pc-nrfconnect-shared",
3
- "version": "136.0.0",
3
+ "version": "138.0.0",
4
4
  "description": "Shared commodities for developing pc-nrfconnect-* packages",
5
5
  "repository": {
6
6
  "type": "git",
@@ -135,7 +135,8 @@ const firmwareOptions = (
135
135
 
136
136
  export const jprogDeviceSetup = (
137
137
  firmware: JprogEntry[],
138
- needSerialport = false
138
+ needSerialport = false,
139
+ hideDeviceSetupWhenProtected = false
139
140
  ): DeviceSetup => ({
140
141
  supportsProgrammingMode: device =>
141
142
  (needSerialport === !!device.traits.serialPorts || !needSerialport) &&
@@ -176,6 +177,16 @@ export const jprogDeviceSetup = (
176
177
  });
177
178
  }
178
179
 
180
+ if (
181
+ hideDeviceSetupWhenProtected &&
182
+ readbackProtection === 'protected'
183
+ ) {
184
+ return Promise.resolve({
185
+ device,
186
+ validFirmware: true,
187
+ });
188
+ }
189
+
179
190
  return Promise.resolve({
180
191
  device,
181
192
  validFirmware: false,
@@ -1,3 +1,3 @@
1
1
  import { DeviceSetup, JprogEntry } from './deviceSetup';
2
- export declare const jprogDeviceSetup: (firmware: JprogEntry[], needSerialport?: boolean) => DeviceSetup;
2
+ export declare const jprogDeviceSetup: (firmware: JprogEntry[], needSerialport?: boolean, hideDeviceSetupWhenProtected?: boolean) => DeviceSetup;
3
3
  //# sourceMappingURL=jprogOperations.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"jprogOperations.d.ts","sourceRoot":"","sources":["../../../../src/Device/jprogOperations.ts"],"names":[],"mappings":"AAWA,OAAO,EAAE,WAAW,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AA4HxD,eAAO,MAAM,gBAAgB,aACf,UAAU,EAAE,+BAEvB,WAgDD,CAAC"}
1
+ {"version":3,"file":"jprogOperations.d.ts","sourceRoot":"","sources":["../../../../src/Device/jprogOperations.ts"],"names":[],"mappings":"AAWA,OAAO,EAAE,WAAW,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AA4HxD,eAAO,MAAM,gBAAgB,aACf,UAAU,EAAE,uEAGvB,WA0DD,CAAC"}