Skip to content

Commit

Permalink
docs: replace npm2yarn with npm2yarn2pnpm docusaurus plugin (#4805)
Browse files Browse the repository at this point in the history
* feat: rm npm2yarn add npm2yarn2pnpm plugin

* fix: pnpm-lock.yaml

* chore: test change

* fix: update npm2yarn2pnpm usage

* fix: package.json mistake packages added

* fix: pnpm-lock.yaml

* fix: test debug output

* fix: named import npm2yarn2pnpm

* chore: rm debug:true

* fix: change require statement

* Update pnpm-lock.yaml

* Update pnpm-lock.yaml

* Update pnpm-lock.yaml

* Update pnpm-lock.yaml

* Delete pnpm-lock.yaml

* add pnpm-lock.yaml

Co-authored-by: Balázs Orbán <info@balazsorban.com>
  • Loading branch information
ndom91 and balazsorban44 committed Jul 5, 2022
1 parent f4c0d5a commit 4d4c276
Show file tree
Hide file tree
Showing 18 changed files with 33 additions and 34 deletions.
14 changes: 7 additions & 7 deletions docs/docs/adapters/dgraph.md
Expand Up @@ -11,7 +11,7 @@ This is the Dgraph Adapter for [`next-auth`](https://next-auth.js.org).

1. Install the necessary packages

```bash npm2yarn
```bash npm2yarn2pnpm
npm install next-auth @next-auth/dgraph-adapter
```

Expand Down Expand Up @@ -226,22 +226,22 @@ database you must customize next-auth `encode` and `decode` functions, as the de
further customize the jwt with roles if you want to implement [`RBAC logic`](https://dgraph.io/docs/graphql/authorization/directive/#role-based-access-control).

```js
import * as jwt from "jsonwebtoken";
import * as jwt from "jsonwebtoken"
export default NextAuth({
session: {
strategy: "jwt"
strategy: "jwt",
},
jwt: {
secret: process.env.SECRET,
encode: async ({ secret, token }) => {
return jwt.sign({...token, userId: token.id}, secret, {
return jwt.sign({ ...token, userId: token.id }, secret, {
algorithm: "HS256",
expiresIn: 30 * 24 * 60 * 60, // 30 days
});
})
},
decode: async ({ secret, token }) => {
return jwt.verify(token, secret, { algorithms: ["HS256"] });
}
return jwt.verify(token, secret, { algorithms: ["HS256"] })
},
},
})
```
Expand Down
2 changes: 1 addition & 1 deletion docs/docs/adapters/dynamodb.md
Expand Up @@ -15,7 +15,7 @@ You can find the full schema in the table structure section below.

1. Install `next-auth` and `@next-auth/dynamodb-adapter`

```bash npm2yarn
```bash npm2yarn2pnpm
npm install next-auth @next-auth/dynamodb-adapter
```

Expand Down
2 changes: 1 addition & 1 deletion docs/docs/adapters/fauna.md
Expand Up @@ -13,7 +13,7 @@ You can find the Fauna schema and seed information in the docs at [next-auth.js.

1. Install the necessary packages

```bash npm2yarn
```bash npm2yarn2pnpm
npm install next-auth @next-auth/fauna-adapter faunadb
```

Expand Down
2 changes: 1 addition & 1 deletion docs/docs/adapters/firebase.md
Expand Up @@ -15,7 +15,7 @@ This is the Firebase Adapter for [`next-auth`](https://next-auth.js.org). This p

1. Install the necessary packages

```bash npm2yarn
```bash npm2yarn2pnpm
npm install next-auth @next-auth/firebase-adapter@experimental
```

Expand Down
2 changes: 1 addition & 1 deletion docs/docs/adapters/mikro-orm.md
Expand Up @@ -5,7 +5,7 @@ title: MikroORM

To use this Adapter, you need to install Mikro ORM, the driver that suits your database, and the separate `@next-auth/mikro-orm-adapter` package:

```bash npm2yarn
```bash npm2yarn2pnpm
npm install next-auth @next-auth/mikro-orm-adapter @mikro-orm/core @mikro-orm/[YOUR DRIVER]
```

Expand Down
2 changes: 1 addition & 1 deletion docs/docs/adapters/mongodb.md
Expand Up @@ -11,7 +11,7 @@ The MongoDB adapter does not handle connections automatically, so you will have

1. Install the necessary packages

```bash npm2yarn
```bash npm2yarn2pnpm
npm install next-auth @next-auth/mongodb-adapter mongodb
```

Expand Down
2 changes: 1 addition & 1 deletion docs/docs/adapters/neo4j.md
Expand Up @@ -11,7 +11,7 @@ This is the Neo4j Adapter for [`next-auth`](https://next-auth.js.org). This pack

1. Install the necessary packages

```bash npm2yarn
```bash npm2yarn2pnpm
npm install next-auth @next-auth/neo4j-adapter neo4j-driver
```

Expand Down
2 changes: 1 addition & 1 deletion docs/docs/adapters/pouchdb.md
Expand Up @@ -19,7 +19,7 @@ Depending on your architecture you can use PouchDB's http adapter to reach any d
1. Install `next-auth` and `@next-auth/pouchdb-adapter`

```bash npm2yarn
```bash npm2yarn2pnpm
npm install next-auth @next-auth/pouchdb-adapter
```

Expand Down
2 changes: 1 addition & 1 deletion docs/docs/adapters/prisma.md
Expand Up @@ -7,7 +7,7 @@ title: Prisma

To use this Adapter, you need to install Prisma Client, Prisma CLI, and the separate `@next-auth/prisma-adapter` package:

```bash npm2yarn
```bash npm2yarn2pnpm
npm install next-auth @prisma/client @next-auth/prisma-adapter
npm install prisma --save-dev
```
Expand Down
2 changes: 1 addition & 1 deletion docs/docs/adapters/sequelize.md
Expand Up @@ -11,7 +11,7 @@ This is the Sequelize Adapter for [`next-auth`](https://next-auth.js.org).

1. Install the necessary packages

```bash npm2yarn
```bash npm2yarn2pnpm
npm install next-auth @next-auth/sequelize-adapter sequelize
```

Expand Down
2 changes: 1 addition & 1 deletion docs/docs/adapters/typeorm.md
Expand Up @@ -19,7 +19,7 @@ In the future, we might split up this adapter to support single flavors of SQL f

To use this Adapter, you need to install the following packages:

```bash npm2yarn
```bash npm2yarn2pnpm
npm install next-auth @next-auth/typeorm-legacy-adapter typeorm
```

Expand Down
2 changes: 1 addition & 1 deletion docs/docs/adapters/upstash-redis.md
Expand Up @@ -7,7 +7,7 @@ title: Upstash Redis

To use this Adapter, you need to install `@upstash/redis` and `@next-auth/upstash-redis-adapter` package:

```bash npm2yarn
```bash npm2yarn2pnpm
npm install @upstash/redis @next-auth/upstash-redis-adapter
```

Expand Down
2 changes: 1 addition & 1 deletion docs/docs/getting-started/upgrade-to-v4.md
Expand Up @@ -13,7 +13,7 @@ We encourage users to try it out and report any and all issues they come across.

You can upgrade to the new version by running:

```bash npm2yarn
```bash npm2yarn2pnpm
npm install next-auth
```

Expand Down
2 changes: 1 addition & 1 deletion docs/docs/tutorials/ldap-auth.md
Expand Up @@ -7,7 +7,7 @@ NextAuth.js provides the ability to setup a [custom Credential provider](/config

You will need an additional dependency, `ldapjs`, which you can install by running

```bash npm2yarn
```bash npm2yarn2pnpm
npm install ldapjs
```

Expand Down
2 changes: 1 addition & 1 deletion docs/docs/tutorials/testing-with-cypress.md
Expand Up @@ -9,7 +9,7 @@ To test an implementation of NextAuth.js, we encourage you to use [Cypress](http

To get started, install the dependencies:

```bash npm2yarn
```bash npm2yarn2pnpm
npm install --save-dev cypress cypress-social-logins @testing-library/cypress
```

Expand Down
2 changes: 1 addition & 1 deletion docs/docusaurus.config.js
Expand Up @@ -155,9 +155,9 @@ module.exports = {
showLastUpdateAuthor: true,
showLastUpdateTime: true,
remarkPlugins: [
require("@sapphire/docusaurus-plugin-npm2yarn2pnpm").npm2yarn2pnpm,
require("remark-github"),
require("mdx-mermaid"),
[require("@docusaurus/remark-plugin-npm2yarn"), { sync: true }],
],
versions: {
current: {
Expand Down
2 changes: 1 addition & 1 deletion docs/package.json
Expand Up @@ -21,9 +21,9 @@
"dependencies": {
"@docusaurus/core": "^2.0.0-beta.21",
"@docusaurus/preset-classic": "^2.0.0-beta.21",
"@docusaurus/remark-plugin-npm2yarn": "^2.0.0-beta.21",
"@docusaurus/theme-common": "2.0.0-beta.21",
"@mdx-js/react": "1.6.22",
"@sapphire/docusaurus-plugin-npm2yarn2pnpm": "^1.1.0",
"classnames": "^2.3.1",
"mdx-mermaid": "^1.2.2",
"mermaid": "^9.0.1",
Expand Down
21 changes: 10 additions & 11 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 comment on commit 4d4c276

@vercel
Copy link

@vercel vercel bot commented on 4d4c276 Jul 5, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.