New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@vuedx/vue-virtual-textdocument

Package Overview
Dependencies
Maintainers
1
Versions
155
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@vuedx/vue-virtual-textdocument - npm Package Compare versions

Comparing version 0.7.5-next-1647933433.0 to 0.7.5-next-1648400394.0

3

lib/index.d.ts

@@ -82,2 +82,4 @@ import { TextDocument, Range, Position, TextDocumentContentChangeEvent } from 'vscode-languageserver-textdocument';

findGeneratedTextSpan(textSpanInBlockText: TextSpan): TextSpan;
findCopiedOffsets(offsetInBlockText: number): number[];
findCopiedTextSpans(textSpanInBlockText: TextSpan): TextSpan[];
/**

@@ -115,2 +117,3 @@ * Find original position in .vue file for position in genreated text

isOffsetInCopiedZone(offset: number): boolean;
isOffsetInOriginalZone(offset: number): boolean;
private _isOffsetInZone;

@@ -117,0 +120,0 @@ private _toSourceMapPosition;

@@ -392,2 +392,24 @@ 'use strict';

}
findCopiedOffsets(offsetInBlockText) {
return this.findCopiedTextSpans({
start: offsetInBlockText,
length: 1,
}).map((span) => span.start);
}
findCopiedTextSpans(textSpanInBlockText) {
const spans = [];
if (this.isOffsetInOriginalZone(textSpanInBlockText.start)) {
for (let i = 0; i < this.originalsForCopiedTextRanges.length; i++) {
const copied = this.copiedTextRanges[i];
const original = this.originalsForCopiedTextRanges[i];
if (copied == null || original == null)
continue;
spans.push({
start: copied.start + textSpanInBlockText.start - original.start,
length: textSpanInBlockText.length,
});
}
}
return spans;
}
/**

@@ -508,2 +530,5 @@ * Find original position in .vue file for position in genreated text

}
isOffsetInOriginalZone(offset) {
return this._isOffsetInZone(this.originalsForCopiedTextRanges, offset);
}
_isOffsetInZone(ranges, offset) {

@@ -510,0 +535,0 @@ return ranges.some((range) => isOffsetInRange(range, offset));

12

package.json
{
"name": "@vuedx/vue-virtual-textdocument",
"version": "0.7.5-next-1647933433.0",
"version": "0.7.5-next-1648400394.0",
"description": "A virtual filesystem to access blocks in SFC as files",

@@ -36,7 +36,7 @@ "main": "lib/index.js",

"dependencies": {
"@vuedx/compiler-sfc": "0.7.2-next-1647933433.0",
"@vuedx/compiler-tsx": "0.7.5-next-1647933433.0",
"@vuedx/shared": "0.7.4-next-1647933433.0",
"@vuedx/template-ast-types": "0.7.3-next-1647933433.0",
"@vuedx/transforms": "0.7.5-next-1647933433.0",
"@vuedx/compiler-sfc": "0.7.2-next-1648400394.0",
"@vuedx/compiler-tsx": "0.7.5-next-1648400394.0",
"@vuedx/shared": "0.7.4-next-1648400394.0",
"@vuedx/template-ast-types": "0.7.3-next-1648400394.0",
"@vuedx/transforms": "0.7.5-next-1648400394.0",
"source-map": "^0.6.1",

@@ -43,0 +43,0 @@ "vscode-languageserver-textdocument": "^1.0.1",

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
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc