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

vscode-yaml-languageservice

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

vscode-yaml-languageservice - npm Package Compare versions

Comparing version 0.1.0 to 0.2.0

5

lib/services/yamlFormatter.js

@@ -19,9 +19,10 @@ (function (factory) {

jsyaml.loadAll(text, doc => documents.push(doc));
const dumpOptions = { indent: options.tabSize, noCompatMode: true };
let newText;
if (documents.length == 1) {
const yaml = documents[0];
newText = jsyaml.safeDump(yaml, { indent: options.tabSize });
newText = jsyaml.safeDump(yaml, dumpOptions);
}
else {
const formatted = documents.map(d => jsyaml.safeDump(d, { indent: options.tabSize }));
const formatted = documents.map(d => jsyaml.safeDump(d, dumpOptions));
newText = '%YAML 1.2' + os_1.EOL + '---' + os_1.EOL + formatted.join('...' + os_1.EOL + '---' + os_1.EOL) + '...' + os_1.EOL;

@@ -28,0 +29,0 @@ }

1

lib/yamlLanguageService.d.ts

@@ -18,3 +18,2 @@ import { TextDocument, Position, CompletionItem, CompletionList, Hover, Range, SymbolInformation, Diagnostic, TextEdit, FormattingOptions, MarkedString } from 'vscode-languageserver-types';

findDocumentSymbols(document: TextDocument, doc: YAMLDocument): SymbolInformation[];
findColorSymbols(document: TextDocument, doc: YAMLDocument): Thenable<Range[]>;
doHover(document: TextDocument, position: Position, doc: YAMLDocument): Thenable<Hover>;

@@ -21,0 +20,0 @@ format(document: TextDocument, options: FormattingOptions): TextEdit[];

@@ -69,3 +69,2 @@ (function (factory) {

findDocumentSymbols: jsonDocumentSymbols.findDocumentSymbols.bind(jsonDocumentSymbols),
findColorSymbols: jsonDocumentSymbols.findColorSymbols.bind(jsonDocumentSymbols),
doHover: jsonHover.doHover.bind(jsonHover),

@@ -72,0 +71,0 @@ format: yamlFormatter_1.format

{
"name": "vscode-yaml-languageservice",
"version": "0.1.0",
"version": "0.2.0",
"description": "Language service for YAML",

@@ -5,0 +5,0 @@ "main": "./lib/yamlLanguageService.js",

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