Socket
Socket
Sign inDemoInstall

@changesets/parse

Package Overview
Dependencies
Maintainers
3
Versions
23
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@changesets/parse - npm Package Compare versions

Comparing version 0.3.11-temp.0 to 0.3.11

39

CHANGELOG.md
# @changesets/parse
## 0.3.11-temp.0
## 0.3.11
### Patch Changes
- Updated dependencies [[`636c7d7`](https://github.com/changesets/changesets/commit/636c7d7c9333664c91cd4d0ff678d5acb17256ad)]:
- @changesets/types@4.1.0-temp.0
- [#740](https://github.com/changesets/changesets/pull/740) [`957e39c`](https://github.com/changesets/changesets/commit/957e39c21549dd91e03faa5cd30e44e4c3d7331f) Thanks [@akphi](https://github.com/akphi)! - Fixed an issue with failing to parse changesets containing a completely empty summary.

@@ -14,3 +13,3 @@ ## 0.3.10

- Updated dependencies [[`9a993ba`](https://github.com/atlassian/changesets/commit/9a993ba09629c1620d749432520470cec49d3a96)]:
- Updated dependencies [[`9a993ba`](https://github.com/changesets/changesets/commit/9a993ba09629c1620d749432520470cec49d3a96)]:
- @changesets/types@4.0.2

@@ -22,3 +21,3 @@

- Updated dependencies [[`e89e28a`](https://github.com/atlassian/changesets/commit/e89e28a05f5fa43307db73812a6bcd269b62ddee)]:
- Updated dependencies [[`e89e28a`](https://github.com/changesets/changesets/commit/e89e28a05f5fa43307db73812a6bcd269b62ddee)]:
- @changesets/types@4.0.1

@@ -30,3 +29,3 @@

- Updated dependencies [[`de2b4a5`](https://github.com/atlassian/changesets/commit/de2b4a5a7b244a37d94625bcb70ecde9dde5b612)]:
- Updated dependencies [[`de2b4a5`](https://github.com/changesets/changesets/commit/de2b4a5a7b244a37d94625bcb70ecde9dde5b612)]:
- @changesets/types@4.0.0

@@ -38,3 +37,3 @@

- [`5b6005e`](https://github.com/atlassian/changesets/commit/5b6005e0349a105b3d138fccdb22d13de8949862) [#462](https://github.com/atlassian/changesets/pull/462) Thanks [@Andarist](https://github.com/Andarist)! - Fixed an issue with failing to parse changesets containing Windows newlines.
- [`5b6005e`](https://github.com/changesets/changesets/commit/5b6005e0349a105b3d138fccdb22d13de8949862) [#462](https://github.com/changesets/changesets/pull/462) Thanks [@Andarist](https://github.com/Andarist)! - Fixed an issue with failing to parse changesets containing Windows newlines.

@@ -45,3 +44,3 @@ ## 0.3.6

- Updated dependencies [[`2b49d66`](https://github.com/atlassian/changesets/commit/2b49d668ecaa1333bc5c7c5be4648dda1b11528d)]:
- Updated dependencies [[`2b49d66`](https://github.com/changesets/changesets/commit/2b49d668ecaa1333bc5c7c5be4648dda1b11528d)]:
- @changesets/types@3.0.0

@@ -53,5 +52,5 @@

- [`1706fb7`](https://github.com/atlassian/changesets/commit/1706fb751ecc2f5a792c42f467b2063078d58716) [#321](https://github.com/atlassian/changesets/pull/321) Thanks [@mitchellhamilton](https://github.com/mitchellhamilton)! - Fix TypeScript declarations
- [`1706fb7`](https://github.com/changesets/changesets/commit/1706fb751ecc2f5a792c42f467b2063078d58716) [#321](https://github.com/changesets/changesets/pull/321) Thanks [@mitchellhamilton](https://github.com/mitchellhamilton)! - Fix TypeScript declarations
- Updated dependencies [[`1706fb7`](https://github.com/atlassian/changesets/commit/1706fb751ecc2f5a792c42f467b2063078d58716)]:
- Updated dependencies [[`1706fb7`](https://github.com/changesets/changesets/commit/1706fb751ecc2f5a792c42f467b2063078d58716)]:
- @changesets/types@2.0.1

@@ -63,3 +62,3 @@

- Updated dependencies [[`011d57f`](https://github.com/atlassian/changesets/commit/011d57f1edf9e37f75a8bef4f918e72166af096e)]:
- Updated dependencies [[`011d57f`](https://github.com/changesets/changesets/commit/011d57f1edf9e37f75a8bef4f918e72166af096e)]:
- @changesets/types@2.0.0

@@ -71,5 +70,5 @@

- [`04ddfd7`](https://github.com/atlassian/changesets/commit/04ddfd7c3acbfb84ef9c92873fe7f9dea1f5145c) [#305](https://github.com/atlassian/changesets/pull/305) Thanks [@Noviny](https://github.com/Noviny)! - Add link to changelog in readme
- [`04ddfd7`](https://github.com/changesets/changesets/commit/04ddfd7c3acbfb84ef9c92873fe7f9dea1f5145c) [#305](https://github.com/changesets/changesets/pull/305) Thanks [@Noviny](https://github.com/Noviny)! - Add link to changelog in readme
- Updated dependencies [[`04ddfd7`](https://github.com/atlassian/changesets/commit/04ddfd7c3acbfb84ef9c92873fe7f9dea1f5145c), [`e56928b`](https://github.com/atlassian/changesets/commit/e56928bbd6f9096def06ac37487bdbf28efec9d1)]:
- Updated dependencies [[`04ddfd7`](https://github.com/changesets/changesets/commit/04ddfd7c3acbfb84ef9c92873fe7f9dea1f5145c), [`e56928b`](https://github.com/changesets/changesets/commit/e56928bbd6f9096def06ac37487bdbf28efec9d1)]:
- @changesets/types@1.0.1

@@ -81,5 +80,5 @@

- [`41e2e3d`](https://github.com/atlassian/changesets/commit/41e2e3dd1053ff2f35a1a07e60793c9099f26997) [#292](https://github.com/atlassian/changesets/pull/292) Thanks [@acheronfail](https://github.com/acheronfail)! - Fix `repository` field in package.json
- [`41e2e3d`](https://github.com/changesets/changesets/commit/41e2e3dd1053ff2f35a1a07e60793c9099f26997) [#292](https://github.com/changesets/changesets/pull/292) Thanks [@acheronfail](https://github.com/acheronfail)! - Fix `repository` field in package.json
- Updated dependencies [[`41e2e3d`](https://github.com/atlassian/changesets/commit/41e2e3dd1053ff2f35a1a07e60793c9099f26997), [`cc8c921`](https://github.com/atlassian/changesets/commit/cc8c92143d4c4b7cca8b9917dfc830a40b5cda20), [`cc8c921`](https://github.com/atlassian/changesets/commit/cc8c92143d4c4b7cca8b9917dfc830a40b5cda20), [`2363366`](https://github.com/atlassian/changesets/commit/2363366756d1b15bddf6d803911baccfca03cbdf)]:
- Updated dependencies [[`41e2e3d`](https://github.com/changesets/changesets/commit/41e2e3dd1053ff2f35a1a07e60793c9099f26997), [`cc8c921`](https://github.com/changesets/changesets/commit/cc8c92143d4c4b7cca8b9917dfc830a40b5cda20), [`cc8c921`](https://github.com/changesets/changesets/commit/cc8c92143d4c4b7cca8b9917dfc830a40b5cda20), [`2363366`](https://github.com/changesets/changesets/commit/2363366756d1b15bddf6d803911baccfca03cbdf)]:
- @changesets/types@1.0.0

@@ -91,3 +90,3 @@

- Updated dependencies [[`8f0a1ef`](https://github.com/atlassian/changesets/commit/8f0a1ef327563512f471677ef0ca99d30da009c0)]:
- Updated dependencies [[`8f0a1ef`](https://github.com/changesets/changesets/commit/8f0a1ef327563512f471677ef0ca99d30da009c0)]:
- @changesets/types@0.4.0

@@ -99,3 +98,3 @@

- [`8dce96f`](https://github.com/atlassian/changesets/commit/8dce96f8aec43f82b35e65f54b06cbeed3275885) [#187](https://github.com/atlassian/changesets/pull/187) Thanks [@gardnerjack](https://github.com/gardnerjack)! - Added --empty flag to the add command for empty changeset files. New tests for adding, writing, parsing, and reading empty changesets.
- [`8dce96f`](https://github.com/changesets/changesets/commit/8dce96f8aec43f82b35e65f54b06cbeed3275885) [#187](https://github.com/changesets/changesets/pull/187) Thanks [@gardnerjack](https://github.com/gardnerjack)! - Added --empty flag to the add command for empty changeset files. New tests for adding, writing, parsing, and reading empty changesets.

@@ -106,5 +105,5 @@ ## 0.2.1

- [8c43fa0](https://github.com/atlassian/changesets/commit/8c43fa061e2a5a01e4f32504ed351d261761c8dc) [#155](https://github.com/atlassian/changesets/pull/155) Thanks [@Noviny](https://github.com/Noviny)! - Add Readme
- [8c43fa0](https://github.com/changesets/changesets/commit/8c43fa061e2a5a01e4f32504ed351d261761c8dc) [#155](https://github.com/changesets/changesets/pull/155) Thanks [@Noviny](https://github.com/Noviny)! - Add Readme
* [0320391](https://github.com/atlassian/changesets/commit/0320391699a73621d0e51ce031062a06cbdefadc) [#163](https://github.com/atlassian/changesets/pull/163) Thanks [@Noviny](https://github.com/Noviny)! - Reordered dependencies in the package json (this should have no impact)
* [0320391](https://github.com/changesets/changesets/commit/0320391699a73621d0e51ce031062a06cbdefadc) [#163](https://github.com/changesets/changesets/pull/163) Thanks [@Noviny](https://github.com/Noviny)! - Reordered dependencies in the package json (this should have no impact)

@@ -118,3 +117,3 @@ * Updated dependencies [8c43fa0, 1ff73b7]:

- [296a6731](https://github.com/atlassian/changesets/commit/296a6731) - Safety bump: Towards the end of preparing changesets v2, there was a lot of chaos - this bump is to ensure every package on npm matches what is found in the repository.
- [296a6731](https://github.com/changesets/changesets/commit/296a6731) - Safety bump: Towards the end of preparing changesets v2, there was a lot of chaos - this bump is to ensure every package on npm matches what is found in the repository.

@@ -121,0 +120,0 @@ ### Patch Changes

@@ -11,3 +11,3 @@ 'use strict';

const mdRegex = /\s*---([^]*?)\n\s*---\s*\n([^]*)/;
const mdRegex = /\s*---([^]*?)\n\s*---(\s*(?:\n|$)[^]*)/;
function parseChangesetFile(contents) {

@@ -14,0 +14,0 @@ const execResult = mdRegex.exec(contents);

@@ -17,3 +17,3 @@ "use strict";

const mdRegex = /\s*---([^]*?)\n\s*---\s*\n([^]*)/;
const mdRegex = /\s*---([^]*?)\n\s*---(\s*(?:\n|$)[^]*)/;

@@ -20,0 +20,0 @@ function parseChangesetFile(contents) {

import yaml from 'js-yaml';
const mdRegex = /\s*---([^]*?)\n\s*---\s*\n([^]*)/;
const mdRegex = /\s*---([^]*?)\n\s*---(\s*(?:\n|$)[^]*)/;
function parseChangesetFile(contents) {

@@ -5,0 +5,0 @@ const execResult = mdRegex.exec(contents);

{
"name": "@changesets/parse",
"version": "0.3.11-temp.0",
"version": "0.3.11",
"description": "Parse a changeset file's contents into a usable json object",

@@ -10,3 +10,3 @@ "main": "dist/parse.cjs.js",

"dependencies": {
"@changesets/types": "^4.1.0-temp.0",
"@changesets/types": "^4.0.2",
"js-yaml": "^3.13.1"

@@ -13,0 +13,0 @@ },

@@ -139,2 +139,24 @@ import outdent from "outdent";

});
it("should be fine if the summary body is completely empty and there is no trailing whitespace", () => {
const changesetMd = outdent`---
"cool-package": minor
---`;
const changeset = parse(changesetMd);
expect(changeset).toEqual({
releases: [{ name: "cool-package", type: "minor" }],
summary: ""
});
});
it("should be fine if there is no summary body and the frontmatter has some trailing whitespace", () => {
const changesetMd = outdent`---
"cool-package": minor
--- `;
const changeset = parse(changesetMd);
expect(changeset).toEqual({
releases: [{ name: "cool-package", type: "minor" }],
summary: ""
});
});
it("should be fine if the changeset is empty", () => {

@@ -152,2 +174,9 @@ const changesetMd = outdent`---

});
it("should be fine if the changeset is empty and without any trailing whitespace", () => {
const changeset = parse(`---\n---`);
expect(changeset).toEqual({
releases: [],
summary: ""
});
});
it("should be fine if the frontmatter is followed by a whitespace on the same line", () => {

@@ -154,0 +183,0 @@ const changesetMd = outdent`---

import yaml from "js-yaml";
import { Release, VersionType } from "@changesets/types";
const mdRegex = /\s*---([^]*?)\n\s*---\s*\n([^]*)/;
const mdRegex = /\s*---([^]*?)\n\s*---(\s*(?:\n|$)[^]*)/;

@@ -6,0 +6,0 @@ export default function parseChangesetFile(

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc