get-source
Advanced tools
Comparing version 1.0.17 to 1.0.18
@@ -16,3 +16,3 @@ "use strict"; | ||
const m = (x = '') => (x in m.cache) ? m.cache[x] : (m.cache[x] = f(x)) | ||
const m = x => (x in m.cache) ? m.cache[x] : (m.cache[x] = f(x)) | ||
m.forgetEverything = () => { m.cache = Object.create (null) } | ||
@@ -69,3 +69,3 @@ m.cache = Object.create (null) | ||
constructor (path, text /* optional */) { | ||
this.path = path | ||
@@ -84,3 +84,3 @@ | ||
xhr.send (null) | ||
this.text = xhr.responseText } | ||
@@ -106,6 +106,10 @@ | ||
const [,url] = this.text.match (/\u0023 sourceMappingURL=(.+)\n?/) || [undefined, undefined] // escape #, otherwise it will match this exact line.. %) | ||
// Node v4 does not support destructuring... | ||
// const [,url] = this.text.match (/\u0023 sourceMappingURL=(.+)\n?/) || [undefined, undefined] // escape #, otherwise it will match this exact line.. %) | ||
const match = this.text.match (/\u0023 sourceMappingURL=(.+)\n?/) || [undefined, undefined] // escape #, otherwise it will match this exact line.. %) | ||
, url = match[1] | ||
if (url) { | ||
const sourceMap = new SourceMap (this.path, url) | ||
@@ -112,0 +116,0 @@ |
{ | ||
"name": "get-source", | ||
"version": "1.0.17", | ||
"version": "1.0.18", | ||
"description": "Platform-agnostic source code inspection, with sourcemaps support", | ||
"main": "get-source", | ||
"scripts": { | ||
"test": "mocha --reporter spec", | ||
"autotest": "mocha --reporter spec --watch" | ||
"test-browser": "mocha test/test.browser --reporter spec", | ||
"test": "nyc --reporter=html --reporter=text mocha test/test.path test/test.node --reporter spec", | ||
"coveralls": "nyc report --reporter=text-lcov | coveralls" | ||
}, | ||
@@ -28,12 +29,15 @@ "repository": { | ||
"chai": "^3.5.0", | ||
"chromedriver": "^2.23.1", | ||
"chromedriver": "^2.32.3", | ||
"coveralls": "^2.13.1", | ||
"istanbul": "^0.4.5", | ||
"memory-fs": "^0.3.0", | ||
"mocha": "^2.4.5", | ||
"mocha": "^3.5.3", | ||
"nyc": "^11.2.1", | ||
"selenium-webdriver": "^2.53.3", | ||
"webpack": "^3.2.0" | ||
"webpack": "^3.6.0" | ||
}, | ||
"dependencies": { | ||
"data-uri-to-buffer": "^1.0.0", | ||
"source-map": "^0.5.6" | ||
"data-uri-to-buffer": "^1.2.0", | ||
"source-map": "^0.5.7" | ||
} | ||
} |
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
206926
22
6464
9
1
Updateddata-uri-to-buffer@^1.2.0
Updatedsource-map@^0.5.7