Skip to content

feat: add support for tedious 20 and remove TVP schema workaround#1877

Merged
dhensby merged 1 commit into
tediousjs:masterfrom
dhensby:feat/tedious-20
Jul 2, 2026
Merged

feat: add support for tedious 20 and remove TVP schema workaround#1877
dhensby merged 1 commit into
tediousjs:masterfrom
dhensby:feat/tedious-20

Conversation

@dhensby

@dhensby dhensby commented Jul 2, 2026

Copy link
Copy Markdown
Collaborator

Summary

Adds support for tedious 20.x and removes the SchemaAwareTVP workaround that was introduced in #1838.

Background

Tedious 19.2.2 (tediousjs/tedious#1730) fixed the upstream bug where schema names were not included in TVP type declarations for sp_executesql. Our SchemaAwareTVP workaround (Object.create(tds.TYPES.TVP, ...)) is no longer needed.

Tedious 20.0.0 bumps the minimum Node.js version to 22, but is otherwise identical to 19.2.2 in functionality.

Changes

  • Bump tedious dependency to "^19.2.2 || ^20.0.0"
  • Remove SchemaAwareTVP workaround from lib/tedious/request.js
  • Use tds.TYPES.TVP directly in getTediousType()
  • Update unit tests to verify tedious natively handles schema in TVP declarations (removed tests for the now-deleted workaround)

Compatibility

  • Users on Node.js 18/20 will get tedious ^19.2.2
  • Users on Node.js 22+ can use either tedious 19.2.2+ or 20.x
  • No breaking changes to node-mssql's public API

Supersedes #1875 (dependabot).

@dhensby dhensby force-pushed the feat/tedious-20 branch from 906e5d0 to 337cd6a Compare July 2, 2026 21:38
Tedious 19.2.2 fixed the upstream bug where schema names were not
included in TVP type declarations (tediousjs/tedious#1730). This
removes our SchemaAwareTVP workaround and widens the dependency range
to accept both tedious 19.2.2+ and the new tedious 20.x.

- Bump tedious dependency to "^19.2.2 || ^20.0.0"
- Remove SchemaAwareTVP Object.create() workaround from lib/tedious/request.js
- Use tds.TYPES.TVP directly in getTediousType()
- Update unit tests to verify tedious natively handles schema in TVP declarations

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@dhensby dhensby force-pushed the feat/tedious-20 branch from 337cd6a to 735c3c8 Compare July 2, 2026 21:48
@dhensby dhensby merged commit c6d1e24 into tediousjs:master Jul 2, 2026
47 checks passed
@dhensby dhensby deleted the feat/tedious-20 branch July 2, 2026 22:21
@github-actions

github-actions Bot commented Jul 2, 2026

Copy link
Copy Markdown

🎉 This PR is included in version 12.7.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant