From ac7c8172b0cbdd5fe38e6442e34eeedcb6f5b1b0 Mon Sep 17 00:00:00 2001 From: YunZZY <1263206327@qq.com> Date: Mon, 2 Dec 2024 11:13:11 +0800 Subject: [PATCH] chore(release): 6.22.0 (#1343) * 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 --- CHANGELOG.md | 12 ++++++++++++ karma.conf.js | 2 +- test/browser/browser.test.js | 10 ++++++++++ test/node/multipart.test.js | 2 ++ test/node/object.test.js | 10 ++++++++++ 5 files changed, 35 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 7397e5b9..a7048b53 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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 diff --git a/karma.conf.js b/karma.conf.js index 92c43328..758abc63 100644 --- a/karma.conf.js +++ b/karma.conf.js @@ -34,7 +34,7 @@ module.exports = function (config) { concurrency: 1, client: { mocha: { - timeout: 10000 + timeout: 15000 } } }); diff --git a/test/browser/browser.test.js b/test/browser/browser.test.js index 86e6b69d..a8655f1e 100644 --- a/test/browser/browser.test.js +++ b/test/browser/browser.test.js @@ -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; @@ -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()', () => { diff --git a/test/node/multipart.test.js b/test/node/multipart.test.js index 0665359f..eba9909b 100644 --- a/test/node/multipart.test.js +++ b/test/node/multipart.test.js @@ -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)]); diff --git a/test/node/object.test.js b/test/node/object.test.js index 9ae899a5..c1a7039b 100644 --- a/test/node/object.test.js +++ b/test/node/object.test.js @@ -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'); @@ -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()', () => {