-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: outputted keys not in same order as input
This switches the `BTreeMap` implementation for objects out for an `IndexMap`, which means the order you write keys in is always preserved.
- Loading branch information
1 parent
f39d24f
commit d124160
Showing
46 changed files
with
356 additions
and
329 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
{ | ||
"bar": false, | ||
"foo": true | ||
"foo": true, | ||
"bar": false | ||
} |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,10 +3,10 @@ | |
"bar": { | ||
"baz": 42 | ||
}, | ||
"qux": true, | ||
"quux": [ | ||
"green eggs", | ||
"ham" | ||
], | ||
"qux": true | ||
] | ||
} | ||
} |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,50 +1,50 @@ | ||
{ | ||
"one": { | ||
"foo": "bar", | ||
"bar": "foo" | ||
}, | ||
"two": { | ||
"foo": 1, | ||
"bar": 2 | ||
}, | ||
"three": { | ||
"foo": 1.0, | ||
"bar": 2.0 | ||
}, | ||
"four": { | ||
"foo": true, | ||
"bar": false | ||
}, | ||
"five": { | ||
"foo": null, | ||
"bar": null | ||
}, | ||
"six": { | ||
"foo": {}, | ||
"bar": {} | ||
}, | ||
"seven": { | ||
"foo": [], | ||
"bar": [] | ||
}, | ||
"eight": [ | ||
"foo", | ||
"bar" | ||
], | ||
"eleven": [ | ||
[], | ||
[] | ||
], | ||
"five": { | ||
"bar": null, | ||
"foo": null | ||
}, | ||
"four": { | ||
"bar": false, | ||
"foo": true | ||
}, | ||
"nine": [ | ||
true, | ||
false | ||
], | ||
"one": { | ||
"bar": "foo", | ||
"foo": "bar" | ||
}, | ||
"seven": { | ||
"bar": [], | ||
"foo": [] | ||
}, | ||
"six": { | ||
"bar": {}, | ||
"foo": {} | ||
}, | ||
"ten": [ | ||
null, | ||
null | ||
], | ||
"three": { | ||
"bar": 2.0, | ||
"foo": 1.0 | ||
}, | ||
"eleven": [ | ||
[], | ||
[] | ||
], | ||
"twelve": [ | ||
{}, | ||
{} | ||
], | ||
"two": { | ||
"bar": 2, | ||
"foo": 1 | ||
} | ||
] | ||
} |
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,13 @@ | ||
{ | ||
"with_underscore": 0, | ||
"with-dash": 1, | ||
"with_🌽": 2, | ||
"!\"£$%^&*()_": 3, | ||
"apple-pie": { | ||
"crust": "yum" | ||
}, | ||
"j12345": 4, | ||
"foo": { | ||
"bar-baz": "hello" | ||
}, | ||
"j12345": 4, | ||
"with-dash": 1, | ||
"with_underscore": 0, | ||
"with_🌽": 2 | ||
"apple-pie": { | ||
"crust": "yum" | ||
} | ||
} |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
{ | ||
"bar": 101.0, | ||
"foo": 3.14159 | ||
"foo": 3.14159, | ||
"bar": 101.0 | ||
} |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,11 @@ | ||
{ | ||
"name": { | ||
"first": "John", | ||
"last": "Smith" | ||
}, | ||
"dob": { | ||
"day": 1, | ||
"month": 1, | ||
"year": 1970 | ||
}, | ||
"name": { | ||
"first": "John", | ||
"last": "Smith" | ||
} | ||
} |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
{ | ||
"foo": 42, | ||
"bar": 16448250, | ||
"baz": 1000000, | ||
"foo": 42 | ||
"baz": 1000000 | ||
} |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,8 @@ | ||
{ | ||
"foo": [ | ||
{ | ||
"bar": 2, | ||
"foo": 1 | ||
"foo": 1, | ||
"bar": 2 | ||
} | ||
] | ||
} |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,34 +1,34 @@ | ||
{ | ||
"author": { | ||
"email": "mail@example.com", | ||
"name": "John Smith", | ||
"url": "https://example.com" | ||
}, | ||
"name": "example-package", | ||
"version": "1.0.0", | ||
"main": "dist/index.js", | ||
"bin": { | ||
"filebrowser": "dist/index.js" | ||
}, | ||
"config": { | ||
"hostname": null, | ||
"port": 8080 | ||
"private": false, | ||
"author": { | ||
"name": "John Smith", | ||
"email": "mail@example.com", | ||
"url": "https://example.com" | ||
}, | ||
"contributors": [ | ||
{ | ||
"email": "mail@example.com", | ||
"name": "John Smith" | ||
"name": "John Smith", | ||
"email": "mail@example.com" | ||
} | ||
], | ||
"scripts": { | ||
"build": "tsc", | ||
"run": "node dist" | ||
}, | ||
"dependencies": { | ||
"dotenv": "^8.2.0" | ||
}, | ||
"devDependencies": { | ||
"typescript": "^4.5" | ||
}, | ||
"main": "dist/index.js", | ||
"name": "example-package", | ||
"private": false, | ||
"scripts": { | ||
"build": "tsc", | ||
"run": "node dist" | ||
}, | ||
"version": "1.0.0" | ||
"config": { | ||
"port": 8080, | ||
"hostname": null | ||
} | ||
} |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
{ | ||
"bar": "baz", | ||
"hello": "world", | ||
"bar": "baz", | ||
"nums": [ | ||
1, | ||
2, | ||
|
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
{ | ||
"foo": "bar", | ||
"bar": "\"\\\n\r\t", | ||
"baz": "a", | ||
"foo": "bar", | ||
"qux": "" | ||
} |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
{ | ||
"bar": "$escaped", | ||
"foo": "hello, world" | ||
"foo": "hello, world", | ||
"bar": "$escaped" | ||
} |
Oops, something went wrong.