diff --git a/lib/Compiler.js b/lib/Compiler.js index 2bdd15b9983..2d59a1a6481 100644 --- a/lib/Compiler.js +++ b/lib/Compiler.js @@ -5,7 +5,7 @@ "use strict"; -const parseJson = require("json-parse-better-errors"); +const parseJson = require("json-parse-even-better-errors"); const asyncLib = require("neo-async"); const { SyncHook, diff --git a/lib/DllReferencePlugin.js b/lib/DllReferencePlugin.js index 5effddb3f55..1be7b86d120 100644 --- a/lib/DllReferencePlugin.js +++ b/lib/DllReferencePlugin.js @@ -5,7 +5,7 @@ "use strict"; -const parseJson = require("json-parse-better-errors"); +const parseJson = require("json-parse-even-better-errors"); const DelegatedModuleFactoryPlugin = require("./DelegatedModuleFactoryPlugin"); const ExternalModuleFactoryPlugin = require("./ExternalModuleFactoryPlugin"); const WebpackError = require("./WebpackError"); diff --git a/lib/NormalModule.js b/lib/NormalModule.js index fdc28f1a6ca..4d1264f9b3c 100644 --- a/lib/NormalModule.js +++ b/lib/NormalModule.js @@ -5,7 +5,7 @@ "use strict"; -const parseJson = require("json-parse-better-errors"); +const parseJson = require("json-parse-even-better-errors"); const { getContext, runLoaders } = require("loader-runner"); const querystring = require("querystring"); const { HookMap, SyncHook, AsyncSeriesBailHook } = require("tapable"); diff --git a/lib/json/JsonParser.js b/lib/json/JsonParser.js index 43b6d57dc65..b56394fd752 100644 --- a/lib/json/JsonParser.js +++ b/lib/json/JsonParser.js @@ -5,7 +5,7 @@ "use strict"; -const parseJson = require("json-parse-better-errors"); +const parseJson = require("json-parse-even-better-errors"); const Parser = require("../Parser"); const JsonExportsDependency = require("../dependencies/JsonExportsDependency"); const JsonData = require("./JsonData"); diff --git a/package.json b/package.json index 4848da2c8c3..465d24500e6 100644 --- a/package.json +++ b/package.json @@ -20,7 +20,7 @@ "events": "^3.2.0", "glob-to-regexp": "^0.4.1", "graceful-fs": "^4.2.9", - "json-parse-better-errors": "^1.0.2", + "json-parse-even-better-errors": "^2.3.1", "loader-runner": "^4.2.0", "mime-types": "^2.1.27", "neo-async": "^2.6.2", diff --git a/test/__snapshots__/StatsTestCases.basictest.js.snap b/test/__snapshots__/StatsTestCases.basictest.js.snap index c7bb869e6b0..cdd346662d2 100644 --- a/test/__snapshots__/StatsTestCases.basictest.js.snap +++ b/test/__snapshots__/StatsTestCases.basictest.js.snap @@ -1009,7 +1009,7 @@ exports[`StatsTestCases should print correct stats for dll-reference-plugin-issu ./entry.js 29 bytes [built] [code generated] ERROR in Dll manifest ./blank-manifest.json -Unexpected end of JSON input while parsing near '' +Unexpected end of JSON input while parsing empty string webpack x.x.x compiled with 1 error in X ms" `; diff --git a/yarn.lock b/yarn.lock index 50074a06add..eda8df822d7 100644 --- a/yarn.lock +++ b/yarn.lock @@ -3934,11 +3934,16 @@ json-loader@^0.5.7: resolved "https://registry.yarnpkg.com/json-loader/-/json-loader-0.5.7.tgz#dca14a70235ff82f0ac9a3abeb60d337a365185d" integrity sha512-QLPs8Dj7lnf3e3QYS1zkCo+4ZwqOiF9d/nZnYozTISxXWCfNs9yuky5rJw4/W34s7POaNlbZmQGaB5NiXCbP4w== -json-parse-better-errors@^1.0.1, json-parse-better-errors@^1.0.2: +json-parse-better-errors@^1.0.1: version "1.0.2" resolved "https://registry.yarnpkg.com/json-parse-better-errors/-/json-parse-better-errors-1.0.2.tgz#bb867cfb3450e69107c131d1c514bab3dc8bcaa9" integrity sha512-mrqyZKfX5EhL7hvqcV6WG1yYjnjeuYDzDhhcAAUrq8Po85NBQBJP+ZDUT75qZQ98IkUoBqdkExkukOU7Ts2wrw== +json-parse-even-better-errors@^2.3.1: + version "2.3.1" + resolved "https://registry.yarnpkg.com/json-parse-even-better-errors/-/json-parse-even-better-errors-2.3.1.tgz#7c47805a94319928e05777405dc12e1f7a4ee02d" + integrity sha512-xyFwyhro/JEof6Ghe2iz2NcXoj2sloNsWr/XsERDK/oiPCfaNhl5ONfp+jQdAZRQQ0IJWNzH9zIZF7li91kh2w== + json-schema-ref-parser@^9.0.1: version "9.0.6" resolved "https://registry.yarnpkg.com/json-schema-ref-parser/-/json-schema-ref-parser-9.0.6.tgz#fc89a5e6b853f2abe8c0af30d3874196526adb60"