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

pgsql-deparser

Package Overview
Dependencies
Maintainers
1
Versions
75
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

pgsql-deparser - npm Package Compare versions

Comparing version 13.3.15 to 13.4.0

8

CHANGELOG.md

@@ -6,2 +6,10 @@ # Change Log

# [13.4.0](https://github.com/pyramation/pgsql-parser/compare/pgsql-deparser@13.3.15...pgsql-deparser@13.4.0) (2023-03-15)
**Note:** Version bump only for package pgsql-deparser
## [13.3.15](https://github.com/pyramation/pgsql-parser/compare/pgsql-deparser@13.3.14...pgsql-deparser@13.3.15) (2022-12-22)

@@ -8,0 +16,0 @@

11

main/index.js
"use strict";
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
Object.defineProperty(exports, "__esModule", {

@@ -14,15 +13,5 @@ value: true

});
Object.defineProperty(exports, "preparse", {
enumerable: true,
get: function get() {
return _preparse.preparse;
}
});
exports.deparse = void 0;
var _deparser = _interopRequireDefault(require("./deparser"));
var _preparse = require("./preparse");
var deparse = _deparser["default"].deparse;
exports.deparse = deparse;

36

main/utils/index.js
"use strict";
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.cleanTreeWithStmt = exports.cleanTree = exports.transform = exports.cleanLines = void 0;
exports.transform = exports.cleanTreeWithStmt = exports.cleanTree = exports.cleanLines = void 0;
var _typeof2 = _interopRequireDefault(require("@babel/runtime/helpers/typeof"));
/* eslint-disable no-restricted-syntax */
/* eslint-disable no-restricted-syntax */
var cleanLines = function cleanLines(sql) {

@@ -20,13 +18,11 @@ return sql.split('\n').map(function (l) {

};
exports.cleanLines = cleanLines;
var transform = function transform(obj, props) {
var copy = null; // Handle the 3 simple types, and null or undefined
var copy = null;
// Handle the 3 simple types, and null or undefined
if (obj == null || (0, _typeof2["default"])(obj) !== 'object') {
return obj;
} // Handle Date
}
// Handle Date
if (obj instanceof Date) {

@@ -36,19 +32,16 @@ copy = new Date();

return copy;
} // Handle Array
}
// Handle Array
if (obj instanceof Array) {
copy = [];
for (var i = 0, len = obj.length; i < len; i++) {
copy[i] = transform(obj[i], props);
}
return copy;
} // Handle Object
}
// Handle Object
if (obj instanceof Object || (0, _typeof2["default"])(obj) === 'object') {
copy = {};
for (var attr in obj) {

@@ -71,15 +64,10 @@ if (obj.hasOwnProperty(attr)) {

}
return copy;
}
throw new Error("Unable to copy obj! Its type isn't supported.");
};
exports.transform = transform;
var noop = function noop() {
return undefined;
};
var cleanTree = function cleanTree(tree) {

@@ -102,3 +90,2 @@ return transform(tree, {

}
return cleanTree(obj);

@@ -111,5 +98,3 @@ } else {

};
exports.cleanTree = cleanTree;
var cleanTreeWithStmt = function cleanTreeWithStmt(tree) {

@@ -121,3 +106,2 @@ return transform(tree, {

};
exports.cleanTreeWithStmt = cleanTreeWithStmt;
import Deparser from './deparser';
import { preparse } from './preparse';
const deparse = Deparser.deparse;
export { deparse, Deparser, preparse };
export { deparse, Deparser };
/* eslint-disable no-restricted-syntax */
export const cleanLines = sql => {

@@ -6,9 +7,9 @@ return sql.split('\n').map(l => l.trim()).filter(a => a).join('\n');

export const transform = (obj, props) => {
let copy = null; // Handle the 3 simple types, and null or undefined
let copy = null;
// Handle the 3 simple types, and null or undefined
if (obj == null || typeof obj !== 'object') {
return obj;
} // Handle Date
}
// Handle Date
if (obj instanceof Date) {

@@ -18,19 +19,16 @@ copy = new Date();

return copy;
} // Handle Array
}
// Handle Array
if (obj instanceof Array) {
copy = [];
for (let i = 0, len = obj.length; i < len; i++) {
copy[i] = transform(obj[i], props);
}
return copy;
} // Handle Object
}
// Handle Object
if (obj instanceof Object || typeof obj === 'object') {
copy = {};
for (const attr in obj) {

@@ -53,11 +51,7 @@ if (obj.hasOwnProperty(attr)) {

}
return copy;
}
throw new Error("Unable to copy obj! Its type isn't supported.");
};
const noop = () => undefined;
export const cleanTree = tree => {

@@ -80,3 +74,2 @@ return transform(tree, {

}
return cleanTree(obj);

@@ -83,0 +76,0 @@ } else {

{
"name": "pgsql-deparser",
"version": "13.3.15",
"version": "13.4.0",
"description": "PostgreSQL AST Deparser",

@@ -68,3 +68,3 @@ "author": "Dan Lynch <pyramation@gmail.com>",

"jest": "^25.1.0",
"pgsql-parser": "^13.4.1",
"pgsql-parser": "^13.5.0",
"prettier": "^2.1.2",

@@ -76,6 +76,5 @@ "regenerator-runtime": "^0.13.2"

"dotty": "^0.1.0",
"lodash": "^4.17.20",
"pgsql-enums": "^13.1.3"
},
"gitHead": "f2353fb8a98b0ac1d637c57d2c8be79f5495b446"
"gitHead": "3d78dc66d800eb8cdf76851337f27b972160fb41"
}

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

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

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