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

pg-minify

Package Overview
Dependencies
Maintainers
1
Versions
54
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

pg-minify - npm Package Compare versions

Comparing version 0.4.5 to 0.5.1

6

lib/error.js

@@ -10,3 +10,4 @@ 'use strict';

unclosedQI: 2, // Unclosed quoted identifier.
multiLineQI: 3 // Multi-line quoted identifiers are not supported.
multiLineQI: 3, // Multi-line quoted identifiers are not supported.
nestedMLC: 4 // Nested multi-line comments are not supported.
};

@@ -20,3 +21,4 @@

{name: 'unclosedQI', message: 'Unclosed quoted identifier.'},
{name: 'multiLineQI', message: 'Multi-line quoted identifiers are not supported.'}
{name: 'multiLineQI', message: 'Multi-line quoted identifiers are not supported.'},
{name: 'nestedMLC', message: 'Nested multi-line comments are not supported.'}
];

@@ -23,0 +25,0 @@

@@ -36,3 +36,3 @@ 'use strict';

var s = sql[idx], // current symbol;
s1 = idx < len - 1 ? sql[idx + 1] : ''; // next symbol;
s1 = sql[idx + 1]; // next symbol;

@@ -63,2 +63,9 @@ if (isGap(s)) {

}
var nestedIdx = sql.substr(idx + 2, end - idx).search(/\/\*/);
if (nestedIdx !== -1) {
idx += 2 + nestedIdx;
throwError(PEC.nestedMLC);
}
idx = end + 1;

@@ -65,0 +72,0 @@ skipGaps();

{
"name": "pg-minify",
"version": "0.4.5",
"version": "0.5.1",
"description": "Minifies PostgreSQL scripts.",

@@ -42,3 +42,3 @@ "main": "lib/index.js",

"eslint": "4.3",
"coveralls": "2.x",
"coveralls": "2.11",
"istanbul": "0.4",

@@ -45,0 +45,0 @@ "jasmine-node": "1.x",

@@ -11,3 +11,3 @@ pg-minify

**Features:**
**Features:**

@@ -27,3 +27,3 @@ * Removes both `/*multi-line*/` and `--single-line` comments

* Multi-line quoted identifiers are not supported, throwing an error when encountered.
* Nested multi-line comments are not supported - `/* /* nested */ */`.
* Nested multi-line comments are not supported, throwing an error when encountered.

@@ -41,3 +41,3 @@ ## Installing

var sql = "SELECT 1; -- comments";
var sql = 'SELECT 1; -- comments';

@@ -64,3 +64,3 @@ minify(sql); //=> SELECT 1;

try {
minify("SELECT '1");
minify('SELECT \'1');
} catch (error) {

@@ -67,0 +67,0 @@ // error is minify.SQLParsingError instance

////////////////////////////////////////
// Requires pg-minify v0.4.0 or later.
// Requires pg-minify v0.5.0 or later.
////////////////////////////////////////

@@ -20,3 +20,4 @@

unclosedQI = 2, // Unclosed quoted identifier.
multiLineQI = 3 // Multi-line quoted identifiers are not supported.
multiLineQI = 3, // Multi-line quoted identifiers are not supported.
nestedMLC = 4 // Nested multi-line comments are not supported.
}

@@ -23,0 +24,0 @@

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