Skip to content

Commit 3d1e215

Browse files
authored
docs: Reapply "docs: exclude inherits, update deps (#12628)" (#12645) (#12690)
* Reapply "docs: exclude inherits, update deps (#12628)" (#12645) This reverts commit d47bb20.
1 parent 3664aa5 commit 3d1e215

File tree

21 files changed

+271
-105
lines changed

21 files changed

+271
-105
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ packages/next-auth/providers
3232
# copied from @auth/core
3333
packages/frameworks-*/**/providers
3434
packages/*/*.js
35+
!packages/*/typedoc.config.js
3536
packages/*/*.d.ts
3637
packages/*/*.d.ts.map
3738
packages/*/lib

docs/next.config.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ export default withNextra({
7272
{
7373
source: "/:path(.*)",
7474
has: [{ type: "host", value: "warnings.authjs.dev" }],
75-
destination: "https://authjs.dev/reference/warnings/:path*",
75+
destination: "https://authjs.dev/reference/core/types#warningcode",
7676
permanent: true,
7777
},
7878
{

docs/package.json

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,8 @@
1111
"start": "next start",
1212
"lint": "eslint ./{components,pages,utils}",
1313
"lint:fix": "eslint ./{components,pages,utils} --fix",
14-
"build:sitemap": "next-sitemap --config next-sitemap.config.cjs"
14+
"build:sitemap": "next-sitemap --config next-sitemap.config.cjs",
15+
"clean": "rm -rf .next build pages/reference/*.mdx pages/reference/**/*"
1516
},
1617
"repository": {
1718
"type": "git",
@@ -49,8 +50,9 @@
4950
"postcss": "^8.4.47",
5051
"shiki": "^1.22.0",
5152
"tailwindcss": "^3.4.13",
52-
"typedoc": "^0.25.13",
53-
"typedoc-plugin-markdown": "4.0.0-next.54",
54-
"typedoc-plugin-mdn-links": "^3.3.2"
53+
"typedoc": "^0.27.6",
54+
"typedoc-plugin-markdown": "4.3.3",
55+
"typedoc-plugin-mdn-links": "4.0.11",
56+
"typedoc-plugin-no-inherit": "^1.5.0"
5557
}
5658
}

