Security News
New Python Packaging Proposal Aims to Solve Phantom Dependency Problem with SBOMs
PEP 770 proposes adding SBOM support to Python packages to improve transparency and catch hidden non-Python dependencies that security tools often miss.
kysely-postgres-js
Advanced tools
Kysely dialect for PostgreSQL using the Postgres.js client library under the hood (version >= 3.4).
This dialect should not be confused with Kysely's built-in PostgreSQL dialect, which uses the pg client library instead.
npm i kysely-postgres-js
npm i kysely-postgres-js kysely postgres
yarn add kysely-postgres-js kysely postgres
pnpm add kysely-postgres-js kysely postgres
This package uses/extends some Kysely types and classes, which are imported using its NPM package name -- not a relative file path or CDN url. It also uses [Postgres.js] which is imported using its NPM package name -- not a relative file path or CDN url.
To fix that, add an import_map.json
file.
{
"imports": {
"kysely": "https://cdn.jsdelivr.net/npm/kysely@0.26.3/dist/esm/index.js",
"postgres": "https://deno.land/x/postgresjs@v3.4.0/mod.js"
}
}
import {type GeneratedAlways, Kysely} from 'kysely'
import {PostgresJSDialect} from 'kysely-postgres-js'
import postgres from 'postgres'
interface Database {
person: {
id: GeneratedAlways<number>
first_name: string | null
last_name: string | null
age: number
}
}
const db = new Kysely<Database>({
dialect: new PostgresJSDialect({
postgres: postgres({
database: 'test',
host: 'localhost',
max: 10,
port: 5434,
user: 'admin',
}),
}),
})
MIT License, see LICENSE
FAQs
Kysely dialect for PostgreSQL using the Postgres.js client
We found that kysely-postgres-js 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
PEP 770 proposes adding SBOM support to Python packages to improve transparency and catch hidden non-Python dependencies that security tools often miss.
Security News
Socket CEO Feross Aboukhadijeh discusses open source security challenges, including zero-day attacks and supply chain risks, on the Cyber Security Council podcast.
Security News
Research
Socket researchers uncover how threat actors weaponize Out-of-Band Application Security Testing (OAST) techniques across the npm, PyPI, and RubyGems ecosystems to exfiltrate sensitive data.