From 6bdf008609cc106c21711c75e71eaa1ea752b592 Mon Sep 17 00:00:00 2001 From: Thomas Watson Date: Mon, 30 May 2022 13:31:04 +0200 Subject: [PATCH 1/6] ci: switch from Travis to GitHub Actions (#7) --- .github/workflows/ci.yml | 19 +++++++++++++++++++ .travis.yml | 10 ---------- 2 files changed, 19 insertions(+), 10 deletions(-) create mode 100644 .github/workflows/ci.yml delete mode 100644 .travis.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..2352650 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,19 @@ +name: CI +on: + push: + branches: ['master'] + pull_request: + branches: ['*'] +jobs: + test: + runs-on: ubuntu-latest + strategy: + matrix: + node-version: [18, 17, 16, 14] + steps: + - uses: actions/checkout@v2 + - uses: actions/setup-node@v1 + with: + node-version: ${{ matrix.node-version }} + - run: npm install + - run: npm test diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 44f1164..0000000 --- a/.travis.yml +++ /dev/null @@ -1,10 +0,0 @@ -language: node_js -node_js: -- '9' -- '8' -- '7' -- '6' -- '5' -- '4' -- '0.12' -- '0.10' From 1ab6ab45e11127814001a7f51518b05ea43fe3d8 Mon Sep 17 00:00:00 2001 From: Trent Mick Date: Mon, 30 May 2022 04:31:30 -0700 Subject: [PATCH 2/6] chore: update to selfsigned@2 for vuln updates in node-forge dep (#5) There were some vulnerability updates in node-forge@1.3.0. See https://github.com/jfromaniello/selfsigned/issues/55 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 3162b58..3e7fd90 100644 --- a/package.json +++ b/package.json @@ -32,7 +32,7 @@ }, "homepage": "https://github.com/watson/https-pem#readme", "dependencies": { - "selfsigned": "^1.10.1" + "selfsigned": "^2.0.1" }, "devDependencies": { "standard": "^10.0.2" From 66591065f5a05c603b0252e60edc6136558846e6 Mon Sep 17 00:00:00 2001 From: Thomas Watson Date: Mon, 30 May 2022 13:32:56 +0200 Subject: [PATCH 3/6] chore: bump copyright year --- LICENSE | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/LICENSE b/LICENSE index 4a59c94..7487192 100644 --- a/LICENSE +++ b/LICENSE @@ -1,6 +1,6 @@ The MIT License (MIT) -Copyright (c) 2016-2017 Thomas Watson Steen +Copyright (c) 2016-2022 Thomas Watson Steen Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal From fa3c646aafc980e371eb275a26f8a66e08a95e59 Mon Sep 17 00:00:00 2001 From: Thomas Watson Date: Mon, 30 May 2022 13:34:42 +0200 Subject: [PATCH 4/6] chore: use const/let instead of var --- index.js | 4 ++-- install.js | 8 ++++---- test.js | 10 +++++----- 3 files changed, 11 insertions(+), 11 deletions(-) diff --git a/index.js b/index.js index 04bcc63..8bf44e7 100644 --- a/index.js +++ b/index.js @@ -1,7 +1,7 @@ 'use strict' -var path = require('path') -var fs = require('fs') +const path = require('path') +const fs = require('fs') exports.key = fs.readFileSync(path.join(__dirname, 'key.pem')) exports.cert = fs.readFileSync(path.join(__dirname, 'cert.pem')) diff --git a/install.js b/install.js index d7cc884..b59dae8 100644 --- a/install.js +++ b/install.js @@ -1,10 +1,10 @@ 'use strict' -var fs = require('fs') -var path = require('path') -var selfsigned = require('selfsigned') +const fs = require('fs') +const path = require('path') +const selfsigned = require('selfsigned') -var pems = selfsigned.generate() +const pems = selfsigned.generate() fs.writeFileSync(path.join(__dirname, 'key.pem'), pems.private) fs.writeFileSync(path.join(__dirname, 'cert.pem'), pems.cert) diff --git a/test.js b/test.js index b22e2c6..7e70655 100644 --- a/test.js +++ b/test.js @@ -1,15 +1,15 @@ 'use strict' -var assert = require('assert') -var https = require('https') -var pem = require('./') +const assert = require('assert') +const https = require('https') +const pem = require('./') -var server = https.createServer(pem, function (req, res) { +const server = https.createServer(pem, function (req, res) { res.end('foo') }) server.listen(function () { - var opts = { + const opts = { port: server.address().port, rejectUnauthorized: false } From 2afe8f46253722414b70a5cfe9d9a4072090279f Mon Sep 17 00:00:00 2001 From: Thomas Watson Date: Mon, 30 May 2022 13:35:05 +0200 Subject: [PATCH 5/6] chore: upgrade standard to v17.0.0 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 3e7fd90..d42f8a3 100644 --- a/package.json +++ b/package.json @@ -35,7 +35,7 @@ "selfsigned": "^2.0.1" }, "devDependencies": { - "standard": "^10.0.2" + "standard": "^17.0.0" }, "coordinates": [ 55.7774667, From 3f297dc884a328f9afa83cf94d78aaa0fad7ab2d Mon Sep 17 00:00:00 2001 From: Thomas Watson Date: Mon, 30 May 2022 13:35:25 +0200 Subject: [PATCH 6/6] 3.0.0 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index d42f8a3..bc8b998 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "https-pem", - "version": "2.0.0", + "version": "3.0.0", "description": "Self-signed PEM key and certificate ready for use in your HTTPS server", "main": "index.js", "scripts": {