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

volar-service-pug-beautify

Package Overview
Dependencies
Maintainers
1
Versions
63
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

volar-service-pug-beautify - npm Package Compare versions

Comparing version 0.0.34 to 0.0.35

8

index.d.ts

@@ -1,7 +0,7 @@

import type { DocumentSelector, FormattingOptions, Result, ServiceContext, ServicePlugin, TextDocument } from '@volar/language-service';
import type { DocumentSelector, FormattingOptions, ProviderResult, ServiceContext, LanguageServicePlugin, TextDocument } from '@volar/language-service';
export declare function create({ documentSelector, isFormattingEnabled, getFormattingOptions, }?: {
documentSelector?: DocumentSelector;
isFormattingEnabled?(document: TextDocument, context: ServiceContext): Result<boolean>;
getFormattingOptions?(document: TextDocument, options: FormattingOptions, context: ServiceContext): Result<{}>;
}): ServicePlugin;
isFormattingEnabled?(document: TextDocument, context: ServiceContext): ProviderResult<boolean>;
getFormattingOptions?(document: TextDocument, options: FormattingOptions, context: ServiceContext): ProviderResult<{}>;
}): LanguageServicePlugin;
//# sourceMappingURL=index.d.ts.map

@@ -15,10 +15,13 @@ "use strict";

async provideDocumentFormattingEdits(document, range, options) {
if (!matchDocument(documentSelector, document))
if (!matchDocument(documentSelector, document)) {
return;
if (!await isFormattingEnabled(document, context))
}
if (!await isFormattingEnabled(document, context)) {
return;
}
const pugCode = document.getText(range);
// fix https://github.com/johnsoncodehk/volar/issues/304
if (pugCode.trim() === '')
if (pugCode.trim() === '') {
return;
}
const pugBeautify = require('@johnsoncodehk/pug-beautify');

@@ -25,0 +28,0 @@ const prefixesLength = pugCode.length - pugCode.trimStart().length;

{
"name": "volar-service-pug-beautify",
"version": "0.0.34",
"version": "0.0.35",
"description": "Integrate pug-beautify into Volar",

@@ -30,3 +30,3 @@ "homepage": "https://github.com/volarjs/services/tree/master/packages/pug-beautify",

"peerDependencies": {
"@volar/language-service": "~2.1.0"
"@volar/language-service": "~2.2.0-alpha.0"
},

@@ -41,3 +41,3 @@ "peerDependenciesMeta": {

},
"gitHead": "aafefd1d65541462b3e99208f14dbb2cd8477ae9"
"gitHead": "cbd8ef0ada6eae9656286535599c9b289134d1e3"
}
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