Skip to content

Conversation

@WasixXD
Copy link
Contributor

@WasixXD WasixXD commented Nov 28, 2025

Closes #6884

@WasixXD WasixXD requested a review from kt3k as a code owner November 28, 2025 17:11
@github-actions github-actions bot added the ini label Nov 28, 2025
@codecov
Copy link

codecov bot commented Nov 28, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 94.11%. Comparing base (9b2c51d) to head (aa2b7ca).
⚠️ Report is 4 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #6887   +/-   ##
=======================================
  Coverage   94.11%   94.11%           
=======================================
  Files         581      581           
  Lines       42707    42708    +1     
  Branches     6796     6797    +1     
=======================================
+ Hits        40194    40196    +2     
+ Misses       2463     2462    -1     
  Partials       50       50           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

ini/parse.ts Outdated
}

const QUOTED_VALUE_REGEXP = /^"(?<value>.*)"$/;
function defaultReviver(_key: string, value: string, _section?: string) {
Copy link
Contributor

@timreichen timreichen Nov 29, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
function parseValue(_key: string, value: string) {

ini/parse.ts Outdated
}

const val = reviver(key, value, sectionName);
const parsedValue = defaultReviver(key, value, sectionName);
Copy link
Contributor

@timreichen timreichen Nov 29, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
const parsedValue = defaultReviver(key, value, sectionName);
let parsedValue = parseValue(key, value);

ini/parse.ts Outdated
Comment on lines 201 to 203
const val = options.reviver
? options.reviver(key, parsedValue, sectionName)
: parsedValue;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
const val = options.reviver
? options.reviver(key, parsedValue, sectionName)
: parsedValue;
if (options.reviver) parsedValue = options.reviver(key, parsedValue, sectionName);

Comment on lines 261 to 263
const json = '{ "a": 100, "b": true, "c": null, "d": "foo" }';
const parsedJson = JSON.parse(json, (_key, value) => value);
assertEquals(parsedJson, expected);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think we need to run JSON version here

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

@std/ini: options.reviver value is not type casted

3 participants