fix: use named imports for js-yaml v5 ESM compatibility - #10676
Merged
Conversation
js-yaml was bumped from 4.x to 5.2.3 in a recent dependency update. v5 ships a real ESM build with named exports only (no default export), which breaks the default import in scripts/update-publiccode.mjs on Node 24, crashing the publish workflow. - Switch to named imports (load, dump) for js-yaml v5 - Declare js-yaml as explicit devDependency (was undeclared transitive dep)
Contributor
|
Netlify Draft Deployment |
Contributor
|
🚀 Preview deployed to GitHub Pages: https://public-ui.github.io/kolibri/pr-10676/3992fb3/ |
Contributor
📸 Visual Test Reports
Run: https://github.com/public-ui/kolibri/actions/runs/31676217109 |
laske185
approved these changes
Aug 13, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
The 01 - Publish workflow (#878) crashes on Node 24 with:
Root cause
js-yaml was bumped from 4.x → 5.2.3 in a recent dependency update (
chore: update dependencies and lock file). Version 5.x ships a real ESM build (dist/js-yaml.mjs) with named exports only — there is noexport default. The default importimport yaml from 'js-yaml'worked under 4.x (CJS interop) but crashes under 5.x.Additionally,
js-yamlwas not declared as a dependency in anypackage.json— it only resolved as a hoisted transitive dependency viastylelint → cosmiconfig → js-yaml(surviving only because.npmrcsetsshamefully-hoist=true). This masked the version bump entirely.Changes
scripts/update-publiccode.mjs: Switch from default import (import yaml from 'js-yaml') to named imports (import { dump, load } from 'js-yaml') — theload/dumpsignatures are unchanged from 4.xpackage.json: Declarejs-yaml@5.2.3as explicit devDependency so the version is tracked and not at the mercy of transitive resolutionpnpm-lock.yaml: Updated lockfile (no new download — 5.2.3 was already in the store)Verification
✅
node scripts/update-publiccode.mjsruns successfully (previously crashed immediately)✅
pnpm format— all files pass