Skip to content

Commit 0655c73

Browse files
authored
docs: update legacy drivers section and fix drop down (#4130)
1 parent fd002c1 commit 0655c73

File tree

5 files changed

+41
-26
lines changed

5 files changed

+41
-26
lines changed

etc/docs/build.ts

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,11 @@ import {
1010
confirm,
1111
customSemverCompare,
1212
getCommandLineArguments,
13-
JsonVersionSchema,
13+
type JsonVersionSchema,
1414
LATEST_TAG,
1515
log,
16-
TomlVersionSchema,
17-
VersionSchema
16+
type TomlVersionSchema,
17+
type VersionSchema
1818
} from './utils';
1919

2020
const exec = promisify(execCb);
@@ -94,8 +94,7 @@ async function main() {
9494

9595
if (!skipPrompts) {
9696
await confirm(`
97-
Generating docs for the following configuration.
98-
${JSON.stringify(newVersion, null, 2)}
97+
Generating docs for the following configuration.\n${JSON.stringify(newVersion, null, 2)}
9998
Does this look right? [y/n] `);
10099
}
101100

etc/docs/template/data/releases.toml

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -136,140 +136,140 @@ tag = "5.0"
136136

137137
[[versions]]
138138
version = "4.17 Driver"
139-
status = "supported"
139+
status = "not-supported"
140140
api = "./4.17"
141141
usesMongoDBManual = true
142142
tag = "4.17"
143143

144144
[[versions]]
145145
version = "4.16 Driver"
146-
status = "supported"
146+
status = "not-supported"
147147
api = "./4.16"
148148
usesMongoDBManual = true
149149
tag = "4.16"
150150

151151
[[versions]]
152152
version = "4.15 Driver"
153-
status = "supported"
153+
status = "not-supported"
154154
api = "./4.15"
155155
usesMongoDBManual = true
156156
tag = "4.15"
157157

158158
[[versions]]
159159
version = "4.14 Driver"
160-
status = "supported"
160+
status = "not-supported"
161161
api = "./4.14"
162162
usesMongoDBManual = true
163163
tag = "4.14"
164164

165165
[[versions]]
166166
version = "4.13 Driver"
167-
status = "supported"
167+
status = "not-supported"
168168
api = "./4.13"
169169
usesMongoDBManual = true
170170
tag = "4.13"
171171

172172
[[versions]]
173173
version = "4.12 Driver"
174-
status = "supported"
174+
status = "not-supported"
175175
api = "./4.12"
176176
usesMongoDBManual = true
177177
tag = "4.12"
178178

179179
[[versions]]
180180
version = "4.11 Driver"
181-
status = "supported"
181+
status = "not-supported"
182182
api = "./4.11"
183183
usesMongoDBManual = true
184184
tag = "4.11"
185185

186186
[[versions]]
187187
version = "4.10 Driver"
188-
status = "supported"
188+
status = "not-supported"
189189
api = "./4.10"
190190
usesMongoDBManual = true
191191
tag = "4.10"
192192

193193
[[versions]]
194194
version = "4.9 Driver"
195-
status = "supported"
195+
status = "not-supported"
196196
api = "./4.9"
197197
usesMongoDBManual = true
198198
tag = "4.9"
199199

200200
[[versions]]
201201
version = "4.8 Driver"
202-
status = "supported"
202+
status = "not-supported"
203203
api = "./4.8"
204204
usesMongoDBManual = true
205205
tag = "4.8"
206206

207207
[[versions]]
208208
version = "4.7 Driver"
209-
status = "supported"
209+
status = "not-supported"
210210
api = "./4.7"
211211
usesMongoDBManual = true
212212
tag = "4.7"
213213

214214
[[versions]]
215215
version = "4.6 Driver"
216-
status = "supported"
216+
status = "not-supported"
217217
api = "./4.6"
218218
usesMongoDBManual = true
219219
tag = "4.6"
220220

221221
[[versions]]
222222
version = "4.5 Driver"
223-
status = "supported"
223+
status = "not-supported"
224224
api = "./4.5"
225225
usesMongoDBManual = true
226226
tag = "4.5"
227227

228228
[[versions]]
229229
version = "4.4 Driver"
230-
status = "supported"
230+
status = "not-supported"
231231
api = "./4.4"
232232
usesMongoDBManual = true
233233
tag = "4.4"
234234

235235
[[versions]]
236236
version = "4.3 Driver"
237-
status = "supported"
237+
status = "not-supported"
238238
api = "./4.3"
239239
usesMongoDBManual = true
240240
tag = "4.3"
241241

242242
[[versions]]
243243
version = "4.2 Driver"
244-
status = "supported"
244+
status = "not-supported"
245245
api = "./4.2"
246246
usesMongoDBManual = true
247247
tag = "4.2"
248248

249249
[[versions]]
250250
version = "4.1 Driver"
251-
status = "supported"
251+
status = "not-supported"
252252
api = "./4.1"
253253
usesMongoDBManual = true
254254
tag = "4.1"
255255

256256
[[versions]]
257257
version = "4.0 Driver"
258-
status = "supported"
258+
status = "not-supported"
259259
api = "./4.0"
260260
usesMongoDBManual = true
261261
tag = "4.0"
262262

263263
[[versions]]
264264
version = "3.7 Driver"
265-
status = "supported"
265+
status = "not-supported"
266266
docs = "./3.7"
267267
api = "./3.7/api"
268268
tag = "3.7"
269269

270270
[[versions]]
271271
version = "3.6 Driver"
272-
status = "supported"
272+
status = "not-supported"
273273
docs = "./3.6"
274274
api = "./3.6/api"
275275
tag = "3.6"

etc/docs/template/layouts/partials/releases.html

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,8 @@ <h2>Releases</h2>
2626
</table>
2727

2828
<details>
29-
<summary><h2>Legacy Versions</h2></summary>
29+
<summary class="legacy-summary">Legacy Versions</summary>
30+
<p>⚠️ The following versions are no longer maintained. For the latest bug fixes and features, please upgrade to a version listed above.</p>
3031
<table class="table table-striped">
3132
<thead><tr><th>Release</th><th>Documentation</th></tr></thead>
3233
<tbody>

etc/docs/template/static/s/css/frontpage.css

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -403,3 +403,15 @@ code {
403403
background-color: #ddd;
404404
color: #494747;
405405
}
406+
407+
.legacy-summary {
408+
font-family: "PT Sans", "Helvetica Neue", Helvetica, Arial, sans-serif;
409+
font-weight: normal;
410+
color: #313030;
411+
font-size: 30px;
412+
margin-top: 20px;
413+
margin-bottom: 10px;
414+
line-height: 1.1;
415+
box-sizing: border-box;
416+
display: list-item;
417+
}

etc/docs/utils.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import { createInterface } from 'readline';
2+
import * as util from 'util';
23
import yargs from 'yargs';
34
import { hideBin } from 'yargs/helpers';
45

@@ -26,6 +27,8 @@ export interface TomlVersionSchema {
2627
const capitalize = (s: string) =>
2728
s.length === 0 ? s : s[0].toUpperCase() + s.slice(1).toLowerCase();
2829

30+
util.inspect.defaultOptions.breakLength = 1000;
31+
util.inspect.defaultOptions.depth = 1000;
2932
// eslint-disable-next-line no-console
3033
export const log = (...args: any[]) => console.error(args);
3134

0 commit comments

Comments
 (0)