From 43b7f5412543acdd00ef8ab44cc6be96515a224e Mon Sep 17 00:00:00 2001 From: KhoaHTD Date: Thu, 2 May 2024 22:22:12 +0700 Subject: [PATCH] chore: drop support node version less than 16 --- .github/workflows/build.yml | 10 +++++++++- .gitignore | 4 +++- package.json | 9 ++++++++- yarn.lock | 32 ++++++++++++++++++++++++++++++++ 4 files changed, 52 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 6a6f048..4918853 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -12,7 +12,7 @@ jobs: strategy: matrix: - node: ['10', '12', '14', '16', '18'] + node: ['16', '18', '20'] name: Node ${{ matrix.node }} testing @@ -39,6 +39,14 @@ jobs: - name: Test run: yarn test:cov + - name: Test report with Node ${{ matrix.node }} + uses: dorny/test-reporter@v1 + if: always() + with: + name: Test report with Node ${{ matrix.node }} + path: junit.xml + reporter: jest-junit + - name: Coveralls uses: coverallsapp/github-action@v1.1.2 with: diff --git a/.gitignore b/.gitignore index 87cfa5f..52009c2 100644 --- a/.gitignore +++ b/.gitignore @@ -107,4 +107,6 @@ dist # TernJS port file .tern-port -jest.config.js \ No newline at end of file +jest.config.js + +junit.xml \ No newline at end of file diff --git a/package.json b/package.json index 8e6aaf3..22b13f3 100644 --- a/package.json +++ b/package.json @@ -61,6 +61,7 @@ "fastify-express": "^0.3.3", "husky": "^7.0.2", "jest": "^27.2.2", + "jest-junit": "^16.0.0", "pem": "^1.14.4", "prettier": "^2.4.1", "serve-static": "^1.14.1", @@ -69,11 +70,17 @@ "wrk": "^1.2.1" }, "engines": { - "node": ">= 10.12.0" + "node": ">= 16" }, "husky": { "hooks": { "pre-push": "npm test" } + }, + "jest": { + "reporters": [ + "default", + "jest-junit" + ] } } diff --git a/yarn.lock b/yarn.lock index 840b178..6c197ee 100644 --- a/yarn.lock +++ b/yarn.lock @@ -3314,6 +3314,16 @@ jest-jasmine2@^27.2.2: pretty-format "^27.2.2" throat "^6.0.1" +jest-junit@^16.0.0: + version "16.0.0" + resolved "https://registry.yarnpkg.com/jest-junit/-/jest-junit-16.0.0.tgz#d838e8c561cf9fdd7eb54f63020777eee4136785" + integrity sha512-A94mmw6NfJab4Fg/BlvVOUXzXgF0XIH6EmTgJ5NDPp4xoKq0Kr7sErb+4Xs9nZvu58pJojz5RFGpqnZYJTrRfQ== + dependencies: + mkdirp "^1.0.4" + strip-ansi "^6.0.1" + uuid "^8.3.2" + xml "^1.0.1" + jest-leak-detector@^27.2.2: version "27.2.2" resolved "https://registry.yarnpkg.com/jest-leak-detector/-/jest-leak-detector-27.2.2.tgz#5af54273efcf5114ad406f4448860c2396319e12" @@ -3881,6 +3891,11 @@ minimist@~0.0.1: resolved "https://registry.yarnpkg.com/minimist/-/minimist-0.0.10.tgz#de3f98543dbf96082be48ad1a0c7cda836301dcf" integrity sha1-3j+YVD2/lggr5IrRoMfNqDYwHc8= +mkdirp@^1.0.4: + version "1.0.4" + resolved "https://registry.yarnpkg.com/mkdirp/-/mkdirp-1.0.4.tgz#3eb5ed62622756d79a5f0e2a221dfebad75c2f7e" + integrity sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw== + ms@2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/ms/-/ms-2.0.0.tgz#5608aeadfc00be6c2901df5f9861788de0d597c8" @@ -4832,6 +4847,13 @@ strip-ansi@^6.0.0: dependencies: ansi-regex "^5.0.0" +strip-ansi@^6.0.1: + version "6.0.1" + resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-6.0.1.tgz#9e26c63d30f53443e9489495b2105d37b67a85d9" + integrity sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A== + dependencies: + ansi-regex "^5.0.1" + strip-bom@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/strip-bom/-/strip-bom-3.0.0.tgz#2334c18e9c759f7bdd56fdef7e9ae3d588e68ed3" @@ -5151,6 +5173,11 @@ uuid@^3.3.2: resolved "https://registry.yarnpkg.com/uuid/-/uuid-3.4.0.tgz#b23e4358afa8a202fe7a100af1f5f883f02007ee" integrity sha512-HjSDRw6gZE5JMggctHBcjVak08+KEVhSIiDzFnT9S9aegmp85S/bReBVTb4QTFaRNptJ9kuYaNhnbNEOkbKb/A== +uuid@^8.3.2: + version "8.3.2" + resolved "https://registry.yarnpkg.com/uuid/-/uuid-8.3.2.tgz#80d5b5ced271bb9af6c445f21a1a04c606cefbe2" + integrity sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg== + v8-compile-cache@^2.0.3: version "2.2.0" resolved "https://registry.yarnpkg.com/v8-compile-cache/-/v8-compile-cache-2.2.0.tgz#9471efa3ef9128d2f7c6a7ca39c4dd6b5055b132" @@ -5325,6 +5352,11 @@ xml-name-validator@^3.0.0: resolved "https://registry.yarnpkg.com/xml-name-validator/-/xml-name-validator-3.0.0.tgz#6ae73e06de4d8c6e47f9fb181f78d648ad457c6a" integrity sha512-A5CUptxDsvxKJEU3yO6DuWBSJz/qizqzJKOMIfUJHETbBw/sFaDxgd6fxm1ewUaM0jZ444Fc5vC5ROYurg/4Pw== +xml@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/xml/-/xml-1.0.1.tgz#78ba72020029c5bc87b8a81a3cfcd74b4a2fc1e5" + integrity sha512-huCv9IH9Tcf95zuYCsQraZtWnJvBtLVE0QHMOs8bWyZAFZNDcYjsPq1nEx8jKA9y+Beo9v+7OBPRisQTjinQMw== + xmlchars@^2.2.0: version "2.2.0" resolved "https://registry.yarnpkg.com/xmlchars/-/xmlchars-2.2.0.tgz#060fe1bcb7f9c76fe2a17db86a9bc3ab894210cb"