Skip to content

chore(npm)!: release 4.0.0 - #207

Merged
tvdeyen merged 1 commit into
mainfrom
chore/npm-3.1.0
Aug 31, 2026
Merged

chore(npm)!: release 4.0.0#207
tvdeyen merged 1 commit into
mainfrom
chore/npm-3.1.0

Conversation

@tvdeyen

@tvdeyen tvdeyen commented Aug 31, 2026

Copy link
Copy Markdown
Member

Releases the first TypeScript build of the npm package as 4.0.0 — a major bump, because the package has breaking changes for consumers of the currently-published 3.0.1 (which predates the TS work).

Breaking — deserializePage/deserializePages no longer filter deprecated content. In 3.0.1 these were Alchemy-aware and stripped deprecated elements and their essences. They are now thin, @deprecated aliases for the generic deserialize, which returns every resource the response contains. Callers relying on the old filtering will now see the deprecated elements. (deprecated is an admin-only hint and must not alter serialized output, which is why the filtering was removed.)

Breaking — an exports map is introduced. 3.0.1 exposed only main, so any path was importable. Now only . and ./deserialize are exported; deep imports into the package break.

Additive — ships .d.ts type declarations (root + ./deserialize subpath). deserialize itself is unchanged (<T>(document)).

Release hygiene — adds a prepare script (pnpm run build) so the compiled dist/ (JS + declarations) is regenerated before publish and on git-based installs, instead of relying on a hand-committed build staying in sync with src/.

npm-only; does not touch the gem or its release workflow. (Branch name still says 3.1.0 — cosmetic; the released version is 4.0.0.)

The published 3.0.1 predates the TypeScript migration, and the npm package
has since gained changes that are breaking for consumers of that release,
so this takes a major version rather than a minor.

BREAKING CHANGE: `deserializePage`/`deserializePages` no longer filter
deprecated content. In 3.0.1 they stripped deprecated elements and their
essences; they are now thin, deprecated aliases for the generic
`deserialize`, which returns every resource the response contains, so
callers that relied on the old filtering will now see the deprecated
elements. The package also introduces an `exports` map -- only `.` and
`./deserialize` are importable, so deep imports into the package break.

Additionally ships `.d.ts` type declarations, and adds a `prepare` script
that builds the compiled `dist/` before publish and on git-based installs,
so it can no longer drift from `src/`.
@tvdeyen tvdeyen changed the title chore(npm): release 3.1.0 and build dist on prepare chore(npm)!: release 4.0.0 Aug 31, 2026
@tvdeyen
tvdeyen merged commit 9f88453 into main Aug 31, 2026
15 checks passed
@tvdeyen
tvdeyen deleted the chore/npm-3.1.0 branch August 31, 2026 14:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant