Skip to content

Commit

Permalink
chore: upgrade TS-related dependencies (#6727)
Browse files Browse the repository at this point in the history
  • Loading branch information
AlCalzone authored Apr 5, 2024
1 parent 53cf383 commit 5473b6e
Show file tree
Hide file tree
Showing 30 changed files with 942 additions and 1,019 deletions.
32 changes: 16 additions & 16 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,21 +34,21 @@
"@alcalzone/jsonl-db": "^3.1.1",
"@alcalzone/monopack": "^1.2.2",
"@alcalzone/release-script": "~3.7.0",
"@commitlint/cli": "^17.7.1",
"@commitlint/config-conventional": "^17.7.0",
"@commitlint/cli": "^19.2.1",
"@commitlint/config-conventional": "^19.1.0",
"@dprint/formatter": "^0.2.1",
"@dprint/json": "^0.19.2",
"@dprint/markdown": "^0.16.4",
"@dprint/typescript": "^0.90.0",
"@microsoft/api-extractor": "^7.37.3",
"@microsoft/api-extractor": "^7.43.0",
"@monorepo-utils/workspaces-to-typescript-project-references": "^2.10.2",
"@tsconfig/node18": "^18.2.1",
"@tsconfig/node18": "^18.2.4",
"@types/fs-extra": "^11.0.1",
"@types/node": "^18.17.14",
"@types/node": "^18.19.29",
"@types/semver": "^7.5.1",
"@types/source-map-support": "^0.5.7",
"@typescript-eslint/eslint-plugin": "^6.6.0",
"@typescript-eslint/parser": "^6.6.0",
"@typescript-eslint/eslint-plugin": "^7.5.0",
"@typescript-eslint/parser": "^7.5.0",
"@zwave-js/cc": "workspace:*",
"@zwave-js/config": "workspace:*",
"@zwave-js/core": "workspace:*",
Expand All @@ -69,25 +69,25 @@
"cz-conventional-changelog": "^3.3.0",
"del-cli": "^5.1.0",
"dprint": "^0.45.0",
"esbuild": "0.19.2",
"esbuild-register": "^3.4.2",
"eslint": "^8.48.0",
"eslint-plugin-deprecation": "^1.5.0",
"eslint-plugin-unicorn": "^48.0.1",
"eslint-plugin-unused-imports": "^3.0.0",
"esbuild": "0.20.2",
"esbuild-register": "^3.5.0",
"eslint": "^8.57.0",
"eslint-plugin-deprecation": "^2.0.0",
"eslint-plugin-unicorn": "^52.0.0",
"eslint-plugin-unused-imports": "^3.1.0",
"execa": "^5.1.1",
"fs-extra": "^11.1.1",
"husky": "^8.0.3",
"husky": "^9.0.11",
"json5": "^2.2.3",
"jsonc-eslint-parser": "^2.3.0",
"jsonc-eslint-parser": "^2.4.0",
"lint-staged": "^14.0.1",
"p-queue": "^7.4.1",
"reflect-metadata": "^0.1.13",
"semver": "^7.5.4",
"source-map-support": "^0.5.21",
"ts-patch": "3.0.2",
"turbo": "1.7.4",
"typescript": "5.2.2",
"typescript": "5.4.4",
"zwave-js": "workspace:*"
},
"resolutions": {
Expand Down
6 changes: 3 additions & 3 deletions packages/cc/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -71,15 +71,15 @@
"reflect-metadata": "^0.1.13"
},
"devDependencies": {
"@microsoft/api-extractor": "^7.37.3",
"@microsoft/api-extractor": "^7.43.0",
"@types/fs-extra": "^11.0.1",
"@types/node": "^18.17.14",
"@types/node": "^18.19.29",
"@zwave-js/maintenance": "workspace:*",
"@zwave-js/testing": "workspace:*",
"@zwave-js/transformers": "workspace:*",
"ava": "^5.3.1",
"del-cli": "^5.1.0",
"fs-extra": "^11.1.1",
"typescript": "5.2.2"
"typescript": "5.4.4"
}
}
2 changes: 1 addition & 1 deletion packages/cc/src/cc/AssociationCC.ts
Original file line number Diff line number Diff line change
Expand Up @@ -309,7 +309,7 @@ export class AssociationCC extends CommandClass {
): ReadonlyMap<number, readonly AssociationAddress[]> {
const ret = new Map<number, AssociationAddress[]>();
const groupCount = this.getGroupCountCached(applHost, endpoint);
const valueDB = applHost.getValueDB(endpoint.nodeId)!;
const valueDB = applHost.getValueDB(endpoint.nodeId);
for (let i = 1; i <= groupCount; i++) {
// Add all root destinations
const nodes = valueDB.getValue<number[]>(
Expand Down
2 changes: 1 addition & 1 deletion packages/cc/src/cc/ManufacturerProprietaryCC.ts
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,7 @@ export class ManufacturerProprietaryCC extends CommandClass {
const manufacturerId = this.getManufacturerIdOrThrow();
// ManufacturerProprietaryCC has no CC command, so the first byte
// is stored in ccCommand
super.ccCommand = (manufacturerId >>> 8) & 0xff;
(this.ccCommand as unknown as number) = (manufacturerId >>> 8) & 0xff;
// The 2nd byte is in the payload
this.payload = Buffer.concat([
Buffer.from([
Expand Down
2 changes: 1 addition & 1 deletion packages/cc/src/cc/MultiChannelAssociationCC.ts
Original file line number Diff line number Diff line change
Expand Up @@ -373,7 +373,7 @@ export class MultiChannelAssociationCC extends CommandClass {
): ReadonlyMap<number, readonly AssociationAddress[]> {
const ret = new Map<number, AssociationAddress[]>();
const groupCount = this.getGroupCountCached(applHost, endpoint);
const valueDB = applHost.getValueDB(endpoint.nodeId)!;
const valueDB = applHost.getValueDB(endpoint.nodeId);
for (let i = 1; i <= groupCount; i++) {
const groupDestinations: AssociationAddress[] = [];
// Add all node destinations
Expand Down
2 changes: 1 addition & 1 deletion packages/cc/src/cc/Security2CC.ts
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ function getSecurityManager(
destination: MulticastDestination | number,
): SecurityManager2 | undefined {
const longRange = isLongRangeNodeId(
isArray(destination) ? destination[0]! : destination,
isArray(destination) ? destination[0] : destination,
);
return longRange
? host.securityManagerLR
Expand Down
10 changes: 5 additions & 5 deletions packages/config/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -66,11 +66,11 @@
"winston": "^3.10.0"
},
"devDependencies": {
"@microsoft/api-extractor": "^7.37.3",
"@microsoft/api-extractor": "^7.43.0",
"@types/fs-extra": "^11.0.1",
"@types/js-levenshtein": "^1.1.1",
"@types/json-logic-js": "^2.0.2",
"@types/node": "^18.17.14",
"@types/node": "^18.19.29",
"@types/pegjs": "^0.10.3",
"@types/semver": "^7.5.1",
"@types/sinon": "^10.0.16",
Expand All @@ -80,14 +80,14 @@
"ava": "^5.3.1",
"comment-json": "^4.2.3",
"del-cli": "^5.1.0",
"esbuild": "0.19.2",
"esbuild-register": "^3.4.2",
"esbuild": "0.20.2",
"esbuild-register": "^3.5.0",
"got": "^13.0.0",
"js-levenshtein": "^1.1.6",
"pegjs": "^0.10.0",
"sinon": "^15.2.0",
"ts-pegjs": "^0.3.1",
"typescript": "5.2.2",
"typescript": "5.4.4",
"xml2js": "^0.6.2",
"yargs": "^17.7.2"
}
Expand Down
10 changes: 5 additions & 5 deletions packages/core/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -69,15 +69,15 @@
"winston-transport": "^4.5.0"
},
"devDependencies": {
"@microsoft/api-extractor": "^7.37.3",
"@types/node": "^18.17.14",
"@microsoft/api-extractor": "^7.43.0",
"@types/node": "^18.19.29",
"@types/sinon": "^10.0.16",
"@types/triple-beam": "^1.3.2",
"ava": "^5.3.1",
"del-cli": "^5.1.0",
"esbuild": "0.19.2",
"esbuild-register": "^3.4.2",
"esbuild": "0.20.2",
"esbuild-register": "^3.5.0",
"sinon": "^15.2.0",
"typescript": "5.2.2"
"typescript": "5.4.4"
}
}
6 changes: 3 additions & 3 deletions packages/eslint-plugin/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,9 @@
"lint:ts:fix": "yarn run lint:ts --fix"
},
"devDependencies": {
"@types/eslint": "^8.44.3",
"@typescript-eslint/utils": "^6.7.0",
"@types/eslint": "^8.56.7",
"@typescript-eslint/utils": "^7.5.0",
"@zwave-js/core": "workspace:*",
"typescript": "5.2.2"
"typescript": "5.4.4"
}
}
8 changes: 4 additions & 4 deletions packages/eslint-plugin/src/rules/consistent-cc-classes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -60,14 +60,14 @@ export const consistentCCClasses = ESLintUtils.RuleCreator.withoutDocs({
// These must...

// ...be in a file that ends with "CC.ts"
if (!context.getFilename().endsWith("CC.ts")) {
if (!context.filename.endsWith("CC.ts")) {
context.report({
node,
loc: node.id.loc,
messageId: "wrong-filename",
});
} else if (
context.getFilename().split(path.sep).includes(
context.filename.split(path.sep).includes(
"manufacturerProprietary",
)
) {
Expand Down Expand Up @@ -216,14 +216,14 @@ export const consistentCCClasses = ESLintUtils.RuleCreator.withoutDocs({
// These must...

// ...be in a file that ends with "CC.ts"
if (!context.getFilename().endsWith("CC.ts")) {
if (!context.filename.endsWith("CC.ts")) {
context.report({
node,
loc: node.id.loc,
messageId: "api-wrong-filename",
});
} else if (
context.getFilename().split(path.sep).includes(
context.filename.split(path.sep).includes(
"manufacturerProprietary",
)
) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ export const consistentDeviceConfigPropertyOrder: JSONCRule.RuleModule = {
});

const indentation = context.sourceCode
.getLines()[withRanges[0].property.loc.start.line]!
.getLines()[withRanges[0].property.loc.start.line]
.slice(
0,
withRanges[0].property.loc.start.column,
Expand Down
2 changes: 1 addition & 1 deletion packages/eslint-plugin/src/rules/no-forbidden-imports.ts
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,7 @@ export const noForbiddenImports: Rule = ESLintUtils.RuleCreator.withoutDocs({
}

// Remember which source files we have already visited
const visitedSourceFiles = new Set<string>(context.getFilename());
const visitedSourceFiles = new Set<string>(context.filename);
let todo: { file: ts.SourceFile; importStack: string[] }[] = [];
const resolverContext: ResolverContext = {
program: services.program,
Expand Down
2 changes: 1 addition & 1 deletion packages/eslint-plugin/src/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -390,7 +390,7 @@ export function getJSONIndentationAtNode(
node: JSONC_AST.JSONNode,
): string {
return context.sourceCode
.getLines()[node.loc.start.line - 1]!
.getLines()[node.loc.start.line - 1]
.slice(
0,
node.loc.start.column,
Expand Down
4 changes: 2 additions & 2 deletions packages/flash/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,9 @@
},
"devDependencies": {
"@types/fs-extra": "^11.0.1",
"@types/node": "^18.17.14",
"@types/node": "^18.19.29",
"@types/yargs": "^17.0.24",
"del-cli": "^5.1.0",
"typescript": "5.2.2"
"typescript": "5.4.4"
}
}
6 changes: 3 additions & 3 deletions packages/host/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -55,9 +55,9 @@
"alcalzone-shared": "^4.0.8"
},
"devDependencies": {
"@microsoft/api-extractor": "^7.37.3",
"@types/node": "^18.17.14",
"@microsoft/api-extractor": "^7.43.0",
"@types/node": "^18.19.29",
"del-cli": "^5.1.0",
"typescript": "5.2.2"
"typescript": "5.4.4"
}
}
10 changes: 5 additions & 5 deletions packages/maintenance/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
"@dprint/typescript": "^0.90.0",
"@types/fs-extra": "^11.0.1",
"@types/globrex": "^0.1.2",
"@types/node": "^18.17.14",
"@types/node": "^18.19.29",
"@types/yargs": "^17.0.24",
"@zwave-js/core": "workspace:*",
"@zwave-js/fmt": "^1.0.0",
Expand All @@ -51,16 +51,16 @@
"cli-highlight": "^2.1.11",
"del-cli": "^5.1.0",
"dprint": "^0.45.0",
"esbuild": "0.19.2",
"esbuild-register": "^3.4.2",
"esbuild": "0.20.2",
"esbuild-register": "^3.5.0",
"execa": "^5.1.1",
"fs-extra": "^11.1.1",
"globrex": "^0.1.2",
"json5": "^2.2.3",
"piscina": "^4.1.0",
"reflect-metadata": "^0.1.13",
"ts-morph": "^20.0.0",
"typescript": "5.2.2",
"ts-morph": "^22.0.0",
"typescript": "5.4.4",
"yargs": "^17.7.2"
}
}
2 changes: 1 addition & 1 deletion packages/maintenance/src/codefind.ts
Original file line number Diff line number Diff line change
Expand Up @@ -327,7 +327,7 @@ export function codefind(query: CodeFindQuery): Result[] {
const matches = text.matchAll(query.search);
for (const match of matches) {
const matchPosition = node.getStart(sourceFile)
+ match.index!;
+ match.index;
const location = ts.getLineAndCharacterOfPosition(
sourceFile,
matchPosition,
Expand Down
4 changes: 2 additions & 2 deletions packages/maintenance/src/generateTypedDocs.ts
Original file line number Diff line number Diff line change
Expand Up @@ -216,8 +216,8 @@ const importRegex =
export function findImportRanges(docFile: string): ImportRange[] {
const matches = [...docFile.matchAll(importRegex)];
return matches.map((match) => ({
index: match.index!,
end: match.index! + match[0].length,
index: match.index,
end: match.index + match[0].length,
module: match.groups!.module,
symbol: match.groups!.symbol,
import: match.groups!.import,
Expand Down
10 changes: 5 additions & 5 deletions packages/nvmedit/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -62,15 +62,15 @@
"test:dirty": "node -r ../../maintenance/esbuild-register.js ../maintenance/src/resolveDirtyTests.ts --run"
},
"devDependencies": {
"@microsoft/api-extractor": "^7.37.3",
"@microsoft/api-extractor": "^7.43.0",
"@types/fs-extra": "^11.0.1",
"@types/node": "^18.17.14",
"@types/node": "^18.19.29",
"@types/semver": "^7.5.1",
"@types/yargs": "^17.0.24",
"ava": "^5.3.1",
"del-cli": "^5.1.0",
"esbuild": "0.19.2",
"esbuild-register": "^3.4.2",
"typescript": "5.2.2"
"esbuild": "0.20.2",
"esbuild-register": "^3.5.0",
"typescript": "5.4.4"
}
}
10 changes: 5 additions & 5 deletions packages/serial/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -64,17 +64,17 @@
"winston": "^3.10.0"
},
"devDependencies": {
"@microsoft/api-extractor": "^7.37.3",
"@microsoft/api-extractor": "^7.43.0",
"@serialport/binding-mock": "^10.2.2",
"@serialport/bindings-interface": "*",
"@types/node": "^18.17.14",
"@types/node": "^18.19.29",
"@types/sinon": "^10.0.16",
"ansi-colors": "^4.1.3",
"ava": "^5.3.1",
"del-cli": "^5.1.0",
"esbuild": "0.19.2",
"esbuild-register": "^3.4.2",
"esbuild": "0.20.2",
"esbuild-register": "^3.5.0",
"sinon": "^15.2.0",
"typescript": "5.2.2"
"typescript": "5.4.4"
}
}
10 changes: 5 additions & 5 deletions packages/shared/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -55,15 +55,15 @@
"test:dirty": "node -r ../../maintenance/esbuild-register.js ../maintenance/src/resolveDirtyTests.ts --run"
},
"devDependencies": {
"@microsoft/api-extractor": "^7.37.3",
"@microsoft/api-extractor": "^7.43.0",
"@types/fs-extra": "^11.0.1",
"@types/node": "^18.17.14",
"@types/node": "^18.19.29",
"@types/sinon": "^10.0.16",
"ava": "^5.3.1",
"del-cli": "^5.1.0",
"esbuild": "0.19.2",
"esbuild-register": "^3.4.2",
"esbuild": "0.20.2",
"esbuild-register": "^3.5.0",
"sinon": "^15.2.0",
"typescript": "5.2.2"
"typescript": "5.4.4"
}
}
Loading

0 comments on commit 5473b6e

Please sign in to comment.