Socket
Socket
Sign inDemoInstall

inline-source-map

Package Overview
Dependencies
2
Maintainers
1
Versions
19
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 0.3.0 to 0.3.1

2

index.js

@@ -119,3 +119,3 @@ 'use strict';

Generator.prototype._mappings = function () {
return this.generator._mappings;
return this.generator._mappings._array;
};

@@ -122,0 +122,0 @@

{
"name": "inline-source-map",
"version": "0.3.0",
"version": "0.3.1",
"description": "Adds source mappings and base64 encodes them, so they can be inlined in your generated file.",

@@ -10,3 +10,4 @@ "main": "index.js",

"test-0.10": "nave use 0.10 npm run test-main",
"test-all": "npm run test-main && npm run test-0.8 && npm run test-0.10",
"test-0.12": "nave use 0.12 npm run test-main",
"test-all": "npm run test-main && npm run test-0.8 && npm run test-0.10 && npm run test-0.12",
"test": "if [ -e $TRAVIS ]; then npm run test-all; else npm run test-main; fi"

@@ -20,3 +21,3 @@ },

"dependencies": {
"source-map": "~0.1.31"
"source-map": "~0.3.0"
},

@@ -23,0 +24,0 @@ "devDependencies": {

@@ -17,4 +17,4 @@ # inline-source-map [![build status](https://secure.travis-ci.org/thlorenz/inline-source-map.png)](http://travis-ci.org/thlorenz/inline-source-map)

```
base64 mapping: eyJ2ZXJzaW9uIjozLCJmaWxlIjoiIiwic291cmNlcyI6WyJmb28uanMiLCJiYXIuanMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7Ozs7Ozs7O1VBQ0c7Ozs7Ozs7Ozs7Ozs7O3NCQ0RIO3NCQUNBIn0=
inline mapping url: //@ sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiIiwic291cmNlcyI6WyJmb28uanMiLCJiYXIuanMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7Ozs7Ozs7O1VBQ0c7Ozs7Ozs7Ozs7Ozs7O3NCQ0RIO3NCQUNBIn0=
base64 mapping eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImZvby5qcyIsImJhci5qcyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7Ozs7Ozs7VUFDRzs7Ozs7Ozs7Ozs7Ozs7c0JDREg7c0JBQ0EiLCJmaWxlIjoiIiwic291cmNlUm9vdCI6IiJ9
inline mapping url //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImZvby5qcyIsImJhci5qcyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7Ozs7Ozs7VUFDRzs7Ozs7Ozs7Ozs7Ozs7c0JDREg7c0JBQ0EiLCJmaWxlIjoiIiwic291cmNlUm9vdCI6IiJ9
```

@@ -21,0 +21,0 @@

@@ -68,3 +68,3 @@ 'use strict';

decode(gen.base64Encode())
, '{"version":3,"file":"","sources":["foo.js"],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA"}'
, '{"version":3,"sources":["foo.js"],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA","file":"","sourceRoot":""}'
, 'encodes generated mappings'

@@ -74,3 +74,3 @@ )

gen.inlineMappingUrl()
, '//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiIiwic291cmNlcyI6WyJmb28uanMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUE7QUFDQTtBQUNBO0FBQ0E7QUFDQSJ9'
, '//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImZvby5qcyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQTtBQUNBO0FBQ0E7QUFDQTtBQUNBIiwiZmlsZSI6IiIsInNvdXJjZVJvb3QiOiIifQ=='
, 'returns correct inline mapping url'

@@ -140,3 +140,3 @@ )

decode(gen.base64Encode())
, '{"version":3,"file":"","sources":["foo.js","bar.js"],"names":[],"mappings":"ACAA,ADAA;ACCA,ADAA;ACCA,ADAA;AACA;AACA"}'
, '{"version":3,"sources":["foo.js","bar.js"],"names":[],"mappings":"ACAA,ADAA;ACCA,ADAA;ACCA,ADAA;AACA;AACA","file":"","sourceRoot":""}'
, 'encodes generated mappings'

@@ -146,3 +146,3 @@ )

gen.inlineMappingUrl()
, '//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiIiwic291cmNlcyI6WyJmb28uanMiLCJiYXIuanMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFDQUEsQURBQTtBQ0NBLEFEQUE7QUNDQSxBREFBO0FBQ0E7QUFDQSJ9'
, '//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImZvby5qcyIsImJhci5qcyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUNBQSxBREFBO0FDQ0EsQURBQTtBQ0NBLEFEQUE7QUFDQTtBQUNBIiwiZmlsZSI6IiIsInNvdXJjZVJvb3QiOiIifQ=='
, 'returns correct inline mapping url'

