@cldmv/holdmytask 2.1.0 → 2.1.2

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 CHANGED
@@ -16,18 +16,17 @@ Use it with callbacks or promises, from ESM or CommonJS, with full TypeScript de
16
16
 
17
17
  ## ✨ What's New
18
18
 
19
- ### Latest: v2.1.0 (November 2026)
19
+ ### Latest: v2.1.2 (November 2026)
20
20
 
21
- - **Built with tsup from `src/`, with `./main` deprecated** — the entries now live in `src/index.mjs` / `src/index.cjs` and tsup builds them into `dist/`; `dist/index.cjs` is a thin wrapper over the ESM bundle, not a second copy. The `holdmytask-dev` condition now sits on the package root for both `import` and `require()`, and the development-only `devcheck.mjs` is gone. `@cldmv/holdmytask/main` still works but emits a one-time `DeprecationWarning` (`CLDMV_HOLDMYTASK_MAIN`) and will be removed in the next major; import `@cldmv/holdmytask` instead (#81, #89).
22
- - **Node.js `>=22.22.0` is now required** — up from `>=18.12`. The queue code itself is unchanged, but older Node.js versions are no longer built, tested or supported; stay on v2.0.6 if you can't upgrade.
23
- - [View full v2.1.0 Changelog](https://github.com/CLDMV/holdmytask/blob/master/docs/changelog/v2/v2.1.0.md)
21
+ - **Tooling release, no library changes** — the vitest config now uses `devCondition()` from `@cldmv/configs`, so tests really run against `src/` through the `holdmytask-dev` export condition, and the type scripts are renamed to the fleet names `types:check` and `types:build` ([#99](https://github.com/CLDMV/holdmytask/pull/99), [#101](https://github.com/CLDMV/holdmytask/pull/101)).
22
+ - [View full v2.1.2 Changelog](https://github.com/CLDMV/holdmytask/blob/master/docs/changelog/v2/v2.1.2.md)
24
23
 
25
24
  ### Recent Releases
26
25
 
26
+ - **v2.1.1** (November 2026) — `engines.node` is the runtime floor again (`>=18.12.0`); the 22.22.0 toolchain floor moves to `devEngines` ([Changelog](https://github.com/CLDMV/holdmytask/blob/master/docs/changelog/v2/v2.1.1.md))
27
+ - **v2.1.0** (November 2026) — Built with tsup from `src/` into `dist/`, `@cldmv/holdmytask/main` becomes a deprecated alias of the root, and `engines.node` went to `>=22.22.0` ([Changelog](https://github.com/CLDMV/holdmytask/blob/master/docs/changelog/v2/v2.1.0.md))
27
28
  - **v2.0.6** (October 2026) — Development dependency updates only (`eslint`, `globals`, `@cldmv/vitest-runner`, `@types/node`); the published package is unchanged ([Changelog](https://github.com/CLDMV/holdmytask/blob/master/docs/changelog/v2/v2.0.6.md))
28
29
  - **v2.0.5** (October 2026) — Task-level `postDelay` / `startDelay` honored, failing callback tasks no longer crash the process, and header tooling on fix-headers 2.2.0 ([Changelog](https://github.com/CLDMV/holdmytask/blob/master/docs/changelog/v2/v2.0.5.md))
29
- - **v2.0.4** (October 2026) — Clearer `require()` error on Node.js without `require(esm)`; `brace-expansion` security patch in development tooling ([Changelog](https://github.com/CLDMV/holdmytask/blob/master/docs/changelog/v2/v2.0.4.md))
30
- - **v2.0.3** (October 2026) — Development toolchain moves to vitest 5; bundle-size and v4 workflow updates; verbatim Apache-2.0 license text ([Changelog](https://github.com/CLDMV/holdmytask/blob/master/docs/changelog/v2/v2.0.3.md))
31
30
 
32
31
  📚 **For complete version history and detailed release notes, see the [docs/changelog/](https://github.com/CLDMV/holdmytask/tree/master/docs/changelog/) folder.**
33
32
 
@@ -54,8 +53,9 @@ Use it with callbacks or promises, from ESM or CommonJS, with full TypeScript de
54
53
 
55
54
  ### Requirements
56
55
 
57
- - **Node.js `>=22.22.0`**, as declared in the package's `engines` field
58
- - **CommonJS `require()`** uses the same range. The CommonJS entry is a thin wrapper that loads the ESM build through Node's synchronous `require(esm)`. On older Node.js versions `require("@cldmv/holdmytask")` throws an `ERR_REQUIRE_ESM` error that names the supported versions; load the package with `import()` instead.
56
+ - **Node.js `>=18.12.0`** for `import`, as declared in the package's `engines` field
57
+ - **CommonJS `require()`** needs Node.js `^20.19.0 || >=22.13.0`. The CommonJS entry is a thin wrapper that loads the ESM build through Node's synchronous `require(esm)`. On older Node.js versions `require("@cldmv/holdmytask")` throws an `ERR_REQUIRE_ESM` error that names the supported versions; load the package with `import()` instead.
58
+ - **Development**: developing this package needs Node.js 22.22.0 or later (`devEngines`).
59
59
 
60
60
  ### Install
61
61
 
@@ -130,7 +130,7 @@ import HoldMyTask from "@cldmv/holdmytask";
130
130
  import * as HoldMyTaskLib from "@cldmv/holdmytask";
131
131
  // Uses optimized distribution files
132
132
 
133
- // CommonJS (Node.js >=22.22.0)
133
+ // CommonJS (Node.js ^20.19.0 || >=22.13.0)
134
134
  const HoldMyTask = require("@cldmv/holdmytask"); // the class itself
135
135
  const { HoldMyTask: Named } = require("@cldmv/holdmytask"); // or by name
136
136
  ```
package/dist/index.cjs CHANGED
@@ -7,7 +7,7 @@
7
7
  * @Email: <Shinrai@users.noreply.github.com>
8
8
  * -----
9
9
  * @Last modified by: Nate Corcoran <CLDMV> (Shinrai@users.noreply.github.com)
10
- * @Last modified time: 2026-11-01T13:23:18-08:00 (1793568198)
10
+ * @Last modified time: 2026-11-01T16:28:46-08:00 (1793579326)
11
11
  * -----
12
12
  * @Copyright: Copyright (c) 2013-2026 Catalyzed Motivation Inc. All rights reserved.
13
13
  *
@@ -34,7 +34,7 @@
34
34
  // early with a message that says what to do instead.
35
35
  if (!process.features?.require_module) {
36
36
  const error = new Error(
37
- `@cldmv/holdmytask: require() needs Node.js >=22.22.0 (this is ${process.version}). On older Node.js, load the package with import() instead.`
37
+ `@cldmv/holdmytask: require() needs Node.js ^20.19.0 or >=22.13.0 (this is ${process.version}). On older Node.js, load the package with import() instead.`
38
38
  );
39
39
  error.code = "ERR_REQUIRE_ESM";
40
40
  throw error;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cldmv/holdmytask",
3
- "version": "2.1.0",
3
+ "version": "2.1.2",
4
4
  "description": "A tiny task queue that waits until your task is ready",
5
5
  "main": "./dist/index.cjs",
6
6
  "module": "./dist/index.mjs",
@@ -26,13 +26,20 @@
26
26
  }
27
27
  },
28
28
  "engines": {
29
- "node": ">=22.22.0"
29
+ "node": ">=18.12.0"
30
+ },
31
+ "devEngines": {
32
+ "runtime": {
33
+ "name": "node",
34
+ "version": ">=22.22.0",
35
+ "onFail": "error"
36
+ }
30
37
  },
31
38
  "scripts": {
32
39
  "test": "node tests/run-vitest.mjs && npm run test:cjs",
33
40
  "test:cjs": "npm run build && node --conditions=holdmytask-dev --test tests/cjs/entry.test.cjs",
34
41
  "test:watch": "vitest --config .configs/vitest.config.mjs",
35
- "test:types": "tsc --noEmit --project .configs/tsconfig.dts.jsonc",
42
+ "types:check": "tsc --noEmit --project .configs/tsconfig.dts.jsonc",
36
43
  "coverage": "node tests/run-vitest.mjs --coverage-quiet && npm run test:cjs",
37
44
  "ci:coverage": "npm run coverage",
38
45
  "lint": "eslint --config .configs/eslint.config.mjs .",
@@ -40,10 +47,10 @@
40
47
  "format": "prettier --config .configs/.prettierrc --write .",
41
48
  "format:check": "prettier --config .configs/.prettierrc --check .",
42
49
  "build": "node -e \"require('node:fs').rmSync('dist', { recursive: true, force: true })\" && tsup",
43
- "build:types": "tsc --project .configs/tsconfig.dts.jsonc",
44
- "build:ci": "npm run lint && npm run format:check && npm run build:types && npm run test:types && npm run build",
50
+ "types:build": "tsc --project .configs/tsconfig.dts.jsonc",
51
+ "build:ci": "npm run lint && npm run format:check && npm run types:build && npm run types:check && npm run build",
45
52
  "prepack": "npm run build",
46
- "precommit": "npm run build:types && npm run test:types && npm run lint && npm run test",
53
+ "precommit": "npm run types:build && npm run types:check && npm run lint && npm run test",
47
54
  "fix:headers": "fix-headers --config .configs/fix-headers.json"
48
55
  },
49
56
  "keywords": [
@@ -90,7 +97,7 @@
90
97
  "minimatch": "^11.0.3"
91
98
  },
92
99
  "devDependencies": {
93
- "@cldmv/configs": "^1.3.0",
100
+ "@cldmv/configs": "^1.4.0",
94
101
  "@cldmv/fix-headers": "^2.2.4",
95
102
  "@cldmv/vitest-runner": "^1.5.6",
96
103
  "@eslint/css": "^2.0.1",