Skip to content

@okuryu okuryu released this Sep 10, 2020 · 1 commit to master since this release

Changelog

  • Exclude .vscode and .github directories from package (#97)
Assets 2

@okuryu okuryu released this Sep 9, 2020 · 3 commits to master since this release

Changelog

  • Bump mocha from 8.1.2 to 8.1.3 (#96)
  • Support sparse arrays (#95)
  • Bump mocha from 8.1.1 to 8.1.2 (#94)
  • Bump mocha from 8.1.0 to 8.1.1 (#92)
  • Create Dependabot config file (#91)
  • Bump mocha from 8.0.1 to 8.1.0 (#90)
  • Bump lodash from 4.17.15 to 4.17.19 (#89)
  • Bump mocha from 7.2.0 to 8.0.1 (#88)

Behavior changes for sparse arrays

It serializes sparse arrays as follows since this version. The result of serialization may be changed if you are passing sparse arrays values into the serialize-javascript.

const serialize = require('serialize-javascript');

var a = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10];
delete a[0];
a.length = 3;
a[5] = 'wat';
serialize(a) // 'Array.prototype.slice.call({"1":2,"2":3,"5":"wat","length":6})'

Thank you @victorporof for this release.

Assets 2

@okuryu okuryu released this Jun 8, 2020 · 12 commits to master since this release

Changelog

  • Bump nyc from 15.0.1 to 15.1.0 (#85)
  • support for bigint (#80)

Behavior changes for BigInt

It serializes BigInt values as follows since this version. The result of serialization may be changed if you are passing BigInt values into the serialize-javascript.

v4.x:

const serialize = require('serialize-javascript');

serialize({big: BigInt('10')}); // '{"big":BigInt("10")}'

v3.x:

const serialize = require('serialize-javascript');

serialize({big: BigInt('10')}); // throws error

Thank you @mum-never-proud for this release.

Assets 2

@okuryu okuryu released this May 28, 2020 · 16 commits to master since this release

  • Bump mocha from 7.1.2 to 7.2.0 (#83)
  • Bump mocha from 7.1.1 to 7.1.2 (#82)
  • Bump nyc from 15.0.0 to 15.0.1 (#81)
  • Don't replace regex / function placeholders within string literals (#79)
  • [Security] Bump minimist from 1.2.0 to 1.2.5 (#78)
  • Bump mocha from 7.1.0 to 7.1.1 (#77)
  • Bump mocha from 7.0.1 to 7.1.0 (#74)
  • Update example in README (#73)

Note: the randombytes has been added to the dependency package to improve the generation of UIDs. Check the #22 for more information. Thanks to @JordanMilne and @Siebes for this change.

Assets 2

@okuryu okuryu released this Feb 16, 2020 · 27 commits to master since this release

  • Introduce support for Infinity (@vthibault, #72)
  • Bump mocha from 7.0.0 to 7.0.1 (#71)
  • Test on Node.js v12 (@okuryu, #70)
  • Bump mocha from 6.2.2 to 7.0.0 (#69)
  • Bump nyc from 14.1.1 to 15.0.0 (#68)

Behavior changes for Infinity

It serializes Infinity values as follows since this version. The result of serialization may be changed if you are passing Infinity values into the serialize-javascript.

v3.x

const serialize = require('serialize-javascript');

serialize({inf: Infinity}); // '{"inf":Infinity}'

v2.x

const serialize = require('serialize-javascript');

serialize({inf: Infinity}); // '{"inf":null}'
Assets 2

@okuryu okuryu released this Dec 9, 2019 · 33 commits to master since this release

Assets 2

@okuryu okuryu released this Dec 9, 2019 · 36 commits to master since this release

  • Fix regular expressions Cross-Site Scripting (XSS) vulnerability (see security advisory)
  • Migrate to nyc from istanbul
Assets 2

@okuryu okuryu released this Sep 4, 2019 · 41 commits to master since this release

Assets 2

@okuryu okuryu released this Sep 4, 2019 · 43 commits to master since this release

  • re-landed #54 with bump major version (see: #57)

Behavior changes for undefined

It serializes undefined values as follows since this version. The result of serialization may be changed if you are passing undefined values into the serialize-javascript.

v2.x

const serialize = require('serialize-javascript');

serialize({undef: undefined}); // '{"undef":undefined}'

v1.x

const serialize = require('serialize-javascript');

serialize({undef: undefined}); // '{}'
Assets 2

@okuryu okuryu released this Sep 4, 2019 · 45 commits to master since this release

  • Revert #54 for breaking changes (see: #57)
  • Bump mocha from 5.2.0 to 6.2.0 (#56)
Assets 2
You can’t perform that action at this time.