Skip to content

Commit 5aba09c

Browse files
committed
chore: fix typos in comments and documentation
1 parent f683c29 commit 5aba09c

19 files changed

Lines changed: 40 additions & 40 deletions

docs/features/test.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -255,7 +255,7 @@ reportResults
255255

256256
## dev-container-features-test-lib
257257

258-
The `dev-container-features-test-lib` is convenience helper [defined in the CLI](https://github.com/devcontainers/cli/blob/1910ca41015c627b884ddd69ebc52d1e8cdd8cf0/src/spec-node/featuresCLI/utils.ts#L59) that adds several bash functions to organize test asserts. Note that using this libary **is not required**.
258+
The `dev-container-features-test-lib` is convenience helper [defined in the CLI](https://github.com/devcontainers/cli/blob/1910ca41015c627b884ddd69ebc52d1e8cdd8cf0/src/spec-node/featuresCLI/utils.ts#L59) that adds several bash functions to organize test asserts. Note that using this library **is not required**.
259259

260260
#### `check <LABEL> <cmd> [args...]`
261261
Description: Executes `cmd` and prints success/failed depending on exit code (0 === success) of `cmd`.

src/spec-common/commonUtils.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -481,8 +481,8 @@ async function findLocalWindowsExecutable(command: string, cwd = process.cwd(),
481481
}
482482
}
483483
// Not found in PATH. Bail out.
484-
output.write(`findLocalWindowsExecutable: Exectuable '${command}' not found on PATH '${pathValue}'.`);
485-
const err = new Error(`Exectuable '${command}' not found on PATH '${pathValue}'.`);
484+
output.write(`findLocalWindowsExecutable: Executable '${command}' not found on PATH '${pathValue}'.`);
485+
const err = new Error(`Executable '${command}' not found on PATH '${pathValue}'.`);
486486
(err as any).code = 'ENOENT';
487487
throw err;
488488
}