@@ -227,3 +227,3 @@ )

decode(gen.base64Encode())
, '{"version":3,"file":"","sources":["foo.js","bar.js"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AACA;AACA;AACA,sBCHA;ADIA,sBCHA;sBACA"}'
, '{"version":3,"sources":["foo.js","bar.js"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AACA;AACA;AACA,sBCHA;ADIA,sBCHA;sBACA","file":"","sourceRoot":""}'
, 'encodes generated mappings with offset'

@@ -274,3 +274,3 @@ )

decode(gen.base64Encode())
, '{"version":3,"file":"","sources":["foo.js","bar.js"],"names":[],"mappings":";;;;UACG;;oBCIH;8B"}'
, '{"version":3,"sources":["foo.js","bar.js"],"names":[],"mappings":";;;;UACG;;oBCIH;8B","file":"","sourceRoot":""}'
, 'encodes generated mappings'

@@ -280,3 +280,3 @@ )

gen.inlineMappingUrl()
, '//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiIiwic291cmNlcyI6WyJmb28uanMiLCJiYXIuanMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7OztVQUNHOztvQkNJSDs4QiJ9'
, '//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImZvby5qcyIsImJhci5qcyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7O1VBQ0c7O29CQ0lIOzhCIiwiZmlsZSI6IiIsInNvdXJjZVJvb3QiOiIifQ=='
, 'returns correct inline mapping url'

@@ -316,3 +316,3 @@ )

decode(gen.base64Encode())
, '{\"version\":3,\"file\":\"\",\"sources\":[\"foo.js\",\"bar.js\"],\"names\":[],\"mappings\":\";;;;;;;;;UACG;;;;;;uBCIH;iC\"}'
, '{\"version\":3,\"sources\":[\"foo.js\",\"bar.js\"],\"names\":[],\"mappings\":\";;;;;;;;;UACG;;;;;;uBCIH;iC\",\"file\":\"\",\"sourceRoot\":\"\"}'
, 'encodes mappings with offset'

@@ -319,0 +319,0 @@ )

@@ -41,2 +41,3 @@ 'use strict';

"mappings": "AAAA;AACA;AACA;AACA;AACA",
"sourceRoot": "",
"sourcesContent": [

@@ -51,3 +52,3 @@ "function foo() {\n var hello = 'hello';\n var world = 'world';\n console.log('%s %s', hello, world);\n}"

decode(gen.base64Encode())
, '{"version":3,"file":"","sources":["foo.js"],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA","sourcesContent":["function foo() {\\n var hello = \'hello\';\\n var world = \'world\';\\n console.log(\'%s %s\', hello, world);\\n}"]}'
, '{"version":3,"sources":["foo.js"],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA","file":"","sourceRoot":"","sourcesContent":["function foo() {\\n var hello = \'hello\';\\n var world = \'world\';\\n console.log(\'%s %s\', hello, world);\\n}"]}'
, 'encodes generated mappings including source content'

@@ -57,3 +58,3 @@ )

gen.inlineMappingUrl()
, '//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiIiwic291cmNlcyI6WyJmb28uanMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUE7QUFDQTtBQUNBO0FBQ0E7QUFDQSIsInNvdXJjZXNDb250ZW50IjpbImZ1bmN0aW9uIGZvbygpIHtcbiAgdmFyIGhlbGxvID0gJ2hlbGxvJztcbiAgdmFyIHdvcmxkID0gJ3dvcmxkJztcbiAgY29uc29sZS5sb2coJyVzICVzJywgaGVsbG8sIHdvcmxkKTtcbn0iXX0='
, '//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImZvby5qcyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQTtBQUNBO0FBQ0E7QUFDQTtBQUNBIiwiZmlsZSI6IiIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzQ29udGVudCI6WyJmdW5jdGlvbiBmb28oKSB7XG4gIHZhciBoZWxsbyA9ICdoZWxsbyc7XG4gIHZhciB3b3JsZCA9ICd3b3JsZCc7XG4gIGNvbnNvbGUubG9nKCclcyAlcycsIGhlbGxvLCB3b3JsZCk7XG59Il19'
, 'returns correct inline mapping url including source content'

@@ -81,2 +82,3 @@ )

