![Create React App Officially Deprecated Amid React 19 Compatibility Issues](https://cdn.sanity.io/images/cgdhsj6q/production/04fa08cf844d798abc0e1a6391c129363cc7e2ab-1024x1024.webp?w=400&fit=max&auto=format)
Security News
Create React App Officially Deprecated Amid React 19 Compatibility Issues
Create React App is officially deprecated due to React 19 issues and lack of maintenance—developers should switch to Vite or other modern alternatives.
pgparser
is basically just lib_pgquery ported to Javascript using Emscripten, with a tiny bit of glue! It is a direct port of PostgreSQL's query parser. The output format is a JSON representation of the parse tree.
Note that this is very similar to pg-query-parser. It has the advantage of being plain JS, so it should run fine in browsers (although it's quite large). The drawback of this package is that I haven't implemented a way to transform the parse tree back into SQL (yet!).
Currently, pgparser
simply parses queries into a parse tree. It returns a Promise when invoked:
const pgparser = require('pgparser');
let sql = `
SELECT
id,
first_name
FROM
users
`;
pgparser.parse(sql).then((parse_tree) => {
console.log(parse_tree);
}, (error) => {
console.warn(`${error.message} near character ${error.cursorpos}`);
});
The parse tree for the sample query is below:
[
{
"SelectStmt": {
"targetList": [
{
"ResTarget": {
"val": {
"ColumnRef": {
"fields": [
{
"String": {
"str": "id"
}
}
],
"location": 19
}
},
"location": 19
}
},
{
"ResTarget": {
"val": {
"ColumnRef": {
"fields": [
{
"String": {
"str": "first_name"
}
}
],
"location": 31
}
},
"location": 31
}
}
],
"fromClause": [
{
"RangeVar": {
"relname": "users",
"inhOpt": 2,
"relpersistence": "p",
"location": 59
}
}
],
"op": 0
}
}
]
FAQs
Parse PostgreSQL statements in plain Javascript
The npm package pgparser receives a total of 0 weekly downloads. As such, pgparser popularity was classified as not popular.
We found that pgparser demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Create React App is officially deprecated due to React 19 issues and lack of maintenance—developers should switch to Vite or other modern alternatives.
Security News
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
Security News
The Linux Foundation is warning open source developers that compliance with global sanctions is mandatory, highlighting legal risks and restrictions on contributions.