[matter] Dependency Cleanups (#21001)

This removes unused dependencies and reruns our code-gen logic, there
are no functional changes to the binding code in this PR, just
general housekeeping.

Signed-off-by: Dan Cunningham <dan@digitaldan.com>
This commit is contained in:
Dan Cunningham
2026-06-18 18:46:41 +02:00
committed by GitHub
parent fb88301d32
commit bbb099a362
9 changed files with 14 additions and 1232 deletions
File diff suppressed because it is too large Load Diff
@@ -7,15 +7,13 @@
"build": "tsc --build", "build": "tsc --build",
"build-clean": "tsc --build --clean", "build-clean": "tsc --build --clean",
"start": "ts-node src/app.ts", "start": "ts-node src/app.ts",
"test": "ts-node src/test.ts",
"format": "prettier --write \"src/**/*.ts\"" "format": "prettier --write \"src/**/*.ts\""
}, },
"devDependencies": { "devDependencies": {
"ts-loader": "^9.4.4",
"ts-node": "^10.9.2",
"typescript": "^5.2.2",
"prettier": "^3.5.3", "prettier": "^3.5.3",
"prettier-plugin-organize-imports": "^4.1.0" "prettier-plugin-organize-imports": "^4.1.0",
"ts-node": "^10.9.2",
"typescript": "^5.2.2"
}, },
"dependencies": { "dependencies": {
"@matter/main": "0.17.3", "@matter/main": "0.17.3",
@@ -93,7 +93,7 @@ handlebars.registerHelper("asTitleCase", function (str) {
.replace(/[_\s]+/g, " ") // Replace underscores or multiple spaces with a single space .replace(/[_\s]+/g, " ") // Replace underscores or multiple spaces with a single space
.trim() .trim()
.split(" ") .split(" ")
.map(word => word.charAt(0).toUpperCase() + word.slice(1).toLowerCase()) .map((word: string) => word.charAt(0).toUpperCase() + word.slice(1).toLowerCase())
.join(" "); .join(" ");
}); });
@@ -79,4 +79,4 @@ public class SemanticTags {
} }
} }
{{/each}} {{/each}}
} }
@@ -11,7 +11,6 @@
"@matter/main": "0.17.3", "@matter/main": "0.17.3",
"@matter/node": "0.17.3", "@matter/node": "0.17.3",
"@project-chip/matter.js": "0.17.3", "@project-chip/matter.js": "0.17.3",
"uuid": "^9.0.1",
"ws": "^8.18.0", "ws": "^8.18.0",
"yargs": "^17.7.2" "yargs": "^17.7.2"
}, },
@@ -19,17 +18,12 @@
"matter-server": "dist/src/app.js" "matter-server": "dist/src/app.js"
}, },
"devDependencies": { "devDependencies": {
"@eslint/compat": "^1.2.8",
"@eslint/eslintrc": "^3.3.1", "@eslint/eslintrc": "^3.3.1",
"@eslint/js": "^9.24.0", "@eslint/js": "^9.24.0",
"@types/bn.js": "^5.1.5",
"@types/node": "^20.9.0", "@types/node": "^20.9.0",
"@types/uuid": "^9.0.7",
"@types/ws": "^8.5.10", "@types/ws": "^8.5.10",
"@types/yargs": "^17.0.32", "@types/yargs": "^17.0.32",
"@typescript-eslint/eslint-plugin": "^8.30.1",
"@typescript-eslint/parser": "^8.30.1", "@typescript-eslint/parser": "^8.30.1",
"eslint-plugin-node-import": "^1.0.5",
"eslint-plugin-regexp": "^2.7.0", "eslint-plugin-regexp": "^2.7.0",
"globals": "^16.0.0", "globals": "^16.0.0",
"prettier": "^3.5.3", "prettier": "^3.5.3",
@@ -107,24 +101,6 @@
"node": "^12.0.0 || ^14.0.0 || >=16.0.0" "node": "^12.0.0 || ^14.0.0 || >=16.0.0"
} }
}, },
"node_modules/@eslint/compat": {
"version": "1.2.9",
"resolved": "https://registry.npmjs.org/@eslint/compat/-/compat-1.2.9.tgz",
"integrity": "sha512-gCdSY54n7k+driCadyMNv8JSPzYLeDVM/ikZRtvtROBpRdFSkS8W9A82MqsaY7lZuwL0wiapgD0NT1xT0hyJsA==",
"dev": true,
"license": "Apache-2.0",
"engines": {
"node": "^18.18.0 || ^20.9.0 || >=21.1.0"
},
"peerDependencies": {
"eslint": "^9.10.0"
},
"peerDependenciesMeta": {
"eslint": {
"optional": true
}
}
},
"node_modules/@eslint/config-array": { "node_modules/@eslint/config-array": {
"version": "0.20.0", "version": "0.20.0",
"resolved": "https://registry.npmjs.org/@eslint/config-array/-/config-array-0.20.0.tgz", "resolved": "https://registry.npmjs.org/@eslint/config-array/-/config-array-0.20.0.tgz",
@@ -601,16 +577,6 @@
"dev": true, "dev": true,
"license": "MIT" "license": "MIT"
}, },
"node_modules/@types/bn.js": {
"version": "5.1.6",
"resolved": "https://registry.npmjs.org/@types/bn.js/-/bn.js-5.1.6.tgz",
"integrity": "sha512-Xh8vSwUeMKeYYrj3cX4lGQgFSF/N03r+tv4AiLl1SucqV+uTQpxRcnM8AkXKHwYP9ZPXOYXRr2KPXpVlIvqh9w==",
"dev": true,
"license": "MIT",
"dependencies": {
"@types/node": "*"
}
},
"node_modules/@types/eslint": { "node_modules/@types/eslint": {
"version": "9.6.1", "version": "9.6.1",
"resolved": "https://registry.npmjs.org/@types/eslint/-/eslint-9.6.1.tgz", "resolved": "https://registry.npmjs.org/@types/eslint/-/eslint-9.6.1.tgz",
@@ -658,13 +624,6 @@
"undici-types": "~6.19.2" "undici-types": "~6.19.2"
} }
}, },
"node_modules/@types/uuid": {
"version": "9.0.8",
"resolved": "https://registry.npmjs.org/@types/uuid/-/uuid-9.0.8.tgz",
"integrity": "sha512-jg+97EGIcY9AGHJJRaaPVgetKDsrTgbRjQ5Msgjh/DQKEFl0DtyRr/VCOyD1T2R1MNeWPK/u7JoGhlDZnKBAfA==",
"dev": true,
"license": "MIT"
},
"node_modules/@types/ws": { "node_modules/@types/ws": {
"version": "8.18.1", "version": "8.18.1",
"resolved": "https://registry.npmjs.org/@types/ws/-/ws-8.18.1.tgz", "resolved": "https://registry.npmjs.org/@types/ws/-/ws-8.18.1.tgz",
@@ -1713,19 +1672,6 @@
} }
} }
}, },
"node_modules/eslint-plugin-node-import": {
"version": "1.0.5",
"resolved": "https://registry.npmjs.org/eslint-plugin-node-import/-/eslint-plugin-node-import-1.0.5.tgz",
"integrity": "sha512-razzgbr3EcB5+bm8/gqTqzTJ7Bpiu8PIChiAMRfZCNigr9GZBtnVSI+wPw+RGbWYCCIzWAsK/A7ihoAeSz5j7A==",
"dev": true,
"license": "ISC",
"engines": {
"node": "^14.18.0 || ^16.0.0 || >= 18.0.0"
},
"peerDependencies": {
"eslint": ">=7"
}
},
"node_modules/eslint-plugin-regexp": { "node_modules/eslint-plugin-regexp": {
"version": "2.7.0", "version": "2.7.0",
"resolved": "https://registry.npmjs.org/eslint-plugin-regexp/-/eslint-plugin-regexp-2.7.0.tgz", "resolved": "https://registry.npmjs.org/eslint-plugin-regexp/-/eslint-plugin-regexp-2.7.0.tgz",
@@ -3451,19 +3397,6 @@
"punycode": "^2.1.0" "punycode": "^2.1.0"
} }
}, },
"node_modules/uuid": {
"version": "9.0.1",
"resolved": "https://registry.npmjs.org/uuid/-/uuid-9.0.1.tgz",
"integrity": "sha512-b+1eJOlsR9K8HJpow9Ok3fiWOWSIcIzXodvv0rQjVoOVNpWMpxf1wZNpt4y9h10odCNrqnYp1OBzRktckBe3sA==",
"funding": [
"https://github.com/sponsors/broofa",
"https://github.com/sponsors/ctavan"
],
"license": "MIT",
"bin": {
"uuid": "dist/bin/uuid"
}
},
"node_modules/v8-compile-cache-lib": { "node_modules/v8-compile-cache-lib": {
"version": "3.0.1", "version": "3.0.1",
"resolved": "https://registry.npmjs.org/v8-compile-cache-lib/-/v8-compile-cache-lib-3.0.1.tgz", "resolved": "https://registry.npmjs.org/v8-compile-cache-lib/-/v8-compile-cache-lib-3.0.1.tgz",
@@ -15,17 +15,12 @@
"lint-fix": "eslint --fix" "lint-fix": "eslint --fix"
}, },
"devDependencies": { "devDependencies": {
"@eslint/compat": "^1.2.8",
"@eslint/eslintrc": "^3.3.1", "@eslint/eslintrc": "^3.3.1",
"@eslint/js": "^9.24.0", "@eslint/js": "^9.24.0",
"@typescript-eslint/eslint-plugin": "^8.30.1",
"@typescript-eslint/parser": "^8.30.1",
"@types/bn.js": "^5.1.5",
"@types/node": "^20.9.0", "@types/node": "^20.9.0",
"@types/uuid": "^9.0.7",
"@types/ws": "^8.5.10", "@types/ws": "^8.5.10",
"@types/yargs": "^17.0.32", "@types/yargs": "^17.0.32",
"eslint-plugin-node-import": "^1.0.5", "@typescript-eslint/parser": "^8.30.1",
"eslint-plugin-regexp": "^2.7.0", "eslint-plugin-regexp": "^2.7.0",
"globals": "^16.0.0", "globals": "^16.0.0",
"prettier": "^3.5.3", "prettier": "^3.5.3",
@@ -41,7 +36,6 @@
"@matter/main": "0.17.3", "@matter/main": "0.17.3",
"@matter/node": "0.17.3", "@matter/node": "0.17.3",
"@project-chip/matter.js": "0.17.3", "@project-chip/matter.js": "0.17.3",
"uuid": "^9.0.1",
"ws": "^8.18.0", "ws": "^8.18.0",
"yargs": "^17.7.2" "yargs": "^17.7.2"
}, },
@@ -54,4 +48,4 @@
"publishConfig": { "publishConfig": {
"access": "public" "access": "public"
} }
} }
@@ -355,7 +355,7 @@ public class OperationalCredentialsCluster extends BaseCluster {
* response. * response.
* A Commissioner or Administrator SHOULD issue this command after performing the Attestation Procedure. * A Commissioner or Administrator SHOULD issue this command after performing the Attestation Procedure.
*/ */
public static ClusterCommand updateNoc(OctetString nocValue, OctetString icacValue, Integer fabricIndex) { public static ClusterCommand updateNoc(OctetString nocValue, OctetString icacValue) {
Map<String, Object> map = new LinkedHashMap<>(); Map<String, Object> map = new LinkedHashMap<>();
if (nocValue != null) { if (nocValue != null) {
map.put("nocValue", nocValue); map.put("nocValue", nocValue);
@@ -363,9 +363,6 @@ public class OperationalCredentialsCluster extends BaseCluster {
if (icacValue != null) { if (icacValue != null) {
map.put("icacValue", icacValue); map.put("icacValue", icacValue);
} }
if (fabricIndex != null) {
map.put("fabricIndex", fabricIndex);
}
return new ClusterCommand("updateNoc", map); return new ClusterCommand("updateNoc", map);
} }
@@ -380,14 +377,11 @@ public class OperationalCredentialsCluster extends BaseCluster {
* Administrators to provide additional per-fabric context when operations such as RemoveFabric are considered or * Administrators to provide additional per-fabric context when operations such as RemoveFabric are considered or
* used. * used.
*/ */
public static ClusterCommand updateFabricLabel(String label, Integer fabricIndex) { public static ClusterCommand updateFabricLabel(String label) {
Map<String, Object> map = new LinkedHashMap<>(); Map<String, Object> map = new LinkedHashMap<>();
if (label != null) { if (label != null) {
map.put("label", label); map.put("label", label);
} }
if (fabricIndex != null) {
map.put("fabricIndex", fabricIndex);
}
return new ClusterCommand("updateFabricLabel", map); return new ClusterCommand("updateFabricLabel", map);
} }
@@ -284,8 +284,7 @@ public class OtaSoftwareUpdateRequestorCluster extends BaseCluster {
* If the accessing fabric index is 0, this command shall fail with an UNSUPPORTED_ACCESS status code. * If the accessing fabric index is 0, this command shall fail with an UNSUPPORTED_ACCESS status code.
*/ */
public static ClusterCommand announceOtaProvider(BigInteger providerNodeId, Integer vendorId, public static ClusterCommand announceOtaProvider(BigInteger providerNodeId, Integer vendorId,
AnnouncementReasonEnum announcementReason, OctetString metadataForNode, Integer endpoint, AnnouncementReasonEnum announcementReason, OctetString metadataForNode, Integer endpoint) {
Integer fabricIndex) {
Map<String, Object> map = new LinkedHashMap<>(); Map<String, Object> map = new LinkedHashMap<>();
if (providerNodeId != null) { if (providerNodeId != null) {
map.put("providerNodeId", providerNodeId); map.put("providerNodeId", providerNodeId);
@@ -302,9 +301,6 @@ public class OtaSoftwareUpdateRequestorCluster extends BaseCluster {
if (endpoint != null) { if (endpoint != null) {
map.put("endpoint", endpoint); map.put("endpoint", endpoint);
} }
if (fabricIndex != null) {
map.put("fabricIndex", fabricIndex);
}
return new ClusterCommand("announceOtaProvider", map); return new ClusterCommand("announceOtaProvider", map);
} }
@@ -519,15 +519,11 @@ public class TimeSynchronizationCluster extends BaseCluster {
* matching those in the TrustedTimeSource field and has its FabricIndex field set to the command's accessing fabric * matching those in the TrustedTimeSource field and has its FabricIndex field set to the command's accessing fabric
* index. * index.
*/ */
public static ClusterCommand setTrustedTimeSource(FabricScopedTrustedTimeSourceStruct trustedTimeSource, public static ClusterCommand setTrustedTimeSource(FabricScopedTrustedTimeSourceStruct trustedTimeSource) {
Integer fabricIndex) {
Map<String, Object> map = new LinkedHashMap<>(); Map<String, Object> map = new LinkedHashMap<>();
if (trustedTimeSource != null) { if (trustedTimeSource != null) {
map.put("trustedTimeSource", trustedTimeSource); map.put("trustedTimeSource", trustedTimeSource);
} }
if (fabricIndex != null) {
map.put("fabricIndex", fabricIndex);
}
return new ClusterCommand("setTrustedTimeSource", map); return new ClusterCommand("setTrustedTimeSource", map);
} }