Skip to content

Commit

Permalink
Update deps (#576)
Browse files Browse the repository at this point in the history
* Update deps

* fix duplicate dep

* prettier run

* fixup package-lock
  • Loading branch information
Apollon77 authored Dec 12, 2023
1 parent 8bf60da commit e297f4a
Show file tree
Hide file tree
Showing 16 changed files with 1,863 additions and 1,907 deletions.
7 changes: 5 additions & 2 deletions codegen/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,14 @@
"@project-chip/matter.js": "0.7.3-alpha.0-20231205-f58a8489",
"@project-chip/matter.js-intermediate-models": "0.7.3-alpha.0-20231205-f58a8489"
},
"engines": {
"node": ">=18.0.0"
},
"devDependencies": {
"@project-chip/matter.js-tools": "0.7.3-alpha.0-20231205-f58a8489",
"@types/jsdom": "^21.1.6",
"jsdom": "^22.1.0",
"typescript": "^5.2.2",
"jsdom": "^23.0.1",
"typescript": "^5.3.3",
"word-list": "^3.1.0"
}
}
8 changes: 4 additions & 4 deletions codegen/src/mom/spec/translate-table.ts
Original file line number Diff line number Diff line change
Expand Up @@ -47,10 +47,10 @@ type TableSchema = {
type FieldType<F> = F extends Optional<infer W>
? W | undefined
: F extends Alias<infer W> | Translator<infer W> | Constant<infer W>
? W
: F extends Children
? DatatypeElement[]
: never;
? W
: F extends Children
? DatatypeElement[]
: never;

// Create TS object type from schema definition
type TableRecord<T extends TableSchema> = {
Expand Down
3,642 changes: 1,798 additions & 1,844 deletions package-lock.json

Large diffs are not rendered by default.

10 changes: 5 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,16 +33,16 @@
"devDependencies": {
"@typescript-eslint/eslint-plugin": "^6.14.0",
"@typescript-eslint/parser": "^6.14.0",
"eslint": "^8.53.0",
"eslint": "^8.55.0",
"eslint-import-resolver-typescript": "^3.6.1",
"eslint-plugin-import": "^2.29.0",
"lerna": "^8.0.0",
"prettier": "^3.0.3",
"prettier-plugin-organize-imports": "^3.2.3",
"prettier": "^3.1.1",
"prettier-plugin-organize-imports": "^3.2.4",
"semver": "^7.5.4",
"typedoc": "^0.25.4",
"typedoc-plugin-markdown": "^3.16.0",
"typedoc-plugin-markdown": "^3.17.1",
"typedoc-plugin-missing-exports": "^2.1.0",
"typescript": "^5.2.2"
"typescript": "^5.3.3"
}
}
4 changes: 2 additions & 2 deletions packages/matter-node-ble.js/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@
},
"devDependencies": {
"@project-chip/matter.js-tools": "0.7.3-alpha.0-20231205-f58a8489",
"ts-node": "^10.9.1",
"typescript": "^5.2.2"
"ts-node": "^10.9.2",
"typescript": "^5.3.3"
},
"dependencies": {
"@project-chip/matter.js": "0.7.3-alpha.0-20231205-f58a8489"
Expand Down
2 changes: 1 addition & 1 deletion packages/matter-node-shell.js/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
},
"devDependencies": {
"@project-chip/matter.js-tools": "0.7.3-alpha.0-20231205-f58a8489",
"typescript": "^5.2.2"
"typescript": "^5.3.3"
},
"dependencies": {
"@project-chip/matter-node-ble.js": "0.7.3-alpha.0-20231205-f58a8489",
Expand Down
8 changes: 4 additions & 4 deletions packages/matter-node-shell.js/src/shell/cmd_commission.ts
Original file line number Diff line number Diff line change
Expand Up @@ -82,10 +82,10 @@ export default function commands(theNode: MatterNode) {
instanceId !== undefined
? { instanceId }
: discriminator !== undefined
? { longDiscriminator: discriminator }
: shortDiscriminator !== undefined
? { shortDiscriminator }
: {},
? { longDiscriminator: discriminator }
: shortDiscriminator !== undefined
? { shortDiscriminator }
: {},
discoveryCapabilities: {
ble,
onIpNetwork: true,
Expand Down
16 changes: 8 additions & 8 deletions packages/matter-node-shell.js/src/shell/cmd_discover.ts
Original file line number Diff line number Diff line change
Expand Up @@ -92,14 +92,14 @@ export default function commands(theNode: MatterNode) {
discriminator !== undefined
? { longDiscriminator: discriminator }
: shortDiscriminator !== undefined
? { shortDiscriminator }
: vendorId !== undefined
? { vendorId: VendorId(vendorId) }
: productId !== undefined
? { productId }
: deviceType !== undefined
? { deviceType }
: {};
? { shortDiscriminator }
: vendorId !== undefined
? { vendorId: VendorId(vendorId) }
: productId !== undefined
? { productId }
: deviceType !== undefined
? { deviceType }
: {};

console.log(
`Discover devices with identifier ${Logger.toJSON(
Expand Down
3 changes: 1 addition & 2 deletions packages/matter-node.js-examples/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,7 @@
"matter-controller": "./dist/esm/examples/ControllerNode.js"
},
"devDependencies": {
"@project-chip/matter.js-tools": "0.6.1-alpha.0-20231108-f1d82f9",
"typescript": "^5.2.2"
"typescript": "^5.3.3"
},
"dependencies": {
"@project-chip/matter-node-ble.js": "0.7.3-alpha.0-20231205-f58a8489",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -200,8 +200,8 @@ class ControllerNode {
longDiscriminator !== undefined
? { longDiscriminator }
: shortDiscriminator !== undefined
? { shortDiscriminator }
: {},
? { shortDiscriminator }
: {},
},
passcode: setupPin,
} as NodeCommissioningOptions;
Expand Down
4 changes: 2 additions & 2 deletions packages/matter-node.js/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,8 @@
"@types/bytebuffer": "^5.0.48",
"@types/node-localstorage": "^1.3.3",
"bn.js": "^5.2.1",
"ts-node": "^10.9.1",
"typescript": "^5.2.2"
"ts-node": "^10.9.2",
"typescript": "^5.3.3"
},
"dependencies": {
"@project-chip/matter.js": "0.7.3-alpha.0-20231205-f58a8489",
Expand Down
8 changes: 4 additions & 4 deletions packages/matter.js-tools/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -41,17 +41,17 @@
"homepage": "https://github.com/project-chip/matter.js#readme",
"dependencies": {
"@npmcli/map-workspaces": "^3.0.4",
"@types/express": "^4.17.20",
"@types/express": "^4.17.21",
"ansi-colors": "^4.1.3",
"c8": "^8.0.1",
"chai": "^4.3.10",
"chai-as-promised": "^7.1.1",
"esbuild": "^0.19.8",
"esbuild": "^0.19.9",
"express": "^4.18.2",
"glob": "^10.3.10",
"mocha": "^10.2.0",
"playwright": "^1.40.0",
"typescript": "^5.2.2",
"playwright": "^1.40.1",
"typescript": "^5.3.3",
"yargs": "^17.7.2"
},
"optionalDependencies": {
Expand Down
2 changes: 1 addition & 1 deletion packages/matter.js/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
"@types/mocha": "^10.0.6",
"chai": "^4.3.10",
"mocha": "^10.2.0",
"typescript": "^5.2.2"
"typescript": "^5.3.3"
},
"files": [
"dist/**/*",
Expand Down
12 changes: 6 additions & 6 deletions packages/matter.js/src/cluster/Cluster.ts
Original file line number Diff line number Diff line change
Expand Up @@ -620,13 +620,13 @@ export interface ConditionalCommand<RequestT, ResponseT, F extends BitSchema>
export type ResponseType<T extends Command<any, any, any>> = T extends OptionalCommand<any, infer ResponseT, any>
? ResponseT
: T extends Command<any, infer ResponseT, any>
? ResponseT
: never;
? ResponseT
: never;
export type RequestType<T extends Command<any, any, any>> = T extends OptionalCommand<infer RequestT, any, any>
? RequestT
: T extends Command<infer RequestT, any, any>
? RequestT
: never;
? RequestT
: never;

interface CommandOptions {
invokeAcl?: AccessLevel;
Expand Down Expand Up @@ -809,8 +809,8 @@ export const UnknownEvent = <F extends BitSchema>(id: number): Event<unknown, F>
export type EventType<T extends Event<any, any>> = T extends OptionalEvent<infer EventT, any>
? EventT
: T extends Event<infer EventT, any>
? EventT
: never;
? EventT
: never;
export type MandatoryEventNames<E extends Events> = {
[K in keyof E]: E[K] extends OptionalEvent<any, any> ? never : K;
}[keyof E];
Expand Down
32 changes: 16 additions & 16 deletions packages/matter.js/src/cluster/server/ClusterServerTypes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -56,19 +56,19 @@ type MandatoryAttributeServers<A extends Attributes> = Omit<
[P in MandatoryAttributeNames<A>]: A[P] extends FabricScopedAttribute<any, any>
? FabricScopedAttributeServer<AttributeJsType<A[P]>>
: A[P] extends WritableFabricScopedAttribute<any, any>
? FabricScopedAttributeServer<AttributeJsType<A[P]>>
: A[P] extends FixedAttribute<any, any>
? FixedAttributeServer<AttributeJsType<A[P]>>
: AttributeServer<AttributeJsType<A[P]>>;
? FabricScopedAttributeServer<AttributeJsType<A[P]>>
: A[P] extends FixedAttribute<any, any>
? FixedAttributeServer<AttributeJsType<A[P]>>
: AttributeServer<AttributeJsType<A[P]>>;
},
keyof GlobalAttributes<any>
>;
type OptionalAttributeServers<A extends Attributes> = {
[P in OptionalAttributeNames<A>]?: A[P] extends OptionalWritableFabricScopedAttribute<any, any>
? FabricScopedAttributeServer<AttributeJsType<A[P]>>
: A[P] extends OptionalFixedAttribute<any, any>
? FixedAttributeServer<AttributeJsType<A[P]>>
: AttributeServer<AttributeJsType<A[P]>>;
? FixedAttributeServer<AttributeJsType<A[P]>>
: AttributeServer<AttributeJsType<A[P]>>;
};
export type AttributeServers<A extends Attributes> = Merge<MandatoryAttributeServers<A>, OptionalAttributeServers<A>>;

Expand Down Expand Up @@ -159,10 +159,10 @@ type MakeAttributeMandatory<A extends Attribute<any, any>> = A extends OptionalW
>
? WritableFabricScopedAttribute<T, any>
: A extends OptionalWritableAttribute<infer T, any>
? WritableAttribute<T, any>
: A extends OptionalAttribute<infer T, any>
? Attribute<T, any>
: A;
? WritableAttribute<T, any>
: A extends OptionalAttribute<infer T, any>
? Attribute<T, any>
: A;
type MakeAttributesMandatory<T extends Attributes, C extends OptionalAttributeConf<T>> = {
[K in keyof T]: K extends keyof C ? MakeAttributeMandatory<T[K]> : T[K];
};
Expand Down Expand Up @@ -201,17 +201,17 @@ export type FabricScopedAttributeNames<A extends Attributes> = {
[K in keyof A]: A[K] extends FabricScopedAttribute<any, any>
? K
: A[K] extends WritableFabricScopedAttribute<any, any>
? K
: A[K] extends OptionalWritableFabricScopedAttribute<any, any>
? K
: never;
? K
: A[K] extends OptionalWritableFabricScopedAttribute<any, any>
? K
: never;
}[keyof A];
export type NonFixedAttributeNames<A extends Attributes> = {
[K in keyof A]: A[K] extends FixedAttribute<any, any>
? never
: A[K] extends OptionalFixedAttribute<any, any>
? never
: K;
? never
: K;
}[keyof A];

type GetterTypeFromSpec<A extends Attribute<any, any>> = A extends OptionalAttribute<infer T, any>
Expand Down
8 changes: 4 additions & 4 deletions packages/matter.js/src/util/Type.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@ export type MergeAll<T> = T extends [infer O extends Properties | undefined, ...
? MergeAll<R>
: O & MergeAll<R>
: T extends []
? {}
: never;
? {}
: never;

export function MergeAll<T extends (Properties | undefined)[]>(...objects: readonly [...T]): MergeAll<T> {
return Object.assign({}, ...objects);
Expand All @@ -37,8 +37,8 @@ export type Pluck<K, T extends readonly [...any]> = T extends [infer O, ...infer
? [O[K], ...Pluck<K, R>]
: Pluck<K, R>
: T extends []
? T
: never;
? T
: never;

export function Pluck<T extends Properties[], K extends keyof T[number]>(
key: K,
Expand Down

0 comments on commit e297f4a

Please sign in to comment.