0.1.2
Summary — main story
This release (0.1.2) is a maintenance and packaging update: package metadata, build/test scripts, runtime/engine requirements, dependency bumps, and CI publish workflow behavior were adjusted. There are no code-level feature additions in the runtime library itself — the changes improve developer ergonomics, CI reliability, and how packages are published to npm.
What changed (high level)
- package.json version set to 0.1.2 and several package metadata, scripts, engines and dependency updates.
- GitHub Actions workflow (.github/workflows/npm-publish.yml) updated to make npm publishing stricter and more explicit:
- Distinguishes between pre-release/dev versions and production releases.
- Automatically stamps pre-release versions with timestamp + short SHA.
- Only publishes production versions when the event is a release (prevents accidental publishes on branch pushes).
- Installs build-essential/python3 for native module builds and performs a clean npm install to ensure native/optional deps resolve correctly.
- Updates package.json when publishing a dev pre-release so published package contains the stamped pre-release version.
Why this matters / Problems solved
- Prevent accidental publishes: CI now prevents publishing a production version on normal branch pushes; production publish happens only on a GitHub "release" event.
- Clear pre-release workflow: When the package version in package.json contains a pre-release suffix (e.g.,
-dev), the workflow will publish a deterministically stamped dev release (timestamp + SHA) to thedevnpm tag automatically. This makes dev artifacts traceable and avoids tag collisions. - Improved native build reliability: Installing system build tools in the workflow and doing a clean npm install helps avoid failures when optional/native bindings are required during package build/publish.
- Updated developer scripts: build/test/lint scripts clarified and enforced (precommit, prepublishOnly) to ensure CI and local builds run consistent checks before publishing.
- Updated runtime requirement: Node engine requirement is now ">=24.0.0" (documented in package.json).
Notable concrete changes
-
package.json
- version: 0.1.2
- engines.node: ">=24.0.0"
- scripts:
- build: "npm run lint && tsc --noEmit && vite build"
- prepublishOnly: "npm run clean && npm run build"
- precommit: runs lint, build and coverage
- dependencies updated / recorded (high-level list):
- @anthropic-ai/sdk, @google/generative-ai, openai, zod, winston, fluent-ffmpeg, dayjs, luxon, moment-timezone, js-yaml, gray-matter, glob, plus internal packages (@redaksjon/context, @redaksjon/protokoll-format) — check package.json for exact versions.
-
.github/workflows/npm-publish.yml
- Publishes on release-created events and will publish dev builds on pushes where version contains a pre-release suffix.
- Adds logic:
- If package.json version contains a hyphen (pre-release), produce a stamped dev version and publish with npm tag
dev. - If package.json version is a production version, only publish if the GitHub event is a release; otherwise skip publishing.
- If package.json version contains a hyphen (pre-release), produce a stamped dev version and publish with npm tag
- Steps to ensure proper environment for native modules (install build-essential, python3) and perform fresh npm installs before publishing.
Impact on users and developers
-
Developers:
- Local development: build/lint/test commands are stricter (tsc --noEmit in build, lint required). Precommit hook script is defined to run lint/build/coverage — running those locally may be required by your workflow (or by hooks configured in your environment).
- CI/publishing: To publish a production release to npm using the workflow, create a GitHub Release (the workflow publishes production versions only on a release event). For iterative/dev publishes, leave a pre-release suffix in package.json (e.g.,
0.1.2-dev) and the workflow will publish a stamped dev release to thedevtag automatically. - Node runtime: The package specifies Node >= 24.0.0. Ensure target environments and CI runners use Node 24+.
- Dependency upgrades: Some dependencies were updated to newer versions; run full tests if you rely on behavior from a specific dependency version.
-
Package consumers:
- No behavioral API changes are introduced in this release — runtime functionality and public API should remain the same.
- Consumers should not see changes unless they rely on a transitive behavior tied to updated dependencies; typical users are unaffected.
Breaking changes
- Automated checks and the Node engine requirement are the only potentially disruptive items:
- Node version requirement changed to >=24.0.0. This is a constraint — if you run this package in environments with Node <24, upgrades will break runtime compatibility.
- There are no code/API changes detected that change runtime behavior or public interfaces. get_breaking_changes returned no obvious breaking changes.
Practical notes / examples
-
Publishing a production release:
- Create a GitHub Release (this triggers the workflow on the
releaseevent). - Ensure package.json version is a production version (no hyphen). The workflow will publish that version with npm tag
latest.
- Create a GitHub Release (this triggers the workflow on the
-
Publishing a dev/pre-release from a branch push:
- Keep package.json version with a pre-release suffix (example: "0.1.2-dev.0" or "0.1.2-dev").
- On push to the branch configured in the workflow, the workflow will stamp the pre-release (adds timestamp + short SHA) and publish it under npm tag
dev.
-
If you need to reproduce the workflow locally, note the workflow will:
- Install build-essential and python3 (used for building native dependencies),
- Remove node_modules and package-lock.json then run npm install --force to ensure platform-specific optional deps are resolved.
Files changed (concise)
- package.json — version bump (0.1.2), scripts, engines, dependency pins/updates, metadata
- .github/workflows/npm-publish.yml — publish logic, dev vs production branching, environment setup for native builds
If you need a checklist for upgrading or publishing based on this release (for maintainers or CI owners), include that request and it will be provided.