json5 breaking changes

npm

26 curated breaking changes across major versions of json5. Use this as a migration checklist before bumping dependencies.

26
changes
Breaking changes by transition
  • v1.0.1 \u2192 v2.0.0breaking

    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.

  • v1.0.1 \u2192 v2.0.0breaking

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

  • v1.0.1 \u2192 v2.0.0breaking

    New: Support for Unicode 10 has been added.

  • v1.0.1 \u2192 v2.0.0breaking

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

  • v1.0.1 \u2192 v2.0.0breaking

    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)

  • v0.5.0 \u2192 v1.0.0breaking

    New: Unicode property names and Unicode escapes in property names are supported. (#1)

  • v0.5.0 \u2192 v1.0.0breaking

    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)

  • v0.5.0 \u2192 v1.0.0breaking

    New: `stringify` outputs trailing commas in objects and arrays when a `space` option is provided. (#66)

  • v0.5.0 \u2192 v1.0.0breaking

    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)

  • v0.5.0 \u2192 v1.0.0breaking

    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)

  • unknown \u2192 v0.5.0breaking

    Fix: YUI Compressor no longer fails when compressing json5.js. ([#97](https://github.com/aseemk/json5/pull/97))

  • unknown \u2192 v0.5.0breaking

    New: `parse` and the CLI provide line and column numbers when displaying error messages. ([#101](https://github.com/aseemk/json5/pull/101); awesome work by [@amb26](https://github.com/amb26).)

  • 0.1.0 \u2192 0.2.0breaking

    **Breaking:** Negative hexadecimal numbers (e.g. `-0xC8`) are rejected now.

  • 0.1.0 \u2192 0.2.0breaking

    New: Trailing decimal points in decimal numbers are allowed again.

  • 0.1.0 \u2192 0.2.0breaking

    New: `Infinity` and `-Infinity` are now allowed number literals.

  • 0.1.0 \u2192 0.2.0breaking

    New: Plus signs (`+`) in front of numbers are now allowed, since it can

  • 0.1.0 \u2192 0.2.0breaking

    Fix: unescaped newlines in strings are rejected now.

  • 0.0.1 \u2192 0.1.0breaking

    New: Add Node.js `json5` executable to compile JSON5 files to JSON.

  • 0.0.1 \u2192 0.1.0breaking

    New: Add Node.js `require()` hook. Register via `json5/lib/require`.

  • 0.0.1 \u2192 0.1.0breaking

    Fix: Throw proper `SyntaxError` instances on errors now.

  • 0.0.1 \u2192 0.1.0breaking

    **Breaking:** Reject omitted elements in arrays now. These are disallowed by

  • 0.0.1 \u2192 0.1.0breaking

    **Breaking:** Reject trailing decimal points in decimal numbers now. These

  • 0.0.1 \u2192 0.1.0breaking

    New: Support leading decimal points in decimal numbers.

  • 0.0.1 \u2192 0.1.0breaking

    **Breaking:** Reject "noctal" numbers now (base-10 numbers that begin with a

  • 0.0.1 \u2192 0.1.0breaking

    Fix: Reject octal numbers properly now. Previously, they were accepted but

  • 0.0.1 \u2192 0.1.0breaking

    New: Support hexadecimal numbers. (Thanks [@MaxNanasy].)

API access

Get this data programmatically \u2014 free, no authentication.

curl https://depscope.dev/api/breaking/npm/json5