From d792151a6899d7ea20736edaa539b3b9007c16a4 Mon Sep 17 00:00:00 2001 From: gammazero <11790789+gammazero@users.noreply.github.com> Date: Fri, 3 Jul 2026 17:03:25 -1000 Subject: [PATCH] fix spelling errors --- src/bundles/analytics.js | 2 +- src/bundles/files/actions.js | 8 ++++---- src/bundles/files/utils.js | 8 ++++---- src/bundles/peer-bandwidth.js | 2 +- src/bundles/peer-locations.js | 2 +- src/bundles/task.js | 34 +++++++++++++++++----------------- 6 files changed, 28 insertions(+), 28 deletions(-) diff --git a/src/bundles/analytics.js b/src/bundles/analytics.js index d0c61f6f4..8d99a698e 100644 --- a/src/bundles/analytics.js +++ b/src/bundles/analytics.js @@ -224,7 +224,7 @@ const selectors = { */ selectAnalyticsOptedOut: (state) => state.analytics.optedOut, /** - * Show or hide all UI compontent related to analytics. + * Show or hide all UI component related to analytics. * @param {State} state */ selectShowAnalyticsComponents: (state) => state.analytics.showAnalyticsComponents, diff --git a/src/bundles/files/actions.js b/src/bundles/files/actions.js index 44bca1289..7acc25c61 100644 --- a/src/bundles/files/actions.js +++ b/src/bundles/files/actions.js @@ -207,8 +207,8 @@ const actions = () => ({ }), /** - * Fetches conten for the currently selected path. And updates - * `state.pageContent` on succesful completion. + * Fetches content for the currently selected path. And updates + * `state.pageContent` on successful completion. * @param {Info} info * @returns {function(Context): *} */ @@ -314,7 +314,7 @@ const actions = () => ({ // Skip ignored files .filter($ => !IGNORED_FILES.includes(basename($.path))) // Dropped files come as absolute, those added by the file input come - // as relative paths, so normalise all to be relative. + // as relative paths, so normalize all to be relative. .map($ => $.path[0] === '/' ? { ...$, path: $.path.slice(1) } : $) const totalSize = files.reduce((prev, { size }) => prev + size, 0) @@ -379,7 +379,7 @@ const actions = () => ({ }), /** - * Deletes `files` with provided paths. On completion (success sor fail) will + * Deletes `files` with provided paths. On completion (success or fail) will * trigger `doFilesFetch` to update the state. * @param {Object} args * @param {FileStat[]} args.files diff --git a/src/bundles/files/utils.js b/src/bundles/files/utils.js index 62580f211..bb53a5294 100644 --- a/src/bundles/files/utils.js +++ b/src/bundles/files/utils.js @@ -33,7 +33,7 @@ import { debouncedProvide } from '../../lib/files.js' * 4. `{ status: 'Failed', id: Symbol, error: Error }` - State when task is * failed do to error. * - * template {string} Name - Name of the task which, correponds to `.type` of + * template {string} Name - Name of the task which, corresponds to `.type` of * dispatched actions. * template State - Type of yielded value by a the generator, which will * correspond to `.job.state` of dispatched actions while task is pending. @@ -64,7 +64,7 @@ import { debouncedProvide } from '../../lib/files.js' * @template Success - Type of the `action.task.result.vaule` when task is * complete successfully. It is also a value of the promise returned by * running `store.doX` created by this decorator. - * @template Init - Type of the initialization paramater. + * @template Init - Type of the initialization parameter. * @template State - Type of the `context.getState()` for this task. * @template {BundlerContext, Ext, Extra>} Context * @@ -112,10 +112,10 @@ export const spawn = (type, task, ...[init]) => async (context) => { * `context.getIpfs()` returns an `IPFSService` passing it into the task as a * first argument. Otherwise it fails without dispatching any actions. * - * @template {string} Type - Type of the task which, correponds to `.type` of + * @template {string} Type - Type of the task which, corresponds to `.type` of * dispatched actions. * @template Success - Return type of the task, which will correspond to - * `.job.result.value` of dispatched action on succefully completed task. + * `.job.result.value` of dispatched action on successfully completed task. * @template Init - Initial data * @template State - Type of the `context.getState()` for this task. * @template {BundlerContext, Ext, Extra>} Context diff --git a/src/bundles/peer-bandwidth.js b/src/bundles/peer-bandwidth.js index 8bca15bc9..613a25791 100644 --- a/src/bundles/peer-bandwidth.js +++ b/src/bundles/peer-bandwidth.js @@ -20,7 +20,7 @@ const bundle = function (opts) { opts.tickResolution = opts.tickResolution || 1000 // The minimum time between updates for each peer opts.peerUpdateInterval = opts.peerUpdateInterval || 5000 - // Inactive peers are de-prioritised + // Inactive peers are de-prioritized opts.inactivePeerUpdateInterval = opts.inactivePeerUpdateInterval || 30000 return { diff --git a/src/bundles/peer-locations.js b/src/bundles/peer-locations.js index 7af704467..4cedbbeb7 100644 --- a/src/bundles/peer-locations.js +++ b/src/bundles/peer-locations.js @@ -93,7 +93,7 @@ function createPeersLocations (opts) { }) } - // Avoid unnecessary selector recomputation and re-renders: return + // Avoid unnecessary selector re-computation and re-renders: return // the previous data reference when nothing actually changed. This is // cheap because memoryCache (HLRU) returns the same value references // for the same IPs, so a shallow comparison suffices. diff --git a/src/bundles/task.js b/src/bundles/task.js index 58d68074e..1db49cb0b 100644 --- a/src/bundles/task.js +++ b/src/bundles/task.js @@ -20,11 +20,11 @@ * @typedef {Object} InitState * @property {'Init'} status * @property {Symbol} id - Unique identifier of this task. - * @property {Init} init - Initialization paramater provided on spawn. + * @property {Init} init - Initialization parameter provided on spawn. */ /** - * Reperesents task in it's completion phase. + * Represents task in it's completion phase. * * @template Failure = Error - Type of `result.error` if failed. * @template Success - Type of `result.value` if succeeded. @@ -36,7 +36,7 @@ */ /** - * Type reperesenting a state of the performed task. It is state machine + * Type representing a state of the performed task. It is state machine * representing task state that will initial be in `InitState` and on completion * transition to `ExitState`. * @@ -51,7 +51,7 @@ * * @template {string} Type - String literal used as `action.type`. * @template Failure - Type of the `result.error` for a failed task. - * @template Success - Type of the `result.value` for the successfull task. + * @template Success - Type of the `result.value` for the successful task. * @template Init - Initialization parameter passed to perform. * @typedef {Object} Perform * @property {Type} type @@ -60,7 +60,7 @@ /** * Takes the action `type`, a `task` (in form of async function) and an optional - * `init` parameters to produce a `doX` style action creator. On exectuion + * `init` parameters to produce a `doX` style action creator. On execution * `{ type, task }` actions will be dispatched, where `task` represents a state * (machine) of the executed task, which proceeds as follows: * @@ -70,20 +70,20 @@ * optional parameter that was passed to `perform` (Which can be useful in * certain reducers and middleware that need to keep track of state). * - * - Once task is finishes, action with status `Exit` is dispatced just once: + * - Once task is finishes, action with status `Exit` is dispatched just once: * `{ status: 'Exit', id: Symbol, duration: number, result: Result }` * with some new new fields: * - `duration` - Is a time it took a task from `Init` to `Exit` in ms. - * - `result` - Is a result of the task. On succesful completion it is + * - `result` - Is a result of the task. On successful completion it is * `{ok:true, value:Success}` (value is return value of the async * function). On failure it is `{ok:false, error:Error}` (`error` is an - * expception thrown, or a rejection reason of the promise). + * exception thrown, or a rejection reason of the promise). * * @template {string} Type - Corresponds to `action.type` for all the actions * @template Success - Type of the `action.task.result.vaule` when task is * complete successfully. It is also a value of the promise returned by * running `store.doX` created by this decorator. - * @template Init - Type of the initialization paramater. + * @template Init - Type of the initialization parameter. * @template State - Type of the `context.getState()` for this task. * @template {Object} StoreExt - Store extension. * @template {Object} ContextExt - Context extension @@ -109,7 +109,7 @@ export const perform = (type, task, ...[init]) => */ /** - * Type reperesenting a state of the spawned task. It is state machine that will + * Type representing a state of the spawned task. It is state machine that will * transition from InitState -> SendState -> ExitState. It is guaranteed that * spawned task will be in `InitState` and `ExitState` exactly once. It is also * guaranteed that task can be in `SendState` 0 or 1 or more times between @@ -144,7 +144,7 @@ export const perform = (type, task, ...[init]) => * * It takes the action `type`, a `task` (in form of async generator) and an * optional `init` parameters to produce a `doX` style action creator. On - * exectuion `{ type, task }` actions will be dispatched, where `task` + * execution `{ type, task }` actions will be dispatched, where `task` * represents a state (machine) of the executed task, which proceeds as follows: * * - At the start of the execution, task will have an `Init` status, which is @@ -154,19 +154,19 @@ export const perform = (type, task, ...[init]) => * certain reducers and middleware that need to keep track of state). * * - During execution task may produce messages by yielding them. On each - * message dispatche actions task will have a `Send` status: + * message dispatch actions task will have a `Send` status: * `{ status: 'Send', id: Symbol, message: Message }`. Task can produce >= 0 * such actions. (If your task produces 0 messages you want to use perform * instead). * - Once task is finishes, action with status `Exit` is dispatced just once: + Once task is finishes, action with status `Exit` is dispatched just once: * `{ status: 'Exit', id: Symbol, duration: number, result: Result }` * with some new new fields: * - `duration` - Is a time it took a task from `Init` to `Exit` in ms. - * - `result` - Is a result of the task. On succesful completion it is + * - `result` - Is a result of the task. On successful completion it is * `{ok:true, value:Success}` (value is return value of the async * generator). On failure it is `{ok:false, error:Error}` (`error` is an - * expception thrown, or a rejection reason of the promise). + * exception thrown, or a rejection reason of the promise). * * @template {string} Type - Corresponds to `action.type` for all the actions * that this task will dispatch. @@ -176,7 +176,7 @@ export const perform = (type, task, ...[init]) => * @template Success - Type of the `action.task.result.vaule` when task is * complete successfully. It is also a value of the promise returned by * running `store.doX` created by this decorator. - * @template Init - Type of the initialization paramater. + * @template Init - Type of the initialization parameter. * @template State - Type of the `context.getState()` for this task. * @template {Object} StoreExt - Store extension. * @template {Object} ContextExt - Context extension @@ -184,7 +184,7 @@ export const perform = (type, task, ...[init]) => * * @param {Type} type - Type of the actions this will dispatch. * @param {(context:Context) => AsyncGenerator} task - Task - * @param {Init[]} rest - Optinal initialization parameter. + * @param {Init[]} rest - Optional initialization parameter. * @returns {(context:Context) => Promise} */export const spawn = (type, task, ...[init]) => async (context) => { // Generate unique id for this task