Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@parcel/source-map

Package Overview
Dependencies
Maintainers
1
Versions
90
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@parcel/source-map - npm Package Compare versions

Comparing version 2.0.0-alpha.2.1 to 2.0.0-alpha.3

index.js

4

lib/SourceMap.js

@@ -20,3 +20,3 @@ "use strict";

function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { keys.push.apply(keys, Object.getOwnPropertySymbols(object)); } if (enumerableOnly) keys = keys.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); return keys; }
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }

@@ -28,3 +28,3 @@ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(source, true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(source).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }

function generateInlineMap(map) {
return `data:application/json;charset=utf-8;base64,${new Buffer(map).toString('base64')}`;
return `data:application/json;charset=utf-8;base64,${Buffer.from(map).toString('base64')}`;
}

@@ -31,0 +31,0 @@

{
"name": "@parcel/source-map",
"version": "2.0.0-alpha.2.1",
"main": "./lib/SourceMap.js",
"version": "2.0.0-alpha.3",
"license": "MIT",
"publishConfig": {
"access": "public"
},
"repository": {
"type": "git",
"url": "https://github.com/parcel-bundler/parcel.git"
},
"main": "lib/SourceMap.js",
"source": "src/SourceMap.js",
"scripts": {},

@@ -11,3 +19,3 @@ "engines": {

"dependencies": {
"@parcel/utils": "^2.0.0-alpha.2.1",
"@parcel/utils": "^2.0.0-alpha.3",
"nullthrows": "^1.1.1",

@@ -19,6 +27,3 @@ "source-map": "^0.7.3"

},
"gitHead": "2c01341d81c41a70cb33acb51fff621353b3e494",
"publishConfig": {
"access": "public"
}
}
"gitHead": "d4b611ac4495787fa31dac40dda15eedb6e31492"
}

@@ -37,5 +37,5 @@ // @flow strict-local

function generateInlineMap(map: string): string {
return `data:application/json;charset=utf-8;base64,${new Buffer(map).toString(
'base64'
)}`;
return `data:application/json;charset=utf-8;base64,${Buffer.from(
map
).toString('base64')}`;
}

@@ -65,3 +65,6 @@

// Static Helper functions
static generateEmptyMap(sourceName: string, sourceContent: string) {
static generateEmptyMap(
sourceName: string,
sourceContent: string
): SourceMap {
let map = new SourceMap();

@@ -89,3 +92,3 @@ map.setSourceContentFor(sourceName, sourceContent);

static async fromRawSourceMap(input: RawMapInput) {
static async fromRawSourceMap(input: RawMapInput): Promise<SourceMap> {
let map = new SourceMap();

@@ -114,3 +117,3 @@ await map.addRawMap(input);

columnOffset: number = 0
) {
): Promise<SourceMap> {
let consumer = await this.getConsumer(map);

@@ -137,3 +140,7 @@

addMap(map: SourceMap, lineOffset: number = 0, columnOffset: number = 0) {
addMap(
map: SourceMap,
lineOffset: number = 0,
columnOffset: number = 0
): SourceMap {
if (lineOffset === 0 && columnOffset === 0) {

@@ -214,3 +221,3 @@ this.mappings.push(...map.mappings);

async extend(extension: SourceMap | RawMapInput) {
async extend(extension: SourceMap | RawMapInput): Promise<SourceMap> {
let sourceMap =

@@ -224,3 +231,3 @@ extension instanceof SourceMap

_extend(extension: SourceMap) {
_extend(extension: SourceMap): SourceMap {
extension.eachMapping(mapping => {

@@ -227,0 +234,0 @@ let originalMappingIndex = null;

SocketSocket SOC 2 Logo

Product

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

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc