Zum Inhalt springen

Serverless Updates & Release Notes

Einträge
26
Quellen
1
Zuletzt aktualisiert
Kategorie
Datenbanken

Folge Serverless, um die Release Notes in deinen Feed zu holen.

Serverless von Neon

1.2.2 (2026-11-27)

Fix Pool.query() over HTTP (poolQueryViaFetch) sending a password function's source text instead of its resolved value (#243).

Make query and params well-formed (no invalid surrogates) over HTTP, so behaviour matches WebSockets and Pool.query() behaviour does not vary by poolQueryViaFetch (#241).

Prevent a Pool.query() going over HTTP (even with poolQueryViaFetch) if any startup keys are set that would be honoured over WebSockets but not http, such as statement_timeout (#223).

Originalquelle(öffnet in neuem Tab)Problem melden

Serverless von Neon

Neon Serverless 1.2.0: Flexiblere Verbindungsparameter, kein JSR mehr

In Neon Serverless 1.2.0 akzeptieren neon(...), transaction und query einzelne Verbindungsparameter (auch als sync oder async Funktionen), Client und Pool unterstützen bei aktiviertem pipelineConnect eine password-Funktion, parseIntoClientConfig wird exportiert, es gibt kleinere Fixes, und das Paket wird nicht mehr auf JSR veröffentlicht (stattdessen npm:@neondatabase/serverless verwenden).

  • Options to the neon(...) HTTP-client creation function, and to the transaction and query functions, now support individual connection parameters: user (or username), password, host (or hostname), port, database and connectionString.

    These can be strings (or number, for port) or sync or async functions to be resolved on every query. They can supplement, override parts of, or fully replace the first-argument connection string.

    So this still works:

    • const sql = neon(DATABASE_URL)

    But, for example, these now work too:

    • const sql = neon(DATABASE_URL_NO_PASSWORD, { password: () => getPasswordAsync() })
    • const sql = neon({ user, password, host, database })
    • const sql = neon({ connectionString: () => getConnectionString() })
  • Client and Pool now support a sync or async function as the password connection parameter when pipelineConnect is enabled (this previously caused an error). And parseIntoClientConfig from pg-connection-string is exported at top-level to make it easy to use a password function alongside a connection string:

    import { Pool, parseIntoClientConfig } from '@neondatabase/serverless';
    
    const pool = new Pool({
      ...parseIntoClientConfig(process.env.DATABASE_URL),
      password: () => getDatabaseAuthToken('argument'),
    });
    
  • A few other minor fixes.

  • The package is no longer published to JSR. Please update any jsr references to npm:@neondatabase/serverless.

Originalquelle(öffnet in neuem Tab)Problem melden

Serverless von Neon

Eigene Domains für Neon Functions

Für bereitgestellte Functions können jetzt eigene Domains per CNAME genutzt werden; TLS-Zertifikate werden automatisch bereitgestellt, und Domains sind branch-spezifisch.

Ship your public API or webhook on a domain you own, like api.example.com, instead of the native Neon URL. Point a CNAME at the target Neon gives you, and Neon provisions the TLS certificate automatically. Declare it in neon.ts:

// neon.ts
functions: {
  api: {
    source: './functions/api.ts',
    customDomains: ['api.example.com'],
  },
},

Domains are branch-scoped, so a preview branch can serve from its own hostname while production keeps yours. See Custom domains.

Originalquelle(öffnet in neuem Tab)Problem melden

Serverless von Neon

Neue Anleitungen zu Neon Functions

Zwei neue Anleitungen zeigen, wie man Neon Functions mit GitHub Actions automatisiert bereitstellt oder mit Sentry überwacht.

Two new guides show what you can build on Neon Functions, which run alongside your database as part of the Neon backend:

Try the Neon backend

Object Storage, Functions, and AI Gateway branch with your Postgres database, so your whole stack forks together.

Get started


Originalquelle(öffnet in neuem Tab)Problem melden

Serverless von Neon

Neon Serverless 1.1.0: Inline-Typdeklarationen

Version 1.1.0 hat alle Typdeklarationen vollständig inline integriert, wodurch die Paketgröße reduziert wird; fortgeschrittene Type-Level-Muster können jedoch betroffen sein.

Type declarations are now fully inlined (some were previously re-exported from @types/pg and @types/node). The new types greatly reduce the size of the package with dependencies, and should be compatible in normal usage. The code that is actually run remains unchanged.

A few advanced type-level patterns could be affected. Code that depends on exact type identity with the @types/pg exports, that relies on declare module 'pg' augmentation flowing through these exports, or that assumes Buffer-specific types in places now declared as Uint8Array may need updated types.

Originalquelle(öffnet in neuem Tab)Problem melden

Serverless von Neon

Neon Serverless 1.0.1: Browser-Sicherheitswarnung

Version 1.0.1 zeigt beim Verbindungsaufbau im Browser eine Sicherheitswarnung an, die über eine neue Konfigurationsoption deaktiviert werden kann.

The package now prints a security warning to the console when a connection is made in a web browser. This behaviour can be suppressed with a new configuration option: disableWarningInBrowsers. There are a few other very minor fixes.

Originalquelle(öffnet in neuem Tab)Problem melden

Serverless von Neon

Neon Serverless 1.0.0: Sichere Abfragefunktion

Version 1.0.0 erzwingt die Verwendung der HTTP-Abfragevorlagenfunktion als Template-Funktion, um SQL-Injection zu verhindern, und bietet neue "query()"- und "unsafe()"-Eigenschaften.

Breaking change: the HTTP query template function can now only be called as a template function, not as a conventional function. This improves safety from accidental SQL-injection vulnerabilities. For example:

import { neon } from '@neondatabase/serverless';
const sql = neon(process.env.DATABASE_URL);
const id = 1;

// this is safe and convenient, as before
const result = await sql`SELECT * FROM table WHERE id = ${id}`;

// this looks very similar and was previously allowed, but was open to SQL
// injection attacks because it uses ordinary string interpolation -- it's now
// both a TypeScript type error and a runtime error
const throws = await sql(`SELECT * FROM table WHERE id = ${id}`);

To fill the gap left by this change, the template function has two new properties: a query() function that allows manually parameterized queries, and an unsafe() function that lets you interpolate trusted arbitrary string values. For example:

// this was previously allowed, and was safe, but is now also an error so as to
// prevent the vulnerability seen above
const throws = await sql('SELECT * FROM table WHERE id = $1', [id]);

// the `query()` function is the new way to manually specify placeholders and
// values (the same way it's done by `client.query()` and `pool.query()`)
const result = await sql.query('SELECT * FROM table WHERE id = $1', [id]);

// to interpolate strings like column or table names, **only** if you know …

Originalquelle(öffnet in neuem Tab)Problem melden

Serverless von Neon

Neon Serverless 0.10.4

Behebt Probleme beim Einfügen von Buffer- und ArrayBuffer-Werten in BYTEA-Felder sowie die Übergabe von authToken in HTTP-Fetch-Abfragen.

Fixes insert Buffer/ArrayBuffer values into BYTEA fields when using HTTP fetch queries.

Fixes only passing authToken in the sql HTTP request and not in the neon connection setup.

Originalquelle(öffnet in neuem Tab)Problem melden

Serverless von Neon

Neon Serverless 0.10.0

Erfasst Stack-Traces in NeonDbError und ermöglicht Authentifizierung per JWT durch eine neue authToken-Eigenschaft.

Capture stack traces in NeonDbError, if Error.captureStackTrace is available.

Allow authentication through JWT by adding a authToken property to the neon HTTP connection options.

Originalquelle(öffnet in neuem Tab)Problem melden

Serverless von Neon

Neon Serverless 0.9.3

Macht alle Fehlerinformationsfelder auf NeonDbError-Objekten für HTTP-Fetch-Transporte verfügbar.

Expose all error information fields on NeonDbError objects thrown when using the http fetch transport.

Originalquelle(öffnet in neuem Tab)Problem melden

Serverless von Neon

Neon Serverless 0.9.1

Übergibt Benutzernamen und Datenbanknamen durch den URL-Decoder, damit alle Benutzernamen erfolgreich autorisiert werden können.

Pass username (and database name) through URL decoder, so all usernames can successfully authorize.

Originalquelle(öffnet in neuem Tab)Problem melden

Serverless von Neon

Neon Serverless 0.9.0

Markiert die fetchConnectionCache-Option als veraltet, da sie immer aktiviert ist, und erlaubt Optionen für einzelne Abfragen in einer Batch-Transaktion.

Deprecate fetchConnectionCache option, which is now always enabled. For neon http fetch queries, enable setting options on individual queries within a batch transaction (but note that the types still do not allow this).

Originalquelle(öffnet in neuem Tab)Problem melden

Serverless von Neon

Neon Serverless 0.8.1

Macht die Einführung einer einzelnen Region-Domain für WebSockets rückgängig und korrigiert die Behandlung von -pooler-Verbindungshosts.

Revert single per-region domain for WebSockets. Fix treatment of -pooler connection hosts.

Originalquelle(öffnet in neuem Tab)Problem melden

Serverless von Neon

Neon Serverless 0.8.0

Nutzt eine einzige domain-weite Verbindung pro Region für alle Verbindungen zu Neon-Datenbanken, um das Verbindungs-Caching in V8 zu unterstützen, und übergibt die Endpunkt-ID in den Verbindungsoptionen für WebSocket-Verbindungen.

Use a single (per-region) domain name for all connections to Neon databases. Intended to help with connection caching in V8. Passes the endpoint ID inside connection options for WebSocket connections.

Originalquelle(öffnet in neuem Tab)Problem melden