Skip to content

Commit 7d8bef7

Browse files
Merge pull request #548 from NordicSemiconductor/update_shared
Update shared to 231
2 parents 344929f + cb5ad75 commit 7d8bef7

31 files changed

+1514
-642
lines changed

Changelog.md

Lines changed: 169 additions & 169 deletions
Large diffs are not rendered by default.

LICENSE

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,10 @@
1+
LicenseID: LicenseRef-Nordic-4-Clause
2+
3+
ExtractedText: <text>
4+
15
Copyright (c) 2015 Nordic Semiconductor ASA
26
All rights reserved.
37

4-
SPDX-License-Identifier: Nordic-4-Clause
58

69
Use in source and binary forms, redistribution in binary form only, with
710
or without modification, are permitted provided that the following conditions
@@ -33,3 +36,4 @@ SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
3336
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
3437
TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
3538
THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
39+
</text>

package-lock.json

Lines changed: 1079 additions & 215 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@
4747
"prepare": "husky install"
4848
},
4949
"devDependencies": {
50-
"@nordicsemiconductor/pc-nrfconnect-shared": "^219.0.0"
50+
"@nordicsemiconductor/pc-nrfconnect-shared": "^231.0.0"
5151
},
5252
"eslintConfig": {
5353
"extends": "./node_modules/@nordicsemiconductor/pc-nrfconnect-shared/config/eslintrc"

src/actions/fileActions.ts

Lines changed: 22 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ const updateCoreInfo = (): AppThunk<RootState> => (dispatch, getState) => {
5858
startAddresses.find(
5959
s =>
6060
s >= networkCore.romBaseAddr &&
61-
s <= networkCore.romBaseAddr + networkCore.romSize
61+
s <= networkCore.romBaseAddr + networkCore.romSize,
6262
)
6363
) {
6464
dispatch(setDeviceDefinition(nRF5340DefaultDevice));
@@ -81,7 +81,7 @@ const updateCoreInfo = (): AppThunk<RootState> => (dispatch, getState) => {
8181
romSize: Math.max(lastEndAddress, 0x100000), // 1 MB
8282
},
8383
},
84-
})
84+
}),
8585
);
8686
}
8787
};
@@ -90,9 +90,12 @@ export const removeFile =
9090
(filePath: string): AppThunk<RootState> =>
9191
(dispatch, getState) => {
9292
const { loaded, memMaps } = getState().app.file;
93-
const newLoaded = { ...loaded };
93+
94+
const newLoaded = Object.fromEntries(
95+
Object.entries(loaded).filter(([key]) => key !== filePath),
96+
);
97+
9498
const newMemMaps = memMaps.filter(element => element[0] !== filePath);
95-
delete newLoaded[filePath];
9699

97100
dispatch(fileParse({ loaded: newLoaded, memMaps: newMemMaps }));
98101
dispatch(updateCoreInfo());
@@ -135,10 +138,12 @@ const parseZipFile =
135138
stat(filePath, (statsError, result) => {
136139
if (statsError) {
137140
logger.error(
138-
`Could not open ZIP file: ${describeError(statsError)}`
141+
`Could not open ZIP file: ${describeError(statsError)}`,
139142
);
140143
dispatch(
141-
ErrorDialogActions.showDialog(describeError(statsError))
144+
ErrorDialogActions.showDialog(
145+
describeError(statsError),
146+
),
142147
);
143148
removeMruFile(filePath);
144149
return reject();
@@ -163,10 +168,12 @@ const parseHexFile =
163168
stat(filePath, (statsError, result) => {
164169
if (statsError) {
165170
logger.error(
166-
`Could not open HEX file: ${describeError(statsError)}`
171+
`Could not open HEX file: ${describeError(statsError)}`,
167172
);
168173
dispatch(
169-
ErrorDialogActions.showDialog(describeError(statsError))
174+
ErrorDialogActions.showDialog(
175+
describeError(statsError),
176+
),
170177
);
171178
removeMruFile(filePath);
172179
return reject();
@@ -180,14 +187,14 @@ const parseHexFile =
180187
logger.info('Parsing HEX file: ', filePath);
181188
logger.info(
182189
'File was last modified at ',
183-
stats.mtime.toLocaleString()
190+
stats.mtime.toLocaleString(),
184191
);
185192
if (readError) {
186193
logger.error(
187-
`Could not open HEX file: ${describeError(readError)}`
194+
`Could not open HEX file: ${describeError(readError)}`,
188195
);
189196
dispatch(
190-
ErrorDialogActions.showDialog(describeError(readError))
197+
ErrorDialogActions.showDialog(describeError(readError)),
191198
);
192199
removeMruFile(filePath);
193200
return reject();
@@ -268,7 +275,7 @@ export const openFileDialog = (): AppThunk => dispatch => {
268275
.showOpenDialog(getCurrentWindow(), dialogOptions)
269276
.then(
270277
({ filePaths }: { filePaths: string[] }) =>
271-
filePaths && dispatch(openFile(...filePaths))
278+
filePaths && dispatch(openFile(...filePaths)),
272279
);
273280
};
274281

@@ -288,11 +295,11 @@ export const refreshAllFiles =
288295
logger.info('Does not need to be reloaded: ', filePath);
289296
} catch (error) {
290297
logger.error(
291-
`Could not open HEX file: ${describeError(error)}`
298+
`Could not open HEX file: ${describeError(error)}`,
292299
);
293300
dispatch(
294-
ErrorDialogActions.showDialog(describeError(error))
301+
ErrorDialogActions.showDialog(describeError(error)),
295302
);
296303
}
297-
})
304+
}),
298305
).then(() => Promise.resolve());

0 commit comments

Comments
 (0)