Skip to content

Update json5 to the latest version 🚀 #6

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

greenkeeper[bot]
Copy link
Contributor

@greenkeeper greenkeeper bot commented Mar 11, 2018

☝️ Greenkeeper’s updated Terms of Service will come into effect on April 6th, 2018.

Version 1.0.0 of json5 was just published.

Dependency json5
Current Version 0.5.1
Type dependency

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.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.

Commits

The new version differs by 82 commits.

There are 82 commits in total.

See the full diff

FAQ and help

There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper.


Your Greenkeeper bot 🌴

greenkeeper bot added a commit that referenced this pull request Mar 18, 2018
@greenkeeper
Copy link
Contributor Author

greenkeeper bot commented Mar 18, 2018

Version 1.0.1 just got published.

Update to this version instead 🚀

Release Notes v1.0.1

This release includes a bug fix and minor change.

  • Fix: parse throws on unclosed objects and arrays.

  • New: package.json5 has been removed until an easier way to keep it in sync
    with package.json is found.

Commits

The new version differs by 6 commits.

  • 072eb40 1.0.1
  • e7bdcd1 Update CHANGELOG for v1.0.1
  • 342d575 Remove package.json5 file
  • 0336c9c Fix unclosed object and array bug
  • 25929ab Fix typo in API documentation
  • 607c18f Readme: fix typo in attribution. [skip ci]

See the full diff

greenkeeper bot added a commit that referenced this pull request Aug 17, 2018
@greenkeeper
Copy link
Contributor Author

greenkeeper bot commented Aug 17, 2018

Version 2.0.0 just got published.

Update to this version instead 🚀

Release Notes v2.0.0
  • Major: JSON5 officially supports Node.js v6 and later. Support for Node.js
    v4 has been dropped. Since Node.js v6 supports ES5 features, the code has been
    rewritten in native ES5, and the dependence on Babel has been eliminated.

  • New: Support for Unicode 10 has been added.

  • New: The test framework has been migrated from Mocha to Tap.

  • New: The browser build at dist/index.js is no longer minified by default. A
    minified version is available at dist/index.min.js. ([#181])

  • Fix: The warning has been made clearer when line and paragraph separators are
    used in strings.

  • Fix: package.json5 has been restored, and it is automatically generated and
    committed when the version is bumped. A new build-package NPM script has
    been added to facilitate this.

Commits

The new version differs by 20 commits.

  • 3b44f2e 2.0.0
  • 7514e54 Update dependencies
  • bc93dc2 Use rollup-plugin-terser
  • 0519272 Format CHANGELOG to follow convention
  • 02cf24c Build non-minified browser bundle by default
  • 6196ab0 Merge branch 'master' into v2
  • 2c0723e Test Node.js v10 with Travis CI
  • 5fe80dd Update dependencies and patch vulnerabilities
  • c89eeb9 Merge pull request #179 from einSelbst/master
  • 75130f7 fix typo in Readme (Contibuting)
  • 25acee5 Update CHANGELOG for v2.0.0
  • 8cd89c1 Use Tap instead of Istanbul and Mocha
  • 799098f Update to Unicode 10
  • 36c79eb Set minimum Node.js version to 6.0.0
  • 7628711 Make line and paragraph separator warning clearer

There are 20 commits in total.

See the full diff

greenkeeper bot added a commit that referenced this pull request Aug 18, 2018
@greenkeeper
Copy link
Contributor Author

greenkeeper bot commented Aug 18, 2018

Version 2.0.1 just got published.

Update to this version instead 🚀

Commits

The new version differs by 2 commits.

  • 59eee02 2.0.1
  • ed17d06 Use buble and polyfills to support ES5 in bundles

See the full diff

greenkeeper bot added a commit that referenced this pull request Sep 28, 2018
@greenkeeper
Copy link
Contributor Author

greenkeeper bot commented Sep 28, 2018

  • The dependency json5 was updated from 0.5.1 to 2.1.0.

Update to this version instead 🚀

Commits

The new version differs by 3 commits.

See the full diff

greenkeeper bot added a commit that referenced this pull request Oct 2, 2019
@greenkeeper
Copy link
Contributor Author

greenkeeper bot commented Oct 2, 2019

  • The dependency json5 was updated from 0.5.1 to 2.1.1.

Update to this version instead 🚀

Release Notes for v2.1.1
  • New: package.json and package.json5 include a module property so
    bundlers like webpack, rollup and parcel can take advantage of the ES Module
    build. ([#208])
  • Fix: stringify outputs \0 as \\x00 when followed by a digit. ([#210])
  • Fix: Spelling mistakes have been fixed. ([#196])
Commits

The new version differs by 10 commits.

See the full diff

greenkeeper bot added a commit that referenced this pull request Mar 16, 2020
@greenkeeper
Copy link
Contributor Author

greenkeeper bot commented Mar 16, 2020

  • The dependency json5 was updated from 0.5.1 to 2.1.2.

Update to this version instead 🚀

greenkeeper bot added a commit that referenced this pull request Apr 5, 2020
@greenkeeper
Copy link
Contributor Author

greenkeeper bot commented Apr 5, 2020

  • The dependency json5 was updated from 0.5.1 to 2.1.3.

Update to this version instead 🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

0 participants