Skip to content

fix: decoding bracketed arrays#252

Merged
wraithgar merged 1 commit intonpm:mainfrom
Cherry:fix/decode-bracketed-array
May 22, 2024
Merged

fix: decoding bracketed arrays#252
wraithgar merged 1 commit intonpm:mainfrom
Cherry:fix/decode-bracketed-array

Conversation

@Cherry
Copy link
Copy Markdown
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
@wraithgar
Copy link
Copy Markdown
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