docs/pages/reference/_meta.js

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,6 @@ export default {
1010
express: "@auth/express",
1111
qwik: "@auth/qwik",
1212
"solid-start": "@auth/solid-start",
13-
warnings: "Warnings",
14-
errors: {
15-
title: "Errors",
16-
href: "/reference/core/errors",
17-
},
1813
"--- adapters": {
1914
type: "separator",
2015
title: "Adapters",
@@ -33,6 +28,7 @@ export default {
3328
"mikro-orm-adapter": "@auth/mikro-orm-adapter",
3429
"mongodb-adapter": "@auth/mongodb-adapter",
3530
"neo4j-adapter": "@auth/neo4j-adapter",
31+
"neon-adapter": "@auth/neon-adapter",
3632
"pg-adapter": "@auth/pg-adapter",
3733
"pouchdb-adapter": "@auth/pouchdb-adapter",
3834
"sequelize-adapter": "@auth/sequelize-adapter",

docs/pages/reference/warnings.mdx

Lines changed: 0 additions & 23 deletions
This file was deleted.

docs/typedoc-nextauth.cjs renamed to docs/typedoc-nextauth.js

Lines changed: 13 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
// @ts-check
22

3-
const { MarkdownPageEvent } = require("typedoc-plugin-markdown")
4-
const path = require("path")
5-
const fs = require("fs")
3+
import { MarkdownPageEvent } from "typedoc-plugin-markdown"
4+
import path from "path"
5+
import fs from "fs"
66

77
/**
88
* Local plugin to tweak TypeDoc output for nextra docs
99
*
1010
* @param {import("typedoc-plugin-markdown").MarkdownApplication} app
1111
*/
12-
module.exports.load = (app) => {
12+
export function load(app) {
1313
injectNextraCalloutImport(app)
1414
parseOutput(app)
1515
writeMetaJsFiles(app)
@@ -57,7 +57,7 @@ function parseOutput(app) {
5757
const replaceCodeBlockTitle = (match, p1, p2, p3) => `${p1}filename="${p3}"`
5858

5959
page.contents = page.contents
60-
.replace(calloutRegex, replaceCallout)
60+
?.replace(calloutRegex, replaceCallout)
6161
.replace(codeBlockRegex, replaceCodeBlockTitle)
6262
})
6363
}
@@ -82,7 +82,7 @@ function writeMetaJsFiles(app) {
8282
) => {
8383
const pages = defaultValue
8484
navigationItems.forEach((item) => {
85-
const pageKey = item.url ? path.parse(item.url).name : null
85+
const pageKey = item.path ? path.parse(item.path).name : null
8686
if (pageKey) {
8787
pages[pageKey] = item.title
8888
if (item?.children && item?.children?.length > 0) {
@@ -101,15 +101,19 @@ function writeMetaJsFiles(app) {
101101

102102
const metaJString = `
103103
export default ${JSON.stringify(pages, null, 2)}`
104+
104105
if (new RegExp(".*docs/pages/reference$").test(outputDirectory)) return
106+
105107
fs.writeFileSync(path.join(outputDirectory, "_meta.js"), metaJString)
106108
}
107109

108110
/**
109111
* Recursively write _meta.js files for each page based on output.navigation
110112
*/
111-
writeMetaJs(output.navigation, output.outputDirectory, {
112-
overview: "Overview",
113-
})
113+
if (output.navigation) {
114+
writeMetaJs(output.navigation, output.outputDirectory, {
115+
overview: "Overview",
116+
})
117+
}
114118
})
115119
}

docs/typedoc.config.cjs

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -24,15 +24,16 @@ module.exports = {
2424
tsconfig: "./tsconfig.json",
2525
plugin: [
2626
"typedoc-plugin-markdown",
27-
require.resolve("./typedoc-nextauth.cjs"),
27+
require.resolve("./typedoc-nextauth.js"),
2828
"typedoc-plugin-mdn-links",
29+
"typedoc-plugin-no-inherit",
2930
],
3031
disableSources: true,
3132
excludeNotDocumented: true,
3233
excludeExternals: true,
3334
excludeInternal: true,
34-
excludePrivate: true,
3535
excludeProtected: true,
36+
excludeReferences: true,
3637
cleanOutputDir: false,
3738
gitRevision: "main",
3839
githubPages: false,
@@ -75,8 +76,5 @@ module.exports = {
7576
expandObjects: true,
7677
parametersFormat: "table",
7778
indexFormat: "table",
78-
textContentMappings: {
79-
"label.packages": "Integrations",
80-
},
8179
useCodeBlocks: true,
8280
}

packages/adapter-kysely/src/index.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,19 +2,18 @@
22
* <div style={{display: "flex", justifyContent: "space-between", alignItems: "center", padding: 16}}>
33
* <p>Official <a href="https://kysely.dev/">Kysely</a> adapter for Auth.js / NextAuth.js.</p>
44
* <a href="https://kysely.dev/">
5-
* <img style={{display: "block"}} src="/img/adapters/kysely.svg" width="38" />
5+
* <img style={{display: "block"}} src="https://authjs.dev/img/adapters/kysely.svg" width="30" />
66
* </a>
77
* </div>
88
*
99
* ## Installation
1010
*
1111
* ```bash npm2yarn
12-
* npm install kysely @auth/kysely-adapter
12+
* npm install @auth/kysely-adapter kysely
1313
* ```
1414
*
1515
* @module @auth/kysely-adapter
1616
*/
17-
1817
import { Kysely, SqliteAdapter } from "kysely"
1918

2019
import {
@@ -205,6 +204,7 @@ export function KyselyAdapter(db: Kysely<Database>): Adapter {
205204
* requires. When used with `kysely-codegen`, the `Codegen` type can be passed as
206205
* the second generic argument. The generated types will be used, and
207206
* `KyselyAuth` will only verify that the correct fields exist.
207+
* @noInheritDoc
208208
*/
209209
export class KyselyAuth<DB extends T, T = Database> extends Kysely<DB> {}
210210

packages/adapter-mongodb/src/index.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ export interface MongoDBAdapterOptions {
5252
databaseName?: string
5353
/**
5454
* Callback function for managing the closing of the MongoDB client.
55-
* This could be useful when `client` is provided as a function returning MongoClient | Promise<MongoClient>.
55+
* This could be useful when `client` is provided as a function returning MongoClient.
5656
* It allows for more customized management of database connections,
5757
* addressing persistence, container reuse, and connection closure issues.
5858
*/
@@ -115,7 +115,7 @@ export function MongoDBAdapter(
115115
* - A promise that resolves to a connected `MongoClient` (not recommended).
116116
* - A function, to handle more complex and custom connection strategies.
117117
*
118-
* Using a function that returns `MongoClient | Promise<MongoClient>`, combined with `options.onClose`, can be useful when you want a more advanced and customized connection strategy to address challenges related to persistence, container reuse, and connection closure.
118+
* Using a function combined with `options.onClose`, can be useful when you want a more advanced and customized connection strategy to address challenges related to persistence, container reuse, and connection closure.
119119
*/
120120
client:
121121
| MongoClient

packages/adapter-prisma/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@
3737
"access": "public"
3838
},
3939
"scripts": {
40-
"clean": "rm ./prisma/dev.db* || echo 'File deleted' && rm -rf *.js *.d.ts*",
40+
"clean": "rm ./prisma/dev.db* || echo 'File deleted' && rm -rf index.js *.d.ts*",
4141
"init:default": "prisma migrate dev --name init --skip-seed",
4242
"init:custom": "prisma migrate dev --name init-custom --schema ./prisma/custom.prisma",
4343
"test:default": "pnpm init:default && vitest run -c ../utils/vitest.config.ts",

0 commit comments

Comments
 (0)