Skip to content

Revert js-yaml 5 (#809): the image no longer booted - #824

Merged
keysersoft merged 1 commit into
mainfrom
keysersoft/revert-js-yaml-5
Oct 2, 2026
Merged

keysersoft merged 1 commit into
mainfrom
keysersoft/revert-js-yaml-5

Conversation

@keysersoft

Copy link
Copy Markdown
Contributor

Main does not produce a bootable image since #809. The post-merge Docker check failed with TypeError: js_yaml_1.CORE_SCHEMA.withTags is not a function.

Why: the runtime stage copies only the hoisted node_modules of backend-prod-deps, not packages/backend/node_modules. js-yaml 5 was the backend's first nested dependency (the root keeps 4.3.2 for swagger-parser and friends), so at runtime the backend loaded 4.3.2. Unit tests resolve the nested copy, which is why CI on the PR was green. Nothing was published or deployed from this commit; the cloud runs 2a85a15.

This goes back to js-yaml 4.3.2, which is outside the advisory's 5.0.0-5.4.0 range. The YAML merge-key regression test from #809 stays and passes on 4.x.

Checked locally: image built from this branch boots and answers /health (10 s), backend loads js-yaml 4.3.2; full backend suite passes.

Follow-ups worth doing: run the Docker boot job on PRs that touch package.json, package-lock.json or the Dockerfile (today it only runs after the merge), and copy packages/backend/node_modules into the runtime image so a nested dependency can't vanish again.

The runtime image copies only the hoisted node_modules of the prod-deps
stage, not packages/backend/node_modules. js-yaml 5 was the backend's
first nested dependency (the root keeps 4.3.2 for other packages), so
the backend loaded 4.3.2 at runtime and crashed on
CORE_SCHEMA.withTags. Unit tests resolve the nested copy and passed;
only the post-merge Docker boot check caught it. Nothing was published.

Back to js-yaml 4.3.2 (not in the advisory's 5.0.0-5.4.0 range). The
YAML merge-key regression test stays: it passes on 4.x as well.
@keysersoft
keysersoft merged commit 113ae00 into main Oct 2, 2026
14 checks passed
@keysersoft
keysersoft deleted the keysersoft/revert-js-yaml-5 branch October 2, 2026 16:32
@github-actions github-actions Bot locked and limited conversation to collaborators Oct 2, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant