Skip to content
This repository was archived by the owner on Mar 3, 2026. It is now read-only.

Commit 9cae69c

Browse files
authored
fix: typo correction (#2610)
1 parent f6b68dc commit 9cae69c

14 files changed

Lines changed: 45 additions & 45 deletions

File tree

src/bucket.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1325,7 +1325,7 @@ class Bucket extends ServiceObject<Bucket, BucketMetadata> {
13251325
* **Note**: For configuring a raw-formatted rule object to be passed as `action`
13261326
* please refer to the [examples]{@link https://cloud.google.com/storage/docs/managing-lifecycles#configexamples}.
13271327
* @param {object} rule.condition Condition a bucket must meet before the
1328-
* action occurson the bucket. Refer to followitn supported [conditions]{@link https://cloud.google.com/storage/docs/lifecycle#conditions}.
1328+
* action occurs on the bucket. Refer to following supported [conditions]{@link https://cloud.google.com/storage/docs/lifecycle#conditions}.
13291329
* @param {string} [rule.storageClass] When using the `setStorageClass`
13301330
* action, provide this option to dictate which storage class the object
13311331
* should update to.
@@ -1950,7 +1950,7 @@ class Bucket extends ServiceObject<Bucket, BucketMetadata> {
19501950
* myBucket.createNotification('my-topic', callback);
19511951
*
19521952
* //-
1953-
* // Configure the nofiication by providing Notification metadata.
1953+
* // Configure the notification by providing Notification metadata.
19541954
* //-
19551955
* const metadata = {
19561956
* objectNamePrefix: 'prefix-'
@@ -3071,7 +3071,7 @@ class Bucket extends ServiceObject<Bucket, BucketMetadata> {
30713071
* @property {boolean} [virtualHostedStyle=false] Use virtual hosted-style
30723072
* URLs ('https://mybucket.storage.googleapis.com/...') instead of path-style
30733073
* ('https://storage.googleapis.com/mybucket/...'). Virtual hosted-style URLs
3074-
* should generally be preferred instaed of path-style URL.
3074+
* should generally be preferred instead of path-style URL.
30753075
* Currently defaults to `false` for path-style, although this may change in a
30763076
* future major-version release.
30773077
* @property {string} [cname] The cname for this bucket, i.e.,
@@ -3118,7 +3118,7 @@ class Bucket extends ServiceObject<Bucket, BucketMetadata> {
31183118
* @param {boolean} [config.virtualHostedStyle=false] Use virtual hosted-style
31193119
* URLs ('https://mybucket.storage.googleapis.com/...') instead of path-style
31203120
* ('https://storage.googleapis.com/mybucket/...'). Virtual hosted-style URLs
3121-
* should generally be preferred instaed of path-style URL.
3121+
* should generally be preferred instead of path-style URL.
31223122
* Currently defaults to `false` for path-style, although this may change in a
31233123
* future major-version release.
31243124
* @param {string} [config.cname] The cname for this bucket, i.e.,
@@ -3222,7 +3222,7 @@ class Bucket extends ServiceObject<Bucket, BucketMetadata> {
32223222
* @throws {Error} if a metageneration is not provided.
32233223
*
32243224
* @param {number|string} metageneration The bucket's metageneration. This is
3225-
* accesssible from calling {@link File#getMetadata}.
3225+
* accessible from calling {@link File#getMetadata}.
32263226
* @param {BucketLockCallback} [callback] Callback function.
32273227
* @returns {Promise<BucketLockResponse>}
32283228
*

src/file.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2982,7 +2982,7 @@ class File extends ServiceObject<File, FileMetadata> {
29822982
* @param {boolean} [config.virtualHostedStyle=false] Use virtual hosted-style
29832983
* URLs (e.g. 'https://mybucket.storage.googleapis.com/...') instead of path-style
29842984
* (e.g. 'https://storage.googleapis.com/mybucket/...'). Virtual hosted-style URLs
2985-
* should generally be preferred instaed of path-style URL.
2985+
* should generally be preferred instead of path-style URL.
29862986
* Currently defaults to `false` for path-style, although this may change in a
29872987
* future major-version release.
29882988
* @param {string} [config.cname] The cname for this bucket, i.e.,

src/storage.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -896,7 +896,7 @@ export class Storage extends Service {
896896
* For more information, see {@link https://cloud.google.com/storage/docs/locations| Bucket Locations}.
897897
* @property {boolean} [dra=false] Specify the storage class as Durable Reduced
898898
* Availability.
899-
* @property {boolean} [enableObjectRetention=false] Specifiy whether or not object retention should be enabled on this bucket.
899+
* @property {boolean} [enableObjectRetention=false] Specify whether or not object retention should be enabled on this bucket.
900900
* @property {object} [hierarchicalNamespace.enabled=false] Specify whether or not to enable hierarchical namespace on this bucket.
901901
* @property {string} [location] Specify the bucket's location. If specifying
902902
* a dual-region, the `customPlacementConfig` property should be set in conjunction.

src/transfer-manager.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -416,7 +416,7 @@ export class TransferManager {
416416
* @typedef {object} UploadManyFilesOptions
417417
* @property {number} [concurrencyLimit] The number of concurrently executing promises
418418
* to use when uploading the files.
419-
* @property {Function} [customDestinationBuilder] A fuction that will take the current path of a local file
419+
* @property {Function} [customDestinationBuilder] A function that will take the current path of a local file
420420
* and return a string representing a custom path to be used to upload the file to GCS.
421421
* @property {boolean} [skipIfExists] Do not upload the file if it already exists in
422422
* the bucket. This will set the precondition ifGenerationMatch = 0.
@@ -744,7 +744,7 @@ export class TransferManager {
744744
* @property {number} [concurrencyLimit] The number of concurrently executing promises
745745
* to use when uploading the file.
746746
* @property {number} [chunkSizeBytes] The size in bytes of each chunk to be uploaded.
747-
* @property {string} [uploadName] Name of the file when saving to GCS. If ommitted the name is taken from the file path.
747+
* @property {string} [uploadName] Name of the file when saving to GCS. If omitted the name is taken from the file path.
748748
* @property {number} [maxQueueSize] The number of chunks to be uploaded to hold in memory concurrently. If not specified
749749
* defaults to the specified concurrency limit.
750750
* @property {string} [uploadId] If specified attempts to resume a previous upload.
@@ -757,14 +757,14 @@ export class TransferManager {
757757
*
758758
*/
759759
/**
760-
* Upload a large file in chunks utilizing parallel upload opertions. If the upload fails, an uploadId and
760+
* Upload a large file in chunks utilizing parallel upload operations. If the upload fails, an uploadId and
761761
* map containing all the successfully uploaded parts will be returned to the caller. These arguments can be used to
762762
* resume the upload.
763763
*
764764
* @param {string} [filePath] The path of the file to be uploaded
765765
* @param {UploadFileInChunksOptions} [options] Configuration options.
766766
* @param {MultiPartHelperGenerator} [generator] A function that will return a type that implements the MPU interface. Most users will not need to use this.
767-
* @returns {Promise<void>} If successful a promise resolving to void, otherwise a error containing the message, uploadid, and parts map.
767+
* @returns {Promise<void>} If successful a promise resolving to void, otherwise a error containing the message, uploadId, and parts map.
768768
*
769769
* @example
770770
* ```

src/util.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,7 @@ export function convertObjKeysToSnakeCase(obj: object): object {
148148
* @param {boolean} includeTime flag to include hours, minutes, seconds in output.
149149
* @param {string} dateDelimiter delimiter between date components.
150150
* @param {string} timeDelimiter delimiter between time components.
151-
* @returns {string} UTC ISO format of provided date obect.
151+
* @returns {string} UTC ISO format of provided date object.
152152
*/
153153
export function formatAsUTCISO(
154154
dateTimeToFormat: Date,
@@ -252,7 +252,7 @@ export class PassThroughShim extends PassThrough {
252252
this.emit('writing');
253253
this.shouldEmitWriting = false;
254254
}
255-
// Per the nodejs documention, callback must be invoked on the next tick
255+
// Per the nodejs documentation, callback must be invoked on the next tick
256256
process.nextTick(() => {
257257
super._write(chunk, encoding, callback);
258258
});

system-test/storage.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -435,9 +435,9 @@ describe('storage', function () {
435435
resumable: false,
436436
});
437437
const [metadata] = await file.getMetadata();
438-
const encyrptionAlgorithm =
438+
const encryptionAlgorithm =
439439
metadata.customerEncryption?.encryptionAlgorithm;
440-
assert.strictEqual(encyrptionAlgorithm, 'AES256');
440+
assert.strictEqual(encryptionAlgorithm, 'AES256');
441441
});
442442

443443
it('should set custom encryption in a resumable upload', async () => {
@@ -447,9 +447,9 @@ describe('storage', function () {
447447
resumable: true,
448448
});
449449
const [metadata] = await file.getMetadata();
450-
const encyrptionAlgorithm =
450+
const encryptionAlgorithm =
451451
metadata.customerEncryption?.encryptionAlgorithm;
452-
assert.strictEqual(encyrptionAlgorithm, 'AES256');
452+
assert.strictEqual(encryptionAlgorithm, 'AES256');
453453
});
454454

455455
it('should make a file public during the upload', async () => {
@@ -2778,7 +2778,7 @@ describe('storage', function () {
27782778
});
27792779
});
27802780

2781-
it('should download from the encrytped file', async () => {
2781+
it('should download from the encrypted file', async () => {
27822782
const [contents] = await file.download();
27832783
assert.strictEqual(contents.toString(), 'secret data');
27842784
});

test/bucket.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -197,7 +197,7 @@ describe('Bucket', () => {
197197
retryOptions: {
198198
autoRetry: true,
199199
maxRetries: 3,
200-
retryDelayMultipier: 2,
200+
retryDelayMultiplier: 2,
201201
totalTimeout: 600,
202202
maxRetryDelay: 60,
203203
retryableErrorFn: (err: HTTPError) => {
@@ -2631,7 +2631,7 @@ describe('Bucket', () => {
26312631
bucket.setStorageClass('hyphenated-class', OPTIONS, CALLBACK);
26322632
});
26332633

2634-
it('should call setMetdata correctly', () => {
2634+
it('should call setMetadata correctly', () => {
26352635
bucket.setMetadata = (
26362636
metadata: BucketMetadata,
26372637
options: {},

test/file.ts

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -237,7 +237,7 @@ describe('File', () => {
237237
retryOptions: {
238238
autoRetry: true,
239239
maxRetries: 3,
240-
retryDelayMultipier: 2,
240+
retryDelayMultiplier: 2,
241241
totalTimeout: 600,
242242
maxRetryDelay: 60,
243243
retryableErrorFn: (err: HTTPError) => {
@@ -282,7 +282,7 @@ describe('File', () => {
282282
assert.strictEqual(file.storage, BUCKET.storage);
283283
});
284284

285-
it('should set instanceRetryValue to the storage insance retryOptions.autoRetry value', () => {
285+
it('should set instanceRetryValue to the storage instance retryOptions.autoRetry value', () => {
286286
assert.strictEqual(
287287
file.instanceRetryValue,
288288
STORAGE.retryOptions.autoRetry
@@ -1815,7 +1815,7 @@ describe('File', () => {
18151815
autoRetry: true,
18161816
maxRetries: 3,
18171817
maxRetryDelay: 60,
1818-
retryDelayMultipier: 2,
1818+
retryDelayMultiplier: 2,
18191819
totalTimeout: 600,
18201820
},
18211821
preconditionOpts: {
@@ -1860,8 +1860,8 @@ describe('File', () => {
18601860
options.retryOptions.maxRetryDelay
18611861
);
18621862
assert.strictEqual(
1863-
opts.retryOptions.retryDelayMultipier,
1864-
options.retryOptions.retryDelayMultipier
1863+
opts.retryOptions.retryDelayMultiplier,
1864+
options.retryOptions.retryDelayMultiplier
18651865
);
18661866
assert.strictEqual(
18671867
opts.retryOptions.totalTimeout,
@@ -1898,7 +1898,7 @@ describe('File', () => {
18981898
autoRetry: true,
18991899
maxRetries: 3,
19001900
maxRetryDelay: 60,
1901-
retryDelayMultipier: 2,
1901+
retryDelayMultiplier: 2,
19021902
totalTimeout: 600,
19031903
},
19041904
};
@@ -1939,8 +1939,8 @@ describe('File', () => {
19391939
options.retryOptions.maxRetryDelay
19401940
);
19411941
assert.strictEqual(
1942-
opts.retryOptions.retryDelayMultipier,
1943-
options.retryOptions.retryDelayMultipier
1942+
opts.retryOptions.retryDelayMultiplier,
1943+
options.retryOptions.retryDelayMultiplier
19441944
);
19451945
assert.strictEqual(
19461946
opts.retryOptions.totalTimeout,
@@ -1996,11 +1996,11 @@ describe('File', () => {
19961996
'Cannot provide an `offset` without providing a `uri`'
19971997
);
19981998

1999-
const opitons = {
1999+
const options = {
20002000
offset: 1,
20012001
isPartialUpload: true,
20022002
};
2003-
const writable = file.createWriteStream(opitons);
2003+
const writable = file.createWriteStream(options);
20042004

20052005
writable.on('error', (err: RangeError) => {
20062006
assert.deepEqual(err, error);
@@ -2919,7 +2919,7 @@ describe('File', () => {
29192919
);
29202920
});
29212921

2922-
it('should add ACL condtion', done => {
2922+
it('should add ACL condition', done => {
29232923
file.generateSignedPostPolicyV2(
29242924
{
29252925
expires: Date.now() + 2000,
@@ -3151,7 +3151,7 @@ describe('File', () => {
31513151
);
31523152
});
31533153

3154-
it('should throw if prexif condition is not an array', () => {
3154+
it('should throw if prefix condition is not an array', () => {
31553155
assert.throws(() => {
31563156
file.generateSignedPostPolicyV2(
31573157
{
@@ -4558,7 +4558,7 @@ describe('File', () => {
45584558
}
45594559
}
45604560

4561-
describe('retry mulipart upload', () => {
4561+
describe('retry multipart upload', () => {
45624562
it('should save a string with no errors', async () => {
45634563
const options = {resumable: false};
45644564
file.createWriteStream = () => {

test/hmacKey.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ describe('HmacKey', () => {
6060
retryOptions: {
6161
autoRetry: true,
6262
maxRetries: 3,
63-
retryDelayMultipier: 2,
63+
retryDelayMultiplier: 2,
6464
totalTimeout: 600,
6565
maxRetryDelay: 60,
6666
retryableErrorFn: (err: HTTPError) => {

test/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -500,7 +500,7 @@ describe('Storage', () => {
500500
);
501501
});
502502

503-
it('should be overriden by apiEndpoint', () => {
503+
it('should be overridden by apiEndpoint', () => {
504504
const storage = new Storage({
505505
projectId: PROJECT_ID,
506506
apiEndpoint: 'https://some.api.com',

0 commit comments

Comments
 (0)