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 2.0.0 to 2.0.2

5

lib/cjs/service/colorProvider.d.ts

@@ -1,6 +0,5 @@

import type * as lst from "vscode-languageserver-types";
import { ColorInformation, Color, ColorPresentation } from "./polyfill.js";
import type { ColorInformation, ColorPresentation, Range, Color } from "vscode-languageserver-types";
import { SourceFile } from "../types.js";
import { DocumentLike } from "../index.js";
export declare function getDocumentColors(doc: DocumentLike, sourceFile: SourceFile): ColorInformation[] | undefined;
export declare function getColorRepresentations(_doc: DocumentLike, _sourceFile: SourceFile, color: Color, range: lst.Range): ColorPresentation[] | undefined;
export declare function getColorRepresentations(_doc: DocumentLike, _sourceFile: SourceFile, color: Color, range: Range): ColorPresentation[] | undefined;

11

lib/cjs/service/colorProvider.js

@@ -38,10 +38,5 @@ "use strict";

function getColorRepresentations(_doc, _sourceFile, color, range) {
if (!color || !range)
return undefined;
const hexColor = getColorStringFromColor(color);
return [
{
label: '"' + hexColor + '"',
}
];
return !color || !range
? undefined
: [{ label: '"' + getColorStringFromColor(color) + '"', }];
}

@@ -48,0 +43,0 @@ exports.getColorRepresentations = getColorRepresentations;

import type * as lst from "vscode-languageserver-types";
import type { ColorInformation, Color, ColorPresentation } from "vscode-languageserver-types";
import type { TextDocument } from "vscode-languageserver-textdocument";
import { ColorInformation, Color, ColorPresentation } from "./polyfill.js";
import { SourceFile, Omit } from "../types.js";

@@ -5,0 +5,0 @@ export interface DocumentLike {

@@ -1,6 +0,5 @@

import type * as lst from "vscode-languageserver-types";
import { ColorInformation, Color, ColorPresentation } from "./polyfill.js";
import type { ColorInformation, ColorPresentation, Range, Color } from "vscode-languageserver-types";
import { SourceFile } from "../types.js";
import { DocumentLike } from "../index.js";
export declare function getDocumentColors(doc: DocumentLike, sourceFile: SourceFile): ColorInformation[] | undefined;
export declare function getColorRepresentations(_doc: DocumentLike, _sourceFile: SourceFile, color: Color, range: lst.Range): ColorPresentation[] | undefined;
export declare function getColorRepresentations(_doc: DocumentLike, _sourceFile: SourceFile, color: Color, range: Range): ColorPresentation[] | undefined;

@@ -11,10 +11,5 @@ import { syntaxNodeToRange } from "./util.js";

export function getColorRepresentations(_doc, _sourceFile, color, range) {
if (!color || !range)
return undefined;
const hexColor = getColorStringFromColor(color);
return [
{
label: '"' + hexColor + '"',
}
];
return !color || !range
? undefined
: [{ label: '"' + getColorStringFromColor(color) + '"', }];
}

@@ -21,0 +16,0 @@ function colorTableToColorInformation(doc, sf, colors) {

import type * as lst from "vscode-languageserver-types";
import type { ColorInformation, Color, ColorPresentation } from "vscode-languageserver-types";
import type { TextDocument } from "vscode-languageserver-textdocument";
import { ColorInformation, Color, ColorPresentation } from "./polyfill.js";
import { SourceFile, Omit } from "../types.js";

@@ -5,0 +5,0 @@ export interface DocumentLike {

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

@@ -39,3 +39,2 @@ "author": "Niklas Mollenhauer",

"ts-jest": "^28.0.1",
"ts-node": "^10.7.0",
"typescript": "^4.6.4"

@@ -42,0 +41,0 @@ },

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