Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .projen/deps.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 1 addition & 8 deletions .projenrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -43,14 +43,7 @@ project.addDevDeps('typescript@5.x');
project.addDevDeps('@types/node@^18');
project.addDevDeps('jest@^29');
project.addDevDeps('ts-jest@^29');
project.addBundledDeps('js-toml@^1.0.2');

// Fix for GHSA-xxjr-mmjv-4gpg: lodash-es prototype pollution vulnerability
// js-toml -> chevrotain -> lodash-es@4.17.21 is vulnerable
// Force chevrotain@11.1.1+ which uses lodash-es@4.17.23 (patched)
project.package.addField('resolutions', {
chevrotain: '^11.1.1',
});
project.addBundledDeps('js-toml@^2.0.1');

project.addGitIgnore('target');
project.gitignore.removePatterns('*.tgz');
Expand Down
5 changes: 3 additions & 2 deletions package.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions test/cargo.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,12 @@ describe('getManifest', () => {
expect(manifest.workspace?.members).toEqual(['binary1', 'binary2']);
});

it('reads TOML 1.1 multi-line inline tables', () => {
const fixture = join(__dirname, 'fixtures/toml-1-1/Cargo.toml');
const manifest = getManifest(fixture);
expect(manifest.package?.name).toEqual('toml-1-1');
});

it('reads binary sections', () => {
const fixture = join(__dirname, 'fixtures/cargo-workspace/binary1/Cargo.toml');
const manifest = getManifest(fixture);
Expand Down
11 changes: 11 additions & 0 deletions test/fixtures/toml-1-1/Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
[package]
name = "toml-1-1"
version = "0.1.0"
edition = "2024"

# TOML 1.1 allows newlines and a trailing comma inside inline tables.
[dependencies]
tokio = {
version = "1",
features = ["macros", "rt-multi-thread"],
}
119 changes: 58 additions & 61 deletions yarn.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.