Socket
Socket
Sign inDemoInstall

libpg-query

Package Overview
Dependencies
Maintainers
2
Versions
40
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

libpg-query - npm Package Compare versions

Comparing version 15.0.2 to 15.0.3-wasm.0.1

libpg_query/include/pg_query.h

8

index.js

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

const PgQuery = require('./build/Release/queryparser');
const PgQuery = require('./build/Release/queryparser.node');

@@ -29,6 +29,6 @@ module.exports = {

fingerprint(query) {
return new Promise((resolve, reject) =>{
return new Promise((resolve, reject) => {
PgQuery.fingerprintAsync(query, (err, result) => {
err ? reject(err) : resolve(result);
})
});
});

@@ -39,3 +39,3 @@ },

return PgQuery.fingerprintSync(query);
}
},
};
{
"name": "libpg-query",
"version": "15.0.2",
"version": "15.0.3-wasm.0.1",
"description": "The real PostgreSQL query parser",

@@ -11,2 +11,23 @@ "homepage": "https://github.com/pyramation/libpg-query-node",

},
"files": [
"binding.gyp",
"index.js",
"index.d.ts",
"libpg_query/*",
"script/*",
"src/*",
"wasm/*"
],
"exports": {
".": {
"types": "./index.d.ts",
"browser": "./wasm/index.js",
"node": "./index.js",
"default": "./index.js"
},
"./wasm": {
"types": "./index.d.ts",
"default": "./wasm/index.js"
}
},
"scripts": {

@@ -16,2 +37,7 @@ "configure": "node-pre-gyp configure",

"rebuild": "node-pre-gyp configure rebuild",
"make:wasm": "docker run --rm -v $(pwd):/src -u $(id -u):$(id -g) emscripten/emsdk emmake make",
"build:wasm": "yarn make:wasm build",
"rebuild:wasm": "yarn make:wasm rebuild",
"clean:wasm": "yarn make:wasm clean",
"clean-cache:wasm": "yarn make:wasm clean-cache",
"test": "mocha --timeout 5000",

@@ -29,2 +55,3 @@ "binary:build": "node-pre-gyp rebuild package",

"chai": "^3.5.0",
"emnapi": "^0.43.1",
"lodash": "^4.17.15",

@@ -34,4 +61,5 @@ "mocha": "^5.2.0"

"dependencies": {
"@emnapi/runtime": "^0.43.1",
"@mapbox/node-pre-gyp": "^1.0.8",
"node-addon-api": "^1.6.3",
"node-addon-api": "^7.0.0",
"node-gyp": "^8.0.0"

@@ -38,0 +66,0 @@ },

# libpg-query
<p align="center" width="100%">
<img src="https://github.com/launchql/libpg-query-node/assets/545047/7f7053b8-9f52-4f4e-95b0-201d656902ed" alt="webincubator" width="100">
</p>
<p align="center" width="100%">
<a href="https://www.npmjs.com/package/libpg-query"><img height="20" src="https://img.shields.io/npm/dt/libpg-query"></a>
<a href="https://www.npmjs.com/package/libpg-query"><img height="20" src="https://img.shields.io/npm/dw/libpg-query"/></a>
<a href="https://github.com/launchql/libpg-query/blob/main/LICENSE-MIT"><img height="20" src="https://img.shields.io/badge/license-MIT-blue.svg"/></a>
<a href="https://www.npmjs.com/package/libpg-query"><img height="20" src="https://img.shields.io/github/package-json/v/launchql/libpg-query-node"/></a>
</p>
The real PostgreSQL parser, exposed for nodejs.

@@ -7,14 +18,13 @@

## Building a binary distribution
- Install requirements (`npm i`)
- `npx node-pre-gyp rebuild package`
- With appropriate AWS credentials configured, `npx node-pre-gyp publish`
## Table of Contents
Or you can run the scripts
1. [Installation](#installation)
2. [Example](#example)
5. [Documentation](#documentation)
3. [Versions](#versions)
4. [Building a binary distribution](#building-a-binary-distribution)
6. [Related Projects](#related-projects)
7. [Credit](#credit)
```
npm run binary:build
npm run binary:publish
```

@@ -27,2 +37,9 @@ ## Installation

## Example
```js
const parser = require('libpg-query');
parser.parseQuery('select 1').then(console.log);
```
### Documentation

@@ -40,25 +57,33 @@

## Example
## Versions
```js
const parser = require('libpg-query');
parser.parseQuery('select 1').then(console.log);
```
Our latest is built with `16-latest` branch from libpg_query
## Versions
Our latest is built with `15-latest` branch from libpg_query
| PG Major Version | libpg_query | Branch | npm
|--------------------------|-------------|------------------------------------------------------------------------------------------------|---------|
| 16 | 16-latest | [`16-latest`](https://github.com/launchql/libpg-query-node/tree/16-latest) | [`libpg-query@16.0.0`](https://www.npmjs.com/package/libpg-query/v/latest)
| 15 | 15-latest | [`15-latest`](https://github.com/launchql/libpg-query-node/tree/15-latest) | [`libpg-query@15.0.3`](https://www.npmjs.com/package/libpg-query/v/15.0.3)
| 14 | 14-latest | [`14-latest`](https://github.com/launchql/libpg-query-node/tree/14-latest) | [`libpg-query@14.0.0`](https://www.npmjs.com/package/libpg-query/v/14.0.0)
| 13 | 13-latest | [`13-latest`](https://github.com/launchql/libpg-query-node/tree/13-latest) | [`libpg-query@13.3.1`](https://www.npmjs.com/package/libpg-query/v/13.3.1)
| 12 | (n/a) | |
| 11 | (n/a) | |
| 10 | 10-latest | | `@1.3.1` ([tree](https://github.com/pyramation/pgsql-parser/tree/39b7b1adc8914253226e286a48105785219a81ca)) |
| PostgreSQL Major Version | libpg_query | Status | npm
|--------------------------|-------------|---------------------|---------|
| 15 | 15-latest | Supported | [`latest`](https://www.npmjs.com/package/libpg-query/v/latest)
| 14 | 14-latest | Supported | [`libpg-query@14.0.0`](https://www.npmjs.com/package/libpg-query/v/14.0.0)
| 13 | 13-latest | Supported | [`libpg-query@13.3.1`](https://www.npmjs.com/package/libpg-query/v/13.3.1)
| 12 | (n/a) | Not supported |
| 11 | (n/a) | Not supported |
| 10 | 10-latest | Not supported | `@1.3.1` ([tree](https://github.com/pyramation/pgsql-parser/tree/39b7b1adc8914253226e286a48105785219a81ca)) |
## Building a binary distribution
## Related
- Install requirements (`npm i`)
- `npx node-pre-gyp rebuild package`
- With appropriate AWS credentials configured, `npx node-pre-gyp publish`
Or you can run the scripts
```
npm run binary:build
npm run binary:publish
```
## Related Projects
* [libpg_query](https://github.com/pganalyze/libpg_query)

@@ -75,4 +100,4 @@ * [pgsql-parser](https://github.com/pyramation/pgsql-parser)

Additional thanks for node binding [Ethan Resnick](github.com/ethanresnick).
Additional thanks for node binding [Ethan Resnick](https://github.com/ethanresnick).
Original [Code](https://github.com/zhm/node-pg-query-native) and [License](https://github.com/zhm/node-pg-query-native/blob/master/LICENSE.md)

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