"mappings": "ACAA,ADAA;ACCA,ADAA;ACCA,ADAA;AACA;AACA",
"sourceRoot": "",
"sourcesContent": [

@@ -92,3 +94,3 @@ "function foo() {\n var hello = 'hello';\n var world = 'world';\n console.log('%s %s', hello, world);\n}",

decode(gen.base64Encode())
, '{"version":3,"file":"","sources":["foo.js","bar.js"],"names":[],"mappings":"ACAA,ADAA;ACCA,ADAA;ACCA,ADAA;AACA;AACA","sourcesContent":["function foo() {\\n var hello = \'hello\';\\n var world = \'world\';\\n console.log(\'%s %s\', hello, world);\\n}","function bar() {\\n console.log(\'yes?\');\\n}"]}'
, '{"version":3,"sources":["foo.js","bar.js"],"names":[],"mappings":"ACAA,ADAA;ACCA,ADAA;ACCA,ADAA;AACA;AACA","file":"","sourceRoot":"","sourcesContent":["function foo() {\\n var hello = \'hello\';\\n var world = \'world\';\\n console.log(\'%s %s\', hello, world);\\n}","function bar() {\\n console.log(\'yes?\');\\n}"]}'
, 'encodes generated mappings including source content'

@@ -98,3 +100,3 @@ )

gen.inlineMappingUrl()
, '//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiIiwic291cmNlcyI6WyJmb28uanMiLCJiYXIuanMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFDQUEsQURBQTtBQ0NBLEFEQUE7QUNDQSxBREFBO0FBQ0E7QUFDQSIsInNvdXJjZXNDb250ZW50IjpbImZ1bmN0aW9uIGZvbygpIHtcbiAgdmFyIGhlbGxvID0gJ2hlbGxvJztcbiAgdmFyIHdvcmxkID0gJ3dvcmxkJztcbiAgY29uc29sZS5sb2coJyVzICVzJywgaGVsbG8sIHdvcmxkKTtcbn0iLCJmdW5jdGlvbiBiYXIoKSB7XG4gIGNvbnNvbGUubG9nKCd5ZXM/Jyk7XG59Il19'
, '//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImZvby5qcyIsImJhci5qcyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUNBQSxBREFBO0FDQ0EsQURBQTtBQ0NBLEFEQUE7QUFDQTtBQUNBIiwiZmlsZSI6IiIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzQ29udGVudCI6WyJmdW5jdGlvbiBmb28oKSB7XG4gIHZhciBoZWxsbyA9ICdoZWxsbyc7XG4gIHZhciB3b3JsZCA9ICd3b3JsZCc7XG4gIGNvbnNvbGUubG9nKCclcyAlcycsIGhlbGxvLCB3b3JsZCk7XG59IiwiZnVuY3Rpb24gYmFyKCkge1xuICBjb25zb2xlLmxvZygneWVzPycpO1xufSJdfQ=='
, 'returns correct inline mapping url including source content'

@@ -121,2 +123,3 @@ )

"mappings": "ACAA,ADAA;ACCA,ADAA;ACCA,ADAA;AACA;AACA",
"sourceRoot": "",
"sourcesContent": [ null, "function bar() {\n console.log('yes?');\n}" ]

@@ -129,3 +132,3 @@ }

decode(gen.base64Encode())
, '{"version":3,"file":"","sources":["foo.js","bar.js"],"names":[],"mappings":"ACAA,ADAA;ACCA,ADAA;ACCA,ADAA;AACA;AACA","sourcesContent":[null,"function bar() {\\n console.log(\'yes?\');\\n}"]}'
, '{"version":3,"sources":["foo.js","bar.js"],"names":[],"mappings":"ACAA,ADAA;ACCA,ADAA;ACCA,ADAA;AACA;AACA","file":"","sourceRoot":"","sourcesContent":[null,"function bar() {\\n console.log(\'yes?\');\\n}"]}'
, 'encodes generated mappings including source content'

@@ -135,3 +138,3 @@ )

gen.inlineMappingUrl()
, '//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiIiwic291cmNlcyI6WyJmb28uanMiLCJiYXIuanMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFDQUEsQURBQTtBQ0NBLEFEQUE7QUNDQSxBREFBO0FBQ0E7QUFDQSIsInNvdXJjZXNDb250ZW50IjpbbnVsbCwiZnVuY3Rpb24gYmFyKCkge1xuICBjb25zb2xlLmxvZygneWVzPycpO1xufSJdfQ=='
, '//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImZvby5qcyIsImJhci5qcyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUNBQSxBREFBO0FDQ0EsQURBQTtBQ0NBLEFEQUE7QUFDQTtBQUNBIiwiZmlsZSI6IiIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzQ29udGVudCI6W251bGwsImZ1bmN0aW9uIGJhcigpIHtcbiAgY29uc29sZS5sb2coJ3llcz8nKTtcbn0iXX0='
, 'returns correct inline mapping url including source content'

@@ -138,0 +141,0 @@ )

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc