Skip to content

Commit 1c9a202

Browse files
committed
convert to pure ESM, require node 18
1 parent 72815a7 commit 1c9a202

File tree

18 files changed

+4120
-154
lines changed

18 files changed

+4120
-154
lines changed

.editorconfig

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,4 +11,3 @@ insert_final_newline = true
1111

1212
[Makefile]
1313
indent_style = tab
14-
indent_size = 2
Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,2 @@
11
root: true
22
extends: silverwind
3-
4-
ignorePatterns:
5-
- /updates

.gitattributes

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
11
* text=auto eol=lf
2+
*.snap linguist-language=JavaScript

.github/workflows/ci.yaml

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -6,15 +6,13 @@ jobs:
66
strategy:
77
fail-fast: false
88
matrix:
9-
os: [macOS-latest, ubuntu-latest, windows-latest]
10-
node: ['10', '12', '13']
9+
node: [18, 20]
10+
os: [ubuntu-latest, macos-latest, windows-latest]
1111

12-
runs-on: ${{ matrix.os }}
12+
runs-on: ${{matrix.os}}
1313
steps:
14-
- uses: actions/checkout@v2
15-
- uses: actions/setup-node@v1
14+
- uses: actions/checkout@v3
15+
- uses: actions/setup-node@v3
1616
with:
17-
node-version: ${{ matrix.node }}
18-
- run: yarn -s
19-
- run: yarn -s test
20-
17+
node-version: ${{matrix.node}}
18+
- run: make lint test

.gitignore

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
/.vscode
22
/node_modules
33
/npm-debug.log*
4-
/package-lock.json
54
/yarn-error.log
65
/yarn.lock

.npmrc

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,5 @@
1-
package-lock=false
1+
audit=false
2+
fund=false
3+
package-lock=true
24
save-exact=true
5+
update-notifier=false

.yarnrc

Lines changed: 0 additions & 1 deletion
This file was deleted.

LICENSE

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

Makefile

Lines changed: 42 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,49 @@
1-
test:
2-
yarn -s run eslint --color .
3-
yarn -s run jest --color
1+
node_modules: package-lock.json
2+
npm install --no-save
3+
@touch node_modules
44

5-
publish:
6-
git push -u --tags origin master
7-
npm publish
5+
.PHONY: deps
6+
deps: node_modules
7+
8+
.PHONY: lint
9+
lint: node_modules
10+
npx eslint --color .
11+
12+
.PHONY: lint-fix
13+
lint-fix: node_modules
14+
npx eslint --color . --fix
815

9-
deps:
10-
rm -rf node_modules
11-
yarn
16+
.PHONY: test
17+
test: node_modules
18+
npx vitest
1219

13-
update:
14-
yarn -s run updates -cu
15-
$(MAKE) deps
20+
.PHONY: test-update
21+
test-update: node_modules
22+
npx vitest --update
23+
24+
.PHONY: publish
25+
publish: node_modules
26+
git push -u --tags origin master
27+
npm publish
1628

17-
patch: test
18-
yarn -s run versions -C patch
19-
$(MAKE) publish
29+
.PHONY: update
30+
update: node_modules
31+
npx updates -cu
32+
rm -rf node_modules package-lock.json
33+
npm install
34+
@touch node_modules
2035

21-
minor: test
22-
yarn -s run versions -C minor
23-
$(MAKE) publish
36+
.PHONY: path
37+
patch: node_modules lint test
38+
npx versions patch package.json package-lock.json
39+
@$(MAKE) --no-print-directory publish
2440

25-
major: test
26-
yarn -s run versions -C major
27-
$(MAKE) publish
41+
.PHONY: minor
42+
minor: node_modules lint test
43+
npx versions minor package.json package-lock.json
44+
@$(MAKE) --no-print-directory publish
2845

29-
.PHONY: test publish deps update patch minor major
46+
.PHONY: major
47+
major: node_modules lint test
48+
npx versions major package.json package-lock.json
49+
@$(MAKE) --no-print-directory publish

README.md

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,14 @@
11
# daemonize-process
2-
[![](https://img.shields.io/npm/v/daemonize-process.svg?style=flat)](https://www.npmjs.org/package/daemonize-process) [![](https://img.shields.io/npm/dm/daemonize-process.svg)](https://www.npmjs.org/package/daemonize-process)
2+
[![](https://img.shields.io/npm/v/daemonize-process.svg?style=flat)](https://www.npmjs.org/package/daemonize-process) [![](https://img.shields.io/npm/dm/daemonize-process.svg)](https://www.npmjs.org/package/daemonize-process) [![](https://packagephobia.com/badge?p=daemonize-process)](https://packagephobia.com/result?p=daemonize-process)
33

44
> Daemonize the current Node.js process
55
66
The module re-spawns the current process and then exits, which will lead to the new child process being adopted by `init` or similar mechanisms, effectively putting the current process into the background.
77

8-
Differences to the popular `daemon` module include:
8+
Differences to the `daemon` module include:
99

1010
- Exposes all options of `child_process.spawn`.
1111
- Cleans up `process.env` after itself.
12-
- Works on Node.js >= 10.
1312

1413
## Install
1514

@@ -20,8 +19,11 @@ $ npm i daemonize-process
2019
## Examples
2120

2221
```js
23-
const daemonizeProcess = require('daemonize-process');
22+
import {daemonizeProcess} from "daemonize-process";
23+
2424
daemonizeProcess();
25+
26+
// below here the process is daemonized
2527
```
2628

2729
## API

0 commit comments

Comments
 (0)