Skip to content
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

build(deps): bump comment-json from 3.0.3 to 4.1.0 #473

Merged
merged 1 commit into from
Oct 31, 2020

Conversation

dependabot[bot]
Copy link
Contributor

@dependabot dependabot bot commented on behalf of github Oct 30, 2020

Bumps comment-json from 3.0.3 to 4.1.0.

Release notes

Sourced from comment-json's releases.

4.1.0

  • MINOR: #19, CommentArray::sort will now maintain comments
  • PATCH: fixes #27

An upgrade is recommended for all users.

MAJOR 4.0.0, 2020-09-01

  • MAJOR: fixes #21, removes after-comma:${prop} and after symbol properties, and introduce after:${prop}
  • MAJOR: #20 symbol properties of comments are now not enumerable, so that you could use Object.keys to get the keys of the parsed object as the normal ones

4.0.0 brings breaking changes, but however, logically but not programmatically.

So for most scenarios, you need NOT to change your code, and an upgrade is recommended.

Upgrade Guide

Use assign instead of object spreading

const parsed = parse(`{
  // comment
  "foo": "bar"
}`)

In 3.x, it is ok to do as following

stringify({...parsed}, null, 2)
// {
//   // comment
//   "foo": "bar"
// }

But with comment-json@4.0.0, the code above will print

{
  "foo": "bar"
}

Because since 4.0.0, symbol properties of comments are non-enumerable, so object spreading will not work for this case, and you should use assign function to copy those properties.

const {assign} = require('comment-json')
stringify(assign({}, parsed), null, 2)
</tr></table>

... (truncated)

Commits
  • b829d3d 4.1.0: #19, #27
  • 25bc75e fixes #27: array (patch): clean up source comments
  • f816f33 fixes #19: array (patch): fixes CommentArray::sort
  • 91e4173 #19: array (feat): CommentArray::sort, untested
  • 61ba0a9 #19: array (chore): refactor common methods
  • 420a7fc 4.0.6 (chore): REAMD.md: about typescript
  • eb44eaa 4.0.5 (chore): README.md: fixes typo and an example
  • eb761e4 4.0.4 (breaking, but ok): assign: special copying rules according to argument...
  • 22e096c 4.0.3: bump version, related to #26
  • 6e201c7 assign: will now copy non-property comments if no keys specified. fixes #26
  • Additional commits viewable in compare view

Dependabot compatibility score

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


Dependabot commands and options

You can trigger Dependabot actions by commenting on this PR:

  • @dependabot rebase will rebase this PR
  • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
  • @dependabot merge will merge this PR after your CI passes on it
  • @dependabot squash and merge will squash and merge this PR after your CI passes on it
  • @dependabot cancel merge will cancel a previously requested merge and block automerging
  • @dependabot reopen will reopen this PR if it is closed
  • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
  • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)

Bumps [comment-json](https://github.com/kaelzhang/node-comment-json) from 3.0.3 to 4.1.0.
- [Release notes](https://github.com/kaelzhang/node-comment-json/releases)
- [Commits](kaelzhang/node-comment-json@3.0.3...4.1.0)

Signed-off-by: dependabot[bot] <support@github.com>
@dependabot dependabot bot added dependencies Pull requests that update a dependency file javascript Pull requests that update Javascript code labels Oct 30, 2020
@Jason3S Jason3S merged commit 5858b68 into cspell4 Oct 31, 2020
@dependabot dependabot bot deleted the dependabot/npm_and_yarn/cspell4/comment-json-4.1.0 branch October 31, 2020 14:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dependencies Pull requests that update a dependency file javascript Pull requests that update Javascript code
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant