Skip to content

Commit 0a1ce68

Browse files
authored
Merge pull request #1891 from dhensby/pulls/9.2.x/ci-merge
ci: merge 9.1.x up into 9.2.x
2 parents 53fc9ea + 9439d15 commit 0a1ce68

4 files changed

Lines changed: 4400 additions & 5918 deletions

File tree

.github/workflows/nodejs.yml

Lines changed: 49 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -12,17 +12,17 @@ permissions:
1212
jobs:
1313
commitlint:
1414
name: Lint commits
15-
runs-on: ubuntu-22.04
15+
runs-on: ubuntu-24.04
1616
steps:
1717
- name: Checkout code
18-
uses: actions/checkout@v3
18+
uses: actions/checkout@v7
1919
with:
2020
fetch-depth: 0
2121
persist-credentials: false
2222
- name: Setup Node.js
23-
uses: actions/setup-node@v3
23+
uses: actions/setup-node@v7
2424
with:
25-
node-version: 16.x
25+
node-version: 18.x
2626
cache: 'npm'
2727
- name: Install dependencies
2828
run: npm clean-install
@@ -34,16 +34,16 @@ jobs:
3434
run: npx commitlint --from ${{ github.event.pull_request.head.sha }}~${{ github.event.pull_request.commits }} --to ${{ github.event.pull_request.head.sha }} --verbose
3535
codelint:
3636
name: Lint code
37-
runs-on: ubuntu-22.04
37+
runs-on: ubuntu-24.04
3838
steps:
3939
- name: Checkout code
40-
uses: actions/checkout@v3
40+
uses: actions/checkout@v7
4141
with:
4242
persist-credentials: false
4343
- name: Setup Node.js
44-
uses: actions/setup-node@v3
44+
uses: actions/setup-node@v7
4545
with:
46-
node-version: 16.x
46+
node-version: 18.x
4747
cache: 'npm'
4848
- name: Install dependencies
4949
run: npm clean-install
@@ -66,17 +66,18 @@ jobs:
6666
env:
6767
MSSQL_PASSWORD: 'yourStrong(!)Password'
6868
strategy:
69+
fail-fast: false
6970
matrix:
70-
os: [ubuntu-22.04]
71-
node: [14.x, 16.x, 18.x]
71+
os: [ubuntu-24.04]
72+
node: [14.x, 16.x, 18.x, 20.x, 22.x, 24.x]
7273
sqlserver: [2017, 2019, 2022]
7374
steps:
7475
- name: Checkout code
75-
uses: actions/checkout@v3
76+
uses: actions/checkout@v7
7677
with:
7778
persist-credentials: false
7879
- name: Setup Node.js ${{ matrix.node }}
79-
uses: actions/setup-node@v3
80+
uses: actions/setup-node@v7
8081
with:
8182
node-version: ${{ matrix.node }}
8283
cache: 'npm'
@@ -113,25 +114,20 @@ jobs:
113114
env:
114115
MSSQL_PASSWORD: 'yourStrong(!)Password'
115116
strategy:
117+
fail-fast: false
116118
matrix:
117-
os: [windows-2019, windows-2022]
118-
node: [14.x, 16.x, 18.x]
119-
sqlserver: [2008, 2012, 2014, 2016, 2017, 2019, 2022]
120-
# These sqlserver versions don't work on windows-2022 (at the moment)
121-
exclude:
122-
- os: windows-2022
123-
sqlserver: 2008
124-
- os: windows-2022
125-
sqlserver: 2012
126-
- os: windows-2022
127-
sqlserver: 2014
119+
os: [windows-2022, windows-2025]
120+
node: [14.x, 16.x, 18.x, 20.x, 22.x, 24.x]
121+
# SQL Server 2008, 2012 and 2014 were dropped with windows-2019: they
122+
# only install on that image, and it was retired in June 2025.
123+
sqlserver: [2016, 2017, 2019, 2022]
128124
steps:
129125
- name: Checkout code
130-
uses: actions/checkout@v3
126+
uses: actions/checkout@v7
131127
with:
132128
persist-credentials: false
133129
- name: Setup Node.js ${{ matrix.node }}
134-
uses: actions/setup-node@v3
130+
uses: actions/setup-node@v7
135131
with:
136132
node-version: ${{ matrix.node }}
137133
cache: 'npm'
@@ -140,7 +136,7 @@ jobs:
140136
- name: Run unit tests
141137
run: npm run test-unit
142138
- name: Setup SQL Server
143-
uses: tediousjs/setup-sqlserver@v1
139+
uses: tediousjs/setup-sqlserver@34a6288c6260c5016590b41842de30a1b87164fb # v4.0.1
144140
with:
145141
sqlserver-version: ${{ matrix.sqlserver }}
146142
sa-password: ${{ env.MSSQL_PASSWORD }}
@@ -152,15 +148,34 @@ jobs:
152148
run: npm run test-tedious
153149
- name: Run cli tests
154150
run: npm run test-cli
155-
- name: Install msnodesqlv8
156-
run: npm install --no-save msnodesqlv8@^2
157-
- name: Run msnodesqlv8 tests
151+
# msnodesqlv8 is gated to the major that publishes a prebuilt win32-x64
152+
# binary for the Node version under test. Its install script is
153+
# `prebuild-install || node-gyp rebuild`, so a combination without a
154+
# prebuild silently falls through to a source build — slow on
155+
# windows-2022 and impossible on windows-2025, whose VS 2026 the node-gyp
156+
# bundled with these Node versions' npm cannot detect.
157+
# v2 (2.7.0) prebuilds cover ABI 64-111 -> Node 10-19
158+
# v4 (4.5.0) prebuilds cover ABI 64-137 -> Node 10-24
159+
# Pinned rather than ranged on purpose: upstream removes prebuilt ABIs
160+
# within a major (5.2.2 dropped Node 20), which would turn this branch red
161+
# without a commit to it and block a security release.
162+
- name: Install msnodesqlv8 v2
163+
if: ${{ matrix.node == '14.x' || matrix.node == '16.x' || matrix.node == '18.x' }}
164+
run: npm install --no-save msnodesqlv8@2.7.0
165+
- name: Run msnodesqlv8 v2 tests
166+
if: ${{ matrix.node == '14.x' || matrix.node == '16.x' || matrix.node == '18.x' }}
167+
run: npm run test-msnodesqlv8
168+
- name: Install msnodesqlv8 v4
169+
if: ${{ matrix.node == '20.x' || matrix.node == '22.x' || matrix.node == '24.x' }}
170+
run: npm install --no-save msnodesqlv8@4.5.0
171+
- name: Run msnodesqlv8 v4 tests
172+
if: ${{ matrix.node == '20.x' || matrix.node == '22.x' || matrix.node == '24.x' }}
158173
run: npm run test-msnodesqlv8
159174
release:
160175
name: Release
161176
concurrency: release
162177
if: ${{ github.repository_owner == 'tediousjs' && github.event_name == 'push' && github.actor != 'dependabot[bot]' }}
163-
runs-on: ubuntu-22.04
178+
runs-on: ubuntu-24.04
164179
needs:
165180
- commitlint
166181
- codelint
@@ -170,16 +185,16 @@ jobs:
170185
contents: write # to be able to publish a GitHub release
171186
issues: write # to be able to comment on released issues
172187
pull-requests: write # to be able to comment on released pull requests
173-
id-token: write # to enable use of OIDC for npm provenance
188+
id-token: write # to enable use of OIDC for npm publishing & provenance
174189
steps:
175190
- name: Checkout
176-
uses: actions/checkout@v3
191+
uses: actions/checkout@v7
177192
with:
178193
fetch-depth: 0
179194
- name: Setup Node.js
180-
uses: actions/setup-node@v3
195+
uses: actions/setup-node@v7
181196
with:
182-
node-version: "lts/*"
197+
node-version: "22.x"
183198
cache: 'npm'
184199
- name: Install dependencies
185200
run: npm clean-install
@@ -189,5 +204,4 @@ jobs:
189204
env:
190205
NPM_CONFIG_PROVENANCE: true
191206
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
192-
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
193207
run: npx semantic-release

