From 69040ec85dac5934615847a58024d94ecc44a6ef Mon Sep 17 00:00:00 2001 From: MDLeom <43627182+curbengh@users.noreply.github.com> Date: Fri, 24 Jul 2020 10:39:28 +0100 Subject: [PATCH 1/5] chore: drop Node 8 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 97a0535..542f7c7 100644 --- a/package.json +++ b/package.json @@ -11,7 +11,7 @@ "index.js" ], "engines": { - "node": ">= 8.6.0" + "node": ">= 10.13.0" }, "scripts": { "eslint": "eslint .", From 4709afaa937e2f5ac46590a8473b3dde6f609508 Mon Sep 17 00:00:00 2001 From: MDLeom <43627182+curbengh@users.noreply.github.com> Date: Fri, 24 Jul 2020 10:41:40 +0100 Subject: [PATCH 2/5] chore(deps-dev): update eslint from 6.2.2 to 7.5.0 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 542f7c7..9d50f87 100644 --- a/package.json +++ b/package.json @@ -33,7 +33,7 @@ "homepage": "https://github.com/hexojs/hexo-filter-nofollow#readme", "devDependencies": { "chai": "^4.2.0", - "eslint": "^6.2.2", + "eslint": "^7.5.0", "eslint-config-hexo": "^3.0.0", "hexo": "hexojs/hexo", "mocha": "^6.2.0" From 9f7bcf417faf65292ee415a63ab342d947fe0eb6 Mon Sep 17 00:00:00 2001 From: MDLeom <43627182+curbengh@users.noreply.github.com> Date: Fri, 24 Jul 2020 10:43:30 +0100 Subject: [PATCH 3/5] chore(deps-dev): update eslint-config-hexo from 3.0.0 to 4.1.0 --- lib/filter.js | 2 +- package.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/filter.js b/lib/filter.js index 5e70272..ba020b9 100755 --- a/lib/filter.js +++ b/lib/filter.js @@ -30,7 +30,7 @@ module.exports = function(data) { config.nofollow.exclude = [exclude]; } - const filterExternal = (data) => { + const filterExternal = data => { return data.replace(//gi, (str, hrefStr, href) => { if (!isExternal(href, config)) return str; diff --git a/package.json b/package.json index 9d50f87..309debc 100644 --- a/package.json +++ b/package.json @@ -34,7 +34,7 @@ "devDependencies": { "chai": "^4.2.0", "eslint": "^7.5.0", - "eslint-config-hexo": "^3.0.0", + "eslint-config-hexo": "^4.1.0", "hexo": "hexojs/hexo", "mocha": "^6.2.0" } From 7d22b3bf161de1c4cdd80a38f7219c9bd21a4570 Mon Sep 17 00:00:00 2001 From: MDLeom <43627182+curbengh@users.noreply.github.com> Date: Fri, 24 Jul 2020 10:46:06 +0100 Subject: [PATCH 4/5] chore(deps-dev): update mocha from 6.2.0 to 8.0.1 --- .mocharc.yml | 7 +++++++ package.json | 2 +- test/mocha.opts | 6 ------ 3 files changed, 8 insertions(+), 7 deletions(-) create mode 100755 .mocharc.yml delete mode 100755 test/mocha.opts diff --git a/.mocharc.yml b/.mocharc.yml new file mode 100755 index 0000000..2a55f11 --- /dev/null +++ b/.mocharc.yml @@ -0,0 +1,7 @@ +color: true +reporter: spec +ui: bdd +full-trace: true +exit: true +require: + - "chai/register-should" diff --git a/package.json b/package.json index 309debc..01213a4 100644 --- a/package.json +++ b/package.json @@ -36,6 +36,6 @@ "eslint": "^7.5.0", "eslint-config-hexo": "^4.1.0", "hexo": "hexojs/hexo", - "mocha": "^6.2.0" + "mocha": "^8.0.1" } } diff --git a/test/mocha.opts b/test/mocha.opts deleted file mode 100755 index 78f25f9..0000000 --- a/test/mocha.opts +++ /dev/null @@ -1,6 +0,0 @@ ---colors ---reporter spec ---ui bdd ---full-trace ---exit ---require chai/register-should \ No newline at end of file From f226c57f7f048c7967b8ec18549b71f6aed29b70 Mon Sep 17 00:00:00 2001 From: MDLeom <43627182+curbengh@users.noreply.github.com> Date: Fri, 24 Jul 2020 10:47:55 +0100 Subject: [PATCH 5/5] ci: add GitHub Actions - replace Travis --- .github/workflows/tester.yml | 30 ++++++++++++++++++++++++++++++ .travis.yml | 13 ------------- 2 files changed, 30 insertions(+), 13 deletions(-) create mode 100644 .github/workflows/tester.yml delete mode 100755 .travis.yml diff --git a/.github/workflows/tester.yml b/.github/workflows/tester.yml new file mode 100644 index 0000000..b5a5742 --- /dev/null +++ b/.github/workflows/tester.yml @@ -0,0 +1,30 @@ +name: Tester + +on: [push, pull_request] + +jobs: + tester: + runs-on: ${{ matrix.os }} + strategy: + matrix: + os: [ubuntu-latest, windows-latest, macos-latest] + node-version: ['10.x', '12.x', '14.x'] + fail-fast: false + steps: + - uses: actions/checkout@v2 + - name: Use Node.js ${{ matrix.node-version }} + uses: actions/setup-node@v1 + with: + node-version: ${{ matrix.node-version }} + - name: Cache NPM dependencies + uses: actions/cache@v1 + with: + path: node_modules + key: ${{ runner.os }}-npm-cache + restore-keys: ${{ runner.os }}-npm-cache + - name: Install Dependencies + run: npm install + - name: Test + run: npm run test + env: + CI: true diff --git a/.travis.yml b/.travis.yml deleted file mode 100755 index 07b8c6c..0000000 --- a/.travis.yml +++ /dev/null @@ -1,13 +0,0 @@ -sudo: false -language: node_js -node_js: - - "8" - - "10" - - "node" # latest stable Node.js release - -cache: npm - -script: - - npm install - - npm run eslint - - npm test