From 07e444addfe6fc9d31ecff2b5d8905f31aafad10 Mon Sep 17 00:00:00 2001 From: luzpaz Date: Tue, 26 Jul 2022 05:16:09 -0400 Subject: [PATCH] fix: more typo fixes (#4842) Co-authored-by: luz paz --- docs/config-files/file-format.md | 2 +- docs/getting-started/migrating-to-v10.md | 2 +- packages/config/config/indicators.json | 2 +- packages/config/maintenance/importConfig.ts | 8 ++++---- packages/config/maintenance/lintConfigFiles.ts | 2 +- packages/core/src/error/ZWaveError.ts | 2 +- packages/core/src/values/Metadata.ts | 2 +- packages/host/src/ZWaveHost.ts | 2 +- packages/maintenance/src/codefind.ts | 4 ++-- packages/maintenance/src/lintForbiddenImports.ts | 2 +- packages/maintenance/src/lintNoExternalImports.ts | 2 +- .../transformers/src/validateArgs/visitor-is-string.ts | 2 +- packages/zwave-js/src/lib/controller/Inclusion.ts | 2 +- .../zwave-js/src/lib/controller/ZWaveSDKVersions.test.ts | 2 +- packages/zwave-js/src/lib/driver/CommandQueueMachine.ts | 2 +- packages/zwave-js/src/lib/driver/Driver.ts | 4 ++-- packages/zwave-js/src/lib/driver/MessageGenerators.ts | 4 ++-- packages/zwave-js/src/lib/driver/Transaction.ts | 2 +- packages/zwave-js/src/lib/log/Driver.ts | 2 +- packages/zwave-js/src/lib/node/Endpoint.ts | 2 +- packages/zwave-js/src/lib/node/Node.test.ts | 2 +- packages/zwave-js/src/lib/node/Node.ts | 2 +- packages/zwave-js/src/lib/node/VirtualEndpoint.ts | 2 +- .../serialapi/application/ApplicationCommandRequest.ts | 2 +- packages/zwave-js/src/lib/test/mocks.ts | 2 +- 25 files changed, 31 insertions(+), 31 deletions(-) diff --git a/docs/config-files/file-format.md b/docs/config-files/file-format.md index fde167d8644..668a0376dcd 100644 --- a/docs/config-files/file-format.md +++ b/docs/config-files/file-format.md @@ -14,7 +14,7 @@ The following properties are defined and should always be present in the same or | `associations` | The association groups the device supports, [see below](#associations) for details. Only needs to be present if the device does not support Z-Wave+ or requires changes to the default association config. | | `paramInformation` | An array of the configuration parameters the device supports. [See below](#paramInformation) for details. | | `proprietary` | A dictionary of settings for the proprietary CC. The settings depend on each proprietary CC implementation. | -| `compat` | Compatibility flags used to influence the communication with non-complient devices. [See below](#compat) for details. | +| `compat` | Compatibility flags used to influence the communication with non-compliant devices. [See below](#compat) for details. | | `metadata` | Metadata that is intended to help the user, like inclusion instructions etc. [See below](#metadata) for details. | ## `devices` diff --git a/docs/getting-started/migrating-to-v10.md b/docs/getting-started/migrating-to-v10.md index f06d95e7f65..e7bd378a6f3 100644 --- a/docs/getting-started/migrating-to-v10.md +++ b/docs/getting-started/migrating-to-v10.md @@ -11,7 +11,7 @@ The implementations of serial messages and Command Classes have been decoupled f - `IVirtualEndpoint` - A barebones abstraction of an endpoint on a virtual (multicast, broadcast) node - `IVirtualNode` - A barebones abstraction of a virtual (multicast, broadcast) node. Similar to how `VirtualNode` is a `VirtualEndpoint`, an `IVirtualNode` is an `IVirtualEndpoint` -These abstractions are mainly used internally. Object instances exposed to applications throught the `Driver` will still be `ZWaveNode`s and `Endpoint`s. +These abstractions are mainly used internally. Object instances exposed to applications through the `Driver` will still be `ZWaveNode`s and `Endpoint`s. For many use cases, these changes should not affect applications, unless they are using some CC methods directly. The `commandClasses` APIs are unchanged. diff --git a/packages/config/config/indicators.json b/packages/config/config/indicators.json index eeba07f6707..85c3877326d 100644 --- a/packages/config/config/indicators.json +++ b/packages/config/config/indicators.json @@ -133,7 +133,7 @@ }, "0x05": { "label": "On/Off Period: On time", - "description": "This property is used to set the length of the On time during an On/Off period. It allows asymetic On/Off periods. The value 0x00 MUST represent symmetric On/Off period (On time equal to Off time)" + "description": "This property is used to set the length of the On time during an On/Off period. It allows asymmetric On/Off periods. The value 0x00 MUST represent symmetric On/Off period (On time equal to Off time)" }, "0x0a": { "label": "Timeout: Hours", diff --git a/packages/config/maintenance/importConfig.ts b/packages/config/maintenance/importConfig.ts index 75dbe68dff3..49645d6905d 100644 --- a/packages/config/maintenance/importConfig.ts +++ b/packages/config/maintenance/importConfig.ts @@ -590,7 +590,7 @@ async function parseOZWProduct( manufacturer, manufacturerId: manufacturerIdHex, label: productLabel, - description: existingDevice?.description ?? productName, // don't override the descrition + description: existingDevice?.description ?? productName, // don't override the description devices: devices, firmwareVersion: { min: existingDevice?.firmwareVersion.min ?? "0.0", @@ -1049,7 +1049,7 @@ function combineDeviceFiles(json: Record[]) { ); } // Show an error if the device parameters should match, but they don't - // TODO add erorr handling if a FW changes parameters + // TODO add error handling if a FW changes parameters else if ( test_file.ProductId === file.ProductId && test_file.ProductTypeId === file.ProductTypeId && @@ -1060,7 +1060,7 @@ function combineDeviceFiles(json: Record[]) { ) == false ) { console.log( - `WARNING - Detected possible firmware parameter change ${file.Identifer} -- ${file.Id} and ${test_file.Id}`, + `WARNING - Detected possible firmware parameter change ${file.Identifier} -- ${file.Id} and ${test_file.Id}`, ); } // We were wrong to change the identifier because the params don't match, restore the tested file as it is different @@ -1289,7 +1289,7 @@ async function parseZWAProduct( manufacturer, manufacturerId: manufacturerIdHex, label: productLabel, - description: existingDevice?.description ?? productName, // don't override the descrition + description: existingDevice?.description ?? productName, // don't override the description devices: devices, firmwareVersion: { min: existingDevice?.firmwareVersion.min ?? "0.0", diff --git a/packages/config/maintenance/lintConfigFiles.ts b/packages/config/maintenance/lintConfigFiles.ts index 000ecf35ed1..67e19b7532a 100644 --- a/packages/config/maintenance/lintConfigFiles.ts +++ b/packages/config/maintenance/lintConfigFiles.ts @@ -1085,7 +1085,7 @@ Consider converting this parameter to unsigned using ${white( addError( entry.filename, `Duplicate config file detected for device (manufacturer id = ${entry.manufacturerId}, product type = ${entry.productType}, product id = ${entry.productId}) -The first occurence of this device is in file config/devices/${index[firstIndex].filename}`, +The first occurrence of this device is in file config/devices/${index[firstIndex].filename}`, ); } diff --git a/packages/core/src/error/ZWaveError.ts b/packages/core/src/error/ZWaveError.ts index c280d58fd19..6a07cec349b 100644 --- a/packages/core/src/error/ZWaveError.ts +++ b/packages/core/src/error/ZWaveError.ts @@ -131,7 +131,7 @@ export enum ZWaveErrorCodes { SupervisionCC_CommandFailed = 1100, /** - * Used to report that a ManufacturerProprietaryCC could not be instanciated + * Used to report that a ManufacturerProprietaryCC could not be instantiated * because of a missing manufacturer ID. */ ManufacturerProprietaryCC_NoManufacturerId = 1200, diff --git a/packages/core/src/values/Metadata.ts b/packages/core/src/values/Metadata.ts index dab950108a6..34ec76cc018 100644 --- a/packages/core/src/values/Metadata.ts +++ b/packages/core/src/values/Metadata.ts @@ -69,7 +69,7 @@ export interface ValueMetadataAny { } /** - * Helper function to define metadata templates while checking that they satify a constraint. + * Helper function to define metadata templates while checking that they satisfy a constraint. */ // TODO: Revisit this when https://github.com/microsoft/TypeScript/issues/47920 is solved const define = diff --git a/packages/host/src/ZWaveHost.ts b/packages/host/src/ZWaveHost.ts index 936735c6c59..7ee2295aa56 100644 --- a/packages/host/src/ZWaveHost.ts +++ b/packages/host/src/ZWaveHost.ts @@ -62,7 +62,7 @@ export interface ZWaveHost { ): void; /** - * Returns the next callback ID. Callback IDs are used to correllate requests + * Returns the next callback ID. Callback IDs are used to correlate requests * to the controller/nodes with its response */ getNextCallbackId(): number; diff --git a/packages/maintenance/src/codefind.ts b/packages/maintenance/src/codefind.ts index 4c136926f48..022fa81a371 100644 --- a/packages/maintenance/src/codefind.ts +++ b/packages/maintenance/src/codefind.ts @@ -290,7 +290,7 @@ export function codefind(query: CodeFindQuery): Result[] { for (const [, node] of searchNodes) { const text = node.getText(sourceFile); if (typeof query.search === "string") { - // Find all occurences of simple strings in the node + // Find all occurrences of simple strings in the node let startIndex = 0; let foundIndex = -1; while ( @@ -324,7 +324,7 @@ export function codefind(query: CodeFindQuery): Result[] { startIndex = foundIndex + query.search.length; } } else { - // Find all occurences of regex in the node + // Find all occurrences of regex in the node const matches = text.matchAll(query.search); for (const match of matches) { const matchPosition = diff --git a/packages/maintenance/src/lintForbiddenImports.ts b/packages/maintenance/src/lintForbiddenImports.ts index b84a25da16e..4f53aabb7d9 100644 --- a/packages/maintenance/src/lintForbiddenImports.ts +++ b/packages/maintenance/src/lintForbiddenImports.ts @@ -83,7 +83,7 @@ function getImports( ts.forEachChild(sourceFile, (node) => { // Vist top-level import nodes const moduleNameExpr = getExternalModuleName(node); - // if they have a name, that is a string, i.e. not alias defition `import x = y` + // if they have a name, that is a string, i.e. not alias definition `import x = y` if ( moduleNameExpr && moduleNameExpr.kind === ts.SyntaxKind.StringLiteral diff --git a/packages/maintenance/src/lintNoExternalImports.ts b/packages/maintenance/src/lintNoExternalImports.ts index e94e2d6ec67..14cc669626d 100644 --- a/packages/maintenance/src/lintNoExternalImports.ts +++ b/packages/maintenance/src/lintNoExternalImports.ts @@ -83,7 +83,7 @@ function getImports( ts.forEachChild(sourceFile, (node) => { // Vist top-level import nodes const moduleNameExpr = getExternalModuleName(node); - // if they have a name, that is a string, i.e. not alias defition `import x = y` + // if they have a name, that is a string, i.e. not alias definition `import x = y` if ( moduleNameExpr && moduleNameExpr.kind === ts.SyntaxKind.StringLiteral diff --git a/packages/transformers/src/validateArgs/visitor-is-string.ts b/packages/transformers/src/validateArgs/visitor-is-string.ts index 8c4c619b90a..a35b11222a8 100644 --- a/packages/transformers/src/validateArgs/visitor-is-string.ts +++ b/packages/transformers/src/validateArgs/visitor-is-string.ts @@ -61,7 +61,7 @@ function visitUnionOrIntersectionType( } } else { if (stringTypes.some((stringType) => stringType === false)) { - // If T or U is not assignable to stirng, then T & U is not assignable to string. + // If T or U is not assignable to string, then T & U is not assignable to string. return false; } if (stringTypes.some((stringType) => stringType !== true)) { diff --git a/packages/zwave-js/src/lib/controller/Inclusion.ts b/packages/zwave-js/src/lib/controller/Inclusion.ts index dda1b510a61..09466af408a 100644 --- a/packages/zwave-js/src/lib/controller/Inclusion.ts +++ b/packages/zwave-js/src/lib/controller/Inclusion.ts @@ -35,7 +35,7 @@ export enum InclusionStrategy { * * Issues a warning if Security S0 is not supported or the secure bootstrapping fails. * - * **Not recommended** because S0 should be used sparingly and S2 preferred whereever possible. + * **Not recommended** because S0 should be used sparingly and S2 preferred wherever possible. */ Security_S0, /** diff --git a/packages/zwave-js/src/lib/controller/ZWaveSDKVersions.test.ts b/packages/zwave-js/src/lib/controller/ZWaveSDKVersions.test.ts index 56def9bd864..c994513b299 100644 --- a/packages/zwave-js/src/lib/controller/ZWaveSDKVersions.test.ts +++ b/packages/zwave-js/src/lib/controller/ZWaveSDKVersions.test.ts @@ -10,7 +10,7 @@ describe("protocolVersionToSDKVersion", () => { expect(protocolVersionToSDKVersion("8.99")).toBe("8.99"); }); - it("ensures a non-existant version is at least parsable with semver", () => { + it("ensures a non-existent version is at least parsable with semver", () => { expect(protocolVersionToSDKVersion("99.01")).toBe("99.1"); }); diff --git a/packages/zwave-js/src/lib/driver/CommandQueueMachine.ts b/packages/zwave-js/src/lib/driver/CommandQueueMachine.ts index ad664d86741..ef048e1883c 100644 --- a/packages/zwave-js/src/lib/driver/CommandQueueMachine.ts +++ b/packages/zwave-js/src/lib/driver/CommandQueueMachine.ts @@ -60,7 +60,7 @@ export type CommandQueueEvent = | { type: "message"; message: Message } | { type: "unsolicited"; message: Message } | { type: "remove"; transaction: Transaction } // Used to abort the given transaction and remove it from the command queue - | { type: "command_error"; error: Error } // An unexpected error occured during command execution + | { type: "command_error"; error: Error } // An unexpected error occurred during command execution | ({ type: "command_success" } & Omit< CommandQueueDoneData & { type: "success" }, "type" diff --git a/packages/zwave-js/src/lib/driver/Driver.ts b/packages/zwave-js/src/lib/driver/Driver.ts index e10bd1e3d06..00b91b442f7 100644 --- a/packages/zwave-js/src/lib/driver/Driver.ts +++ b/packages/zwave-js/src/lib/driver/Driver.ts @@ -832,7 +832,7 @@ export class Driver if (this.serial.isOpen) await this.serial.close(); // IMPORTANT: Test code expects the open promise to be created and returned synchronously - // Everything async (inluding opening the serial port) must happen in the setImmediate callback + // Everything async (including opening the serial port) must happen in the setImmediate callback // asynchronously open the serial port setImmediate(async () => { @@ -3356,7 +3356,7 @@ ${handlers.length} left`, private lastCallbackId = 0xff; /** - * Returns the next callback ID. Callback IDs are used to correllate requests + * Returns the next callback ID. Callback IDs are used to correlate requests * to the controller/nodes with its response */ public getNextCallbackId(): number { diff --git a/packages/zwave-js/src/lib/driver/MessageGenerators.ts b/packages/zwave-js/src/lib/driver/MessageGenerators.ts index da1cd493f38..d7dbd94d973 100644 --- a/packages/zwave-js/src/lib/driver/MessageGenerators.ts +++ b/packages/zwave-js/src/lib/driver/MessageGenerators.ts @@ -273,7 +273,7 @@ export const secureMessageGeneratorS2: MessageGeneratorImplementation = message: `failed to decode the message, retrying with SPAN extension...`, direction: "none", }); - // Prepare the messsage for re-transmission + // Prepare the message for re-transmission msg.callbackId = undefined; msg.command.unsetSequenceNumber(); @@ -325,7 +325,7 @@ export function createMessageGenerator( }; async function* gen() { - // Determine which message generator implemenation should be used + // Determine which message generator implementation should be used let implementation: MessageGeneratorImplementation = simpleMessageGenerator; if (isSendData(msg)) { diff --git a/packages/zwave-js/src/lib/driver/Transaction.ts b/packages/zwave-js/src/lib/driver/Transaction.ts index eaffafa43b8..791e9986147 100644 --- a/packages/zwave-js/src/lib/driver/Transaction.ts +++ b/packages/zwave-js/src/lib/driver/Transaction.ts @@ -34,7 +34,7 @@ export interface TransactionOptions { } /** - * Transactions are used to track and correllate messages with their responses. + * Transactions are used to track and correlate messages with their responses. */ export class Transaction implements Comparable { public constructor( diff --git a/packages/zwave-js/src/lib/log/Driver.ts b/packages/zwave-js/src/lib/log/Driver.ts index 88e587c00ec..10fdf94518d 100644 --- a/packages/zwave-js/src/lib/log/Driver.ts +++ b/packages/zwave-js/src/lib/log/Driver.ts @@ -189,7 +189,7 @@ export class DriverLogger extends ZWaveLoggerBase { } } - /** Logs whats currently in the driver's send queue */ + /** Logs what's currently in the driver's send queue */ public sendQueue(queue: SortedList): void { if (!this.isSendQueueLogVisible()) return; diff --git a/packages/zwave-js/src/lib/node/Endpoint.ts b/packages/zwave-js/src/lib/node/Endpoint.ts index 827ce372deb..fa8461c9140 100644 --- a/packages/zwave-js/src/lib/node/Endpoint.ts +++ b/packages/zwave-js/src/lib/node/Endpoint.ts @@ -411,7 +411,7 @@ export class Endpoint implements IZWaveEndpoint { }.bind(this); /** - * Provides access to simplified APIs that are taylored to specific CCs. + * Provides access to simplified APIs that are tailored to specific CCs. * Make sure to check support of each API using `API.isSupported()` since * all other API calls will throw if the API is not supported */ diff --git a/packages/zwave-js/src/lib/node/Node.test.ts b/packages/zwave-js/src/lib/node/Node.test.ts index 9a449519a71..d7f5f13d5c7 100644 --- a/packages/zwave-js/src/lib/node/Node.test.ts +++ b/packages/zwave-js/src/lib/node/Node.test.ts @@ -1856,7 +1856,7 @@ describe("lib/node/Node", () => { }, true, ); - // The endpoint suppports Binary Switch + // The endpoint supports Binary Switch node.getEndpoint(1)?.addCC(CommandClasses["Binary Switch"], { isSupported: true, }); diff --git a/packages/zwave-js/src/lib/node/Node.ts b/packages/zwave-js/src/lib/node/Node.ts index 2abe430ece1..83f08746538 100644 --- a/packages/zwave-js/src/lib/node/Node.ts +++ b/packages/zwave-js/src/lib/node/Node.ts @@ -1426,7 +1426,7 @@ protocol version: ${this.protocolVersion}`; // Assume that sleeping nodes start asleep if (this.canSleep) { if (this.status === NodeStatus.Alive) { - // unless it was just inluded and is currently communicating with us + // unless it was just included and is currently communicating with us // In that case we need to switch from alive/dead to awake/asleep this.markAsAwake(); } else { diff --git a/packages/zwave-js/src/lib/node/VirtualEndpoint.ts b/packages/zwave-js/src/lib/node/VirtualEndpoint.ts index c282afa70f2..77eba9e02df 100644 --- a/packages/zwave-js/src/lib/node/VirtualEndpoint.ts +++ b/packages/zwave-js/src/lib/node/VirtualEndpoint.ts @@ -169,7 +169,7 @@ export class VirtualEndpoint implements IVirtualEndpoint { }.bind(this); /** - * Provides access to simplified APIs that are taylored to specific CCs. + * Provides access to simplified APIs that are tailored to specific CCs. * Make sure to check support of each API using `API.isSupported()` since * all other API calls will throw if the API is not supported */ diff --git a/packages/zwave-js/src/lib/serialapi/application/ApplicationCommandRequest.ts b/packages/zwave-js/src/lib/serialapi/application/ApplicationCommandRequest.ts index d750153b5b9..e66ab61a027 100644 --- a/packages/zwave-js/src/lib/serialapi/application/ApplicationCommandRequest.ts +++ b/packages/zwave-js/src/lib/serialapi/application/ApplicationCommandRequest.ts @@ -30,7 +30,7 @@ export enum ApplicationCommandStatusFlags { Explore = 0b10000, // Received an explore frame - ForeignFrame = 0b0100_0000, // Received a foreign frame (only promiscous mode) + ForeignFrame = 0b0100_0000, // Received a foreign frame (only promiscuous mode) ForeignHomeId = 0b1000_0000, // The received frame is received from a foreign HomeID. Only Controllers in Smart Start AddNode mode can receive this status. } diff --git a/packages/zwave-js/src/lib/test/mocks.ts b/packages/zwave-js/src/lib/test/mocks.ts index b9454f76feb..b1718e01b6f 100644 --- a/packages/zwave-js/src/lib/test/mocks.ts +++ b/packages/zwave-js/src/lib/test/mocks.ts @@ -256,7 +256,7 @@ export function createTestNode( }, getEndpoint: ((index: number) => { - // When the endpoint count is known, return undefined for non-existant endpoints + // When the endpoint count is known, return undefined for non-existent endpoints if ( options.numEndpoints != undefined && index > options.numEndpoints