@oliasoft-open-source/node-json-migrator 2.3.5-beta-1 → 2.3.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/plan/plan.js CHANGED
@@ -19,7 +19,14 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de
19
19
  * @param {String} json
20
20
  * @returns {String} formatted json
21
21
  */
22
- const formatJSON = json => JSON.stringify(JSON.parse(json), null, 2);
22
+ const formatJSON = json => {
23
+ try {
24
+ return JSON.stringify(JSON.parse(json), null, 2);
25
+ } catch (e) {
26
+ console.warn('Unable to parse JSON');
27
+ throw new Error(e);
28
+ }
29
+ };
23
30
 
24
31
  //https://stackoverflow.com/a/31102605/942635
25
32
  exports.formatJSON = formatJSON;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@oliasoft-open-source/node-json-migrator",
3
- "version": "2.3.5-beta-1",
3
+ "version": "2.3.5",
4
4
  "description": "A library for JSON migrations",
5
5
  "homepage": "https://oliasoft-open-source.gitlab.io/node-postgresql-migrator",
6
6
  "bugs": {