Skip to content

Commit

Permalink
chore: minor update & bundlesize
Browse files Browse the repository at this point in the history
  • Loading branch information
AllanZhengYP committed Jan 21, 2025
1 parent ba3d3b2 commit 14a23f7
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion packages/aws-amplify/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -515,7 +515,7 @@
"name": "[Storage] uploadData (S3)",
"path": "./dist/esm/storage/index.mjs",
"import": "{ uploadData }",
"limit": "22.87 kB"
"limit": "22.95 kB"
}
]
}
Original file line number Diff line number Diff line change
Expand Up @@ -44,10 +44,10 @@ const bucket = 'bucket';
const region = 'region';
const defaultKey = 'key';
const defaultContentType = 'application/octet-stream';
const defaultCacheKey =
'o6a/Qw==_8388608_application/octet-stream_bucket_public_key';
const emptyOptionHash = 'o6a/Qw=='; // crc32 for '{}'
const defaultCacheKey = `${emptyOptionHash}_8388608_application/octet-stream_bucket_public_key`;
const testPath = 'testPath/object';
const testPathCacheKey = `o6a/Qw==_8388608_${defaultContentType}_${bucket}_custom_${testPath}`;
const testPathCacheKey = `${emptyOptionHash}_8388608_${defaultContentType}_${bucket}_custom_${testPath}`;

const mockCreateMultipartUpload = jest.mocked(createMultipartUpload);
const mockUploadPart = jest.mocked(uploadPart);
Expand Down Expand Up @@ -545,7 +545,7 @@ describe('getMultipartUploadHandlers with key', () => {
describe('cache validation', () => {
it.each([
{
name: 'mismatch part count between cached upload and actual upload',
name: 'mismatched part count between cached upload and actual upload',
parts: [{ PartNumber: 1 }, { PartNumber: 2 }, { PartNumber: 3 }],
},
{
Expand Down Expand Up @@ -693,7 +693,7 @@ describe('getMultipartUploadHandlers with key', () => {
expect(Object.keys(cacheValue)).toEqual([
expect.stringMatching(
// \d{13} is the file lastModified property of a file
/someName_\d{13}_o6a\/Qw==_8388608_application\/octet-stream_bucket_public_key/,
new RegExp(`someName_\\d{13}_${defaultCacheKey}`),
),
]);
});
Expand Down

0 comments on commit 14a23f7

Please # to comment.