Skip to content

Commit

Permalink
chore(release): 6.22.0 (#1343)
Browse files Browse the repository at this point in the history
* chore(release): 6.22.0

* chore: 6.22.0

* chore: modify package-lock.json

* chore: remove only

* chore: add case sleep time

* chore: increase the timeout period

---------

Co-authored-by: zhengzuoyu.zzy <[email protected]>
  • Loading branch information
YunZZY and zhengzuoyu.zzy authored Dec 2, 2024
1 parent ca8c027 commit ac7c817
Show file tree
Hide file tree
Showing 5 changed files with 35 additions and 1 deletion.
12 changes: 12 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,18 @@

All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.

## [6.22.0](https://github.com/ali-sdk/ali-oss/compare/v6.21.0...v6.22.0) (2024-11-29)

### Features

* list object functions support return restore info ([#1339](https://github.com/ali-sdk/ali-oss/issues/1339)) ([986b743](https://github.com/ali-sdk/ali-oss/commit/986b7432f06b216eea24ae0f7b437aaf8786a3d4))
* support restore Deep Cold Archive object ([#1337](https://github.com/ali-sdk/ali-oss/issues/1337)) ([ac500d3](https://github.com/ali-sdk/ali-oss/commit/ac500d3d87a911ec359d9ba781006034a78c1db2))
* support PostObject policy V4 signature and restore archive object with setting of days ([#1340](https://github.com/ali-sdk/ali-oss/issues/1340)) ([ca8c027](https://github.com/ali-sdk/ali-oss/commit/ca8c027264a875e56f2740fa88b45dd562c2b809))

### Bug Fixes

* fix requestError return null and signatureUrlV4 run in Node 8.x ([#1338](https://github.com/ali-sdk/ali-oss/issues/1338)) ([439ffde](https://github.com/ali-sdk/ali-oss/commit/439ffded0bf9f8b9e73bed9a917d5265b80e8286))

## [6.21.0](https://github.com/ali-sdk/ali-oss/compare/v6.20.0...v6.21.0) (2024-08-16)

### Features
Expand Down
2 changes: 1 addition & 1 deletion karma.conf.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ module.exports = function (config) {
concurrency: 1,
client: {
mocha: {
timeout: 10000
timeout: 15000
}
}
});
Expand Down
10 changes: 10 additions & 0 deletions test/browser/browser.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ const { Readable } = require('stream');
const { prefix } = require('./browser-utils');
const { getCredential } = require('../../lib/common/signUtils');
const { getStandardRegion } = require('../../lib/common/utils/getStandardRegion');
const { parseRestoreInfo } = require('../../lib/common/utils/parseRestoreInfo');
const { policy2Str } = require('../../lib/common/utils/policy2Str');

let ossConfig;
Expand Down Expand Up @@ -533,6 +534,15 @@ describe('browser', () => {

await client.delete(testFile);
});

it('should parse restore info correctly with expiry date', () => {
const date = new Date();
const restoreInfoStr = `ongoing-request="false", expiry-date="${date.toUTCString()}"`;
const restoreInfo = parseRestoreInfo(restoreInfoStr);

assert.strictEqual(restoreInfo.ongoingRequest, false);
assert.strictEqual(restoreInfo.expiryDate.toUTCString(), date.toUTCString());
});
});

describe('listV2()', () => {
Expand Down
2 changes: 2 additions & 0 deletions test/node/multipart.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -1017,6 +1017,8 @@ describe('test/multipart.test.js', () => {
assert(e.message.includes('mock upload part fail.'));
}

await utils.sleep(3000);

mm.restore();

await Promise.all([store.multipartUpload(name, fileName), store.multipartUpload(name1, fileName)]);
Expand Down
10 changes: 10 additions & 0 deletions test/node/object.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ const FormData = require('form-data');
const dateFormat = require('dateformat');
const { getCredential } = require('../../lib/common/signUtils');
const { getStandardRegion } = require('../../lib/common/utils/getStandardRegion');
const { parseRestoreInfo } = require('../../lib/common/utils/parseRestoreInfo');
const { policy2Str } = require('../../lib/common/utils/policy2Str');

const tmpdir = path.join(__dirname, '.tmp');
Expand Down Expand Up @@ -2104,6 +2105,15 @@ describe('test/object.test.js', () => {
assert.strictEqual(listResult.objects[0].restoreInfo.ongoingRequest, true);
assert.strictEqual(listResult.objects[0].restoreInfo.expiryDate, undefined);
});

it('should parse restore info correctly with expiry date', () => {
const date = new Date();
const restoreInfoStr = `ongoing-request="false", expiry-date="${date.toUTCString()}"`;
const restoreInfo = parseRestoreInfo(restoreInfoStr);

assert.strictEqual(restoreInfo.ongoingRequest, false);
assert.strictEqual(restoreInfo.expiryDate.toUTCString(), date.toUTCString());
});
});

describe('listV2()', () => {
Expand Down

0 comments on commit ac7c817

Please sign in to comment.