deps: move js-yaml 4 to 5, with a parse test on the real data#1000
Merged
Conversation
js-yaml 5 drops the safe* helpers (we never used them) and parses numbers per YAML 1.2. We only call yaml.load() in two spots, the bundled-env spec in buildutil.js and the auto-updater's latest.yml in app.ts, both reading strings, so neither leans on the 1.1 number quirks. v5 is still dual CJS/ESM, so the CommonJS main keeps loading it. Added a test that loads the actual env_installer/jlab_server.yaml and a latest.yml-shaped manifest and asserts what those two call sites read. You can sanity-check it yourself: yarn test runs the new parse test green and a yarn build still finds the bundled jupyterlab pin. The 1.2 vs 1.1 number-parsing question is the part I dug into before bumping.
krassowski
approved these changes
Jul 1, 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 join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
js-yaml 5 drops the
safe*helpers (we never used them) and parses numbers per YAML 1.2 instead of 1.1. The only two uses here areyaml.load()on the bundled-env spec (buildutil.js) and on the updater'slatest.yml(app.ts), both reading version strings, so neither depends on the old number behavior. v5 still ships a CommonJS build, so the main process keeps requiring it.I added
test/unit/js-yaml-parse.test.tsthat loads the realenv_installer/jlab_server.yamland alatest.yml-shaped manifest and pins what those two call sites actually read (the jupyterlab pin, the version string).Easy to verify on your side:
yarn testruns the new parse test, and ayarn buildstill resolves the bundled jupyterlab version. The YAML 1.2 number-parsing change is the thing I checked against our data before bumping.