Skip to content

Commit 78e22e3

Browse files
committed
Merge branch 'release/0.6.3'
2 parents 4f64024 + 91cf1b8 commit 78e22e3

File tree

62 files changed

+3156
-2976
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

62 files changed

+3156
-2976
lines changed

.eslintrc

Lines changed: 25 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,27 @@
11
{
2-
"extends": [
3-
"eslint:recommended",
4-
"plugin:@typescript-eslint/recommended",
5-
"prettier",
6-
"plugin:prettier/recommended",
7-
"plugin:import/recommended",
8-
"plugin:import/typescript"
9-
],
2+
"extends": ["standard", "plugin:@typescript-eslint/recommended", "plugin:prettier/recommended"],
103
"env": {
11-
"node": true,
4+
"node": true
125
},
136
"ignorePatterns": ["examples/*"],
147
"rules": {
8+
"prettier/prettier": [
9+
"error",
10+
{
11+
"semi": false,
12+
"printWidth": 120,
13+
"tabWidth": 2,
14+
"tabs": false,
15+
"singleQuote": true,
16+
"quoteProps": "consistent",
17+
"jsxSingleQuote": false,
18+
"trailingComma": "all",
19+
"bracketSpacing": true,
20+
"bracketSameLine": false,
21+
"arrowParens": "always",
22+
"endOfLine": "auto"
23+
}
24+
],
1525
"@typescript-eslint/no-unused-vars": [
1626
"warn",
1727
{
@@ -28,5 +38,11 @@
2838
"caseInsensitive": true
2939
}
3040
}]
41+
},
42+
"parser": "@typescript-eslint/parser",
43+
"plugins": ["@typescript-eslint"],
44+
"parserOptions": {
45+
"ecmaVersion": "latest",
46+
"sourceType": "module"
3147
}
3248
}

.prettierrc

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

.vscode/settings.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
{
22
"files.eol": "\n",
3+
"typescript.tsdk": "node_modules/typescript/lib",
34
}

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -183,6 +183,8 @@ module.exports = {
183183
exportEverythingInObjectsDotTs?: boolean;
184184
/** Map all Prisma fields with "@id" attribute to Graphql "ID" Scalar. Default: 'Objects' */
185185
mapIdFieldsToGraphqlId?: false | 'Objects';
186+
/** Change the generated variables from object.base.ts from something like `UserName` to `User_Name`. This avoids generated duplicated names in some cases. See [issue #58](https://github.com/Cauen/prisma-generator-pothos-codegen/issues/58). Default: false */
187+
underscoreBetweenObjectVariableNames?: false | 'Objects';
186188
};
187189
/** Global config */
188190
global?: {

changelog.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,16 @@
11
# Changelog
22

3+
# 0.6.3
4+
5+
- [x] Upgrade: Update prisma to latest version
6+
- Remove distinct from count https://github.com/prisma/prisma/issues/4228
7+
- [x] Improve: Remove tokenizr dep
8+
- Add tests for comments parser
9+
- [x] Upgrade: Update dependancies and peerDependancies
10+
- [x] Improve: Update prettier and eslint (to remove some conflicts)
11+
- [x] Chore: Eslint remove semicolon
12+
- [x] Feature: New option `config.crud.underscoreBetweenObjectVariableNames` change the generated variables from object.base.ts from something like `UserName` to `User_Name`. This avoids generated duplicated names in some cases. Fixes #58
13+
314
# 0.6.2
415

516
- [x] Fix: The builder path is incorrect in Windows #55

examples/inputs-simple-sqlite/package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,13 +21,13 @@
2121
"dependencies": {
2222
"@pothos/core": "^3.23.0",
2323
"@pothos/plugin-prisma": "^3.57.0",
24-
"@prisma/client": "^5.1.1",
24+
"@prisma/client": "^5.5.2",
2525
"@swc-node/register": "^1.5.1",
2626
"@swc/core": "^1.3.24",
2727
"apollo-server": "^3.9.0",
2828
"graphql": "^16.6.0",
29-
"prisma": "^5.1.1",
29+
"prisma": "^5.5.2",
3030
"ts-node": "^10.8.2",
31-
"typescript": "^4.9.4"
31+
"typescript": "^5.2.2"
3232
}
3333
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
-- CreateTable
2+
CREATE TABLE "UserLast" (
3+
"id" INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT,
4+
"name" TEXT NOT NULL
5+
);

examples/inputs-simple-sqlite/prisma/schema.prisma

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,12 @@ model User {
4242
Following Follow[] @relation("following")
4343
}
4444

45+
/// Its for check for duplicating User.LastName and UserLast.Name
46+
model UserLast {
47+
id Int @id @default(autoincrement())
48+
name String
49+
}
50+
4551
model Post {
4652
id Int @id @default(autoincrement())
4753
title String

examples/inputs-simple-sqlite/src/generated/objects.d.ts

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/* eslint-disable */
2-
import type { Prisma, User, Post, ExtraModal, Comment, Profile, Follow, Unrelated, IdOnly, WithoutID, WithScalars } from ".prisma/client";
2+
import type { Prisma, User, UserLast, Post, ExtraModal, Comment, Profile, Follow, Unrelated, IdOnly, WithoutID, WithScalars } from ".prisma/client";
33
export default interface PrismaTypes {
44
User: {
55
Name: "User";
@@ -36,6 +36,20 @@ export default interface PrismaTypes {
3636
};
3737
};
3838
};
39+
UserLast: {
40+
Name: "UserLast";
41+
Shape: UserLast;
42+
Include: never;
43+
Select: Prisma.UserLastSelect;
44+
OrderBy: Prisma.UserLastOrderByWithRelationInput;
45+
WhereUnique: Prisma.UserLastWhereUniqueInput;
46+
Where: Prisma.UserLastWhereInput;
47+
Create: {};
48+
Update: {};
49+
RelationName: never;
50+
ListRelations: never;
51+
Relations: {};
52+
};
3953
Post: {
4054
Name: "Post";
4155
Shape: Post;

examples/inputs-simple-sqlite/src/schema/__generated__/Comment/queries/count.base.ts

Lines changed: 0 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)