aboutsummaryrefslogtreecommitdiff
path: root/node_modules/convert-source-map
diff options
context:
space:
mode:
authorFlorian Dold <florian.dold@gmail.com>2017-12-27 19:33:54 +0100
committerFlorian Dold <florian.dold@gmail.com>2017-12-27 19:34:16 +0100
commit0e6de2c31dbf8c21277481f112e99c52b913940f (patch)
tree91789032de3b8eec9d789acd1323f25fc5d08422 /node_modules/convert-source-map
parentceda0da31ad542c598c68146ae0712ca03df3d71 (diff)
downloadwallet-core-0e6de2c31dbf8c21277481f112e99c52b913940f.tar.xz
node_modules
Diffstat (limited to 'node_modules/convert-source-map')
-rw-r--r--node_modules/convert-source-map/.npmignore16
-rw-r--r--node_modules/convert-source-map/.travis.yml7
-rw-r--r--node_modules/convert-source-map/example/comment-to-json.js15
-rw-r--r--node_modules/convert-source-map/index.js7
-rw-r--r--node_modules/convert-source-map/package.json7
-rw-r--r--node_modules/convert-source-map/test/comment-regex.js137
-rw-r--r--node_modules/convert-source-map/test/convert-source-map.js255
-rw-r--r--node_modules/convert-source-map/test/fixtures/map-file-comment-double-slash.css14
-rw-r--r--node_modules/convert-source-map/test/fixtures/map-file-comment-inline.css14
-rw-r--r--node_modules/convert-source-map/test/fixtures/map-file-comment.css14
-rw-r--r--node_modules/convert-source-map/test/fixtures/map-file-comment.css.map6
-rw-r--r--node_modules/convert-source-map/test/map-file-comment.js70
12 files changed, 8 insertions, 554 deletions
diff --git a/node_modules/convert-source-map/.npmignore b/node_modules/convert-source-map/.npmignore
deleted file mode 100644
index de78e273f..000000000
--- a/node_modules/convert-source-map/.npmignore
+++ /dev/null
@@ -1,16 +0,0 @@
-lib-cov
-*.seed
-*.log
-*.csv
-*.dat
-*.out
-*.pid
-*.gz
-
-pids
-logs
-results
-
-node_modules
-npm-debug.log
-tmp
diff --git a/node_modules/convert-source-map/.travis.yml b/node_modules/convert-source-map/.travis.yml
deleted file mode 100644
index 86bd20065..000000000
--- a/node_modules/convert-source-map/.travis.yml
+++ /dev/null
@@ -1,7 +0,0 @@
-language: node_js
-node_js:
- - "0.10"
- - "0.12"
- - "4"
- - "6"
- - "node"
diff --git a/node_modules/convert-source-map/example/comment-to-json.js b/node_modules/convert-source-map/example/comment-to-json.js
deleted file mode 100644
index a9bc2f128..000000000
--- a/node_modules/convert-source-map/example/comment-to-json.js
+++ /dev/null
@@ -1,15 +0,0 @@
-'use strict';
-
-var convert = require('..');
-
-var json = convert
- .fromComment('//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYnVpbGQvZm9vLm1pbi5qcyIsInNvdXJjZXMiOlsic3JjL2Zvby5qcyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSIsInNvdXJjZVJvb3QiOiIvIn0=')
- .toJSON();
-
-var modified = convert
- .fromComment('//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYnVpbGQvZm9vLm1pbi5qcyIsInNvdXJjZXMiOlsic3JjL2Zvby5qcyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSIsInNvdXJjZVJvb3QiOiIvIn0=')
- .setProperty('sources', [ 'SRC/FOO.JS' ])
- .toJSON();
-
-console.log(json);
-console.log(modified);
diff --git a/node_modules/convert-source-map/index.js b/node_modules/convert-source-map/index.js
index e171a673c..2d08f1e2b 100644
--- a/node_modules/convert-source-map/index.js
+++ b/node_modules/convert-source-map/index.js
@@ -10,9 +10,8 @@ Object.defineProperty(exports, 'commentRegex', {
Object.defineProperty(exports, 'mapFileCommentRegex', {
get: function getMapFileCommentRegex () {
- //Example (Extra space between slashes added to solve Safari bug. Exclude space in production):
- // / /# sourceMappingURL=foo.js.map /*# sourceMappingURL=foo.js.map */
- return /(?:\/\/[@#][ \t]+sourceMappingURL=([^\s'"]+?)[ \t]*$)|(?:\/\*[@#][ \t]+sourceMappingURL=([^\*]+?)[ \t]*(?:\*\/){1}[ \t]*$)/mg;
+ // Matches sourceMappingURL in either // or /* comment styles.
+ return /(?:\/\/[@#][ \t]+sourceMappingURL=([^\s'"`]+?)[ \t]*$)|(?:\/\*[@#][ \t]+sourceMappingURL=([^\*]+?)[ \t]*(?:\*\/){1}[ \t]*$)/mg;
}
});
@@ -73,7 +72,7 @@ Converter.prototype.toObject = function () {
};
Converter.prototype.addProperty = function (key, value) {
- if (this.sourcemap.hasOwnProperty(key)) throw new Error('property %s already exists on the sourcemap, use set property instead');
+ if (this.sourcemap.hasOwnProperty(key)) throw new Error('property "' + key + '" already exists on the sourcemap, use set property instead');
return this.setProperty(key, value);
};
diff --git a/node_modules/convert-source-map/package.json b/node_modules/convert-source-map/package.json
index 6d25f40ab..744043fb1 100644
--- a/node_modules/convert-source-map/package.json
+++ b/node_modules/convert-source-map/package.json
@@ -1,6 +1,6 @@
{
"name": "convert-source-map",
- "version": "1.5.0",
+ "version": "1.5.1",
"description": "Converts a source-map from/to different formats and allows adding/changing properties.",
"main": "index.js",
"scripts": {
@@ -32,5 +32,8 @@
"license": "MIT",
"engine": {
"node": ">=0.6"
- }
+ },
+ "files": [
+ "index.js"
+ ]
}
diff --git a/node_modules/convert-source-map/test/comment-regex.js b/node_modules/convert-source-map/test/comment-regex.js
deleted file mode 100644
index 7e588dad4..000000000
--- a/node_modules/convert-source-map/test/comment-regex.js
+++ /dev/null
@@ -1,137 +0,0 @@
-'use strict';
-/*jshint asi: true */
-
-var test = require('tap').test
- , generator = require('inline-source-map')
- , convert = require('..')
-
-function comment(prefix, suffix) {
- var rx = convert.commentRegex;
- return rx.test(prefix + 'sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiIiwic291cmNlcyI6WyJmdW5jdGlvbiBmb28oKSB7XG4gY29uc29sZS5sb2coXCJoZWxsbyBJIGFtIGZvb1wiKTtcbiBjb25zb2xlLmxvZyhcIndobyBhcmUgeW91XCIpO1xufVxuXG5mb28oKTtcbiJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSJ9' + suffix)
-}
-
-function commentWithCharSet(prefix, suffix, sep) {
- sep = sep || ':';
- var rx = convert.commentRegex;
- return rx.test(prefix + 'sourceMappingURL=data:application/json;charset' + sep +'utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiIiwic291cmNlcyI6WyJmdW5jdGlvbiBmb28oKSB7XG4gY29uc29sZS5sb2coXCJoZWxsbyBJIGFtIGZvb1wiKTtcbiBjb25zb2xlLmxvZyhcIndobyBhcmUgeW91XCIpO1xufVxuXG5mb28oKTtcbiJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSJ9' + suffix)
-}
-
-// Source Map v2 Tests
-test('comment regex old spec - @', function (t) {
- [
- '//@ ',
- ' //@ ', // with leading space
- '\t//@ ', // with leading tab
- '//@ ', // with leading text
- '/*@ ', // multi line style
- ' /*@ ', // multi line style with leading spaces
- '\t/*@ ', // multi line style with leading tab
- '/*@ ', // multi line style with leading text
- ].forEach(function (x) {
- t.ok(comment(x, ''), 'matches ' + x)
- t.ok(commentWithCharSet(x, ''), 'matches ' + x + ' with charset')
- t.ok(commentWithCharSet(x, '', '='), 'matches ' + x + ' with charset')
- });
-
- [
- ' @// @',
- ' @/* @',
- ].forEach(function (x) { t.ok(!comment(x, ''), 'should not match ' + x) })
-
- t.end()
-})
-
-test('comment regex new spec - #', function (t) {
- [
- ' //# ', // with leading spaces
- '\t//# ', // with leading tab
- '//# ', // with leading text
- '/*# ', // multi line style
- ' /*# ', // multi line style with leading spaces
- '\t/*# ', // multi line style with leading tab
- '/*# ', // multi line style with leading text
- ].forEach(function (x) {
- t.ok(comment(x, ''), 'matches ' + x)
- t.ok(commentWithCharSet(x, ''), 'matches ' + x + ' with charset')
- t.ok(commentWithCharSet(x, '', '='), 'matches ' + x + ' with charset')
- });
-
- [
- ' #// #',
- ' #/* #',
- ].forEach(function (x) { t.ok(!comment(x, ''), 'should not match ' + x) })
-
- t.end()
-})
-
-function mapFileCommentWrap(s1, s2) {
- var mapFileRx = convert.mapFileCommentRegex;
- return mapFileRx.test(s1 + 'sourceMappingURL=foo.js.map' + s2)
-}
-
-test('mapFileComment regex old spec - @', function (t) {
-
- [
- ['//@ ', ''],
- [' //@ ', ''], // with leading spaces
- ['\t//@ ', ''], // with a leading tab
- ['///@ ', ''], // with a leading text
- [';//@ ', ''], // with a leading text
- ['return//@ ', ''], // with a leading text
- ].forEach(function (x) { t.ok(mapFileCommentWrap(x[0], x[1]), 'matches ' + x.join(' :: ')) });
-
- [
- [' @// @', ''],
- ['var sm = "//@ ', '"'], // not inside a string
- ['var sm = \'//@ ', '\''], // not inside a string
- ['var sm = \' //@ ', '\''], // not inside a string
- ].forEach(function (x) { t.ok(!mapFileCommentWrap(x[0], x[1]), 'does not match ' + x.join(' :: ')) })
- t.end()
-})
-
-test('mapFileComment regex new spec - #', function (t) {
- [
- ['//# ', ''],
- [' //# ', ''], // with leading space
- ['\t//# ', ''], // with leading tab
- ['///# ', ''], // with leading text
- [';//# ', ''], // with leading text
- ['return//# ', ''], // with leading text
- ].forEach(function (x) { t.ok(mapFileCommentWrap(x[0], x[1]), 'matches ' + x.join(' :: ')) });
-
- [
- [' #// #', ''],
- ['var sm = "//# ', '"'], // not inside a string
- ['var sm = \'//# ', '\''], // not inside a string
- ['var sm = \' //# ', '\''], // not inside a string
- ].forEach(function (x) { t.ok(!mapFileCommentWrap(x[0], x[1]), 'does not match ' + x.join(' :: ')) })
- t.end()
-})
-
-test('mapFileComment regex /* */ old spec - @', function (t) {
- [ [ '/*@ ', '*/' ]
- , [' /*@ ', ' */ ' ] // with leading spaces
- , [ '\t/*@ ', ' \t*/\t '] // with a leading tab
- , [ 'leading string/*@ ', '*/' ] // with a leading string
- , [ '/*@ ', ' \t*/\t '] // with trailing whitespace
- ].forEach(function (x) { t.ok(mapFileCommentWrap(x[0], x[1]), 'matches ' + x.join(' :: ')) });
-
- [ ['/*@ ', ' */ */ ' ], // not the last thing on its line
- ['/*@ ', ' */ more text ' ] // not the last thing on its line
- ].forEach(function (x) { t.ok(!mapFileCommentWrap(x[0], x[1]), 'does not match ' + x.join(' :: ')) });
- t.end()
-})
-
-test('mapFileComment regex /* */ new spec - #', function (t) {
- [ [ '/*# ', '*/' ]
- , [' /*# ', ' */ ' ] // with leading spaces
- , [ '\t/*# ', ' \t*/\t '] // with a leading tab
- , [ 'leading string/*# ', '*/' ] // with a leading string
- , [ '/*# ', ' \t*/\t '] // with trailing whitespace
- ].forEach(function (x) { t.ok(mapFileCommentWrap(x[0], x[1]), 'matches ' + x.join(' :: ')) });
-
- [ ['/*# ', ' */ */ ' ], // not the last thing on its line
- ['/*# ', ' */ more text ' ] // not the last thing on its line
- ].forEach(function (x) { t.ok(!mapFileCommentWrap(x[0], x[1]), 'does not match ' + x.join(' :: ')) });
- t.end()
-})
diff --git a/node_modules/convert-source-map/test/convert-source-map.js b/node_modules/convert-source-map/test/convert-source-map.js
deleted file mode 100644
index d57d69d14..000000000
--- a/node_modules/convert-source-map/test/convert-source-map.js
+++ /dev/null
@@ -1,255 +0,0 @@
-'use strict';
-/*jshint asi: true */
-
-var test = require('tap').test
- , generator = require('inline-source-map')
- , convert = require('..')
-
-var gen = generator({charset:"utf-8"})
- .addMappings('foo.js', [{ original: { line: 2, column: 3 } , generated: { line: 5, column: 10 } }], { line: 5 })
- .addGeneratedMappings('bar.js', 'var a = 2;\nconsole.log(a)', { line: 23, column: 22 })
-
- , base64 = gen.base64Encode()
- , comment = gen.inlineMappingUrl()
- , json = gen.toString()
- , obj = JSON.parse(json)
-
-test('different formats', function (t) {
-
- t.equal(convert.fromComment(comment).toComment(), comment, 'comment -> comment')
- t.equal(convert.fromComment(comment).toBase64(), base64, 'comment -> base64')
- t.equal(convert.fromComment(comment).toJSON(), json, 'comment -> json')
- t.deepEqual(convert.fromComment(comment).toObject(), obj, 'comment -> object')
-
- t.equal(convert.fromBase64(base64).toBase64(), base64, 'base64 -> base64')
- t.equal(convert.fromBase64(base64).toComment(), comment, 'base64 -> comment')
- t.equal(convert.fromBase64(base64).toJSON(), json, 'base64 -> json')
- t.deepEqual(convert.fromBase64(base64).toObject(), obj, 'base64 -> object')
-
- t.equal(convert.fromJSON(json).toJSON(), json, 'json -> json')
- t.equal(convert.fromJSON(json).toBase64(), base64, 'json -> base64')
- t.equal(convert.fromJSON(json).toComment(), comment, 'json -> comment')
- t.deepEqual(convert.fromJSON(json).toObject(), obj, 'json -> object')
- t.end()
-})
-
-test('to object returns a copy', function (t) {
- var c = convert.fromJSON(json)
- var o = c.toObject()
- o.version = '99';
- t.equal(c.toObject().version, 3, 'setting property on returned object does not affect original')
- t.end()
-})
-
-test('to multi-line map', function (t) {
- var c = convert.fromObject(obj);
- var s = c.toComment({ multiline: true });
- t.similar(s, /^\/\*# sourceMappingURL=.+ \*\/$/);
- t.end();
-})
-
-test('to map file comment', function (t) {
- t.equal(convert.generateMapFileComment('index.js.map'), '//# sourceMappingURL=index.js.map');
- t.equal(convert.generateMapFileComment('index.css.map', { multiline: true }), '/*# sourceMappingURL=index.css.map */');
- t.end();
-})
-
-test('from source', function (t) {
- var foo = [
- 'function foo() {'
- , ' console.log("hello I am foo");'
- , ' console.log("who are you");'
- , '}'
- , ''
- , 'foo();'
- , ''
- ].join('\n')
- , map = '//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiIiwic291cmNlcyI6WyJmdW5jdGlvbiBmb28oKSB7XG4gY29uc29sZS5sb2coXCJoZWxsbyBJIGFtIGZvb1wiKTtcbiBjb25zb2xlLmxvZyhcIndobyBhcmUgeW91XCIpO1xufVxuXG5mb28oKTtcbiJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSJ9'
- , otherMap = '//# sourceMappingURL=data:application/json;charset=utf-8;base64,otherZXJzaW9uIjozLCJmaWxlIjoiIiwic291cmNlcyI6WyJmdW5jdGlvbiBmb28oKSB7XG4gY29uc29sZS5sb2coXCJoZWxsbyBJIGFtIGZvb1wiKTtcbiBjb25zb2xlLmxvZyhcIndobyBhcmUgeW91XCIpO1xufVxuXG5mb28oKTtcbiJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSJ9'
-
- function getComment(src) {
- var map = convert.fromSource(src);
- return map ? map.toComment() : null;
- }
-
- t.equal(getComment(foo), null, 'no comment returns null')
- t.equal(getComment(foo + map), map, 'beginning of last line')
- t.equal(getComment(foo + ' ' + map), map, 'indented of last line')
- t.equal(getComment(foo + ' ' + map + '\n\n'), map, 'indented on last non empty line')
- t.equal(getComment(foo + map + '\nconsole.log("more code");\nfoo()\n'), map, 'in the middle of code')
- t.equal(getComment(foo + otherMap + '\n' + map), map, 'finds last map in source')
- t.end()
-})
-
-test('from source with a large source', function (t) {
- var foo = [
- 'function foo() {'
- , ' console.log("hello I am foo");'
- , ' console.log("who are you");'
- , '}'
- , ''
- , 'foo();'
- , ''
- ].join('\n')
- , map = '//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiIiwic291cmNlcyI6WyJmdW5jdGlvbiBmb28oKSB7XG4gY29uc29sZS5sb2coXCJoZWxsbyBJIGFtIGZvb1wiKTtcbiBjb25zb2xlLmxvZyhcIndobyBhcmUgeW91XCIpO1xufVxuXG5mb28oKTtcbiJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSJ9'
- , otherMap = '//# sourceMappingURL=data:application/json;charset=utf-8;base64,otherZXJzaW9uIjozLCJmaWxlIjoiIiwic291cmNlcyI6WyJmdW5jdGlvbiBmb28oKSB7XG4gY29uc29sZS5sb2coXCJoZWxsbyBJIGFtIGZvb1wiKTtcbiBjb25zb2xlLmxvZyhcIndobyBhcmUgeW91XCIpO1xufVxuXG5mb28oKTtcbiJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSJ9'
-
- function getComment(src) {
- var map = convert.fromSource(src, true);
- return map ? map.toComment() : null;
- }
-
- t.equal(getComment(foo), null, 'no comment returns null')
- t.equal(getComment(foo + map), map, 'beginning of last line')
- t.equal(getComment(foo + ' ' + map), map, 'indented of last line')
- t.equal(getComment(foo + ' ' + map + '\n\n'), map, 'indented on last non empty line')
- t.equal(getComment(foo + map + '\nconsole.log("more code");\nfoo()\n'), map, 'in the middle of code')
- t.equal(getComment(foo + otherMap + '\n' + map), map, 'finds last map in source')
- t.end()
-})
-
-test('remove comments', function (t) {
- var foo = [
- 'function foo() {'
- , ' console.log("hello I am foo");'
- , ' console.log("who are you");'
- , '}'
- , ''
- , 'foo();'
- , ''
- ].join('\n')
- // this one is old spec on purpose
- , map = '//@ sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiIiwic291cmNlcyI6WyJmdW5jdGlvbiBmb28oKSB7XG4gY29uc29sZS5sb2coXCJoZWxsbyBJIGFtIGZvb1wiKTtcbiBjb25zb2xlLmxvZyhcIndobyBhcmUgeW91XCIpO1xufVxuXG5mb28oKTtcbiJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSJ9'
- , otherMap = '//# sourceMappingURL=data:application/json;base64,ZXJzaW9uIjozLCJmaWxlIjoiIiwic291cmNlcyI6WyJmdW5jdGlvbiBmb28oKSB7XG4gY29uc29sZS5sb2coXCJoZWxsbyBJIGFtIGZvb1wiKTtcbiBjb25zb2xlLmxvZyhcIndobyBhcmUgeW91XCIpO1xufVxuXG5mb28oKTtcbiJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSJ9'
- , extraCode = '\nconsole.log("more code");\nfoo()\n'
-
- t.equal(convert.removeComments(foo + map), foo, 'from last line')
- t.equal(convert.removeComments(foo + map + extraCode), foo + extraCode, 'from the middle of code')
- t.equal(convert.removeComments(foo + otherMap + extraCode + map), foo + extraCode, 'multiple comments from the middle of code')
- t.end()
-})
-
-test('remove map file comments', function (t) {
- var foo = [
- 'function foo() {'
- , ' console.log("hello I am foo");'
- , ' console.log("who are you");'
- , '}'
- , ''
- , 'foo();'
- , ''
- ].join('\n')
- , fileMap1 = '//# sourceMappingURL=foo.js.map'
- , fileMap2 = '/*# sourceMappingURL=foo.js.map */';
-
- t.equal(convert.removeMapFileComments(foo + fileMap1), foo, '// style filemap comment')
- t.equal(convert.removeMapFileComments(foo + fileMap2), foo, '/* */ style filemap comment')
- t.end()
-})
-
-test('pretty json', function (t) {
- var mod = convert.fromJSON(json).toJSON(2)
- , expected = JSON.stringify(obj, null, 2);
-
- t.equal(
- mod
- , expected
- , 'pretty prints json when space is given')
- t.end()
-})
-
-test('adding properties', function (t) {
- var mod = convert
- .fromJSON(json)
- .addProperty('foo', 'bar')
- .toJSON()
- , expected = JSON.parse(json);
- expected.foo = 'bar';
- t.equal(
- mod
- , JSON.stringify(expected)
- , 'includes added property'
- )
- t.end()
-})
-
-test('setting properties', function (t) {
- var mod = convert
- .fromJSON(json)
- .setProperty('version', '2')
- .setProperty('mappings', ';;;UACG')
- .setProperty('should add', 'this')
- .toJSON()
- , expected = JSON.parse(json);
- expected.version = '2';
- expected.mappings = ';;;UACG';
- expected['should add'] = 'this';
- t.equal(
- mod
- , JSON.stringify(expected)
- , 'includes new property and changes existing properties'
- )
- t.end()
-})
-
-test('getting properties', function (t) {
- var sm = convert.fromJSON(json)
-
- t.equal(sm.getProperty('version'), 3, 'gets version')
- t.deepEqual(sm.getProperty('sources'), ['foo.js', 'bar.js'], 'gets sources')
- t.end()
-})
-
-test('return null fromSource when largeSource is true', function(t) {
- var mod = convert.fromSource('', true)
- , expected = null;
-
- t.equal(
- mod
- , expected
- , 'return value should be null'
- )
- t.end()
-})
-
-test('commentRegex returns new RegExp on each get', function(t) {
- var foo = [
- 'function foo() {'
- , ' console.log("hello I am foo");'
- , ' console.log("who are you");'
- , '}'
- , ''
- , 'foo();'
- , ''
- ].join('\n')
- , map = '//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiIiwic291cmNlcyI6WyJmdW5jdGlvbiBmb28oKSB7XG4gY29uc29sZS5sb2coXCJoZWxsbyBJIGFtIGZvb1wiKTtcbiBjb25zb2xlLmxvZyhcIndobyBhcmUgeW91XCIpO1xufVxuXG5mb28oKTtcbiJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSJ9'
- , re = convert.commentRegex
-
- re.exec(foo + map)
-
- t.equal(re.lastIndex, 372, 'has an updated lastIndex')
- t.equal(convert.commentRegex.lastIndex, 0, 'a fresh RegExp has lastIndex of 0')
-
- t.end()
-})
-
-test('mapFileCommentRegex returns new RegExp on each get', function(t) {
- var foo = [
- 'function foo() {'
- , ' console.log("hello I am foo");'
- , ' console.log("who are you");'
- , '}'
- , ''
- , 'foo();'
- , ''
- ].join('\n')
- , map = '//# sourceMappingURL=foo.js.map'
- , re = convert.mapFileCommentRegex
-
- re.exec(foo + map)
-
- t.equal(re.lastIndex, 119, 'has an updated lastIndex')
- t.equal(convert.mapFileCommentRegex.lastIndex, 0, 'a fresh RegExp has lastIndex of 0')
-
- t.end()
-})
diff --git a/node_modules/convert-source-map/test/fixtures/map-file-comment-double-slash.css b/node_modules/convert-source-map/test/fixtures/map-file-comment-double-slash.css
deleted file mode 100644
index e77799167..000000000
--- a/node_modules/convert-source-map/test/fixtures/map-file-comment-double-slash.css
+++ /dev/null
@@ -1,14 +0,0 @@
-.header {
- background: #444;
- border: solid;
- padding: 10px;
- border-radius: 10px 5px 10px 5px;
- color: #b4b472; }
-
-#main li {
- color: green;
- margin: 10px;
- padding: 10px;
- font-size: 18px; }
-
-//# sourceMappingURL=map-file-comment.css.map
diff --git a/node_modules/convert-source-map/test/fixtures/map-file-comment-inline.css b/node_modules/convert-source-map/test/fixtures/map-file-comment-inline.css
deleted file mode 100644
index 1e61b2417..000000000
--- a/node_modules/convert-source-map/test/fixtures/map-file-comment-inline.css
+++ /dev/null
@@ -1,14 +0,0 @@
-.header {
- background: #444;
- border: solid;
- padding: 10px;
- border-radius: 10px 5px 10px 5px;
- color: #b4b472; }
-
-#main li {
- color: green;
- margin: 10px;
- padding: 10px;
- font-size: 18px; }
-
-/*# sourceMappingURL=data:application/json;base64,ewoidmVyc2lvbiI6ICIzIiwKIm1hcHBpbmdzIjogIkFBQUEsd0JBQXlCO0VBQ3ZCLFVBQVUsRUFBRSxJQUFJO0VBQ2hCLE1BQU0sRUFBRSxLQUFLO0VBQ2IsT0FBTyxFQUFFLElBQUk7RUFDYixhQUFhLEVBQUUsaUJBQWlCO0VBQ2hDLEtBQUssRUFBRSxPQUFrQjs7QUFHM0Isd0JBQXlCO0VBQ3ZCLE9BQU8sRUFBRSxJQUFJOztBQ1RmLGdCQUFpQjtFQUNmLFVBQVUsRUFBRSxJQUFJO0VBQ2hCLEtBQUssRUFBRSxNQUFNOztBQUdmLGtCQUFtQjtFQUNqQixNQUFNLEVBQUUsSUFBSTtFQUNaLE9BQU8sRUFBRSxJQUFJO0VBQ2IsVUFBVSxFQUFFLEtBQUs7RUFDakIsYUFBYSxFQUFFLEdBQUc7RUFDbEIsS0FBSyxFQUFFLEtBQUs7O0FBRWQsa0JBQW1CO0VBQ2pCLEtBQUssRUFBRSxLQUFLOztBQUdkLG1CQUFvQjtFQUNsQixLQUFLLEVBQUUsS0FBSztFQUNaLE1BQU0sRUFBRSxJQUFJO0VBQ1osT0FBTyxFQUFFLElBQUk7RUFDYixTQUFTLEVBQUUsSUFBSSIsCiJzb3VyY2VzIjogWyIuL2NsaWVudC9zYXNzL2NvcmUuc2NzcyIsIi4vY2xpZW50L3Nhc3MvbWFpbi5zY3NzIl0sCiJmaWxlIjogIm1hcC1maWxlLWNvbW1lbnQuY3NzIgp9 */
diff --git a/node_modules/convert-source-map/test/fixtures/map-file-comment.css b/node_modules/convert-source-map/test/fixtures/map-file-comment.css
deleted file mode 100644
index 8b282680a..000000000
--- a/node_modules/convert-source-map/test/fixtures/map-file-comment.css
+++ /dev/null
@@ -1,14 +0,0 @@
-.header {
- background: #444;
- border: solid;
- padding: 10px;
- border-radius: 10px 5px 10px 5px;
- color: #b4b472; }
-
-#main li {
- color: green;
- margin: 10px;
- padding: 10px;
- font-size: 18px; }
-
-/*# sourceMappingURL=map-file-comment.css.map */
diff --git a/node_modules/convert-source-map/test/fixtures/map-file-comment.css.map b/node_modules/convert-source-map/test/fixtures/map-file-comment.css.map
deleted file mode 100644
index 25950ea24..000000000
--- a/node_modules/convert-source-map/test/fixtures/map-file-comment.css.map
+++ /dev/null
@@ -1,6 +0,0 @@
-{
-"version": "3",
-"mappings": "AAAA,wBAAyB;EACvB,UAAU,EAAE,IAAI;EAChB,MAAM,EAAE,KAAK;EACb,OAAO,EAAE,IAAI;EACb,aAAa,EAAE,iBAAiB;EAChC,KAAK,EAAE,OAAkB;;AAG3B,wBAAyB;EACvB,OAAO,EAAE,IAAI;;ACTf,gBAAiB;EACf,UAAU,EAAE,IAAI;EAChB,KAAK,EAAE,MAAM;;AAGf,kBAAmB;EACjB,MAAM,EAAE,IAAI;EACZ,OAAO,EAAE,IAAI;EACb,UAAU,EAAE,KAAK;EACjB,aAAa,EAAE,GAAG;EAClB,KAAK,EAAE,KAAK;;AAEd,kBAAmB;EACjB,KAAK,EAAE,KAAK;;AAGd,mBAAoB;EAClB,KAAK,EAAE,KAAK;EACZ,MAAM,EAAE,IAAI;EACZ,OAAO,EAAE,IAAI;EACb,SAAS,EAAE,IAAI",
-"sources": ["./client/sass/core.scss","./client/sass/main.scss"],
-"file": "map-file-comment.css"
-}
diff --git a/node_modules/convert-source-map/test/map-file-comment.js b/node_modules/convert-source-map/test/map-file-comment.js
deleted file mode 100644
index b41678777..000000000
--- a/node_modules/convert-source-map/test/map-file-comment.js
+++ /dev/null
@@ -1,70 +0,0 @@
-'use strict';
-/*jshint asi: true */
-
-var test = require('tap').test
- , rx = require('..')
- , fs = require('fs')
- , convert = require('..')
-
-test('\nresolving a "/*# sourceMappingURL=map-file-comment.css.map*/" style comment inside a given css content', function (t) {
- var css = fs.readFileSync(__dirname + '/fixtures/map-file-comment.css', 'utf8')
- var conv = convert.fromMapFileSource(css, __dirname + '/fixtures');
- var sm = conv.toObject();
-
- t.deepEqual(
- sm.sources
- , [ './client/sass/core.scss',
- './client/sass/main.scss' ]
- , 'resolves paths of original sources'
- )
-
- t.equal(sm.file, 'map-file-comment.css', 'includes filename of generated file')
- t.equal(
- sm.mappings
- , 'AAAA,wBAAyB;EACvB,UAAU,EAAE,IAAI;EAChB,MAAM,EAAE,KAAK;EACb,OAAO,EAAE,IAAI;EACb,aAAa,EAAE,iBAAiB;EAChC,KAAK,EAAE,OAAkB;;AAG3B,wBAAyB;EACvB,OAAO,EAAE,IAAI;;ACTf,gBAAiB;EACf,UAAU,EAAE,IAAI;EAChB,KAAK,EAAE,MAAM;;AAGf,kBAAmB;EACjB,MAAM,EAAE,IAAI;EACZ,OAAO,EAAE,IAAI;EACb,UAAU,EAAE,KAAK;EACjB,aAAa,EAAE,GAAG;EAClB,KAAK,EAAE,KAAK;;AAEd,kBAAmB;EACjB,KAAK,EAAE,KAAK;;AAGd,mBAAoB;EAClB,KAAK,EAAE,KAAK;EACZ,MAAM,EAAE,IAAI;EACZ,OAAO,EAAE,IAAI;EACb,SAAS,EAAE,IAAI'
- , 'includes mappings'
- )
- t.end()
-})
-
-test('\nresolving a "//# sourceMappingURL=map-file-comment.css.map" style comment inside a given css content', function (t) {
- var css = fs.readFileSync(__dirname + '/fixtures/map-file-comment-double-slash.css', 'utf8')
- var conv = convert.fromMapFileSource(css, __dirname + '/fixtures');
- var sm = conv.toObject();
-
- t.deepEqual(
- sm.sources
- , [ './client/sass/core.scss',
- './client/sass/main.scss' ]
- , 'resolves paths of original sources'
- )
-
- t.equal(sm.file, 'map-file-comment.css', 'includes filename of generated file')
- t.equal(
- sm.mappings
- , 'AAAA,wBAAyB;EACvB,UAAU,EAAE,IAAI;EAChB,MAAM,EAAE,KAAK;EACb,OAAO,EAAE,IAAI;EACb,aAAa,EAAE,iBAAiB;EAChC,KAAK,EAAE,OAAkB;;AAG3B,wBAAyB;EACvB,OAAO,EAAE,IAAI;;ACTf,gBAAiB;EACf,UAAU,EAAE,IAAI;EAChB,KAAK,EAAE,MAAM;;AAGf,kBAAmB;EACjB,MAAM,EAAE,IAAI;EACZ,OAAO,EAAE,IAAI;EACb,UAAU,EAAE,KAAK;EACjB,aAAa,EAAE,GAAG;EAClB,KAAK,EAAE,KAAK;;AAEd,kBAAmB;EACjB,KAAK,EAAE,KAAK;;AAGd,mBAAoB;EAClB,KAAK,EAAE,KAAK;EACZ,MAAM,EAAE,IAAI;EACZ,OAAO,EAAE,IAAI;EACb,SAAS,EAAE,IAAI'
- , 'includes mappings'
- )
- t.end()
-})
-
-test('\nresolving a /*# sourceMappingURL=data:application/json;base64,... */ style comment inside a given css content', function(t) {
- var css = fs.readFileSync(__dirname + '/fixtures/map-file-comment-inline.css', 'utf8')
- var conv = convert.fromSource(css, __dirname + '/fixtures')
- var sm = conv.toObject()
-
- t.deepEqual(
- sm.sources
- , [ './client/sass/core.scss',
- './client/sass/main.scss' ]
- , 'resolves paths of original sources'
- )
-
- t.equal(sm.file, 'map-file-comment.css', 'includes filename of generated file')
- t.equal(
- sm.mappings
- , 'AAAA,wBAAyB;EACvB,UAAU,EAAE,IAAI;EAChB,MAAM,EAAE,KAAK;EACb,OAAO,EAAE,IAAI;EACb,aAAa,EAAE,iBAAiB;EAChC,KAAK,EAAE,OAAkB;;AAG3B,wBAAyB;EACvB,OAAO,EAAE,IAAI;;ACTf,gBAAiB;EACf,UAAU,EAAE,IAAI;EAChB,KAAK,EAAE,MAAM;;AAGf,kBAAmB;EACjB,MAAM,EAAE,IAAI;EACZ,OAAO,EAAE,IAAI;EACb,UAAU,EAAE,KAAK;EACjB,aAAa,EAAE,GAAG;EAClB,KAAK,EAAE,KAAK;;AAEd,kBAAmB;EACjB,KAAK,EAAE,KAAK;;AAGd,mBAAoB;EAClB,KAAK,EAAE,KAAK;EACZ,MAAM,EAAE,IAAI;EACZ,OAAO,EAAE,IAAI;EACb,SAAS,EAAE,IAAI'
- , 'includes mappings'
- )
- t.end()
-})