Socket
Socket
Sign inDemoInstall

sorcery

Package Overview
Dependencies
19
Maintainers
1
Versions
34
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 0.9.3 to 0.9.4

4

CHANGELOG.md
# changelog
## 0.9.4
* Remove caching mechanism due to collisions ([#74](https://github.com/Rich-Harris/sorcery/pull/74))
## 0.9.3

@@ -4,0 +8,0 @@

19

dist/sorcery.cjs.js
'use strict';
function _interopDefault (ex) { return (ex && (typeof ex === 'object') && 'default' in ex) ? ex['default'] : ex; }
var path = require('path');
var sander = require('sander');
var crc32 = _interopDefault(require('buffer-crc32'));

@@ -210,14 +207,2 @@ var charToInteger = {};

var cache = {};
function decodeMappings ( mappings ) {
var checksum = crc32( mappings );
if ( !cache[ checksum ] ) {
cache[ checksum ] = decode( mappings );
}
return cache[ checksum ];
}
/**

@@ -352,3 +337,3 @@ * Decodes a base64 string

var decodingStart = process.hrtime();
this$1.mappings = decodeMappings( map.mappings );
this$1.mappings = decode( map.mappings );
var decodingTime = process.hrtime( decodingStart );

@@ -390,3 +375,3 @@ this$1._stats.decodingTime = 1e9 * decodingTime[0] + decodingTime[1];

this.map = map;
this.mappings = decodeMappings( map.mappings );
this.mappings = decode( map.mappings );

@@ -393,0 +378,0 @@ sourcesContent = map.sourcesContent || [];

import { resolve, dirname, relative, basename, extname } from 'path';
import { readFileSync, Promise, readFile, writeFileSync, writeFile } from 'sander';
import crc32 from 'buffer-crc32';

@@ -206,14 +205,2 @@ var charToInteger = {};

var cache = {};
function decodeMappings ( mappings ) {
var checksum = crc32( mappings );
if ( !cache[ checksum ] ) {
cache[ checksum ] = decode( mappings );
}
return cache[ checksum ];
}
/**

@@ -348,3 +335,3 @@ * Decodes a base64 string

var decodingStart = process.hrtime();
this$1.mappings = decodeMappings( map.mappings );
this$1.mappings = decode( map.mappings );
var decodingTime = process.hrtime( decodingStart );

@@ -386,3 +373,3 @@ this$1._stats.decodingTime = 1e9 * decodingTime[0] + decodingTime[1];

this.map = map;
this.mappings = decodeMappings( map.mappings );
this.mappings = decode( map.mappings );

@@ -389,0 +376,0 @@ sourcesContent = map.sourcesContent || [];

{
"name": "sorcery",
"description": "Resolve a chain of sourcemaps back to the original source",
"version": "0.9.3",
"version": "0.9.4",
"author": "Rich Harris",

@@ -25,3 +25,3 @@ "repository": "https://github.com/Rich-Harris/sorcery",

"remap-istanbul": "^0.6.3",
"rollup": "^0.25.8",
"rollup": "^0.26.0",
"rollup-plugin-buble": "^0.5.0",

@@ -28,0 +28,0 @@ "rollup-plugin-commonjs": "^2.2.1",

import { dirname, resolve } from 'path';
import { readFile, readFileSync, Promise } from 'sander';
import decodeMappings from './utils/decodeMappings.js';
import { decode } from 'sourcemap-codec';
import getMap from './utils/getMap.js';

@@ -40,3 +40,3 @@

let decodingStart = process.hrtime();
this.mappings = decodeMappings( map.mappings );
this.mappings = decode( map.mappings );
let decodingTime = process.hrtime( decodingStart );

@@ -78,3 +78,3 @@ this._stats.decodingTime = 1e9 * decodingTime[0] + decodingTime[1];

this.map = map;
this.mappings = decodeMappings( map.mappings );
this.mappings = decode( map.mappings );

@@ -81,0 +81,0 @@ sourcesContent = map.sourcesContent || [];

Sorry, the diff of this file is not supported yet

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