parse-json
Advanced tools
Comparing version 6.0.2 to 7.0.0
{ | ||
"name": "parse-json", | ||
"version": "6.0.2", | ||
"version": "7.0.0", | ||
"description": "Parse JSON with more helpful errors", | ||
@@ -16,9 +16,10 @@ "license": "MIT", | ||
"engines": { | ||
"node": "^12.20.0 || ^14.13.1 || >=16.0.0" | ||
"node": ">=16" | ||
}, | ||
"scripts": { | ||
"test": "xo && nyc ava" | ||
"test": "xo && nyc ava && tsd" | ||
}, | ||
"files": [ | ||
"index.js", | ||
"index.d.ts", | ||
"vendor" | ||
@@ -38,12 +39,14 @@ ], | ||
"dependencies": { | ||
"@babel/code-frame": "^7.16.0", | ||
"@babel/code-frame": "^7.21.4", | ||
"error-ex": "^1.3.2", | ||
"json-parse-even-better-errors": "^2.3.1", | ||
"lines-and-columns": "^2.0.2" | ||
"json-parse-even-better-errors": "^3.0.0", | ||
"lines-and-columns": "^2.0.3", | ||
"type-fest": "^3.8.0" | ||
}, | ||
"devDependencies": { | ||
"ava": "^3.15.0", | ||
"ava": "^5.2.0", | ||
"nyc": "^15.1.0", | ||
"xo": "^0.46.4" | ||
"tsd": "^0.28.1", | ||
"xo": "^0.54.0" | ||
} | ||
} |
@@ -14,3 +14,3 @@ # parse-json | ||
```js | ||
import parseJson from 'parse-json'; | ||
import parseJson, {JSONError} from 'parse-json'; | ||
@@ -55,3 +55,3 @@ const json = '{\n\t"foo": true,\n}'; | ||
} catch (error) { | ||
if (error instanceof parseJson.JSONError) { | ||
if (error instanceof JSONError) { | ||
error.fileName = 'foo.json'; | ||
@@ -95,3 +95,3 @@ } | ||
### parseJson.JSONError | ||
### JSONError | ||
@@ -111,13 +111,1 @@ Exposed for `instanceof` checking. | ||
The printable section of the JSON which produces the error. | ||
--- | ||
<div align="center"> | ||
<b> | ||
<a href="https://tidelift.com/subscription/pkg/npm-parse-json?utm_source=npm-parse-json&utm_medium=referral&utm_campaign=readme">Get professional support for this package with a Tidelift subscription</a> | ||
</b> | ||
<br> | ||
<sub> | ||
Tidelift helps make open source sustainable for maintainers while giving companies<br>assurances about security, maintenance, and licensing for their dependencies. | ||
</sub> | ||
</div> |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
8044
5
143
5
4
108
+ Addedtype-fest@^3.8.0
+ Addedjson-parse-even-better-errors@3.0.2(transitive)
+ Addedtype-fest@3.13.1(transitive)
- Removedjson-parse-even-better-errors@2.3.1(transitive)
Updated@babel/code-frame@^7.21.4
Updatedlines-and-columns@^2.0.3