available-parallelism 1.0.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.
- package/README.md +36 -0
- package/dist/cli.d.ts +3 -0
- package/dist/cli.d.ts.map +1 -0
- package/dist/cli.js +4 -0
- package/dist/cli.js.map +1 -0
- package/package.json +42 -0
package/README.md
ADDED
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
# available-parallelism
|
|
2
|
+
|
|
3
|
+
A minimal CLI tool that prints the number of available CPUs for parallelism.
|
|
4
|
+
|
|
5
|
+
## Usage
|
|
6
|
+
|
|
7
|
+
```sh
|
|
8
|
+
npx available-parallelism
|
|
9
|
+
# → 10
|
|
10
|
+
```
|
|
11
|
+
|
|
12
|
+
The output is the result of [`os.availableParallelism()`](https://nodejs.org/api/os.html#osavailableparallelism), which returns the default amount of parallelism a program should use.
|
|
13
|
+
|
|
14
|
+
## Requirements
|
|
15
|
+
|
|
16
|
+
- Node.js ≥ 18.14.0
|
|
17
|
+
|
|
18
|
+
## Releasing
|
|
19
|
+
|
|
20
|
+
Releases are fully automated via [semantic-release](https://semantic-release.gitbook.io). Every push to `main` is analyzed and, if releasable commits are present, a new version is published to npm and a GitHub Release is created automatically.
|
|
21
|
+
|
|
22
|
+
Version bumps are determined by [Conventional Commits](https://www.conventionalcommits.org):
|
|
23
|
+
|
|
24
|
+
| Commit prefix | Release type |
|
|
25
|
+
|---|---|
|
|
26
|
+
| `fix: ...` | Patch (`1.0.0` → `1.0.1`) |
|
|
27
|
+
| `feat: ...` | Minor (`1.0.0` → `1.1.0`) |
|
|
28
|
+
| `BREAKING CHANGE:` in footer | Major (`1.0.0` → `2.0.0`) |
|
|
29
|
+
| `chore:`, `docs:`, `style:`, etc. | No release |
|
|
30
|
+
|
|
31
|
+
> **Prerequisite:** Add your npm Automation token as a repository secret named `NPM_TOKEN`
|
|
32
|
+
> (Settings → Secrets and variables → Actions → New repository secret)
|
|
33
|
+
|
|
34
|
+
## License
|
|
35
|
+
|
|
36
|
+
MIT
|
package/dist/cli.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cli.d.ts","sourceRoot":"","sources":["../src/cli.ts"],"names":[],"mappings":""}
|
package/dist/cli.js
ADDED
package/dist/cli.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cli.js","sourceRoot":"","sources":["../src/cli.ts"],"names":[],"mappings":";AACA,OAAO,EAAE,oBAAoB,EAAE,MAAM,SAAS,CAAC;AAE/C,OAAO,CAAC,GAAG,CAAC,oBAAoB,EAAE,CAAC,CAAC"}
|
package/package.json
ADDED
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "available-parallelism",
|
|
3
|
+
"version": "1.0.0",
|
|
4
|
+
"description": "CLI tool that prints the number of available CPUs for parallelism",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"bin": {
|
|
7
|
+
"available-parallelism": "dist/cli.js"
|
|
8
|
+
},
|
|
9
|
+
"files": [
|
|
10
|
+
"dist"
|
|
11
|
+
],
|
|
12
|
+
"scripts": {
|
|
13
|
+
"build": "tsc"
|
|
14
|
+
},
|
|
15
|
+
"engines": {
|
|
16
|
+
"node": ">=18.14.0"
|
|
17
|
+
},
|
|
18
|
+
"keywords": [
|
|
19
|
+
"parallelism",
|
|
20
|
+
"cpu",
|
|
21
|
+
"cli"
|
|
22
|
+
],
|
|
23
|
+
"license": "MIT",
|
|
24
|
+
"release": {
|
|
25
|
+
"branches": ["main"],
|
|
26
|
+
"plugins": [
|
|
27
|
+
"@semantic-release/commit-analyzer",
|
|
28
|
+
"@semantic-release/release-notes-generator",
|
|
29
|
+
"@semantic-release/npm",
|
|
30
|
+
"@semantic-release/github"
|
|
31
|
+
]
|
|
32
|
+
},
|
|
33
|
+
"devDependencies": {
|
|
34
|
+
"@semantic-release/commit-analyzer": "13.0.1",
|
|
35
|
+
"@semantic-release/github": "12.0.6",
|
|
36
|
+
"@semantic-release/npm": "13.1.5",
|
|
37
|
+
"@semantic-release/release-notes-generator": "14.1.0",
|
|
38
|
+
"@types/node": "24.12.0",
|
|
39
|
+
"semantic-release": "25.0.3",
|
|
40
|
+
"typescript": "5.9.3"
|
|
41
|
+
}
|
|
42
|
+
}
|