You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat: add support for serializing complex objects (#49)
Adds a `shouldSerializeObject` function which determines if a value
should be serialized or should attempt to be nested.
The default implementation checks if a value is a non-date object,
meaning all objects which are not dates will trigger nesting.
fix: nested repeated array syntax (#43)
Fixes#42
Essentially we had two bugs 👀
Bug 1: if you have repeat syntax when using bracket-notation, but only
had one key, we would _not_ create it as a string.
For example:
```ts
parse('foo[]=1', opts); // {foo: 1} - wrong!
parse('foo[]=1&foo[]=2', opts); // {foo: [1, 2]} - right!
```
Bug 2: if you have repeat syntax following an index-nested member, we
would not parse it correctly.
For example:
```ts
parse('foo[bar][]=1', opts); // {foo: {bar: 1}} - wrong!
// expected: {foo: {bar: [1]}}
```
These should both now be fixed.
feat: add new js nesting syntax (#40)
Adds a new syntax type, `js`. With this syntax, arrays use indices and
properties use dot-notation.
For example:
```ts
// foo.bar[0]=baz
({
foo: {
bar: [
'baz'
]
}
})
```
Closes#39
chore: tweak publish flows (#29)
Sets the publish flow to do the following:
- `1.*` pre-releases have the `v1-next` tag
- `1.*` releases have the `v1` tag
- all other pre-releases have the `next` tag
- all other releases have the `latest` tag