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

pgsql-ast-parser

Package Overview
Dependencies
Maintainers
1
Versions
108
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

pgsql-ast-parser - npm Package Compare versions

Comparing version 9.3.0 to 9.3.1

1

ast-mapper.d.ts

@@ -137,2 +137,3 @@ import * as a from './syntax/ast';

wrapped?: IAstPartialMapper;
skipNext?: boolean;
super(): SkipModifier;

@@ -139,0 +140,0 @@ statement(val: a.Statement): a.Statement | nil;

2

package.json
{
"name": "pgsql-ast-parser",
"version": "9.3.0",
"version": "9.3.1",
"description": "Yet another simple Postgres SQL parser/modifier",

@@ -5,0 +5,0 @@ "main": "index.js",

@@ -201,3 +201,20 @@ import 'mocha';

it('maps insert with super() call', () => {
// create a mapper
const mapper = astMapper(map => ({
insert: i => map.super().insert({
...i,
columns: i.columns?.filter(c => c.name !== 'a'),
})
}))
const source = parseFirst(`insert into test (a, b) values ('a', 'b')`);
const target = parseFirst(`insert into test (b) values ('a', 'b')`);
const mapped = mapper.statement(source);
expect(mapped).to.deep.equal(target);
})
it('runs deno test - match', () => {

@@ -204,0 +221,0 @@ const mapper = astMapper(map => ({

@@ -209,2 +209,3 @@ import * as a from './syntax/ast';

wrapped?: IAstPartialMapper;
skipNext?: boolean;

@@ -1268,2 +1269,6 @@ super() {

return function (this: AstDefaultMapper, ...args: []) {
if (this.skipNext) {
this.skipNext = false;
return orig.apply(this, args);
}
const impl = (this.wrapped as any)?.[k];

@@ -1296,3 +1301,4 @@ if (!impl) {

return function (this: SkipModifier, ...args: []) {
return orig.apply(this.parent.wrapped, args);
this.parent.skipNext = true;
return orig.apply(this.parent, args);
}

@@ -1299,0 +1305,0 @@ }

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

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