Repository navigation
Version Packages - #3
Merged
Merged
Conversation
github-actions
Bot
force-pushed
the
changeset-release/main
branch
6 times, most recently
from
September 26, 2026 05:35
a3b8718 to
9ffd09d
Compare
github-actions
Bot
force-pushed
the
changeset-release/main
branch
from
September 26, 2026 05:43
9ffd09d to
f91faf2
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR was opened by the Changesets release GitHub action. When you're ready to do a release, you can merge this and the packages will be published to npm automatically. If you're not ready to do a release yet, that's fine, whenever you add more changesets to main, this PR will be updated.
Releases
flattify@2.0.0
Major Changes
43eba0b: Why a major version?
Flattify 2.0 is a full rewrite in TypeScript. The single default export
flattify(json, isFlattifyArray)is replaced by named exports,flattenandunflatten, with different defaults. Code written for 1.x has to be updated (see Migration below).Breaking changes
flattify(...)is replaced byflatten(...):import { flatten } from 'flattify'orconst { flatten } = require('flattify').flatten({ tags: ['a'] })gives{ 'tags.0': 'a' }. The 1.x default, which turned arrays into JSON strings, is gone: pass{ safe: true }to keep arrays as arrays.flatten([{ id: 1 }])gives{ '0.id': 1 }instead of flattening each item: usearray.map((item) => flatten(item))for the 1.x behavior.JSON.parse(json)instead of the string; anything but a plain object or an array throws aTypeError.{ 'a.b': 1 }gives{ 'a\.b': 1 }), so they come back whole. Pass{ escape: false }to leave them as they are.Migration
flattify(obj, true)flatten(obj)flattify(obj)flatten(obj, { safe: true })flattify(array)array.map((item) => flatten(item))flattify(jsonString)flatten(JSON.parse(jsonString))Fixed
{ a: { tags: [1] }, b: { tags: [2] } }gave{ tags: '[2]' }in 1.x, losinga.tags. It now gives{ 'a.tags.0': 1, 'b.tags.0': 2 }.New
unflatten, the reverse offlatten:unflatten(flatten(data))gives backdata, including dates, class instances,null, empty objects and arrays, and keys with dots in them.asArraygives back an array given toflatten.Flatten<T>,Unflatten<T>), for every option that changes them.delimiter,maxDepth,safe,keepEmpty,escape,circular,transformKeyandpreserveforflatten;delimiter,object,overwrite,arrayLimit,asArray,escapeandtransformKeyforunflatten.items.0.id(dot),items[0].id(bracket, andunflattenreads form fields such asitems[0][id]) and/items/0/id(JSON Pointer, RFC 6901).flattify/path:get,set,has,del,paths,parsePath,stringifyPathandescapeKey, with autocompleted paths and type-checked values.__proto__,constructororprototype, no stack overflow on deep or circular input, andarrayLimitagainst huge sparse arrays. Covered by tests, including fuzzing.@nandomb/flattify, and tested on Node.js 22, 24 and 26, Bun, Deno, Chromium, Firefox, WebKit and Cloudflare Workers.