Repository navigation
Conversation
Cargo accepts TOML 1.1 in Cargo.toml, including inline tables that span several lines. The bundled js-toml 1.0.2 parses TOML 1.0 only, so `getManifest` throws a syntax error on such a manifest and `cdk synth` fails before bundling starts. js-toml parses TOML 1.1 from 1.2.0. This bumps the bundled js-toml to ^2.0.1. The 2.x breaking changes only affect how dates and times are represented, and the manifest fields read here are strings. js-toml 2 depends on chevrotain 12, which no longer depends on lodash-es, so the chevrotain resolution added for GHSA-xxjr-mmjv-4gpg is no longer needed. Dropping it restores projen's default resolutions. Assisted-by: Claude Code:claude-opus-5-5
Author
|
Please let me know if there's anything else you would like me to do. I'm keen to have TOML 1.1 supported by |
JP-Ellis
marked this pull request as ready for review
October 12, 2026 01:36
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.
Cargo accepts TOML 1.1 in
Cargo.toml, including inline tables that span several lines:getManifestparses the manifest with the bundled js-toml 1.0.2, which only supports TOML 1.0, socdk synthfails with aSyntaxParseErrorbefore bundling starts. js-toml has parsed TOML 1.1 since 1.2.0. Because js-toml is a bundled dependency, consumers cannot override the version themselves.Changes
^1.0.2to^2.0.1. The 2.x breaking changes only affect how dates and times are represented.getManifestreadspackage.name,binandworkspace.members, which are all strings. 2.0.0 is deprecated upstream, hence^2.0.1.chevrotainresolution added in fix: resolve lodash-es prototype pollution vulnerability (GHSA-xxjr-mmjv-4gpg) #88 for GHSA-xxjr-mmjv-4gpg. js-toml 2 depends on chevrotain 12, which no longer depends on lodash-es. Removing the override restores projen's default resolutions.getManifesttest. The test fails on js-toml 1.0.2 and passes with this change.Testing
npx projen test: all 23 tests pass.npx projen package:js: the tarball bundles js-toml 2.0.1.Cargo.tomluses a multi-line inline table.cdk synthnow gets past manifest parsing.Related
cargo-lambda/cargo-lambda#940 fixes the same problem in the cargo-lambda CLI, which parses the manifest with the
tomlcrate during bundling. A CDK app with a TOML 1.1 manifest needs both fixes: synthesis fails here first, then bundling fails in cargo-lambda.AI Disclosure
This PR was substantially written by AI, but was reviewed manually by a human.