Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: decoding bracketed arrays #252

Merged
merged 1 commit into from
May 22, 2024

Conversation

Cherry
Copy link
Contributor

@Cherry Cherry commented May 22, 2024

Previously, the following ini file was being parsed incorrectly:

brr = 1
brr = 2
brr = 3
brr = 3

With ini.decode(..., {bracketedArray: false}), this would be parsed as:

{
  "b": [
    "2",
    "3",
    "3"
  ],
  "brr": "1"
}

This was due to always running the key.slice(0, -2) code.

This PR fixes that so it's now parsed as:

{
  "brr": [
    "1",
    "2",
    "3",
    "3"
  ]
}

@Cherry Cherry requested a review from a team as a code owner May 22, 2024 00:15
@wraithgar wraithgar merged commit 858cc82 into npm:main May 22, 2024
29 checks passed
@wraithgar
Copy link
Member

Thanks!

@github-actions github-actions bot mentioned this pull request May 22, 2024
wraithgar pushed a commit that referenced this pull request May 22, 2024
🤖 I have created a release *beep* *boop*
---


## [4.1.3](v4.1.2...v4.1.3)
(2024-05-22)

### Bug Fixes

*
[`858cc82`](858cc82)
[#252](#252) decoding bracketed arrays
(#252) (@Cherry)

### Chores

*
[`2da0471`](2da0471)
[#251](#251) bump @npmcli/template-oss to
4.22.0 (@lukekarrys)
*
[`1eaf0fb`](1eaf0fb)
[#251](#251) postinstall for dependabot
template-oss PR (@lukekarrys)
*
[`faf21a1`](faf21a1)
[#249](#249) bump @npmcli/template-oss
from 4.21.3 to 4.21.4 (@dependabot[bot])

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
@Cherry Cherry deleted the fix/decode-bracketed-array branch May 22, 2024 17:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants