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.31 to 0.0.32

5

index.d.ts

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

import type { DocumentSelector, Result, ServiceContext, ServicePlugin, TextDocument } from '@volar/language-service';
export declare function create({ documentSelector, isFormattingEnabled, }?: {
import type { DocumentSelector, FormattingOptions, Result, ServiceContext, ServicePlugin, 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;
//# sourceMappingURL=index.d.ts.map

13

index.js
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.create = void 0;
function create({ documentSelector = ['jade'], isFormattingEnabled = () => true, } = {}) {
function create({ documentSelector = ['jade'], isFormattingEnabled = () => true, getFormattingOptions = (_document, options) => {
return {
tab_size: options.tabSize,
fill_tab: !options.insertSpaces,
};
}, } = {}) {
return {
name: 'pug-beautify',

@@ -23,6 +28,4 @@ create(context) {

const suffixes = pugCode.slice(pugCode.length - suffixesLength);
let newText = pugBeautify(pugCode, {
tab_size: options.tabSize,
fill_tab: !options.insertSpaces,
});
const formatOptions = await getFormattingOptions(document, options, context);
const newText = pugBeautify(pugCode, formatOptions);
return [{

@@ -29,0 +32,0 @@ range,

{
"name": "volar-service-pug-beautify",
"version": "0.0.31",
"version": "0.0.32",
"description": "Integrate pug-beautify into Volar",

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

},
"gitHead": "f7005aef724767786ee9fe943fa976231cc79bf1"
"gitHead": "717049e7dcd5c30f451f6db8eb71eaba43f74c83"
}
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