source-map-loader
Advanced tools
Comparing version 0.2.3 to 0.2.4
@@ -5,2 +5,14 @@ # Change Log | ||
<a name="0.2.4"></a> | ||
## [0.2.4](https://github.com/webpack-contrib/source-map-loader/compare/v0.2.3...v0.2.4) (2018-08-14) | ||
### Bug Fixes | ||
* **index:** handle exception on loading invalid source maps ([#67](https://github.com/webpack-contrib/source-map-loader/issues/67)) ([78ad469](https://github.com/webpack-contrib/source-map-loader/commit/78ad469)) | ||
* **index:** resolve source maps with root-relative paths correctly ([#68](https://github.com/webpack-contrib/source-map-loader/issues/68)) ([e2fdbfd](https://github.com/webpack-contrib/source-map-loader/commit/e2fdbfd)) | ||
* **package:** 5 low severity vulnerabilities ([#72](https://github.com/webpack-contrib/source-map-loader/issues/72)) ([8262587](https://github.com/webpack-contrib/source-map-loader/commit/8262587)) | ||
<a name="0.2.3"></a> | ||
@@ -7,0 +19,0 @@ ## [0.2.3](https://github.com/webpack/source-map-loader/compare/v0.2.2...v0.2.3) (2017-10-23) |
16
index.js
@@ -5,3 +5,2 @@ /* | ||
*/ | ||
var SourceMap = require("source-map"); | ||
var fs = require("fs"); | ||
@@ -39,7 +38,7 @@ var path = require("path"); | ||
emitWarning("Cannot parse inline SourceMap '" + mapBase64.substr(0, 50) + "': " + e); | ||
return untouched(); | ||
return untouched(); | ||
} | ||
processMap(map, this.context, callback); | ||
} else { | ||
resolve(this.context, loaderUtils.urlToRequest(url), function(err, result) { | ||
resolve(this.context, loaderUtils.urlToRequest(url, true), function(err, result) { | ||
if(err) { | ||
@@ -55,3 +54,10 @@ emitWarning("Cannot find SourceMap '" + url + "': " + err); | ||
} | ||
processMap(JSON.parse(content), path.dirname(result), callback); | ||
var map; | ||
try { | ||
map = JSON.parse(content); | ||
} catch (e) { | ||
emitWarning("Cannot parse SourceMap '" + url + "': " + e); | ||
return untouched(); | ||
} | ||
processMap(map, path.dirname(result), callback); | ||
}); | ||
@@ -75,3 +81,3 @@ }.bind(this)); | ||
async.map(missingSources, function(source, callback) { | ||
resolve(context, loaderUtils.urlToRequest(source), function(err, result) { | ||
resolve(context, loaderUtils.urlToRequest(source, true), function(err, result) { | ||
if(err) { | ||
@@ -78,0 +84,0 @@ emitWarning("Cannot find source file '" + source + "': " + err); |
{ | ||
"name": "source-map-loader", | ||
"version": "0.2.3", | ||
"version": "0.2.4", | ||
"author": "Tobias Koppers @sokra", | ||
"description": "extracts inlined source map and offers it to webpack", | ||
"engines": { | ||
"node": ">= 6" | ||
}, | ||
"scripts": { | ||
"test": "mocha -R spec", | ||
"travis:test": "mocha -R spec", | ||
"release": "yarn run standard-version" | ||
"release": "standard-version" | ||
}, | ||
"dependencies": { | ||
"async": "^2.5.0", | ||
"loader-utils": "^1.1.0" | ||
}, | ||
"devDependencies": { | ||
"mocha": "^1.18.2", | ||
"should": "^3.3.1", | ||
"standard-version": "^4.0.0" | ||
"mocha": "^5.0.5", | ||
"should": "^13.2.1", | ||
"standard-version": "^4.4.0" | ||
}, | ||
"repository": { | ||
"type": "git", | ||
"url": "git://github.com/webpack/source-map-loader.git" | ||
}, | ||
"licenses": [ | ||
{ | ||
"type": "MIT", | ||
"url": "http://www.opensource.org/licenses/mit-license.php" | ||
} | ||
], | ||
"dependencies": { | ||
"async": "^2.5.0", | ||
"loader-utils": "~0.2.2", | ||
"source-map": "~0.6.1" | ||
} | ||
"bugs": "https://github.com/webpack-contrib/source-map-loader/issues", | ||
"homepage": "https://github.com/webpack-contrib/source-map-loader", | ||
"repository": "https://github.com/webpack-contrib/source-map-loader.git", | ||
"license": "MIT" | ||
} |
@@ -44,3 +44,3 @@ [![npm][npm]][npm-url] | ||
This loader is especially useful when using 3rd-party libraries having their own source maps. If not extracted and processed into the souce map of the webpack bundle, browsers may misinterpret source map data. `source-map-loader` allows webpack to maintain source map data continuity across libraries so ease of debugging is preserved. | ||
This loader is especially useful when using 3rd-party libraries having their own source maps. If not extracted and processed into the source map of the webpack bundle, browsers may misinterpret source map data. `source-map-loader` allows webpack to maintain source map data continuity across libraries so ease of debugging is preserved. | ||
@@ -47,0 +47,0 @@ `source-map-loader` will extract from any JavaScript file, including those in the `node_modules` directory. Be mindful in setting [include](https://webpack.js.org/configuration/module/#rule-include) and [exclude](https://webpack.js.org/configuration/module/#rule-exclude) rule conditions to maximize bundling performance. |
Sorry, the diff of this file is not supported yet
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
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
No repository
Supply chain riskPackage does not have a linked source code repository. Without this field, a package will have no reference to the location of the source code use to generate the package.
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
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
No bug tracker
MaintenancePackage does not have a linked bug tracker in package.json.
Found 1 instance in 1 package
No website
QualityPackage does not have a website.
Found 1 instance in 1 package
2
29
424
1
23331
3
2
+ Addedbig.js@5.2.2(transitive)
+ Addedemojis-list@3.0.0(transitive)
+ Addedjson5@1.0.2(transitive)
+ Addedloader-utils@1.4.2(transitive)
+ Addedminimist@1.2.8(transitive)
- Removedsource-map@~0.6.1
- Removedbig.js@3.2.0(transitive)
- Removedemojis-list@2.1.0(transitive)
- Removedjson5@0.5.1(transitive)
- Removedloader-utils@0.2.17(transitive)
- Removedobject-assign@4.1.1(transitive)
- Removedsource-map@0.6.1(transitive)
Updatedloader-utils@^1.1.0