npm / mssql
mssql
What changed in mssql 11 to 12, from its official release notes, upgrade guides and advisories. Sources checked 2026-10-18.
7 breaking4 security7 new APIs and options1 behavior and defaults45 fixes and other
See which of these apply to your code, ranked, in your agent:
npx @unstale/cli initmssql 1263 changes
Breaking changes 6
Requests are rejected when their errors do not end the batch.
Adds support for tedious 20 and removes the TVP schema workaround.
Node.js >=18.19.0 is now required to use this release.
Prepared-statement tracing channels are now nested under the ps namespace.
The msnodesqlv8 driver now treats bigint as a string.
Removes the default value from the CLI flag, so the TDS version is no longer supplied by default.
Security 4
Unconvertible parameter values are rejected without leaking the connection.
Validates parameter names against an allowlist.
Rejects column names that break out of quoted identifiers.
Rejects type metadata that escapes the parameter declaration.
New APIs and options 7
Requests can now set their own requestTimeout instead of relying only on the configured timeout.
The CHANNELS constant is exported from the public API so developers can access diagnostics channel names.
Connection creation, destruction, and abort now emit diagnostics events.
Adds a socket-level pool validation mode.
You can provide a specific config.driver for msnodesqlv8.
Adds the --tds-version flag to the CLI so developers can specify the TDS version.
Prepares the tedious connection pool to receive tdsVersion, allowing the TDS version to be passed through.
Behavior and default changes 1
Tracing channel coverage now includes the callback API.
Fixes and other changes 45
begin() and prepare() reject with ECONNCLOSED when the pool is not connected.
begin() and prepare() reject with ENOCONN when there is no pool.
msnodesqlv8 bulk loads no longer swallow exceptions thrown by their callback.
msnodesqlv8 bulk loads settle when no connection can be acquired.
A request's callback is called once when it throws.
The connection is released when msnodesqlv8 throws while starting a request.
Streams now complete when an error ends the batch.
Streams no longer lose rows under back pressure.
Streams resumed after ending no longer hang the connection.
The connection is returned when an msnodesqlv8 transaction fails to begin.
A piped request is released when its destination fails.
The destroy of a pooled tedious connection that has already closed is now published.
Request errors are passed to the destination of Request.pipe().
A request resumes when its readable stream is destroyed.
The connection is returned when a transaction fails to begin.
Fixed bulk loading created tables and Xml columns on tedious.
Cancelled requests, including paused streams, are reported as ECANCEL.
Bulk loads settle when the table lookup fails.
Errors from commit and rollback are reported.
Requests keep every preceding error, so developers can inspect all errors from an msnodesqlv8 request.
A terminated statement is rejected with its own error.
Sets output parameter initial values in msnodesqlv8 requests.
Binds msnodesqlv8 procedure parameters in marker order.
Passes max lengths to tedious as a number.
Removes request listeners when a request is abandoned before it is sent.
Stops bulk insert from continuing after an invalid table name.
Releases the connection when bulk load options are rejected.
Validates bulk ordering keys.
Validates stored procedure names.
The close() callback is invoked only once while the pool is connecting.
Prevents a TypeError in batches with output parameters when SQL errors occur.
Preserves originalError on EABORT TransactionError instances.
Boolean connection string options are now parsed correctly.
Prevents a TypeError when executing a prepared statement with streaming enabled and no callback.
Passes dataLength to getMssqlType during valueCorrection, fixing the reported issue.
Geography and geometry parsing is more robust.
POOL_CLOSE is emitted when pool destruction fails, and the event includes the reason.
Listeners are cleaned up when batch parameter validation fails, avoiding listener leaks.
Listeners are cleaned up when an execute parameter error occurs, avoiding listener leaks.
An error is cleared when sql_variant is used in TVP columns.
Errors from msnodesqlv8 are now reported as the actual error given by the driver.
Includes the schema in the TVP type declaration for sp_executesql.
ConnectionError is now instantiated with appropriate arguments.
ConnectionError rendering is improved, making the error clearer to developers.
Reverts resolveConfig to its previous options-spread behavior, which may affect how configuration options are resolved.
mssql 111 changes
Breaking changes 1
Rejects type metadata that escapes a parameter declaration.