![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.
@rickbergfalk/sql-formatter
Advanced tools
Formats whitespaces in a SQL query to make it more readable
SQL Formatter is a JavaScript library for pretty-printing SQL queries. It started as a port of a PHP Library, but has since considerably diverged. It supports Standard SQL, Couchbase N1QL, IBM DB2 and Oracle PL/SQL dialects.
Get the latest version from NPM:
npm install sql-formatter
import sqlFormatter from "sql-formatter";
console.log(sqlFormatter.format("SELECT * FROM table1"));
This will output:
SELECT
*
FROM
table1
You can also pass in configuration options:
sqlFormatter.format("SELECT *", {
language: "n1ql", // Defaults to "sql"
indent: " " // Defaults to two spaces
});
Currently just four SQL dialects are supported:
// Named placeholders
sqlFormatter.format("SELECT * FROM tbl WHERE foo = @foo", {
params: {foo: "'bar'"}
}));
// Indexed placeholders
sqlFormatter.format("SELECT * FROM tbl WHERE foo = ?", {
params: ["'bar'"]
}));
Both result in:
SELECT
*
FROM
tbl
WHERE
foo = 'bar'
If you don't use a module bundler, clone the repository, run npm install
and grab a file from /dist
directory to use inside a <script>
tag.
This makes SQL Formatter available as a global variable window.sqlFormatter
.
# run linter and tests
$ npm run check
...and you're ready to poke us with a pull request.
FAQs
Formats whitespaces in a SQL query to make it more readable
The npm package @rickbergfalk/sql-formatter receives a total of 3 weekly downloads. As such, @rickbergfalk/sql-formatter popularity was classified as not popular.
We found that @rickbergfalk/sql-formatter 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.