@nordicsemiconductor/pc-nrfconnect-shared 194.0.0 → 196.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 +15 -0
- package/ipc/MetaFiles.ts +8 -6
- package/ipc/schema/packageJson.ts +3 -4
- package/ipc/schema/parseJson.ts +2 -2
- package/main/index.ts +2 -0
- package/package.json +1 -1
- package/scripts/nordic-publish.js +10 -10
- package/src/Device/DeviceSelector/DeviceList/DeviceList.tsx +66 -41
- package/src/Device/DeviceSelector/DeviceList/VirtualDevices.tsx +93 -0
- package/src/Device/DeviceSelector/DeviceList/device-list.scss +29 -24
- package/src/Device/DeviceSelector/DeviceSelector.tsx +54 -4
- package/src/Device/DeviceSelector/DisconnectDevice.tsx +20 -0
- package/src/Device/DeviceSelector/SelectedDevice.tsx +1 -13
- package/src/Device/DeviceSelector/SelectedVirtualDevice.tsx +40 -0
- package/src/Device/deviceSlice.ts +14 -0
- package/src/Link/ExternalLink.tsx +1 -1
- package/typings/generated/ipc/MetaFiles.d.ts +12 -4
- package/typings/generated/ipc/MetaFiles.d.ts.map +1 -1
- package/typings/generated/ipc/schema/packageJson.d.ts.map +1 -1
- package/typings/generated/ipc/schema/parseJson.d.ts +1 -1
- package/typings/generated/ipc/schema/parseJson.d.ts.map +1 -1
- package/typings/generated/main/index.d.ts +1 -1
- package/typings/generated/main/index.d.ts.map +1 -1
- package/typings/generated/src/Device/DeviceSelector/DeviceList/DeviceList.d.ts +2 -0
- package/typings/generated/src/Device/DeviceSelector/DeviceList/DeviceList.d.ts.map +1 -1
- package/typings/generated/src/Device/DeviceSelector/DeviceList/VirtualDevices.d.ts +14 -0
- package/typings/generated/src/Device/DeviceSelector/DeviceList/VirtualDevices.d.ts.map +1 -0
- package/typings/generated/src/Device/DeviceSelector/DeviceSelector.d.ts +4 -1
- package/typings/generated/src/Device/DeviceSelector/DeviceSelector.d.ts.map +1 -1
- package/typings/generated/src/Device/DeviceSelector/DisconnectDevice.d.ts +7 -0
- package/typings/generated/src/Device/DeviceSelector/DisconnectDevice.d.ts.map +1 -0
- package/typings/generated/src/Device/DeviceSelector/SelectedDevice.d.ts.map +1 -1
- package/typings/generated/src/Device/DeviceSelector/SelectedVirtualDevice.d.ts +9 -0
- package/typings/generated/src/Device/DeviceSelector/SelectedVirtualDevice.d.ts.map +1 -0
- package/typings/generated/src/Device/deviceSlice.d.ts +3 -1
- package/typings/generated/src/Device/deviceSlice.d.ts.map +1 -1
- package/typings/generated/src/Group/Group.d.ts +1 -1
- package/typings/generated/src/Link/ExternalLink.d.ts +2 -2
- package/typings/generated/src/Link/ExternalLink.d.ts.map +1 -1
package/Changelog.md
CHANGED
|
@@ -7,6 +7,21 @@ 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
|
+
## 196.0.0 - 2025-01-13
|
|
11
|
+
|
|
12
|
+
### Changed
|
|
13
|
+
|
|
14
|
+
- `ExternalLink`: The `label` prop now defaults to the value of `href`.
|
|
15
|
+
|
|
16
|
+
## 195.0.0 - 2025-01-09
|
|
17
|
+
|
|
18
|
+
### Added
|
|
19
|
+
|
|
20
|
+
- `virtualDevices` parameter to `DeviceSelector`.
|
|
21
|
+
- `onVirtualDeviceSelected` and `onVirtualDeviceDeselected` parameters to
|
|
22
|
+
`DeviceSelector`.
|
|
23
|
+
- Exported zod schemas for `source.json` and `withdrawn.json` files.
|
|
24
|
+
|
|
10
25
|
## 194.0.0 - 2024-12-17
|
|
11
26
|
|
|
12
27
|
### Fixed
|
package/ipc/MetaFiles.ts
CHANGED
|
@@ -8,12 +8,14 @@ import { z } from 'zod';
|
|
|
8
8
|
|
|
9
9
|
export type UrlString = string;
|
|
10
10
|
|
|
11
|
-
export
|
|
12
|
-
name: string
|
|
13
|
-
apps:
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
|
|
11
|
+
export const sourceJsonSchema = z.object({
|
|
12
|
+
name: z.string(),
|
|
13
|
+
apps: z.array(z.string().url()),
|
|
14
|
+
});
|
|
15
|
+
export type SourceJson = z.infer<typeof sourceJsonSchema>;
|
|
16
|
+
|
|
17
|
+
export const withdrawnJsonSchema = z.array(z.string().url());
|
|
18
|
+
export type WithdrawnJson = z.infer<typeof withdrawnJsonSchema>;
|
|
17
19
|
|
|
18
20
|
export type AppVersions = {
|
|
19
21
|
[version: string]: AppVersion;
|
|
@@ -19,8 +19,7 @@ const packageJson = z.object({
|
|
|
19
19
|
|
|
20
20
|
export type PackageJson = z.infer<typeof packageJson>;
|
|
21
21
|
|
|
22
|
-
export const parsePackageJson =
|
|
23
|
-
parseWithPrettifiedErrorMessage<PackageJson>(packageJson);
|
|
22
|
+
export const parsePackageJson = parseWithPrettifiedErrorMessage(packageJson);
|
|
24
23
|
|
|
25
24
|
// Apps have more required fields in their package.json
|
|
26
25
|
|
|
@@ -57,7 +56,7 @@ const packageJsonApp = packageJson.extend({
|
|
|
57
56
|
export type PackageJsonApp = z.infer<typeof packageJsonApp>;
|
|
58
57
|
|
|
59
58
|
export const parsePackageJsonApp =
|
|
60
|
-
parseWithPrettifiedErrorMessage
|
|
59
|
+
parseWithPrettifiedErrorMessage(packageJsonApp);
|
|
61
60
|
|
|
62
61
|
// In the launcher we want to handle that the whole nrfConnectForDesktop may be missing
|
|
63
62
|
// and the html in it can also be undefined, so there we need to use this legacy variant
|
|
@@ -71,4 +70,4 @@ const packageJsonLegacyApp = packageJsonApp.extend({
|
|
|
71
70
|
export type PackageJsonLegacyApp = z.infer<typeof packageJsonLegacyApp>;
|
|
72
71
|
|
|
73
72
|
export const parsePackageJsonLegacyApp =
|
|
74
|
-
parseWithPrettifiedErrorMessage
|
|
73
|
+
parseWithPrettifiedErrorMessage(packageJsonLegacyApp);
|
package/ipc/schema/parseJson.ts
CHANGED
|
@@ -8,12 +8,12 @@ import { z } from 'zod';
|
|
|
8
8
|
import { fromZodError } from 'zod-validation-error';
|
|
9
9
|
|
|
10
10
|
export const parseWithPrettifiedErrorMessage =
|
|
11
|
-
<
|
|
11
|
+
<T extends z.ZodTypeAny>(schema: T) =>
|
|
12
12
|
(content: string) => {
|
|
13
13
|
const result = schema.safeParse(JSON.parse(content));
|
|
14
14
|
|
|
15
15
|
if (result.success) {
|
|
16
|
-
return result
|
|
16
|
+
return result as z.SafeParseSuccess<z.infer<T>>;
|
|
17
17
|
}
|
|
18
18
|
|
|
19
19
|
return {
|
package/main/index.ts
CHANGED