The version 1.0.0 is not covered by your current version range.
If you donāt accept this pull request, your project will work just like it did before. However, you might be missing out on a bunch of new features, fixes and/or performance improvements from the dependency update.
It might be worth looking into these changes and trying to get this project onto the latest version of json5.
If you have a solid test suite and good coverage, a passing build is a strong indicator that you can take advantage of these changes directly by merging the proposed change into your project. If the build fails or you donāt have such unconditional trust in your tests, this branch is a great starting point for you to work on the update.
Release Notes1.0.0
This release includes major internal changes and public API enhancements.
Major JSON5 officially supports Node.js v4 and later. Support for Node.js
v0.10 and v0.12 have been dropped.
New: Unicode property names and Unicode escapes in property names are
supported. ([#1])
New: stringify outputs trailing commas in objects and arrays when a space
option is provided. ([#66])
New: JSON5 allows line and paragraph separator characters (U+2028 and U+2029)
in strings in order to be compatible with JSON. However, ES5 does not allow
these characters in strings, so JSON5 gives a warning when they are parsed and
escapes them when they are stringified. ([#70])
New: stringify accepts an options object as its second argument. The
supported options are replacer, space, and a new quote option that
specifies the quote character used in strings. ([#71])
New: The CLI supports STDIN and STDOUT and adds --out-file, --space, and --validate options. See json5 --help for more information. ([#72], [#84],
and [#108])
New: In addition to the white space characters space \t, \v, \f, \n, \r, and \xA0, the additional white space characters \u2028, \u2029,
and all other characters in the Space Separator Unicode category are allowed.
New: In addition to the character escapes \', \", \\, \b, \f, \n, \r, and \t, the additional character escapes \v and \0, hexadecimal
escapes like \x0F, and unnecessary escapes like \a are allowed in string
values and string property names.
New: stringify outputs strings with single quotes by default but
intelligently uses double quotes if there are more single quotes than double
quotes inside the string. (i.e. stringify('Stay here.') outputs 'Stay here.' while stringify('Let\'s go.') outputs "Let's go.")
New: When a character is not allowed in a string, stringify outputs a
character escape like \t when available, a hexadecimal escape like \x0F
when the Unicode code point is less than 256, or a Unicode character escape
like \u01FF, in that order.
New: stringify checks for a toJSON5 method on objects and, if it exists,
stringifies its return value instead of the object. toJSON5 overrides toJSON if they both exist.
New: To require or import JSON5 files, use require('json5/lib/register')
or import 'json5/lib/register'. Previous versions used json5/lib/require,
which still exists for backward compatibility but is deprecated and will give
a warning.
New: To use JSON5 in browsers, use the file at dist/index.js or https://unpkg.com/json5@^1.0.0.
Fix: stringify properly outputs Infinity and NaN. ([#67])
Fix: isWord no longer becomes a property of JSON5 after calling stringify. ([#68] and [#89])
Fix: stringify no longer throws when an object does not have a prototype.
([#154])
Fix: stringify properly handles the key argument of toJSON(key) methods. toJSON5(key) follows this pattern.
Fix: stringify accepts Number and String objects as its space
argument.
Fix: In addition to a function, stringify also accepts an array of keys to
include in the output as its replacer argument. Numbers, Number objects,
and String objects will be converted to a string if they are given as array
values.
FAQ and help
There is a collection of [frequently asked questions](https://greenkeeper.io/faq.html). If those donāt help, you can always [ask the humans behind Greenkeeper](https://github.com/greenkeeperio/greenkeeper/issues/new).
āļø Greenkeeperās updated Terms of Service will come into effect on April 6th, 2018.
Version 1.0.0 of json5 was just published.
The version 1.0.0 is not covered by your current version range.
If you donāt accept this pull request, your project will work just like it did before. However, you might be missing out on a bunch of new features, fixes and/or performance improvements from the dependency update.
It might be worth looking into these changes and trying to get this project onto the latest version of json5.
If you have a solid test suite and good coverage, a passing build is a strong indicator that you can take advantage of these changes directly by merging the proposed change into your project. If the build fails or you donāt have such unconditional trust in your tests, this branch is a great starting point for you to work on the update.
Release Notes
1.0.0This release includes major internal changes and public API enhancements.
Major JSON5 officially supports Node.js v4 and later. Support for Node.js
v0.10 and v0.12 have been dropped.
New: Unicode property names and Unicode escapes in property names are
supported. ([#1])
New:
stringify
outputs trailing commas in objects and arrays when aspace
option is provided. ([#66])
New: JSON5 allows line and paragraph separator characters (U+2028 and U+2029)
in strings in order to be compatible with JSON. However, ES5 does not allow
these characters in strings, so JSON5 gives a warning when they are parsed and
escapes them when they are stringified. ([#70])
New:
stringify
accepts an options object as its second argument. Thesupported options are
replacer
,space
, and a newquote
option thatspecifies the quote character used in strings. ([#71])
New: The CLI supports STDIN and STDOUT and adds
--out-file
,--space
, and--validate
options. Seejson5 --help
for more information. ([#72], [#84],and [#108])
New: In addition to the white space characters space
\t
,\v
,\f
,\n
,\r
, and\xA0
, the additional white space characters\u2028
,\u2029
,and all other characters in the Space Separator Unicode category are allowed.
New: In addition to the character escapes
\'
,\"
,\\
,\b
,\f
,\n
,\r
, and\t
, the additional character escapes\v
and\0
, hexadecimalescapes like
\x0F
, and unnecessary escapes like\a
are allowed in stringvalues and string property names.
New:
stringify
outputs strings with single quotes by default butintelligently uses double quotes if there are more single quotes than double
quotes inside the string. (i.e.
stringify('Stay here.')
outputs'Stay here.'
whilestringify('Let\'s go.')
outputs"Let's go."
)New: When a character is not allowed in a string,
stringify
outputs acharacter escape like
\t
when available, a hexadecimal escape like\x0F
when the Unicode code point is less than 256, or a Unicode character escape
like
\u01FF
, in that order.New:
stringify
checks for atoJSON5
method on objects and, if it exists,stringifies its return value instead of the object.
toJSON5
overridestoJSON
if they both exist.New: To
require
orimport
JSON5 files, userequire('json5/lib/register')
or
import 'json5/lib/register'
. Previous versions usedjson5/lib/require
,which still exists for backward compatibility but is deprecated and will give
a warning.
New: To use JSON5 in browsers, use the file at
dist/index.js
orhttps://unpkg.com/json5@^1.0.0
.Fix:
stringify
properly outputsInfinity
andNaN
. ([#67])Fix:
isWord
no longer becomes a property ofJSON5
after callingstringify
. ([#68] and [#89])Fix:
stringify
no longer throws when an object does not have aprototype
.([#154])
Fix:
stringify
properly handles thekey
argument oftoJSON(key)
methods.toJSON5(key)
follows this pattern.Fix:
stringify
acceptsNumber
andString
objects as itsspace
argument.
Fix: In addition to a function,
stringify
also accepts an array of keys toinclude in the output as its
replacer
argument. Numbers,Number
objects,and
String
objects will be converted to a string if they are given as arrayvalues.
Commits
The new version differs by 82 commits.
1d64ece
1.0.0
ef1f94a
Fix headings in README
1c5d18d
Remove remnant in README
d904cd6
Update dependencies
156ae20
Add contributing guidelines
f920edc
Update CHANGELOG for v1.0
4c7fbd2
Update README for v1.0
5cbd656
Update copyright year
1d1c92d
Explain STDIN and STDOUT using in CLI
a95ec35
Update package.json5 with coverage integration
f60448e
Integrate Coveralls
d17173c
1.0.0-beta.4
d828908
Fix and ensure signed numbers are parsed properly
dc2cfbc
Make all tests run
ad03a13
Test on Node v9
There are 82 commits in total.
See the full diff
FAQ and help
There is a collection of [frequently asked questions](https://greenkeeper.io/faq.html). If those donāt help, you can always [ask the humans behind Greenkeeper](https://github.com/greenkeeperio/greenkeeper/issues/new).Your Greenkeeper bot :palm_tree: