node-lifecycle 1.1.0 โ†’ 1.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/README.md +69 -68
  2. package/package.json +10 -3
package/README.md CHANGED
@@ -1,130 +1,131 @@
1
1
  # node-lifecycle
2
2
 
3
- Check the lifecycle status (Current, Active LTS, Maintenance, or EOL) of any Node.js version.
3
+ A lightweight Node.js EOL checker and lifecycle CLI.
4
+
5
+ Check whether your current or specified Node.js version is **Current**, **Active LTS**, **Maintenance**, approaching **end-of-life (EOL)**, or already **EOL**.
6
+
7
+ Use `node-lifecycle` locally or in CI to identify unsupported Node.js versions and get advance warning before a version reaches end-of-life.
4
8
 
5
9
  [![npm version](https://img.shields.io/npm/v/node-lifecycle.svg)](https://www.npmjs.com/package/node-lifecycle)
10
+ [![npm downloads](https://img.shields.io/npm/dm/node-lifecycle.svg)](https://www.npmjs.com/package/node-lifecycle)
11
+ [![CI](https://github.com/ksalguera/node-lifecycle/actions/workflows/ci.yml/badge.svg)](https://github.com/ksalguera/node-lifecycle/actions/workflows/ci.yml)
12
+ [![Socket](https://badge.socket.dev/npm/package/node-lifecycle)](https://socket.dev/npm/package/node-lifecycle)
6
13
  [![license](https://img.shields.io/npm/l/node-lifecycle.svg)](LICENSE)
7
14
 
15
+ ## ๐Ÿ“ฆ Installation
8
16
 
9
- ---
17
+ ### Run without installing
10
18
 
11
- ## ๐Ÿ“ฆ Installation
19
+ For a quick lifecycle check:
12
20
 
13
- ### Option 1: Global install (CLI available anywhere)
21
+ ```bash
22
+ npx node-lifecycle
14
23
  ```
24
+
25
+ ### Global installation
26
+
27
+ Install the CLI globally:
28
+
29
+ ```bash
15
30
  npm install -g node-lifecycle
16
31
  ```
17
32
 
18
- After this, you can run the CLI directly:
33
+ Then run:
19
34
 
20
- ```
35
+ ```bash
21
36
  node-lifecycle
22
37
  ```
23
38
 
24
- ### Option 2: Local install (in your project)
39
+ ### Project installation
25
40
 
26
- ```
41
+ Install `node-lifecycle` as a development dependency:
42
+
43
+ ```bash
27
44
  npm install --save-dev node-lifecycle
28
45
  ```
29
46
 
30
- With a local install, binaries live in `node_modules/.bin`.
47
+ Run it with:
31
48
 
32
- You can run it in one of two ways:
33
-
34
- Use npx (simple):
35
-
36
- ```
49
+ ```bash
37
50
  npx node-lifecycle
38
51
  ```
39
52
 
40
- OR:
53
+ Or add it to your npm scripts:
41
54
 
42
- Add an npm script:
43
- ```
44
- "scripts": {
45
- "check-node": "node-lifecycle"
55
+ ```json
56
+ {
57
+ "scripts": {
58
+ "check-node": "node-lifecycle"
59
+ }
46
60
  }
47
61
  ```
48
62
 
49
63
  Then run:
50
- ```
51
- npm run check-node
52
- ```
53
-
54
- ### Option 3: Run without installing at all
55
64
 
65
+ ```bash
66
+ npm run check-node
56
67
  ```
57
- npx node-lifecycle
58
- ```
59
-
60
- This will fetch the latest version from npm on demand.
61
-
62
- ### Option 4: CircleCI configuration example
63
-
64
- See the [CircleCI configuration example](documentation/circleci-config-example.md).
65
68
 
66
69
  ## ๐Ÿš€ Usage
67
70
 
68
- Check the status of your current Node.js version:
71
+ Check the lifecycle status of your current Node.js version:
69
72
 
70
- ```
73
+ ```bash
71
74
  node-lifecycle
72
75
  ```
73
76
 
74
- Check the status of a specific version:
77
+ Check a specific Node.js version:
75
78
 
79
+ ```bash
80
+ node-lifecycle --version=22.0.0
76
81
  ```
77
- node-lifecycle --version=18.20.4
78
- ```
79
-
80
- ## โš™๏ธ Options
81
-
82
- | Flag | Description |
83
- | ------------------ | --------------------------------------------------------------------------------- |
84
- | `--version=VER` | Check this specific Node.js version instead of your current runtime. |
85
- | `--warn-days=N` | Warn if EOL is within `N` days (default: `180`). |
86
- | `--cache-ttl=SECS` | Cache the Node.js release schedule for `N` seconds (default: `86400` / 24 hours). |
87
- | `--no-fail` | Do not exit with code `2` on EOL (still prints โŒ). |
88
- | `--help` | Show help message. |
89
82
 
90
- ## ๐Ÿ“‹ Examples
83
+ Use a custom EOL warning window:
91
84
 
92
- Check a Node version close to EOL:
93
-
94
- ```
95
- node-lifecycle --version=20.5.0
85
+ ```bash
86
+ node-lifecycle --warn-days=90
96
87
  ```
97
88
 
98
- Use a shorter warning window:
99
-
100
- ```
101
- node-lifecycle --warn-days=30
89
+ ```bash
90
+ node-lifecycle --version=18.20.4 --no-fail
102
91
  ```
103
92
 
104
- Check with no failure on EOL (useful for CI logs):
93
+ ## โš™๏ธ Options
105
94
 
106
- ```
107
- node-lifecycle --version=18.20.4 --no-fail
108
- ```
95
+ | Flag | Description |
96
+ | --- | --- |
97
+ | `--version=VER` | Check a specific Node.js version instead of the current runtime. |
98
+ | `--warn-days=N` | Warn if EOL is within `N` days (default: `180`). |
99
+ | `--cache-ttl=SECS` | Cache the Node.js release schedule for `N` seconds (default: `86400` / 24 hours). |
100
+ | `--no-fail` | Do not exit with code `2` when the version is EOL. |
101
+ | `--help` | Show the help message. |
102
+
103
+ ## ๐Ÿ”„ Exit Codes
109
104
 
110
- ## Exit Codes
105
+ `node-lifecycle` uses exit codes so it can be used in scripts and CI pipelines.
111
106
 
112
- | Code | Meaning |
113
- | ---- | ------------------------------------------ |
114
- | `0` | OK (supported) |
115
- | `1` | Warning (within `warn-days` of EOL) |
116
- | `2` | EOL (unless `--no-fail` is used, then `0`) |
107
+ | Code | Meaning |
108
+ | --- | --- |
109
+ | `0` | Supported, or EOL when `--no-fail` is used |
110
+ | `1` | Warning โ€” version is within `warn-days` of EOL |
111
+ | `2` | Node.js version has reached EOL |
117
112
 
113
+ ## ๐Ÿงช CI Integration
118
114
 
119
- ## ๐Ÿงช CI Integration and GitHub Actions
115
+ `node-lifecycle` can be used in CI to detect unsupported or soon-to-be-unsupported Node.js versions.
120
116
 
121
117
  ### GitHub Actions
122
118
 
123
119
  See the [GitHub Actions configuration example](documentation/github-actions-config-example.md).
124
120
 
121
+ ### CircleCI
122
+
123
+ See the [CircleCI configuration example](documentation/circleci-config-example.md).
125
124
 
126
125
  ## ๐Ÿ“„ License
127
126
 
128
127
  MIT ยฉ 2026 Kelsey Salguera
129
128
 
130
- Note: This tool fetches Node.js release schedules from official sources (nodejs/Release and endoflife.date) and caches them locally for faster performance.
129
+ ---
130
+
131
+ `node-lifecycle` retrieves Node.js release lifecycle information from the Node.js Release schedule and endoflife.date, with local caching for faster subsequent checks.
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "node-lifecycle",
3
- "version": "1.1.0",
4
- "description": "CLI tool to check Node.js version lifecycle and EOL status",
3
+ "version": "1.2.0",
4
+ "description": "Node.js EOL checker and CLI for checking version lifecycle, LTS, maintenance, and end-of-life status",
5
5
  "type": "module",
6
6
  "bin": {
7
7
  "node-lifecycle": "./dist/cli.js"
@@ -18,12 +18,19 @@
18
18
  },
19
19
  "keywords": [
20
20
  "node",
21
+ "nodejs",
22
+ "node.js",
23
+ "node-version",
24
+ "ci",
21
25
  "cli",
22
26
  "lifecycle",
23
27
  "eol",
28
+ "eol-checker",
29
+ "end-of-life",
24
30
  "nodejs",
25
31
  "lts",
26
- "maintenance"
32
+ "maintenance",
33
+ "version-checker"
27
34
  ],
28
35
  "author": "Kelsey Salguera",
29
36
  "license": "MIT",