README.md

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
Microsoft SQL Server client for Node.js
44

5-
[![NPM Version][npm-image]][npm-url] [![NPM Downloads][downloads-image]][downloads-url] [![Appveyor CI][appveyor-image]][appveyor-url] [![Join the chat at https://gitter.im/patriksimek/node-mssql](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/patriksimek/node-mssql?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
5+
[![NPM Version][npm-image]][npm-url] [![NPM Downloads][downloads-image]][downloads-url] [![Join the chat at https://gitter.im/patriksimek/node-mssql](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/patriksimek/node-mssql?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
66

77
Supported TDS drivers:
88
- [Tedious][tedious-url] (pure JavaScript - Windows/macOS/Linux, default)
@@ -2093,8 +2093,6 @@ to create new connections or not
20932093
[downloads-url]: https://www.npmjs.com/package/mssql
20942094
[david-image]: https://img.shields.io/david/tediousjs/node-mssql.svg?style=flat-square
20952095
[david-url]: https://david-dm.org/tediousjs/node-mssql
2096-
[appveyor-image]: https://ci.appveyor.com/api/projects/status/e5gq1a0ujwams9t7/branch/master?svg=true
2097-
[appveyor-url]: https://ci.appveyor.com/project/tediousjs/node-mssql
20982096

20992097
[tedious-url]: https://www.npmjs.com/package/tedious
21002098
[msnodesqlv8-url]: https://www.npmjs.com/package/msnodesqlv8

0 commit comments

Comments
 (0)