From 5251108ba24e0cc15fbe9cc228f4826c37fb5671 Mon Sep 17 00:00:00 2001 From: Sinh Noun Date: Wed, 15 Apr 2020 20:18:55 +0700 Subject: [PATCH 1/3] upgrade size-limit and gzip --- package.json | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index 174d4cb7c..68cf2b61f 100644 --- a/package.json +++ b/package.json @@ -71,6 +71,9 @@ "@babel/core": "^7.0.0-beta.44", "@babel/node": "^7.0.0-beta.44", "@babel/preset-env": "^7.0.0-beta.44", + "@size-limit/preset-app": "^4.4.5", + "@size-limit/preset-big-lib": "^4.4.5", + "@size-limit/preset-small-lib": "^4.4.5", "babel-core": "^7.0.0-bridge.0", "babel-jest": "^22.4.3", "babel-plugin-external-helpers": "^6.22.0", @@ -79,7 +82,7 @@ "eslint-config-airbnb-base": "^12.1.0", "eslint-plugin-import": "^2.10.0", "eslint-plugin-jest": "^21.15.0", - "gzip-size-cli": "^2.1.0", + "gzip-size-cli": "^3.0.0", "jasmine-core": "^2.99.1", "jest": "^22.4.3", "karma": "^2.0.2", @@ -93,7 +96,7 @@ "rollup": "^0.57.1", "rollup-plugin-babel": "^4.0.0-beta.4", "rollup-plugin-uglify": "^3.0.0", - "size-limit": "^0.18.0", + "size-limit": "^4.4.5", "typescript": "^2.8.3" }, "dependencies": {} From 3420210ca84eb8dcc7b7eaf0bec927b2308fb634 Mon Sep 17 00:00:00 2001 From: Sinh Noun Date: Wed, 15 Apr 2020 20:22:18 +0700 Subject: [PATCH 2/3] upgrade typescript --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 68cf2b61f..5602c2c5a 100644 --- a/package.json +++ b/package.json @@ -97,7 +97,7 @@ "rollup-plugin-babel": "^4.0.0-beta.4", "rollup-plugin-uglify": "^3.0.0", "size-limit": "^4.4.5", - "typescript": "^2.8.3" + "typescript": "^3.8.3" }, "dependencies": {} } From 8276f26ab2c95565c970c39d481cd056161a8626 Mon Sep 17 00:00:00 2001 From: Sinh Noun Date: Wed, 15 Apr 2020 20:37:08 +0700 Subject: [PATCH 3/3] upgrade babel and jest --- package.json | 14 +++++++------- test/display.test.js | 2 +- test/parse.test.js | 4 ++-- 3 files changed, 10 insertions(+), 10 deletions(-) diff --git a/package.json b/package.json index 5602c2c5a..cb7cc6b65 100644 --- a/package.json +++ b/package.json @@ -67,15 +67,15 @@ "url": "https://github.com/iamkun/dayjs.git" }, "devDependencies": { - "@babel/cli": "^7.0.0-beta.44", - "@babel/core": "^7.0.0-beta.44", - "@babel/node": "^7.0.0-beta.44", - "@babel/preset-env": "^7.0.0-beta.44", + "@babel/cli": "^7.8.4", + "@babel/core": "^7.9.0", + "@babel/node": "^7.8.7", + "@babel/preset-env": "^7.9.5", "@size-limit/preset-app": "^4.4.5", "@size-limit/preset-big-lib": "^4.4.5", "@size-limit/preset-small-lib": "^4.4.5", - "babel-core": "^7.0.0-bridge.0", - "babel-jest": "^22.4.3", + "babel-core": "^6.26.3", + "babel-jest": "^25.3.0", "babel-plugin-external-helpers": "^6.22.0", "cross-env": "^5.1.6", "eslint": "^4.19.1", @@ -84,7 +84,7 @@ "eslint-plugin-jest": "^21.15.0", "gzip-size-cli": "^3.0.0", "jasmine-core": "^2.99.1", - "jest": "^22.4.3", + "jest": "^25.3.0", "karma": "^2.0.2", "karma-jasmine": "^1.1.2", "karma-sauce-launcher": "^1.1.0", diff --git a/test/display.test.js b/test/display.test.js index 42975c3cb..52dab4eea 100644 --- a/test/display.test.js +++ b/test/display.test.js @@ -248,7 +248,7 @@ it('As Javascript Date -> toDate', () => { it('As JSON -> toJSON', () => { expect(dayjs().toJSON()).toBe(moment().toJSON()) - global.console.warn = jest.genMockFunction()// moment.js otherString will throw warn + global.console.warn = jest.fn()// moment.js otherString will throw warn expect(dayjs('otherString').toJSON()).toBe(moment('otherString').toJSON()) expect(dayjs('otherString').toJSON()).toBe(null) }) diff --git a/test/parse.test.js b/test/parse.test.js index e84a24417..6f96b77a1 100644 --- a/test/parse.test.js +++ b/test/parse.test.js @@ -16,7 +16,7 @@ describe('Parse', () => { }) it('moment-js like formatted dates', () => { - global.console.warn = jest.genMockFunction()// moment.js '2018-4-1 1:1:1:22' will throw warn + global.console.warn = jest.fn()// moment.js '2018-4-1 1:1:1:22' will throw warn let d = '20130108' expect(dayjs(d).valueOf()).toBe(moment(d).valueOf()) d = '2018-04-24' @@ -81,7 +81,7 @@ describe('Parse', () => { }) it('String Other, Null and isValid', () => { - global.console.warn = jest.genMockFunction()// moment.js otherString will throw warn + global.console.warn = jest.fn()// moment.js otherString will throw warn expect(dayjs('otherString').toString().toLowerCase()).toBe(moment('otherString').toString().toLowerCase()) expect(dayjs().isValid()).toBe(true) expect(dayjs('').isValid()).toBe(false)