@enormora/wall-clock 0.0.1 → 0.0.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 +52 -8
- package/package.json +1 -1
- package/sbom.cdx.json +5 -5
package/README.md
CHANGED
|
@@ -95,7 +95,7 @@ The deterministic clock implements the same `WallClock` interface and adds:
|
|
|
95
95
|
The deterministic clock runs scheduled callbacks when time is advanced far enough.
|
|
96
96
|
|
|
97
97
|
```ts
|
|
98
|
-
import
|
|
98
|
+
import assert from 'node:assert';
|
|
99
99
|
import { createDeterministicWallClock } from '@enormora/wall-clock/deterministic-wall-clock';
|
|
100
100
|
|
|
101
101
|
const wallClock = createDeterministicWallClock();
|
|
@@ -110,16 +110,16 @@ wallClock.setTimeout(
|
|
|
110
110
|
);
|
|
111
111
|
|
|
112
112
|
wallClock.advanceByMilliseconds(99);
|
|
113
|
-
|
|
113
|
+
assert.deepStrictEqual(calls, []);
|
|
114
114
|
|
|
115
115
|
wallClock.advanceByMilliseconds(1);
|
|
116
|
-
|
|
116
|
+
assert.deepStrictEqual(calls, ['done']);
|
|
117
117
|
```
|
|
118
118
|
|
|
119
119
|
Intervals run once for each elapsed interval.
|
|
120
120
|
|
|
121
121
|
```ts
|
|
122
|
-
import
|
|
122
|
+
import assert from 'node:assert';
|
|
123
123
|
import { createDeterministicWallClock } from '@enormora/wall-clock/deterministic-wall-clock';
|
|
124
124
|
|
|
125
125
|
const wallClock = createDeterministicWallClock();
|
|
@@ -130,11 +130,11 @@ const intervalIdentifier = wallClock.setInterval(() => {
|
|
|
130
130
|
}, 100);
|
|
131
131
|
|
|
132
132
|
wallClock.advanceByMilliseconds(250);
|
|
133
|
-
|
|
133
|
+
assert.strictEqual(count, 2);
|
|
134
134
|
|
|
135
135
|
wallClock.clearInterval(intervalIdentifier);
|
|
136
136
|
wallClock.advanceByMilliseconds(500);
|
|
137
|
-
|
|
137
|
+
assert.strictEqual(count, 2);
|
|
138
138
|
```
|
|
139
139
|
|
|
140
140
|
## Timer behavior
|
|
@@ -230,13 +230,57 @@ just packtory-dry-run
|
|
|
230
230
|
|
|
231
231
|
## Publishing
|
|
232
232
|
|
|
233
|
-
The package is
|
|
233
|
+
The package is released through the manual GitHub Actions `Release` workflow. Packtory owns the release flow: it
|
|
234
|
+
generates `CHANGELOG.md`, commits it to `main`, publishes to npm, pushes the package tag, and creates the GitHub Release.
|
|
235
|
+
|
|
236
|
+
Pull requests that should appear in the changelog need exactly one changelog label. Supported labels:
|
|
237
|
+
|
|
238
|
+
- `breaking`
|
|
239
|
+
- `bug`
|
|
240
|
+
- `feature`
|
|
241
|
+
- `enhancement`
|
|
242
|
+
- `documentation`
|
|
243
|
+
- `upgrade`
|
|
244
|
+
- `refactor`
|
|
245
|
+
- `build`
|
|
246
|
+
|
|
247
|
+
To release, go to GitHub Actions -> Release -> Run workflow.
|
|
248
|
+
|
|
249
|
+
The dry-run command validates the package shape without publishing.
|
|
234
250
|
|
|
235
251
|
```sh
|
|
236
252
|
just packtory-dry-run
|
|
237
253
|
```
|
|
238
254
|
|
|
239
|
-
|
|
255
|
+
Inspect the next release plan:
|
|
256
|
+
|
|
257
|
+
```sh
|
|
258
|
+
just release-plan
|
|
259
|
+
```
|
|
260
|
+
|
|
261
|
+
Show what would change compared to the latest published package:
|
|
262
|
+
|
|
263
|
+
```sh
|
|
264
|
+
just release-diff
|
|
265
|
+
```
|
|
266
|
+
|
|
267
|
+
Generate or update the configured changelog output:
|
|
268
|
+
|
|
269
|
+
```sh
|
|
270
|
+
just changelog
|
|
271
|
+
```
|
|
272
|
+
|
|
273
|
+
Prepare a changelog commit:
|
|
274
|
+
|
|
275
|
+
```sh
|
|
276
|
+
just prepare-release
|
|
277
|
+
```
|
|
278
|
+
|
|
279
|
+
Publish, tag, push tags, and create GitHub Releases:
|
|
280
|
+
|
|
281
|
+
```sh
|
|
282
|
+
just publish-release
|
|
283
|
+
```
|
|
240
284
|
|
|
241
285
|
## License
|
|
242
286
|
|
package/package.json
CHANGED
package/sbom.cdx.json
CHANGED
|
@@ -9,22 +9,22 @@
|
|
|
9
9
|
{
|
|
10
10
|
"type": "application",
|
|
11
11
|
"name": "packtory",
|
|
12
|
-
"version": "0.0.
|
|
12
|
+
"version": "0.0.46"
|
|
13
13
|
}
|
|
14
14
|
]
|
|
15
15
|
},
|
|
16
16
|
"component": {
|
|
17
17
|
"type": "library",
|
|
18
18
|
"name": "@enormora/wall-clock",
|
|
19
|
-
"version": "0.0.
|
|
20
|
-
"bom-ref": "pkg:npm/@enormora/wall-clock@0.0.
|
|
21
|
-
"purl": "pkg:npm/@enormora/wall-clock@0.0.
|
|
19
|
+
"version": "0.0.2",
|
|
20
|
+
"bom-ref": "pkg:npm/@enormora/wall-clock@0.0.2",
|
|
21
|
+
"purl": "pkg:npm/@enormora/wall-clock@0.0.2"
|
|
22
22
|
}
|
|
23
23
|
},
|
|
24
24
|
"components": [],
|
|
25
25
|
"dependencies": [
|
|
26
26
|
{
|
|
27
|
-
"ref": "pkg:npm/@enormora/wall-clock@0.0.
|
|
27
|
+
"ref": "pkg:npm/@enormora/wall-clock@0.0.2"
|
|
28
28
|
}
|
|
29
29
|
]
|
|
30
30
|
}
|