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

dot-language-support

Package Overview
Dependencies
Maintainers
1
Versions
67
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

dot-language-support - npm Package Compare versions

Comparing version

to
1.4.4

16

lib/service/completion.js

@@ -10,3 +10,2 @@ "use strict";

function getCompletions(doc, sourceFile, position) {
var _a, _b, _c, _d, _e, _f;
const symbols = sourceFile.symbols;

@@ -24,5 +23,5 @@ if (!symbols)

const parent = node.parent;
const prevOffsetNodeParent = (_a = prevOffsetNode) === null || _a === void 0 ? void 0 : _a.parent;
if ((((_b = parent) === null || _b === void 0 ? void 0 : _b.parent) && checker_1.isEdgeStatement(parent.parent))
|| (((_c = prevOffsetNodeParent) === null || _c === void 0 ? void 0 : _c.parent) && checker_1.isEdgeStatement(prevOffsetNodeParent.parent))) {
const prevOffsetNodeParent = prevOffsetNode === null || prevOffsetNode === void 0 ? void 0 : prevOffsetNode.parent;
if (((parent === null || parent === void 0 ? void 0 : parent.parent) && checker_1.isEdgeStatement(parent.parent))
|| ((prevOffsetNodeParent === null || prevOffsetNodeParent === void 0 ? void 0 : prevOffsetNodeParent.parent) && checker_1.isEdgeStatement(prevOffsetNodeParent.parent))) {
return getNodeCompletions(symbols);

@@ -33,3 +32,3 @@ }

if (openingBracket.end - 1 > offset - 1) {
const exclusions = ((_d = prevOffsetNode) === null || _d === void 0 ? void 0 : _d.kind) === types_1.SyntaxKind.TextIdentifier && prevOffsetNode.symbol
const exclusions = (prevOffsetNode === null || prevOffsetNode === void 0 ? void 0 : prevOffsetNode.kind) === types_1.SyntaxKind.TextIdentifier && prevOffsetNode.symbol
? [prevOffsetNode.symbol.name]

@@ -40,3 +39,3 @@ : undefined;

}
if (node.kind === types_1.SyntaxKind.TextIdentifier && ((_e = parent) === null || _e === void 0 ? void 0 : _e.kind) === types_1.SyntaxKind.NodeId) {
if (node.kind === types_1.SyntaxKind.TextIdentifier && (parent === null || parent === void 0 ? void 0 : parent.kind) === types_1.SyntaxKind.NodeId) {
const exclusions = node.symbol

@@ -48,3 +47,3 @@ ? [node.symbol.name]

if (node.kind === types_1.SyntaxKind.AttributeContainer
|| (node.kind == types_1.SyntaxKind.CommaToken && ((_f = parent) === null || _f === void 0 ? void 0 : _f.kind) === types_1.SyntaxKind.Assignment)) {
|| (node.kind == types_1.SyntaxKind.CommaToken && (parent === null || parent === void 0 ? void 0 : parent.kind) === types_1.SyntaxKind.Assignment)) {
return getAttributeCompletions(position);

@@ -125,6 +124,5 @@ }

function getNodeCompletions(symbols, exlucdedSymbols) {
var _a;
const res = new Array();
for (const [key, value] of symbols) {
if ((_a = exlucdedSymbols) === null || _a === void 0 ? void 0 : _a.includes(key))
if (exlucdedSymbols === null || exlucdedSymbols === void 0 ? void 0 : exlucdedSymbols.includes(key))
continue;

@@ -131,0 +129,0 @@ let kind = lst.CompletionItemKind.Variable;

{
"name": "dot-language-support",
"version": "1.4.3",
"version": "1.4.4",
"description": "Parser and language service for graphviz (dot) files",

@@ -31,9 +31,9 @@ "author": "Niklas Mollenhauer",

"devDependencies": {
"@types/chai": "^4.2.8",
"@types/mocha": "^7.0.1",
"@types/chai": "^4.2.11",
"@types/mocha": "^7.0.2",
"chai": "^4.2.0",
"mocha": "^7.0.1",
"ts-node": "^8.6.2",
"typescript": "^3.7.5",
"vscode-languageserver": "^6.1.0"
"mocha": "^7.1.1",
"ts-node": "^8.8.1",
"typescript": "^3.8.3",
"vscode-languageserver": "^6.1.1"
},

@@ -40,0 +40,0 @@ "engines": {