Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

prettier-plugin-sql

Package Overview
Dependencies
Maintainers
2
Versions
33
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

prettier-plugin-sql - npm Package Compare versions

Comparing version 0.16.0 to 0.17.0

5

lib/index.d.ts
/// <reference path="../shim.d.ts" />
import type { AST, Option } from 'node-sql-parser';
import type { Options, ParserOptions, Plugin } from 'prettier';
import { type FormatOptions } from 'sql-formatter';
import { type FormatOptionsWithLanguage } from 'sql-formatter';
declare const SQL_FORMATTER = "sql-formatter";
declare const NODE_SQL_PARSER = "node-sql-parser";
declare const SQL_CST = "sql-cst";
export type SqlBaseOptions = Option & Partial<FormatOptions> & {
language?: string;
export type SqlBaseOptions = Option & Partial<FormatOptionsWithLanguage> & {
formatter?: typeof NODE_SQL_PARSER | typeof SQL_CST | typeof SQL_FORMATTER;

@@ -11,0 +10,0 @@ params?: string;

46

lib/index.js

@@ -170,2 +170,22 @@ import { JSOX } from 'jsox';

},
identifierCase: {
category: 'Output',
type: 'choice',
default: 'preserve',
description: 'Converts identifiers to upper- or lowercase for `sql-formatter`. Only unquoted identifiers are converted. (experimental)',
choices: [
{
value: 'preserve',
description: 'preserves the original case',
},
{
value: 'upper',
description: 'converts to uppercase',
},
{
value: 'lower',
description: 'converts to lowercase',
},
],
},
uppercase: {

@@ -217,28 +237,2 @@ category: 'Output',

},
tabulateAlias: {
category: 'Format',
type: 'boolean',
default: false,
description: 'Aligns column aliases into a single column for `sql-formatter`. Does not effect table name aliases.',
},
commaPosition: {
category: 'Format',
type: 'choice',
default: 'after',
description: 'Defines where to place commas in lists of columns for `sql-formatter`',
choices: [
{
value: 'after',
description: 'places comma at the end of line',
},
{
value: 'before',
description: 'places comma at the start of line',
},
{
value: 'tabular',
description: 'aligns commas in a column at the end of line',
},
],
},
expressionWidth: {

@@ -245,0 +239,0 @@ category: 'Format',

{
"name": "prettier-plugin-sql",
"version": "0.16.0",
"version": "0.17.0",
"type": "module",

@@ -50,3 +50,3 @@ "description": "An opinionated sql formatter plugin for Prettier",

"node-sql-parser": "^4.11.0",
"sql-formatter": "^13.1.0",
"sql-formatter": "^14.0.0",
"tslib": "^2.6.2"

@@ -53,0 +53,0 @@ },

@@ -78,6 +78,5 @@ # prettier-plugin-sql ![npm bundle size](https://img.shields.io/bundlephobia/min/prettier-plugin-sql) ![npm bundle size](https://img.shields.io/bundlephobia/minzip/prettier-plugin-sql)

keywordCase: 'preserve' | 'upper' | 'lower' // default `preserve`
identifierCase: 'preserve' | 'upper' | 'lower' // default `preserve`, experimental
indentStyle: 'standard' | 'tabularLeft' | 'tabularRight' // default `standard`
logicalOperatorNewline: 'before' | 'after' // default `before`
tabulateAlias: boolean // default `false`
commaPosition: 'after' | 'before' | 'tabular' // default `after`
expressionWidth: number // default `50`

@@ -84,0 +83,0 @@ linesBetweenQueries: number // default `1`

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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