From a6c782471014d71c6e710aa74c33c3a3d59dac2a Mon Sep 17 00:00:00 2001 From: Paul Verest Date: Mon, 2 Aug 2021 16:54:49 +0800 Subject: [PATCH 1/5] browserslist updating warning: remove empty line and make 3 lines (every line clearly belonging to browserslist), 2nd, 3rd with " " double spaceindent. --- node.js | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/node.js b/node.js index ffb55fda..0a89d92c 100644 --- a/node.js +++ b/node.js @@ -375,10 +375,8 @@ module.exports = { if (latest !== 0 && latest < halfYearAgo) { console.warn( 'Browserslist: caniuse-lite is outdated. Please run:\n' + - 'npx browserslist@latest --update-db\n' + - '\n' + - 'Why you should do it regularly:\n' + - 'https://github.com/browserslist/browserslist#browsers-data-updating' + ' npx browserslist@latest --update-db\n' + + ' Why you should do it regularly: https://github.com/browserslist/browserslist#browsers-data-updating' ) } }, From 04278bac2d82f00f192951a614fc5e4dd7a5072a Mon Sep 17 00:00:00 2001 From: Paul Verest Date: Mon, 2 Aug 2021 17:02:41 +0800 Subject: [PATCH 2/5] browserslist updating warning: remove empty line (release.test.ts) --- test/release.test.ts | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/test/release.test.ts b/test/release.test.ts index e7e9acd1..a3943c0e 100644 --- a/test/release.test.ts +++ b/test/release.test.ts @@ -111,10 +111,8 @@ it('shows warning', () => { browserslist('last 2 versions') expect(console.warn).toHaveBeenCalledWith( 'Browserslist: caniuse-lite is outdated. Please run:\n' + - 'npx browserslist@latest --update-db\n' + - '\n' + - 'Why you should do it regularly:\n' + - 'https://github.com/browserslist/browserslist#browsers-data-updating' + ' npx browserslist@latest --update-db\n' + + ' Why you should do it regularly: https://github.com/browserslist/browserslist#browsers-data-updating' ) }) From 580f2b3c27e7dabaf9ca4f1bf4e5cd88128bfc99 Mon Sep 17 00:00:00 2001 From: Paul Verest Date: Tue, 3 Aug 2021 10:02:06 +0800 Subject: [PATCH 3/5] comply with lint 80 max --- node.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/node.js b/node.js index 0a89d92c..f4c8559c 100644 --- a/node.js +++ b/node.js @@ -376,7 +376,8 @@ module.exports = { console.warn( 'Browserslist: caniuse-lite is outdated. Please run:\n' + ' npx browserslist@latest --update-db\n' + - ' Why you should do it regularly: https://github.com/browserslist/browserslist#browsers-data-updating' + ' Why you should do it regularly:' + + 'https://github.com/browserslist/browserslist#browsers-data-updating' ) } }, From c2b6e5f20b9f5a504a0b6511c865e86eaf90b84a Mon Sep 17 00:00:00 2001 From: Paul Verest Date: Tue, 3 Aug 2021 10:03:46 +0800 Subject: [PATCH 4/5] spacing --- node.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/node.js b/node.js index f4c8559c..38ed1cae 100644 --- a/node.js +++ b/node.js @@ -376,7 +376,7 @@ module.exports = { console.warn( 'Browserslist: caniuse-lite is outdated. Please run:\n' + ' npx browserslist@latest --update-db\n' + - ' Why you should do it regularly:' + + ' Why you should do it regularly: ' + 'https://github.com/browserslist/browserslist#browsers-data-updating' ) } From 0133894e3ca0f2f19e4744261145d3575a4f2dda Mon Sep 17 00:00:00 2001 From: Paul Verest Date: Tue, 3 Aug 2021 10:04:28 +0800 Subject: [PATCH 5/5] comply with lint 80 max --- test/release.test.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/test/release.test.ts b/test/release.test.ts index a3943c0e..af0e806e 100644 --- a/test/release.test.ts +++ b/test/release.test.ts @@ -112,7 +112,8 @@ it('shows warning', () => { expect(console.warn).toHaveBeenCalledWith( 'Browserslist: caniuse-lite is outdated. Please run:\n' + ' npx browserslist@latest --update-db\n' + - ' Why you should do it regularly: https://github.com/browserslist/browserslist#browsers-data-updating' + ' Why you should do it regularly: ' + + 'https://github.com/browserslist/browserslist#browsers-data-updating' ) })