npm / mssql
mssql
What changed in mssql 7 to 12, from its official release notes, upgrade guides and advisories. Also covers @types/mssql. Sources checked 2026-11-28.
19 breaking4 security14 new APIs and options5 behavior and defaults1 tooling54 fixes and other
See which of these apply to your code, ranked, in your agent:
npx @unstale/cli initmssql 1271 changes
Breaking changes 8
msnodesqlv8 now gives value handlers numbers rather than numeric strings.
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.
Config objects are no longer cloned. They are intended to be readonly; modifying them during the process lifetime results in undefined behaviour.
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 51
An empty Encrypt value in a connection string is treated as not set.
Connection pool timeout errors now include additional context.
Prevents msnodesqlv8 6 from holding the connection when a stream is paused after cancellation.
Every ODBC driver's prefix is stripped from msnodesqlv8 messages.
msnodesqlv8 now describes identity columns by the type they hold.
Held msnodesqlv8 queries now resume when they carry on after their last error.
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 113 changes
Breaking changes 2
Rejects type metadata that escapes a parameter declaration.
Node.js 18 or newer is now required; Node.js 16 support was dropped.
Fixes and other changes 1
Adds support for using native bigint values from tedious.
mssql 102 changes
Breaking changes 1
Node.js versions 14 and earlier are no longer supported.
Tooling 1
The tedious dependency was upgraded to v16.
mssql 91 changes
Breaking changes 1
Support for Node versions 12 and earlier was dropped.
mssql 88 changes
Breaking changes 4
Explicitly set driver options in config.options are no longer overridden by other values.
Connection string parser helpers have been removed.
Duplicate column names are now presented as an array even when their values are empty.
Deprecated pool properties have been removed.
New APIs and options 2
Adds a method to clear table rows, allowing for chunking updates.
Adds a map for storing callbacks used to process row values.
Behavior and default changes 2
Error messages for invalid bulk load parameters have changed slightly.
The driver detects the OS platform and attempts to select the correct connection string for it.
mssql 712 changes
Breaking changes 3
Node.js versions older than 10 are no longer supported.
Piped streams no longer have errors forwarded to them.
The tedious config option trustServerCertificate now defaults to false when not supplied.
New APIs and options 5
The msnodesqlv8 driver now supports detailed errors.
Use request.arrayRowMode to handle result sets with duplicate keys.
Requests in stream mode now emit a rowsaffected event.
UseUTC is now supported on msnodesqlv8 connections.
Connections are validated before being released from the pool; set validateConnection to false to disable this check.
Behavior and default changes 2
Connection config objects are now deep cloned when stored against a connection pool.
Request.pipe now pipes a true Node stream, improving backpressure support.
Fixes and other changes 2
Resolved an issue with geography v2 parsing.
Fixed trailing rows failing to be emitted from request streams using the msnodesqlv8 driver.