From 49297e684855cdb550b42c7b839e0a17c41507c2 Mon Sep 17 00:00:00 2001 From: Shinrai Date: Sun, 4 Oct 2026 20:09:01 -0700 Subject: [PATCH] docs: update the v1.2.5 release notes --- README.md | 1 + docs/changelog/v1/v1.2.5.md | 11 ++++++++--- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 2fe4a8d..8b5050a 100644 --- a/README.md +++ b/README.md @@ -18,6 +18,7 @@ The custom variants (`TA`, `TB`, `IA`) live in the variant `111` namespace, so t - **`require()` works**: the CommonJS entry failed to load in every earlier release, because the ESM entry it wraps used top-level `await`, which Node's synchronous `require(esm)` rejects with `ERR_REQUIRE_ASYNC_MODULE`. The entry no longer uses top-level `await`, so `require("@cldmv/uuid")` now returns the same `UUID` object as `import` on Node.js ^20.19.0 or >=22.12.0, and older versions get a clear error that points to `import()`. ESM behavior and the exported names are unchanged ([#50](https://github.com/CLDMV/uuid/pull/50)). - **Real TypeScript types**: `UUID` used to resolve to `any`. The package and its subpaths now ship accurate declarations, with optional generator options and `toBuffer()` typed as `Buffer` in Node projects and `Uint8Array` in browser and bundler projects ([#55](https://github.com/CLDMV/uuid/pull/55)). The repository also gains its Apache-2.0 `LICENSE` file ([#54](https://github.com/CLDMV/uuid/pull/54)). +- **Dev toolchain**: `@cldmv/fix-headers` 2.2.0 (`@Last modified by` now follows content edits only), `@cldmv/configs` 1.2.4 and a new `@types/node` dev dependency for the type tests, all dev-only; no file headers were restamped ([#55](https://github.com/CLDMV/uuid/pull/55), [#57](https://github.com/CLDMV/uuid/pull/57), [#59](https://github.com/CLDMV/uuid/pull/59)). - [View full v1.2.5 Changelog](https://github.com/CLDMV/uuid/blob/master/docs/changelog/v1/v1.2.5.md) ### Recent Releases diff --git a/docs/changelog/v1/v1.2.5.md b/docs/changelog/v1/v1.2.5.md index 67790ee..13a77a3 100644 --- a/docs/changelog/v1/v1.2.5.md +++ b/docs/changelog/v1/v1.2.5.md @@ -10,7 +10,7 @@ v1.2.5 makes `require("@cldmv/uuid")` work. The CommonJS entry has failed to load in every release up to and including v1.2.4, because the ESM entry it wraps used top-level `await`. This release removes the top-level `await`, so `require()` returns the same `UUID` object that `import` does on any Node.js version with synchronous `require(esm)`, and fails with a clear message on versions without it. -It also gives TypeScript users real types for the first time: `UUID` used to resolve to `any`, and it is now fully typed, with `Buffer` returns in Node projects and `Uint8Array` returns in browser and bundler projects. The repository finally carries the Apache-2.0 `LICENSE` file that `package.json` has always declared. +It also gives TypeScript users real types for the first time: `UUID` used to resolve to `any`, and it is now fully typed, with `Buffer` returns in Node projects and `Uint8Array` returns in browser and bundler projects. The repository finally carries the Apache-2.0 `LICENSE` file that `package.json` has always declared. The dev toolchain moves to `@cldmv/fix-headers` 2.2.0 and `@cldmv/configs` 1.2.4, and `@types/node` is added for the new type tests. ESM consumers see no change in runtime behavior. The exported names (`default`, `UUID`, `uuid`, `ISSUER_CATEGORIES`) and their values are the same as in v1.2.4. @@ -39,7 +39,7 @@ ESM consumers see no change in runtime behavior. The exported names (`default`, - The options argument of `v1`, `v4`, `v6`, `v7` and `v8` is optional and typed (`UUID.v4()` used to be a compile error once the types resolved). Passing `buf` returns that same buffer, typed as whatever you passed in; otherwise the methods return a `string`. - `TA`/`TB` timestamps and `entropy` arguments are optional, and `getRegistry()`'s `IssuerRegistry` type resolves. -- `toBuffer()` returns `Buffer` in Node projects (`module`/`moduleResolution` `node16`/`nodenext` with `@types/node`) and `Uint8Array` in browser and bundler projects, chosen through a private `#bytes-type` import. The package never forces Node's globals into a project: without `@types/node` the type falls back to `Uint8Array`. +- `toBuffer()` returns `Buffer` in Node projects (`module`/`moduleResolution` `node16`/`nodenext` with `@types/node`) and `Uint8Array` in browser and bundler projects, chosen through a private `#bytes-type` import. The package never forces Node's globals into a project: without `@types/node` the type falls back to `Uint8Array`. The two alias declarations behind it live in a new `typings/` folder (`typings/bytes.d.mts` and `typings/bytes-node.d.mts`), which is added to the package's `files` and selected through a new `imports` entry in `package.json`. A new `npm run test:types` check (run by `npm test` and `npm run coverage`) packs the package, installs it into a throwaway consumer and compiles it under `nodenext` and `bundler` resolution, including the README's TypeScript example. @@ -59,7 +59,12 @@ The repository now includes the Apache-2.0 `LICENSE` file ([#54](https://github. ## 🔧 Dependencies -- `@cldmv/fix-headers` (dev dependency) `^2.1.2` → `^2.1.4` ([#57](https://github.com/CLDMV/uuid/pull/57)). Version 2.1.4 no longer writes a JavaScript comment into JSON or Markdown files, processes every repeated `--input`, and never walks dependency folders such as `node_modules`. Only `package.json` and the lockfile changed; no file headers were restamped and the published package is unaffected. +All changes are dev-only and none ships in the package. The package still has no runtime dependencies. + +- `@cldmv/fix-headers` `^2.1.2` → `^2.2.0`, resolved to 2.2.0. The range was first raised to `^2.1.4` ([#57](https://github.com/CLDMV/uuid/pull/57)) and then to `^2.2.0` ([#59](https://github.com/CLDMV/uuid/pull/59)). Version 2.1.4 no longer writes a JavaScript comment into JSON or Markdown files, processes every repeated `--input`, and never walks dependency folders such as `node_modules`. Version 2.2.0 changes `@Last modified by` only when a file's content was edited, so header-only rewrites keep the recorded editor. +- `@cldmv/configs` `^1.2.1` → `^1.2.4`, resolved to 1.2.4. The shared fix-headers config now sets `forceAuthorUpdate` and `forceLastModifiedAuthorUpdate` to false ([#59](https://github.com/CLDMV/uuid/pull/59)). +- `@types/node` `^26.6.4` added (resolved to 26.6.4, with its transitive `undici-types` 8.9.0). The type-check suite uses it to prove that `toBuffer()` returns `Buffer` in a Node project ([#55](https://github.com/CLDMV/uuid/pull/55)). +- No file headers were restamped: the fix-headers and configs bump PRs change only `package.json` and the lockfile, and the published package is unaffected. ---