Socket
Socket
Sign inDemoInstall

bravo-formatter

Package Overview
Dependencies
Maintainers
1
Versions
42
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

bravo-formatter - npm Package Compare versions

Comparing version 0.0.8 to 0.0.9

1

lib/expandPhrases.js

@@ -30,3 +30,2 @@ /**

//
const REQUIRED_PART = /[^[\]{}]+/y;

@@ -33,0 +32,0 @@ const REQUIRED_BLOCK = /\{.*?\}/y;

// Utility functions for config options
/**

@@ -4,0 +3,0 @@ * Creates a string to use for one step of indentation.

3

lib/formatter/ExpressionFormatter.js

@@ -13,2 +13,5 @@ /**

import InlineLayout, { InlineLayoutError } from './InlineLayout.js';
// Contains the same data as DialectFormatOptions,
// but optimized for faster and more conventient lookup.
/** Formats a generic SQL expression */

@@ -15,0 +18,0 @@ export default class ExpressionFormatter {

@@ -9,4 +9,3 @@ /**

/** Whitespace modifiers to be used with add() method */
export let WS;
(function (WS) {
export let WS = /*#__PURE__*/function (WS) {
WS[WS["SPACE"] = 0] = "SPACE";

@@ -20,3 +19,4 @@ WS[WS["NO_SPACE"] = 1] = "NO_SPACE";

WS[WS["TAB_WIDTH_INDENT"] = 7] = "TAB_WIDTH_INDENT";
})(WS || (WS = {}));
return WS;
}({});
/**

@@ -23,0 +23,0 @@ * API for constructing SQL string (especially the whitespace part).

/** Token type enum for all possible Token categories */
export let TokenType;
/** Struct to store the most basic cohesive unit of language grammar */
(function (TokenType) {
export let TokenType = /*#__PURE__*/function (TokenType) {
TokenType["QUOTED_IDENTIFIER"] = "QUOTED_IDENTIFIER";

@@ -44,3 +41,7 @@ TokenType["IDENTIFIER"] = "IDENTIFIER";

TokenType["EOF"] = "EOF";
})(TokenType || (TokenType = {}));
return TokenType;
}({});
/** Struct to store the most basic cohesive unit of language grammar */
/** Creates EOF token positioned at given location */

@@ -47,0 +48,0 @@ export const createEofToken = index => ({

@@ -1,3 +0,2 @@

export let NodeType;
(function (NodeType) {
export let NodeType = /*#__PURE__*/function (NodeType) {
NodeType["statement"] = "statement";

@@ -24,3 +23,12 @@ NodeType["clause"] = "clause";

NodeType["block_comment"] = "block_comment";
})(NodeType || (NodeType = {}));
return NodeType;
}({});
// <ident>[<expr>]
// BETWEEN <expr1> AND <expr2>
// LIMIT <count>
// LIMIT <offset>, <count>
// The "*" operator used in SELECT *
//# sourceMappingURL=ast.js.map

@@ -6,3 +6,2 @@ import { lineColFromIndex } from '../lexer/lineColFromIndex.js';

// which however is wrong. Instead Nearley expects a text field.
export default class LexerAdapter {

@@ -9,0 +8,0 @@ index = 0;

{
"name": "bravo-formatter",
"version": "0.0.8",
"version": "0.0.9",
"description": "Format whitespace in a SQL query to make it more readable",

@@ -52,3 +52,3 @@ "license": "MIT",

"check": "yarn ts:check && yarn pretty:check && yarn lint",
"prepare": "yarn clean && yarn grammar && yarn fix && yarn check && yarn build",
"prepare": "yarn clean && yarn grammar && yarn build",
"pre-commit": "npm-run-all --parallel ts:changes lint:changes",

@@ -55,0 +55,0 @@ "grammar": "nearleyc src/parser/grammar.ne -o src/parser/grammar.ts",

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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