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
66
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 1.3.12 to 1.4.1

2

lib/binder.js

@@ -135,3 +135,5 @@ "use strict";

function bindAttributeContainer(node) {
bind(node.openBracket);
bindChildren(node.assignments);
bind(node.closeBracket);
}

@@ -138,0 +140,0 @@ function bindAssignment(node) {

4

lib/parser.js

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

const node = this.createNode(types_1.SyntaxKind.AttributeContainer);
this.parseExpectedToken(types_1.SyntaxKind.OpenBracketToken);
node.openBracket = this.parseExpectedToken(types_1.SyntaxKind.OpenBracketToken);
if (this.isIdentifier() && this.lookAhead(() => this.isAssignmentStart())) {

@@ -229,3 +229,3 @@ node.assignments = this.parseList(ParsingContext.AssignmentList, () => this.parseAssignment());

}
this.parseExpectedToken(types_1.SyntaxKind.CloseBracketToken);
node.closeBracket = this.parseExpectedToken(types_1.SyntaxKind.CloseBracketToken);
return this.finishNode(node);

@@ -232,0 +232,0 @@ }

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

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

@@ -23,10 +24,15 @@ if (!symbols)

const parent = node.parent;
const prevOffsetNodeParent = prevOffsetNode ? prevOffsetNode.parent : undefined;
if ((parent && parent.parent && checker_1.isEdgeStatement(parent.parent)
||
(prevOffsetNodeParent && prevOffsetNodeParent.parent && checker_1.isEdgeStatement(prevOffsetNodeParent.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))) {
return getNodeCompletions(symbols);
}
if (node.kind === types_1.SyntaxKind.AttributeContainer && ((_d = prevOffsetNodeParent) === null || _d === void 0 ? void 0 : _d.kind) === types_1.SyntaxKind.EdgeStatement) {
const openingBracket = node.openBracket;
if (openingBracket.end - 1 > offset - 1) {
return getNodeCompletions(symbols);
}
}
if (node.kind === types_1.SyntaxKind.AttributeContainer
|| (node.kind == types_1.SyntaxKind.CommaToken && parent && parent.kind === types_1.SyntaxKind.Assignment)) {
|| (node.kind == types_1.SyntaxKind.CommaToken && ((_e = parent) === null || _e === void 0 ? void 0 : _e.kind) === types_1.SyntaxKind.Assignment)) {
return getAttributeCompletions(position);

@@ -33,0 +39,0 @@ }

@@ -131,3 +131,5 @@ export declare const enum ErrorSource {

kind: SyntaxKind.AttributeContainer;
openBracket: Token<SyntaxKind.OpenBracketToken>;
assignments: SyntaxNodeArray<Assignment>;
closeBracket: Token<SyntaxKind.CloseBracketToken>;
}

@@ -134,0 +136,0 @@ export interface Assignment extends SyntaxNode {

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

@@ -28,12 +28,12 @@ "author": "Niklas Mollenhauer",

"dependencies": {
"vscode-languageserver-types": "^3.14.0"
"vscode-languageserver-types": "^3.15.1"
},
"devDependencies": {
"@types/chai": "^4.2.0",
"@types/mocha": "^5.2.7",
"@types/chai": "^4.2.8",
"@types/mocha": "^7.0.1",
"chai": "^4.2.0",
"mocha": "^6.2.0",
"ts-node": "^8.3.0",
"typescript": "^3.6.2",
"vscode-languageserver": "^5.3.0-next.1"
"mocha": "^7.0.1",
"ts-node": "^8.6.2",
"typescript": "^3.7.5",
"vscode-languageserver": "^6.1.0"
},

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

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