build
This commit is contained in:
+2
-2
@@ -1,6 +1,6 @@
|
||||
'use strict';
|
||||
const errorEx = require('error-ex');
|
||||
const fallback = require('json-parse-better-errors');
|
||||
const fallback = require('json-parse-even-better-errors');
|
||||
const {default: LinesAndColumns} = require('lines-and-columns');
|
||||
const {codeFrameColumns} = require('@babel/code-frame');
|
||||
|
||||
@@ -24,7 +24,7 @@ module.exports = (string, reviver, filename) => {
|
||||
}
|
||||
} catch (error) {
|
||||
error.message = error.message.replace(/\n/g, '');
|
||||
const indexMatch = error.message.match(/in JSON at position (\d+) while parsing near/);
|
||||
const indexMatch = error.message.match(/in JSON at position (\d+) while parsing/);
|
||||
|
||||
const jsonError = new JSONError(error);
|
||||
if (filename) {
|
||||
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
MIT License
|
||||
|
||||
Copyright (c) Sindre Sorhus <[email protected]> (sindresorhus.com)
|
||||
Copyright (c) Sindre Sorhus <[email protected]> (https://sindresorhus.com)
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
||||
|
||||
|
||||
+17
-20
@@ -1,47 +1,43 @@
|
||||
{
|
||||
"_args": [
|
||||
[
|
||||
"[email protected]",
|
||||
"/Users/pjquirk/Source/GitHub/actions/labeler"
|
||||
]
|
||||
],
|
||||
"_development": true,
|
||||
"_from": "[email protected]",
|
||||
"_id": "[email protected]",
|
||||
"_from": "parse-json@^5.0.0",
|
||||
"_id": "[email protected]",
|
||||
"_inBundle": false,
|
||||
"_integrity": "sha512-OOY5b7PAEFV0E2Fir1KOkxchnZNCdowAJgQ5NuxjpBKTRP3pQhwkrkxqQjeoKJ+fO7bCpmIZaogI4eZGDMEGOw==",
|
||||
"_integrity": "sha512-+mi/lmVVNKFNVyLXV31ERiy2CY5E1/F6QtJFEzoChPRwwngMNXRDQ9GJ5WdE2Z2P4AujsOi0/+2qHID68KwfIQ==",
|
||||
"_location": "/read-pkg/parse-json",
|
||||
"_phantomChildren": {},
|
||||
"_requested": {
|
||||
"type": "version",
|
||||
"type": "range",
|
||||
"registry": true,
|
||||
"raw": "[email protected]",
|
||||
"raw": "parse-json@^5.0.0",
|
||||
"name": "parse-json",
|
||||
"escapedName": "parse-json",
|
||||
"rawSpec": "5.0.0",
|
||||
"rawSpec": "^5.0.0",
|
||||
"saveSpec": null,
|
||||
"fetchSpec": "5.0.0"
|
||||
"fetchSpec": "^5.0.0"
|
||||
},
|
||||
"_requiredBy": [
|
||||
"/read-pkg"
|
||||
],
|
||||
"_resolved": "https://registry.npmjs.org/parse-json/-/parse-json-5.0.0.tgz",
|
||||
"_spec": "5.0.0",
|
||||
"_where": "/Users/pjquirk/Source/GitHub/actions/labeler",
|
||||
"_resolved": "https://registry.npmjs.org/parse-json/-/parse-json-5.1.0.tgz",
|
||||
"_shasum": "f96088cdf24a8faa9aea9a009f2d9d942c999646",
|
||||
"_spec": "parse-json@^5.0.0",
|
||||
"_where": "/Users/dakale/dev/GitHub/actions/labeler/node_modules/read-pkg",
|
||||
"author": {
|
||||
"name": "Sindre Sorhus",
|
||||
"email": "[email protected]",
|
||||
"url": "sindresorhus.com"
|
||||
"url": "https://sindresorhus.com"
|
||||
},
|
||||
"bugs": {
|
||||
"url": "https://github.com/sindresorhus/parse-json/issues"
|
||||
},
|
||||
"bundleDependencies": false,
|
||||
"dependencies": {
|
||||
"@babel/code-frame": "^7.0.0",
|
||||
"error-ex": "^1.3.1",
|
||||
"json-parse-better-errors": "^1.0.1",
|
||||
"json-parse-even-better-errors": "^2.3.0",
|
||||
"lines-and-columns": "^1.1.6"
|
||||
},
|
||||
"deprecated": false,
|
||||
"description": "Parse JSON with more helpful errors",
|
||||
"devDependencies": {
|
||||
"ava": "^1.4.1",
|
||||
@@ -55,6 +51,7 @@
|
||||
"index.js",
|
||||
"vendor"
|
||||
],
|
||||
"funding": "https://github.com/sponsors/sindresorhus",
|
||||
"homepage": "https://github.com/sindresorhus/parse-json#readme",
|
||||
"keywords": [
|
||||
"parse",
|
||||
@@ -76,5 +73,5 @@
|
||||
"scripts": {
|
||||
"test": "xo && nyc ava"
|
||||
},
|
||||
"version": "5.0.0"
|
||||
"version": "5.1.0"
|
||||
}
|
||||
|
||||
+1
-4
@@ -1,15 +1,13 @@
|
||||
# parse-json [](https://travis-ci.org/sindresorhus/parse-json)
|
||||
# parse-json [](https://travis-ci.com/github/sindresorhus/parse-json)
|
||||
|
||||
> Parse JSON with more helpful errors
|
||||
|
||||
|
||||
## Install
|
||||
|
||||
```
|
||||
$ npm install parse-json
|
||||
```
|
||||
|
||||
|
||||
## Usage
|
||||
|
||||
```js
|
||||
@@ -87,7 +85,6 @@ Type: `string`
|
||||
|
||||
Filename displayed in the error message.
|
||||
|
||||
|
||||
---
|
||||
|
||||
<div align="center">
|
||||
|
||||
+12
-16
@@ -1,38 +1,32 @@
|
||||
{
|
||||
"_args": [
|
||||
[
|
||||
"[email protected]",
|
||||
"/Users/pjquirk/Source/GitHub/actions/labeler"
|
||||
]
|
||||
],
|
||||
"_development": true,
|
||||
"_from": "[email protected]",
|
||||
"_from": "read-pkg@^5.1.1",
|
||||
"_id": "[email protected]",
|
||||
"_inBundle": false,
|
||||
"_integrity": "sha512-Ug69mNOpfvKDAc2Q8DRpMjjzdtrnv9HcSMX+4VsZxD1aZ6ZzrIE7rlzXBtWTyhULSMKg076AW6WR5iZpD0JiOg==",
|
||||
"_location": "/read-pkg",
|
||||
"_phantomChildren": {
|
||||
"@babel/code-frame": "7.5.5",
|
||||
"@babel/code-frame": "7.10.4",
|
||||
"error-ex": "1.3.2",
|
||||
"json-parse-better-errors": "1.0.2",
|
||||
"json-parse-even-better-errors": "2.3.1",
|
||||
"lines-and-columns": "1.1.6"
|
||||
},
|
||||
"_requested": {
|
||||
"type": "version",
|
||||
"type": "range",
|
||||
"registry": true,
|
||||
"raw": "read-pkg@5.2.0",
|
||||
"raw": "read-pkg@^5.1.1",
|
||||
"name": "read-pkg",
|
||||
"escapedName": "read-pkg",
|
||||
"rawSpec": "5.2.0",
|
||||
"rawSpec": "^5.1.1",
|
||||
"saveSpec": null,
|
||||
"fetchSpec": "5.2.0"
|
||||
"fetchSpec": "^5.1.1"
|
||||
},
|
||||
"_requiredBy": [
|
||||
"/husky"
|
||||
],
|
||||
"_resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-5.2.0.tgz",
|
||||
"_spec": "5.2.0",
|
||||
"_where": "/Users/pjquirk/Source/GitHub/actions/labeler",
|
||||
"_shasum": "7bf295438ca5a33e56cd30e053b34ee7250c93cc",
|
||||
"_spec": "read-pkg@^5.1.1",
|
||||
"_where": "/Users/dakale/dev/GitHub/actions/labeler/node_modules/husky",
|
||||
"author": {
|
||||
"name": "Sindre Sorhus",
|
||||
"email": "[email protected]",
|
||||
@@ -41,12 +35,14 @@
|
||||
"bugs": {
|
||||
"url": "https://github.com/sindresorhus/read-pkg/issues"
|
||||
},
|
||||
"bundleDependencies": false,
|
||||
"dependencies": {
|
||||
"@types/normalize-package-data": "^2.4.0",
|
||||
"normalize-package-data": "^2.5.0",
|
||||
"parse-json": "^5.0.0",
|
||||
"type-fest": "^0.6.0"
|
||||
},
|
||||
"deprecated": false,
|
||||
"description": "Read a package.json file",
|
||||
"devDependencies": {
|
||||
"ava": "^2.2.0",
|
||||
|
||||
Reference in New Issue
Block a user