From 1233d919aa1a863727a38a8a358f862078f66a34 Mon Sep 17 00:00:00 2001 From: Aaron Hinni Date: Tue, 25 Oct 2022 11:04:08 -0500 Subject: [PATCH 1/7] writeFile expects string or buffer not int We needed to convert the pid to a string so we could write to the pid file. --- lib/daemon.js | 3 ++- package.json | 4 ++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/lib/daemon.js b/lib/daemon.js index 0704dc5..e9ba416 100644 --- a/lib/daemon.js +++ b/lib/daemon.js @@ -34,8 +34,9 @@ function startDaemon(argv) { var socket = null; var master = null; var server = null; + - fs.writeFile(pidFile, process.pid, function(){ + fs.writeFile(pidFile, process.pid.toString(), function(){ createLogsAndIpcServer(function(err) { if (err) { processSend({event: 'Error', value: err.message}); diff --git a/package.json b/package.json index 93dc535..d0a4adc 100644 --- a/package.json +++ b/package.json @@ -18,7 +18,7 @@ }, "repository": { "type": "git", - "url": "https://github.com/andrewrk/naught" + "url": "https://github.com/nuso/naught" }, "author": "Andrew Kelley", "license": "MIT", @@ -35,7 +35,7 @@ "pend": "~1.2.0" }, "bugs": { - "url": "https://github.com/andrewrk/naught/issues" + "url": "https://github.com/nuso/naught/issues" }, "directories": { "test": "test" From d2848bbf404209bb0b8678861acdaf4299945c94 Mon Sep 17 00:00:00 2001 From: Aaron Hinni Date: Wed, 26 Oct 2022 08:13:13 -0500 Subject: [PATCH 2/7] Add github package registry --- package.json | 3 +++ 1 file changed, 3 insertions(+) diff --git a/package.json b/package.json index d0a4adc..650cc7e 100644 --- a/package.json +++ b/package.json @@ -10,6 +10,9 @@ "daemon", "daemonize" ], + "publishConfig": { + "registry": "https://npm.pkg.github.com/nuso" + }, "scripts": { "test": "node test/test.js" }, From f946b7f2836da3613f838f7ffe3e6c6187953c98 Mon Sep 17 00:00:00 2001 From: Craig McElroy Date: Wed, 26 Oct 2022 08:13:29 -0500 Subject: [PATCH 3/7] Create npm-publish-github-packages.yml --- .../workflows/npm-publish-github-packages.yml | 36 +++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 .github/workflows/npm-publish-github-packages.yml diff --git a/.github/workflows/npm-publish-github-packages.yml b/.github/workflows/npm-publish-github-packages.yml new file mode 100644 index 0000000..47a37f9 --- /dev/null +++ b/.github/workflows/npm-publish-github-packages.yml @@ -0,0 +1,36 @@ +# This workflow will run tests using node and then publish a package to GitHub Packages when a release is created +# For more information see: https://docs.github.com/en/actions/publishing-packages/publishing-nodejs-packages + +name: Node.js Package + +on: + release: + types: [created] + +jobs: + build: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - uses: actions/setup-node@v3 + with: + node-version: 16 + - run: npm ci + - run: npm test + + publish-gpr: + needs: build + runs-on: ubuntu-latest + permissions: + contents: read + packages: write + steps: + - uses: actions/checkout@v3 + - uses: actions/setup-node@v3 + with: + node-version: 16 + registry-url: https://npm.pkg.github.com/ + - run: npm ci + - run: npm publish + env: + NODE_AUTH_TOKEN: ${{secrets.GITHUB_TOKEN}} From d6b6bd63d6fdf70e5ea64eac4ecfd3379e34e5aa Mon Sep 17 00:00:00 2001 From: Aaron Hinni Date: Wed, 26 Oct 2022 08:14:11 -0500 Subject: [PATCH 4/7] Version 1.6.1 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 650cc7e..8170fd3 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "naught", - "version": "1.6.0", + "version": "1.6.1", "description": "zero downtime deployment for your node.js server", "keywords": [ "deploy", From 1b97ee34b9cf6d1e21342d133ae17a6f1cd38bb9 Mon Sep 17 00:00:00 2001 From: Craig McElroy Date: Wed, 26 Oct 2022 08:17:30 -0500 Subject: [PATCH 5/7] Skip ci and test --- .github/workflows/npm-publish-github-packages.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/npm-publish-github-packages.yml b/.github/workflows/npm-publish-github-packages.yml index 47a37f9..347069e 100644 --- a/.github/workflows/npm-publish-github-packages.yml +++ b/.github/workflows/npm-publish-github-packages.yml @@ -15,8 +15,8 @@ jobs: - uses: actions/setup-node@v3 with: node-version: 16 - - run: npm ci - - run: npm test +# - run: npm ci +# - run: npm test publish-gpr: needs: build @@ -30,7 +30,7 @@ jobs: with: node-version: 16 registry-url: https://npm.pkg.github.com/ - - run: npm ci +# - run: npm ci - run: npm publish env: NODE_AUTH_TOKEN: ${{secrets.GITHUB_TOKEN}} From 9aa077bcf1850aabf720c034fea79526d353ea08 Mon Sep 17 00:00:00 2001 From: Craig McElroy Date: Wed, 26 Oct 2022 08:38:04 -0500 Subject: [PATCH 6/7] Add @nuso/ prefix to package name Per https://github.com/sindresorhus/np/issues/489 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 8170fd3..1d3ffbe 100644 --- a/package.json +++ b/package.json @@ -1,5 +1,5 @@ { - "name": "naught", + "name": "@nuso/naught", "version": "1.6.1", "description": "zero downtime deployment for your node.js server", "keywords": [ From a5bea1f39b3e5f3b9bdb997082a4d99bfb2cdc10 Mon Sep 17 00:00:00 2001 From: Aaron Hinni Date: Wed, 26 Oct 2022 09:19:59 -0500 Subject: [PATCH 7/7] Moved npm repo instead of github We couldn't figure out how to do a public package on github. --- package.json | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/package.json b/package.json index 1d3ffbe..9ae289b 100644 --- a/package.json +++ b/package.json @@ -1,5 +1,5 @@ { - "name": "@nuso/naught", + "name": "@nuso.io/naught", "version": "1.6.1", "description": "zero downtime deployment for your node.js server", "keywords": [ @@ -10,9 +10,6 @@ "daemon", "daemonize" ], - "publishConfig": { - "registry": "https://npm.pkg.github.com/nuso" - }, "scripts": { "test": "node test/test.js" },