src/spec-configuration/containerCollectionsOCI.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -322,7 +322,7 @@ export async function getManifest(params: CommonParams, url: string, ref: OCIRef
322322
// Per the specification:
323323
// https://github.com/opencontainers/distribution-spec/blob/v1.0.1/spec.md#pulling-manifests
324324
// The registry server SHOULD return the canonical content digest in a header, but it's not required to.
325-
// That is useful to have, so if the server doesn't provide it, recalculate it outselves.
325+
// That is useful to have, so if the server doesn't provide it, recalculate it ourselves.
326326
// Headers are always automatically downcased by node.
327327
let contentDigest = headers['docker-content-digest'];
328328
if (!contentDigest || expectedDigest) {

src/spec-configuration/containerFeaturesConfiguration.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -167,7 +167,7 @@ export interface FeatureSet {
167167

168168
export interface FeaturesConfig {
169169
featureSets: FeatureSet[];
170-
dstFolder?: string; // set programatically
170+
dstFolder?: string; // set programmatically
171171
}
172172

173173
export interface GitHubApiReleaseInfo {
@@ -1029,7 +1029,7 @@ async function fetchFeatures(params: { extensionPath: string; cwd: string; outpu
10291029
if (authenticatedGithubTarballUri) {
10301030
tarballUris.push(authenticatedGithubTarballUri);
10311031
} else {
1032-
output.write('Failed to generate autenticated tarball URI for provided feature, despite a GitHub token present', LogLevel.Warning);
1032+
output.write('Failed to generate authenticated tarball URI for provided feature, despite a GitHub token present', LogLevel.Warning);
10331033
}
10341034
headers.Accept = 'Accept: application/octet-stream';
10351035
}

src/spec-configuration/containerFeaturesOrder.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ interface FNode {
2424
// FeatureSet contains 'sourceInformation', useful for:
2525
// Providing information on if Feature is an OCI Feature, Direct HTTPS Feature, or Local Feature.
2626
// Additionally, contains 'ref' and 'manifestDigest' for OCI Features - useful for sorting.
27-
// Property set programatically when discovering all the nodes in the graph.
27+
// Property set programmatically when discovering all the nodes in the graph.
2828
featureSet?: FeatureSet;
2929

3030
// Graph directed adjacency lists.
@@ -71,7 +71,7 @@ function satisfiesSoftDependency(params: CommonParams, node: FNode, softDep: FNo
7171
let softDepSourceInfo = softDep.featureSet?.sourceInformation; // Mutable only for type-casting.
7272

7373
if (!nodeSourceInfo || !softDepSourceInfo) {
74-
output.write(`Missing sourceInfo: satisifiesSoftDependency(${nodeSourceInfo?.userFeatureId}, ${softDepSourceInfo?.userFeatureId})`, LogLevel.Trace);
74+
output.write(`Missing sourceInfo: satisfiesSoftDependency(${nodeSourceInfo?.userFeatureId}, ${softDepSourceInfo?.userFeatureId})`, LogLevel.Trace);
7575
throw new Error('ERR: Failure resolving Features.');
7676
}
7777

@@ -624,7 +624,7 @@ export async function computeDependsOnInstallationOrder(
624624
const round = worklist.filter(node =>
625625
// If the node has no hard/soft dependencies, the node can always be installed.
626626
(node.dependsOn.length === 0 && node.installsAfter.length === 0)
627-
// OR, every hard-dependency (dependsOn) AND soft-dependency (installsAfter) has been satified in prior rounds
627+
// OR, every hard-dependency (dependsOn) AND soft-dependency (installsAfter) has been satisfied in prior rounds
628628
|| node.dependsOn.every(dep =>
629629
installationOrder.some(installed => equals(params, installed, dep)))
630630
&& node.installsAfter.every(dep =>

src/spec-configuration/containerTemplatesConfiguration.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,15 +5,15 @@ export interface Template {
55
description?: string;
66
documentationURL?: string;
77
licenseURL?: string;
8-
type?: string; // Added programatically during packaging
9-
fileCount?: number; // Added programatically during packaging
8+
type?: string; // Added programmatically during packaging
9+
fileCount?: number; // Added programmatically during packaging
1010
featureIds?: string[];
1111
options?: Record<string, TemplateOption>;
1212
platforms?: string[];
1313
publisher?: string;
1414
keywords?: string[];
1515
optionalPaths?: string[];
16-
files: string[]; // Added programatically during packaging
16+
files: string[]; // Added programmatically during packaging
1717
}
1818

1919
export type TemplateOption = {

src/spec-node/collectionCommonUtils/publish.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ export function publishOptions(y: Argv, collectionType: string) {
1010
return y
1111
.options({
1212
'registry': { type: 'string', alias: 'r', default: 'ghcr.io', description: 'Name of the OCI registry.' },
13-
'namespace': { type: 'string', alias: 'n', require: true, description: `Unique indentifier for the collection of ${collectionType}s. Example: <owner>/<repo>` },
13+
'namespace': { type: 'string', alias: 'n', require: true, description: `Unique identifier for the collection of ${collectionType}s. Example: <owner>/<repo>` },
1414
'log-level': { choices: ['info' as 'info', 'debug' as 'debug', 'trace' as 'trace'], default: 'info' as 'info', description: 'Log level.' }
1515
})
1616
.positional('target', { type: 'string', default: '.', description: targetPositionalDescription(collectionType) })

src/spec-node/collectionCommonUtils/publishCommandImpl.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ export function getSemanticTags(version: string, tags: string[], output: Log) {
2929

3030
semanticVersions = [];
3131

32-
// Adds semantic versions depending upon the existings (published) versions
32+
// Adds semantic versions depending upon the existing (published) versions
3333
// eg. 1.2.3 --> [1, 1.2, 1.2.3, latest]
3434
updateSemanticTagsList(tags, version, `${parsedVersion.major}.x.x`, `${parsedVersion.major}`);
3535
updateSemanticTagsList(tags, version, `${parsedVersion.major}.${parsedVersion.minor}.x`, `${parsedVersion.major}.${parsedVersion.minor}`);

src/spec-node/dockerCompose.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -170,11 +170,11 @@ export async function buildAndExtendDockerCompose(configWithRaw: SubstitutedConf
170170
const originalDockerfile = (await cliHost.readFile(resolvedDockerfilePath)).toString();
171171
dockerfile = originalDockerfile;
172172
if (target) {
173-
// Explictly set build target for the dev container build features on that
173+
// Explicitly set build target for the dev container build features on that
174174
baseName = target;
175175
} else {
176176
// Use the last stage in the Dockerfile
177-
// Find the last line that starts with "FROM" (possibly preceeded by white-space)
177+
// Find the last line that starts with "FROM" (possibly preceded by white-space)
178178
const { lastStageName, modifiedDockerfile } = ensureDockerfileHasFinalStageName(originalDockerfile, baseName);
179179
baseName = lastStageName;
180180
if (modifiedDockerfile) {

src/spec-node/dockerfileUtils.ts

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -147,15 +147,15 @@ function extractInstructions(stageStr: string) {
147147
}
148148

149149
function getExpressionValue(option: string, isSet: boolean, word: string, value: string) {
150-
const operations: Record<string, Function> = {
150+
const operations: Record<string, Function> = {
151151
'-': (isSet: boolean, word: string, value: string) => isSet ? value : word,
152152
'+': (isSet: boolean, word: string, value: string) => isSet ? word : value,
153153
};
154154

155155
return operations[option](isSet, word, value).replace(/^['"]|['"]$/g, ''); // remove quotes from start and end of the string
156156
}
157157

158-
function replaceVariables(dockerfile: Dockerfile, buildArgs: Record<string, string>, baseImageEnv: Record<string, string>, globalBuildxPlatformArgs: Record<string, string> = {}, str: string, stage: { from?: From; instructions: Instruction[] }, beforeInstructionIndex: number) {
158+
function replaceVariables(dockerfile: Dockerfile, buildArgs: Record<string, string>, baseImageEnv: Record<string, string>, globalBuildxPlatformArgs: Record<string, string> = {}, str: string, stage: { from?: From; instructions: Instruction[] }, beforeInstructionIndex: number) {
159159
return [...str.matchAll(argumentExpression)]
160160
.map(match => {
161161
const variable = match.groups!.variable;
@@ -225,7 +225,7 @@ function findLastIndex<T>(array: T[], predicate: (value: T, index: number, obj:
225225
// not expected to be called externally (exposed for testing)
226226
export function ensureDockerfileHasFinalStageName(dockerfile: string, defaultLastStageName: string): { lastStageName: string; modifiedDockerfile: string | undefined } {
227227

228-
// Find the last line that starts with "FROM" (possibly preceeded by white-space)
228+
// Find the last line that starts with "FROM" (possibly preceded by white-space)
229229
const fromLines = [...dockerfile.matchAll(findFromLines)];
230230
if (fromLines.length === 0) {
231231
throw new Error('Error parsing Dockerfile: Dockerfile contains no FROM instructions');
@@ -273,9 +273,9 @@ export function supportsBuildContexts(dockerfile: Dockerfile) {
273273
}
274274

275275
/**
276-
* Convert mount command' arguments to string
277-
* @param mount
278-
* @returns mount command string
276+
* Convert mount command' arguments to string
277+
* @param mount
278+
* @returns mount command string
279279
*/
280280
export function generateMountCommand(mount: Mount | string): string[] {
281281
const command: string = '--mount';

0 commit comments

Comments
 (0)