Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
17 commits
Select commit Hold shift + click to select a range
24c4c94
Upgrade teeny-request
danieljbruce Apr 15, 2026
fc3ba2f
fix: upgrade teeny-request
danieljbruce Apr 15, 2026
34c2950
Merge branch 'teeny-request-storage' of https://github.com/googleapis…
danieljbruce Apr 15, 2026
ee3aff4
🦉 Updates from OwlBot post-processor
gcf-owl-bot[bot] Apr 15, 2026
b9f1372
Merge branch 'teeny-request-storage' of https://github.com/googleapis…
gcf-owl-bot[bot] Apr 15, 2026
6f3d3b2
🦉 Updates from OwlBot post-processor
gcf-owl-bot[bot] Apr 15, 2026
f50e1ec
Merge branch 'teeny-request-storage' of https://github.com/googleapis…
gcf-owl-bot[bot] Apr 15, 2026
ece7bf5
Upgrade retry request
danieljbruce Apr 15, 2026
5771765
Undo unncessessary changes
danieljbruce Apr 15, 2026
5183f59
undo unwanted automatic change
danieljbruce Apr 15, 2026
4be117e
Undo missed changes
danieljbruce Apr 15, 2026
ad8cefc
🦉 Updates from OwlBot post-processor
gcf-owl-bot[bot] Apr 15, 2026
d5348e6
Merge branch 'teeny-request-storage' of https://github.com/googleapis…
gcf-owl-bot[bot] Apr 15, 2026
515158f
🦉 Updates from OwlBot post-processor
gcf-owl-bot[bot] Apr 15, 2026
3684fd2
Merge branch 'teeny-request-storage' of https://github.com/googleapis…
gcf-owl-bot[bot] Apr 15, 2026
b0bd787
🦉 Updates from OwlBot post-processor
gcf-owl-bot[bot] Apr 15, 2026
e2b31f9
Merge branch 'teeny-request-storage' of https://github.com/googleapis…
gcf-owl-bot[bot] Apr 15, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions handwritten/storage/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -88,8 +88,8 @@
"html-entities": "^2.5.2",
"mime": "^3.0.0",
"p-limit": "^3.0.1",
"retry-request": "^7.0.0",
"teeny-request": "^9.0.0",
"retry-request": "^8.0.2",
"teeny-request": "^10.0.0",
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

security-high high

Upgrading teeny-request to ^10.0.0 is incomplete because retry-request@^7.0.0 (line 91) still depends on teeny-request@^9.0.0. This results in dependency duplication and leaves the vulnerable version in the tree. To fully resolve the vulnerability and maintain a clean dependency tree, retry-request should also be updated to a version compatible with teeny-request v10 (e.g., ^7.0.2).

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I upgraded retry-request as well so that should address this comment.

"uuid": "^8.0.0"
},
"devDependencies": {
Expand Down
2 changes: 1 addition & 1 deletion handwritten/storage/src/bucket.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1664,7 +1664,7 @@ class Bucket extends ServiceObject<Bucket, BucketMetadata> {
if (options.contexts) {
const validationError = handleContextValidation(
options.contexts,
callback
callback,
);
if (validationError) return validationError;
}
Expand Down
4 changes: 2 additions & 2 deletions handwritten/storage/src/file.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1328,7 +1328,7 @@ class File extends ServiceObject<File, FileMetadata> {
if (options.contexts) {
const validationError = handleContextValidation(
options.contexts,
callback
callback,
);
if (validationError) return validationError;
}
Expand Down Expand Up @@ -4169,7 +4169,7 @@ class File extends ServiceObject<File, FileMetadata> {

const validationError = handleContextValidation(
options.metadata?.contexts,
callback
callback,
);
if (validationError) return validationError;

Expand Down
8 changes: 4 additions & 4 deletions handwritten/storage/src/transfer-manager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -611,7 +611,7 @@ export class TransferManager {
let files: File[] = [];

const baseDestination = path.resolve(
options.passthroughOptions?.destination || '.'
options.passthroughOptions?.destination || '.',
);

if (!Array.isArray(filesOrFolder)) {
Expand Down Expand Up @@ -705,7 +705,7 @@ export class TransferManager {
await fsp.mkdir(path.dirname(destination), {recursive: true});

const resp = (await file.download(
passThroughOptionsCopy
passThroughOptionsCopy,
)) as DownloadResponseWithStatus;

finalResults[i] = {
Expand All @@ -723,7 +723,7 @@ export class TransferManager {
errorResp.error = err as Error;
finalResults[i] = errorResp;
}
})
}),
);
}

Expand Down Expand Up @@ -922,7 +922,7 @@ export class TransferManager {
promises = [];
}
promises.push(
limit(() => mpuHelper.uploadPart(partNumber++, curChunk, validation))
limit(() => mpuHelper.uploadPart(partNumber++, curChunk, validation)),
);
}
await Promise.all(promises);
Expand Down
7 changes: 3 additions & 4 deletions handwritten/storage/src/util.ts
Original file line number Diff line number Diff line change
Expand Up @@ -274,7 +274,6 @@ export class PassThroughShim extends PassThrough {
}
}


/**
* Validates Object Contexts for forbidden characters.
* Double quotes (") are forbidden in context keys and values as they
Expand All @@ -289,12 +288,12 @@ export function validateContexts(contexts?: FileMetadata['contexts']): void {
for (const [key, context] of Object.entries(custom)) {
if (key.includes('"')) {
throw new Error(
`Invalid context key "${key}": Forbidden character (") detected.`
`Invalid context key "${key}": Forbidden character (") detected.`,
);
}
if (context?.value && context.value.includes('"')) {
throw new Error(
`Invalid context value for key "${key}": Forbidden character (") detected.`
`Invalid context value for key "${key}": Forbidden character (") detected.`,
);
}
}
Expand All @@ -307,7 +306,7 @@ export function validateContexts(contexts?: FileMetadata['contexts']): void {
*/
export function handleContextValidation(
contexts?: FileMetadata['contexts'],
callback?: Function
callback?: Function,
// eslint-disable-next-line @typescript-eslint/no-explicit-any
): Promise<any> | void {
try {
Expand Down
16 changes: 8 additions & 8 deletions handwritten/storage/system-test/storage.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3005,7 +3005,7 @@ describe('storage', function () {
});

await new Promise(res =>
setTimeout(res, BUCKET_METADATA_UPDATE_WAIT_TIME)
setTimeout(res, BUCKET_METADATA_UPDATE_WAIT_TIME),
);

const encryptionKey = crypto.randomBytes(32);
Expand All @@ -3019,7 +3019,7 @@ describe('storage', function () {
assert.strictEqual(err.code, 412);
assert.ok(err.message.includes(failureMessage));
return true;
}
},
);
});

Expand Down Expand Up @@ -3047,7 +3047,7 @@ describe('storage', function () {
});

await new Promise(res =>
setTimeout(res, BUCKET_METADATA_UPDATE_WAIT_TIME)
setTimeout(res, BUCKET_METADATA_UPDATE_WAIT_TIME),
);

await bucket.setMetadata({
Expand All @@ -3059,19 +3059,19 @@ describe('storage', function () {
});

await new Promise(res =>
setTimeout(res, BUCKET_METADATA_UPDATE_WAIT_TIME)
setTimeout(res, BUCKET_METADATA_UPDATE_WAIT_TIME),
);

const [metadata] = await bucket.getMetadata();
assert.strictEqual(
metadata.encryption?.defaultKmsKeyName,
kmsKeyName
kmsKeyName,
);

assert.strictEqual(
metadata.encryption?.googleManagedEncryptionEnforcementConfig
?.restrictionMode,
'FullyRestricted'
'FullyRestricted',
);
});
});
Expand Down Expand Up @@ -3643,7 +3643,7 @@ describe('storage', function () {
assert.ok(metadata.contexts?.custom);
assert.strictEqual(
metadata.contexts.custom['team-owner']?.value,
'storage-team'
'storage-team',
);
assert.ok(metadata.contexts.custom['team-owner'].createTime);

Expand Down Expand Up @@ -3768,7 +3768,7 @@ describe('storage', function () {
const [metadata] = await combined.getMetadata();
assert.strictEqual(
metadata.contexts?.custom?.status?.value,
'composed'
'composed',
);
});
});
Expand Down
Loading