Skip to content

Commit 40f8149

Browse files
committed
require node 10, modernize
1 parent 0fe499d commit 40f8149

File tree

12 files changed

+110
-59
lines changed

12 files changed

+110
-59
lines changed

.eslintrc

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
11
root: true
2+
extends: silverwind
23

3-
extends: eslint-config-silverwind
4+
ignorePatterns:
5+
- /updates

.gitattributes

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
* text=auto eol=lf

.github/workflows/ci.yaml

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
name: ci
2+
on: [push, pull_request]
3+
4+
jobs:
5+
test:
6+
strategy:
7+
fail-fast: false
8+
matrix:
9+
os: [macOS-latest, ubuntu-latest, windows-latest]
10+
node: ['10', '12', '13']
11+
12+
runs-on: ${{ matrix.os }}
13+
steps:
14+
- uses: actions/checkout@v2
15+
- uses: actions/setup-node@v1
16+
with:
17+
node-version: ${{ matrix.node }}
18+
- run: yarn -s
19+
- run: yarn -s test
20+

.gitignore

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
node_modules
2-
npm-debug.log*
3-
yarn-error.log
4-
yarn.lock
5-
package-lock.json
6-
.vscode/
1+
/.vscode
2+
/node_modules
3+
/npm-debug.log*
4+
/package-lock.json
5+
/yarn-error.log
6+
/yarn.lock

.npmrc

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
package-lock=false
2+
save-exact=true

.travis.yml

Lines changed: 0 additions & 3 deletions
This file was deleted.

.yarnrc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
--install.no-lockfile true

Makefile

Lines changed: 16 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,33 +1,29 @@
1-
.PHONY: test
21
test:
3-
npx eslint --color --quiet *.js
4-
node --pending-deprecation --trace-deprecation --throw-deprecation --trace-warnings test.js
2+
yarn -s run eslint --color .
3+
yarn -s run jest --color
54

6-
.PHONY: publish
75
publish:
86
git push -u --tags origin master
97
npm publish
108

11-
.PHONY: update
12-
update:
13-
npx updates -u
9+
deps:
1410
rm -rf node_modules
15-
npm i
11+
yarn
12+
13+
update:
14+
yarn -s run updates -cu
15+
$(MAKE) deps
1616

17-
.PHONY: patch
18-
patch:
19-
$(MAKE) test
20-
npx ver patch
17+
patch: test
18+
yarn -s run versions -C patch
2119
$(MAKE) publish
2220

23-
.PHONY: minor
24-
minor:
25-
$(MAKE) test
26-
npx ver minor
21+
minor: test
22+
yarn -s run versions -C minor
2723
$(MAKE) publish
2824

29-
.PHONY: major
30-
major:
31-
$(MAKE) test
32-
npx ver major
25+
major: test
26+
yarn -s run versions -C major
3327
$(MAKE) publish
28+
29+
.PHONY: test publish deps update patch minor major

fixtures/child.js

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
"use strict";
2+
3+
const daemonizeProcess = require("."); // eslint-disable-line
4+
const {join} = require("path");
5+
const {writeFileSync} = require("fs");
6+
7+
daemonizeProcess();
8+
const output = [String(process.ppid), "_DAEMONIZE_PROCESS" in process.env].join(",");
9+
writeFileSync(join(__dirname, "test-output"), output);

package.json

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,12 @@
55
"author": "silverwind <[email protected]>",
66
"repository": "silverwind/daemonize-process",
77
"license": "BSD-2-Clause",
8+
"main": "index.js",
89
"scripts": {
910
"test": "make test"
1011
},
1112
"engines": {
12-
"node": ">=6"
13+
"node": ">=10"
1314
},
1415
"files": [
1516
"index.js"
@@ -21,9 +22,16 @@
2122
"process"
2223
],
2324
"devDependencies": {
24-
"eslint": "^5.12.1",
25-
"eslint-config-silverwind": "^2.0.14",
26-
"updates": "^6.2.1",
27-
"ver": "^3.0.1"
25+
"del": "5.1.0",
26+
"eslint": "6.8.0",
27+
"eslint-config-silverwind": "10.0.1",
28+
"jest": "25.1.0",
29+
"tempy": "0.5.0",
30+
"updates": "10.2.3",
31+
"versions": "8.2.5"
32+
},
33+
"jest": {
34+
"verbose": false,
35+
"testTimeout": 10000
2836
}
2937
}

0 commit comments

Comments
 (0)