Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
2 changes: 1 addition & 1 deletion .release-please-manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
"handwritten/logging-winston": "6.0.1",
"handwritten/pubsub": "5.3.0",
"handwritten/spanner": "8.7.0",
"handwritten/storage": "7.19.0",
"handwritten/storage": "7.20.0",
"packages/gapic-node-processing": "0.1.8",
"packages/google-ads-admanager": "0.5.1",
"packages/google-ads-datamanager": "0.2.1",
Expand Down
62 changes: 61 additions & 1 deletion changelog.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,66 @@
{
"repository": "googleapis/google-cloud-node",
"entries": [
{
"changes": [
{
"type": "fix",
"sha": "9fd76eff87b1cf02db6205f141449b31e8ab7d8f",
"message": "Bump all node submodules",
"issues": [
"8178"
]
},
{
"type": "fix",
"sha": "1a44778856255471fa96e7df26e232ffb543d87c",
"message": "Resolve flakiness in Service retry system tests",
"issues": [
"7945"
]
},
{
"type": "fix",
"sha": "c1a03fe604662091be283055c7d34052c64d6334",
"message": "Change the copyright year for files in the packages folder",
"issues": [
"8109"
]
},
{
"type": "feat",
"sha": "d60757e2c61077ee3dfd881be45ef7ca554bd038",
"message": "Implement Object Contexts with advanced filtering and validation",
"issues": [
"7548"
],
"scope": "storage"
},
{
"type": "feat",
"sha": "1a693aa3ade3ffb2ac25ff54677602d199b5e3da",
"message": "Set CRC32C as the default checksum option",
"issues": [
"7547"
],
"scope": "storage"
},
{
"type": "feat",
"sha": "113d05c3bf068487bd81a7d4dbb4510f89142618",
"message": "Implement robust path validation and structured skip reporting",
"issues": [
"7546"
],
"scope": "storage"
}
],
"version": "7.20.0",
"language": "JAVASCRIPT",
"artifactName": "@google-cloud/storage",
"id": "7c9f9e47-8aed-4f11-b409-3f2244df5fa7",
"createTime": "2026-05-06T21:35:08.647Z"
},
{
"changes": [
{
Expand Down Expand Up @@ -77687,5 +77747,5 @@
"createTime": "2023-01-28T04:18:24.718Z"
}
],
"updateTime": "2026-05-06T18:07:28.494Z"
"updateTime": "2026-05-06T21:35:08.647Z"
}
16 changes: 16 additions & 0 deletions handwritten/storage/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,22 @@

[1]: https://www.npmjs.com/package/@google-cloud/storage?activeTab=versions

## [7.20.0](https://github.com/googleapis/google-cloud-node/compare/storage-v7.19.0...storage-v7.20.0) (2026-05-06)


### Features

* **storage:** Implement Object Contexts with advanced filtering and validation ([#7548](https://github.com/googleapis/google-cloud-node/issues/7548)) ([d60757e](https://github.com/googleapis/google-cloud-node/commit/d60757e2c61077ee3dfd881be45ef7ca554bd038))
* **storage:** Implement robust path validation and structured skip reporting ([#7546](https://github.com/googleapis/google-cloud-node/issues/7546)) ([113d05c](https://github.com/googleapis/google-cloud-node/commit/113d05c3bf068487bd81a7d4dbb4510f89142618))
* **storage:** Set CRC32C as the default checksum option ([#7547](https://github.com/googleapis/google-cloud-node/issues/7547)) ([1a693aa](https://github.com/googleapis/google-cloud-node/commit/1a693aa3ade3ffb2ac25ff54677602d199b5e3da))


### Bug Fixes

* Bump all node submodules ([#8178](https://github.com/googleapis/google-cloud-node/issues/8178)) ([9fd76ef](https://github.com/googleapis/google-cloud-node/commit/9fd76eff87b1cf02db6205f141449b31e8ab7d8f))
* Change the copyright year for files in the packages folder ([#8109](https://github.com/googleapis/google-cloud-node/issues/8109)) ([c1a03fe](https://github.com/googleapis/google-cloud-node/commit/c1a03fe604662091be283055c7d34052c64d6334))
* Resolve flakiness in Service retry system tests ([#7945](https://github.com/googleapis/google-cloud-node/issues/7945)) ([1a44778](https://github.com/googleapis/google-cloud-node/commit/1a44778856255471fa96e7df26e232ffb543d87c))

## [7.19.0](https://github.com/googleapis/nodejs-storage/compare/v7.18.0...v7.19.0) (2026-02-05)


Expand Down
2 changes: 1 addition & 1 deletion handwritten/storage/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@google-cloud/storage",
"description": "Cloud Storage Client Library for Node.js",
"version": "7.19.0",
"version": "7.20.0",
"license": "Apache-2.0",
"author": "Google Inc.",
"engines": {
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
4 changes: 2 additions & 2 deletions handwritten/storage/system-test/common.ts
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ describe('Common', () => {
} catch (e) {
mockServer.close(() => done(e));
}
}
},
);
});
});
Expand Down Expand Up @@ -95,7 +95,7 @@ describe('Common', () => {
} catch (e) {
mockServer.close(() => done(e)); // Cleanup even if assertion fails
}
}
},
);
});
});
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