Socket
Socket
Sign inDemoInstall

magic-string

Package Overview
Dependencies
1
Maintainers
4
Versions
114
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 0.30.3 to 0.30.4

21

dist/magic-string.cjs.js

@@ -315,2 +315,19 @@ 'use strict';

if (content.length) {
let contentLineEnd = content.indexOf('\n', 0);
let previousContentLineEnd = -1;
while (contentLineEnd >= 0) {
const segment = [this.generatedCodeColumn, sourceIndex, loc.line, loc.column];
if (nameIndex >= 0) {
segment.push(nameIndex);
}
this.rawSegments.push(segment);
this.generatedCodeLine += 1;
this.raw[this.generatedCodeLine] = this.rawSegments = [];
this.generatedCodeColumn = 0;
previousContentLineEnd = contentLineEnd;
contentLineEnd = content.indexOf('\n', contentLineEnd + 1);
}
const segment = [this.generatedCodeColumn, sourceIndex, loc.line, loc.column];

@@ -321,7 +338,9 @@ if (nameIndex >= 0) {

this.rawSegments.push(segment);
this.advance(content.slice(previousContentLineEnd + 1));
} else if (this.pending) {
this.rawSegments.push(this.pending);
this.advance(content);
}
this.advance(content);
this.pending = null;

@@ -328,0 +347,0 @@ }

@@ -405,2 +405,19 @@ (function (global, factory) {

if (content.length) {
let contentLineEnd = content.indexOf('\n', 0);
let previousContentLineEnd = -1;
while (contentLineEnd >= 0) {
const segment = [this.generatedCodeColumn, sourceIndex, loc.line, loc.column];
if (nameIndex >= 0) {
segment.push(nameIndex);
}
this.rawSegments.push(segment);
this.generatedCodeLine += 1;
this.raw[this.generatedCodeLine] = this.rawSegments = [];
this.generatedCodeColumn = 0;
previousContentLineEnd = contentLineEnd;
contentLineEnd = content.indexOf('\n', contentLineEnd + 1);
}
const segment = [this.generatedCodeColumn, sourceIndex, loc.line, loc.column];

@@ -411,7 +428,9 @@ if (nameIndex >= 0) {

this.rawSegments.push(segment);
this.advance(content.slice(previousContentLineEnd + 1));
} else if (this.pending) {
this.rawSegments.push(this.pending);
this.advance(content);
}
this.advance(content);
this.pending = null;

@@ -418,0 +437,0 @@ }

2

package.json
{
"name": "magic-string",
"version": "0.30.3",
"version": "0.30.4",
"description": "Modify strings, generate sourcemaps",

@@ -5,0 +5,0 @@ "keywords": [

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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