Skip to content

Commit

Permalink
revert json to json5 (#5795)
Browse files Browse the repository at this point in the history
  • Loading branch information
carlagn authored and jharrell committed Apr 10, 2024
1 parent a82fd30 commit 6ab7bb6
Show file tree
Hide file tree
Showing 38 changed files with 85 additions and 85 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ node index.js

This should print an empty array because there are no `User` records in the database yet:

```json no-lines
```json5 no-lines
[]
```

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ node index.js

This should print an empty array because there are no `User` records in the database yet:

```json no-lines
```json5 no-lines
[]
```

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ node index.js

This should print an empty array because there are no `User` records in the database yet:

```json no-lines
```json5 no-lines
[]
```

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ node index.js

This should print an empty array because there are no `User` records in the database yet:

```json no-lines
```json5 no-lines
[]
```

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ node index.js

This should print an empty array because there are no `User` records in the database yet:

```json no-lines
```json5 no-lines
[]
```

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ npx ts-node index.ts

This should print an empty array because there are no `User` records in the database yet:

```json no-lines
```json5 no-lines
[]
```

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ npx ts-node index.ts

This should print an empty array because there are no `User` records in the database yet:

```json no-lines
```json5 no-lines
[]
```

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ npx ts-node index.ts

This should print an empty array because there are no `User` records in the database yet:

```json no-lines
```json5 no-lines
[]
```

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ npx ts-node index.ts

This should print an empty array because there are no `User` records in the database yet:

```json no-lines
```json5 no-lines
[]
```

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ npx ts-node index.ts

This should print an empty array because there are no `User` records in the database yet:

```json no-lines
```json5 no-lines
[]
```

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ node index.js

This should print an empty array because there are no `User` records in the database yet:

```json no-lines
```json5 no-lines
[]
```

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ npx ts-node index.ts

This should print an empty array because there are no `User` records in the database yet:

```json no-lines
```json5 no-lines
[]
```

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ app.get('/feed', async (req, res) => {

Note that the `feed` endpoint in this case returns a nested JSON response of `Post` objects that _include_ an `author` object. Here's a sample response:

```json
```json5
[
{
"id": "21",
Expand Down
6 changes: 3 additions & 3 deletions docs/200-orm/050-overview/500-databases/600-mongodb.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,7 @@ console.log(createNull)
If you check your MongoDB database directly, you will also see a new record with `name` set to `null`:
```json
```json5
{
"_id": "6242c4af032bc76da250b207",
"email": "[email protected]",
Expand Down Expand Up @@ -246,7 +246,7 @@ console.log(createMissing)
Prisma ORM still returns `name: null`, but if you look in the database directly you will see that the record has no `name` field defined at all:
```json
```json5
{
"_id": "6242c4af032bc76da250b208",
"email": "[email protected]"
Expand Down Expand Up @@ -422,7 +422,7 @@ Refer to the [MongoDB connection string documentation](https://docs.mongodb.com/
It is common practice for the `_id` field of a MongoDB document to contain an [ObjectId](https://docs.mongodb.com/manual/reference/bson-types/#std-label-objectid):
```json
```json5
{
"_id": { "$oid": "60d599cb001ef98000f2cad2" },
"createdAt": { "$date": { "$numberLong": "1624611275577" } },
Expand Down
2 changes: 1 addition & 1 deletion docs/200-orm/100-prisma-schema/10-overview/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ The Prisma CLI looks for the Prisma schema file in the following locations, in t

2. The location specified in the `package.json` file (version 2.7.0 and later):

```json
```json5
"prisma": {
"schema": "db/schema.prisma"
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -164,13 +164,13 @@ For MongoDB, Prisma ORM currently uses a [normalized data model design](https://

The following MongoDB document represents a `User`:

```json
```json5
{ "_id": { "$oid": "60d58e130011041800d209e1" }, "name": "Bob" }
```

The following MongoDB document represents a `Profile` - notice the `userId` field, which references the `User` document's `$oid`:

```json
```json5
{
"_id": { "$oid": "60d58e140011041800d209e2" },
"bio": "I'm Bob, and I like drawing.",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -167,13 +167,13 @@ For MongoDB, Prisma ORM currently uses a [normalized data model design](https://

The following MongoDB document represents a `User`:

```json
```json5
{ "_id": { "$oid": "60d5922d00581b8f0062e3a8" }, "name": "Ella" }
```

Each of the following `Post` MongoDB documents has an `authorId` field which references the same user:

```json
```json5
[
{
"_id": { "$oid": "60d5922e00581b8f0062e3a9" },
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -165,11 +165,11 @@ For MongoDB, Prisma ORM currently uses a [normalized data model design](https://

The following MongoDB documents represent a one-to-one self-relation between two users:

```json
```json5
{ "_id": { "$oid": "60d97df70080618f000e3ca9" }, "name": "Elsa the Elder" }
```

```json
```json5
{
"_id": { "$oid": "60d97df70080618f000e3caa" },
"name": "Elsa",
Expand Down Expand Up @@ -241,22 +241,22 @@ For MongoDB, Prisma ORM currently uses a [normalized data model design](https://

The following MongoDB documents represent a one-to-many self-relation between three users - one teacher and two students with the same `teacherId`:

```json
```json5
{
"_id": { "$oid": "60d9b9e600fe3d470079d6f9" },
"name": "Ms. Roberts"
}
```

```json
```json5
{
"_id": { "$oid": "60d9b9e600fe3d470079d6fa" },
"name": "Student 8",
"teacherId": { "$oid": "60d9b9e600fe3d470079d6f9" }
}
```

```json
```json5
{
"_id": { "$oid": "60d9b9e600fe3d470079d6fb" },
"name": "Student 9",
Expand Down Expand Up @@ -347,7 +347,7 @@ For MongoDB, Prisma ORM currently uses a [normalized data model design](https://

The following MongoDB documents represent a many-to-many self-relation between five users - two users that follow `"Bob"`, and two users that follow him:

```json
```json5
{
"_id": { "$oid": "60d9866f00a3e930009a6cdd" },
"name": "Bob",
Expand All @@ -362,31 +362,31 @@ The following MongoDB documents represent a many-to-many self-relation between f
}
```

```json
```json5
{
"_id": { "$oid": "60d9866f00a3e930009a6cde" },
"name": "Follower1",
"followingIDs": [{ "$oid": "60d9866f00a3e930009a6cdd" }]
}
```

```json
```json5
{
"_id": { "$oid": "60d9867000a3e930009a6cdf" },
"name": "Follower2",
"followingIDs": [{ "$oid": "60d9866f00a3e930009a6cdd" }]
}
```

```json
```json5
{
"_id": { "$oid": "60d9867000a3e930009a6ce0" },
"name": "CoolPerson1",
"followedByIDs": [{ "$oid": "60d9866f00a3e930009a6cdd" }]
}
```

```json
```json5
{
"_id": { "$oid": "60d9867000a3e930009a6ce1" },
"name": "CoolPerson2",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -95,13 +95,13 @@ For MongoDB, Prisma ORM currently uses a [normalized data model design](https://

The following document represents a `User` (in the `User` collection):

```json
```json5
{ "_id": { "$oid": "60d5922d00581b8f0062e3a8" }, "name": "Ella" }
```

The following list of `Post` documents (in the `Post` collection) each have a `authorId` field which reference the same user:

```json
```json5
[
{
"_id": { "$oid": "60d5922e00581b8f0062e3a9" },
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ main()
</cmd>
<cmdResult>

```json no-copy
```json5 no-copy
{
"counters": [
// ...
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -309,7 +309,7 @@ const usersWithPosts = await prisma.user.findMany({

<cmdResult>

```json no-copy
```json5 no-copy
[
{
"email": "[email protected]",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ const users = await prisma.user.findMany({

<cmdResult>

```json
```json5
[
{
"id": 3,
Expand Down Expand Up @@ -88,7 +88,7 @@ const users = await prisma.user.findMany({
</cmd>
<cmdResult>

```json
```json5
[
{
"id": 1,
Expand Down Expand Up @@ -166,7 +166,7 @@ const user = await prisma.user.findFirst({

<cmdResult>

```json
```json5
[
{
"id": 3,
Expand Down Expand Up @@ -203,7 +203,7 @@ const user = await prisma.user.findFirst({

<cmdResult>

```json
```json5
[
{
"id": 1,
Expand Down
Loading

0 comments on commit 6ab7bb6

Please sign in to comment.