Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: Llorx/node-postgres
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: master
Choose a base ref
...
head repository: brianc/node-postgres
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: master
Choose a head ref
Checking mergeability… Don’t worry, you can still create the pull request.
  • 11 commits
  • 31 files changed
  • 6 contributors

Commits on Oct 22, 2025

  1. feat: add Node.js version 25 to CI workflow (brianc#3556)

    * feat: add Node.js version 25 to CI workflow
    
    https://nodejs.org/en/blog/release/v25.0.0
    
    * chore: update CI workflow to exclude Node.js version '23'
    
    Remove Node.js version '23' from CI workflow.
    nigrosimone authored Oct 22, 2025
    Configuration menu
    Copy the full SHA
    8d493f3 View commit details
    Browse the repository at this point in the history

Commits on Dec 11, 2025

  1. fix: Avoid retaining buffer for latest parse in reader (brianc#3533)

    * test: Add failing test for parser reader cleanup
    
    * fix: Avoid retaining buffer for latest parse in reader
    
    The buffer can be arbitrarily large, and the parser shouldn’t keep it around while waiting on (and potentially also buffering) the next complete packet.
    charmander authored Dec 11, 2025
    Configuration menu
    Copy the full SHA
    ecff60d View commit details
    Browse the repository at this point in the history

Commits on Jan 14, 2026

  1. Update changelog

    brianc committed Jan 14, 2026
    Configuration menu
    Copy the full SHA
    8750cad View commit details
    Browse the repository at this point in the history
  2. Publish

     - pg-bundler-test@0.1.0
     - pg-cloudflare@1.3.0
     - pg-connection-string@2.10.0
     - pg-cursor@2.16.0
     - pg-esm-test@1.3.0
     - pg-pool@3.11.0
     - pg-protocol@1.11.0
     - pg-query-stream@4.11.0
     - pg@8.17.0
    brianc committed Jan 14, 2026
    Configuration menu
    Copy the full SHA
    d10e09c View commit details
    Browse the repository at this point in the history
  3. Improve Deno compatibility: config-first and safe env access (brianc#…

    …3547)
    
    * Set default PostgreSQL user to 'postgres' to avoid Deno env access errors
    
    Currently, the pg package defaults the database user to process.env.USER (or USERNAME on Windows).  
    This causes errors when running in Deno without --allow-env, as environment access is restricted.
    
    This PR changes the default user to 'postgres', so:
    
    - Node.js behavior is unchanged when a user is explicitly provided in config.
    - Deno users no longer hit NotCapable errors for environment access.
    - Avoids relying on process.env for default values.
    
    Example:
    
    Before:
    user: process.platform === 'win32' ? process.env.USERNAME : process.env.USER,
    
    After:
    user: 'postgres', // default user, avoids using process.env
    
    * Prioritize config values over environment variables in ConnectionParameters
    
    Previously, ConnectionParameters would first check process.env for connection settings before using the provided config object. This could cause errors in environments like Deno where environment access is restricted.
    
    This change updates the val function to:
    
    1. Use the value from config if it is defined.
    
    
    2. Fall back to environment variables only if config does not provide a value.
    
    
    3. Use default values if neither config nor environment variables are set.
    
    
    
    This ensures that explicitly provided configuration values are always respected, avoiding unnecessary errors in restricted environments.
    
    * Wrap NODE_PG_FORCE_NATIVE check in try/catch for Deno compatibility
    
    Replace the `typeof process.env.NODE_PG_FORCE_NATIVE !== 'undefined'` check with a try/catch
    to safely handle environments like Deno without `--allow-env`.
    
    - Keeps Node.js behavior unchanged.
    - Prevents errors when accessing process.env in Deno.
    - Preserves lazy loading of the native module.
    
    * Make default database user Deno-safe
    
    Wrap the default database user assignment in a try/catch to prevent errors when environment access is restricted (e.g., in Deno).
    
    - Uses process.env.USER / USERNAME on Node if available
    - Falls back to 'postgres' when env access fails or is unavailable
    - Maintains code structure and comments
    - Ensures Node tests continue to pass while preventing Deno runtime errors
    
    * Fixing checks pass
    
    * Update packages/pg/lib/connection-parameters.js
    
    Co-authored-by: Charmander <~@charmander.me>
    
    * fix(pg): only guard process.env access when forcing native client
    
    ---------
    
    Co-authored-by: Charmander <~@charmander.me>
    Jobians and charmander authored Jan 14, 2026
    Configuration menu
    Copy the full SHA
    6bf475c View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    5a581bb View commit details
    Browse the repository at this point in the history

Commits on Jan 15, 2026

  1. Don't use prefix import as it breaks in old nodes. (brianc#3578)

    * Don't use prefix import as it breaks in old nodes. This is a one time fix for brianc#3577 because its easy to do. node < v16 is not supported.
    
    * Update docs
    brianc authored Jan 15, 2026
    Configuration menu
    Copy the full SHA
    b94c8e1 View commit details
    Browse the repository at this point in the history
  2. Publish

     - pg-cursor@2.16.1
     - pg-esm-test@1.3.1
     - pg-query-stream@4.11.1
     - pg@8.17.1
    brianc committed Jan 15, 2026
    Configuration menu
    Copy the full SHA
    4eb7529 View commit details
    Browse the repository at this point in the history

Commits on Jan 19, 2026

  1. Configuration menu
    Copy the full SHA
    a3a4567 View commit details
    Browse the repository at this point in the history

Commits on Jan 20, 2026

  1. Remove node: prefix from imports (brianc#3584)

    * Remove node: prefix from imports.
    brianc authored Jan 20, 2026
    Configuration menu
    Copy the full SHA
    ea06db5 View commit details
    Browse the repository at this point in the history
  2. Publish

     - pg-connection-string@2.10.1
     - pg-cursor@2.16.2
     - pg-esm-test@1.3.2
     - pg-query-stream@4.11.2
     - pg@8.17.2
    brianc committed Jan 20, 2026
    Configuration menu
    Copy the full SHA
    5b68a11 View commit details
    Browse the repository at this point in the history
Loading