Skip to content

Commit

Permalink
Merge branch 'release/0.6.3'
Browse files Browse the repository at this point in the history
  • Loading branch information
Cauen committed Nov 9, 2023
2 parents 4f64024 + 91cf1b8 commit 78e22e3
Show file tree
Hide file tree
Showing 62 changed files with 3,156 additions and 2,976 deletions.
34 changes: 25 additions & 9 deletions .eslintrc
Original file line number Diff line number Diff line change
@@ -1,17 +1,27 @@
{
"extends": [
"eslint:recommended",
"plugin:@typescript-eslint/recommended",
"prettier",
"plugin:prettier/recommended",
"plugin:import/recommended",
"plugin:import/typescript"
],
"extends": ["standard", "plugin:@typescript-eslint/recommended", "plugin:prettier/recommended"],
"env": {
"node": true,
"node": true
},
"ignorePatterns": ["examples/*"],
"rules": {
"prettier/prettier": [
"error",
{
"semi": false,
"printWidth": 120,
"tabWidth": 2,
"tabs": false,
"singleQuote": true,
"quoteProps": "consistent",
"jsxSingleQuote": false,
"trailingComma": "all",
"bracketSpacing": true,
"bracketSameLine": false,
"arrowParens": "always",
"endOfLine": "auto"
}
],
"@typescript-eslint/no-unused-vars": [
"warn",
{
Expand All @@ -28,5 +38,11 @@
"caseInsensitive": true
}
}]
},
"parser": "@typescript-eslint/parser",
"plugins": ["@typescript-eslint"],
"parserOptions": {
"ecmaVersion": "latest",
"sourceType": "module"
}
}
14 changes: 0 additions & 14 deletions .prettierrc

This file was deleted.

1 change: 1 addition & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
{
"files.eol": "\n",
"typescript.tsdk": "node_modules/typescript/lib",
}
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -183,6 +183,8 @@ module.exports = {
exportEverythingInObjectsDotTs?: boolean;
/** Map all Prisma fields with "@id" attribute to Graphql "ID" Scalar. Default: 'Objects' */
mapIdFieldsToGraphqlId?: false | 'Objects';
/** 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 */
underscoreBetweenObjectVariableNames?: false | 'Objects';
};
/** Global config */
global?: {
Expand Down
11 changes: 11 additions & 0 deletions changelog.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,16 @@
# Changelog

# 0.6.3

- [x] Upgrade: Update prisma to latest version
- Remove distinct from count https://github.com/prisma/prisma/issues/4228
- [x] Improve: Remove tokenizr dep
- Add tests for comments parser
- [x] Upgrade: Update dependancies and peerDependancies
- [x] Improve: Update prettier and eslint (to remove some conflicts)
- [x] Chore: Eslint remove semicolon
- [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

# 0.6.2

- [x] Fix: The builder path is incorrect in Windows #55
Expand Down
6 changes: 3 additions & 3 deletions examples/inputs-simple-sqlite/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,13 @@
"dependencies": {
"@pothos/core": "^3.23.0",
"@pothos/plugin-prisma": "^3.57.0",
"@prisma/client": "^5.1.1",
"@prisma/client": "^5.5.2",
"@swc-node/register": "^1.5.1",
"@swc/core": "^1.3.24",
"apollo-server": "^3.9.0",
"graphql": "^16.6.0",
"prisma": "^5.1.1",
"prisma": "^5.5.2",
"ts-node": "^10.8.2",
"typescript": "^4.9.4"
"typescript": "^5.2.2"
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
-- CreateTable
CREATE TABLE "UserLast" (
"id" INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT,
"name" TEXT NOT NULL
);
6 changes: 6 additions & 0 deletions examples/inputs-simple-sqlite/prisma/schema.prisma
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,12 @@ model User {
Following Follow[] @relation("following")
}

/// Its for check for duplicating User.LastName and UserLast.Name
model UserLast {
id Int @id @default(autoincrement())
name String
}

model Post {
id Int @id @default(autoincrement())
title String
Expand Down
16 changes: 15 additions & 1 deletion examples/inputs-simple-sqlite/src/generated/objects.d.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/* eslint-disable */
import type { Prisma, User, Post, ExtraModal, Comment, Profile, Follow, Unrelated, IdOnly, WithoutID, WithScalars } from ".prisma/client";
import type { Prisma, User, UserLast, Post, ExtraModal, Comment, Profile, Follow, Unrelated, IdOnly, WithoutID, WithScalars } from ".prisma/client";
export default interface PrismaTypes {
User: {
Name: "User";
Expand Down Expand Up @@ -36,6 +36,20 @@ export default interface PrismaTypes {
};
};
};
UserLast: {
Name: "UserLast";
Shape: UserLast;
Include: never;
Select: Prisma.UserLastSelect;
OrderBy: Prisma.UserLastOrderByWithRelationInput;
WhereUnique: Prisma.UserLastWhereUniqueInput;
Where: Prisma.UserLastWhereInput;
Create: {};
Update: {};
RelationName: never;
ListRelations: never;
Relations: {};
};
Post: {
Name: "Post";
Shape: Post;
Expand Down

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

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

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

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

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

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

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

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

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

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

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

10 changes: 10 additions & 0 deletions examples/inputs-simple-sqlite/src/schema/__generated__/autocrud.ts

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

57 changes: 57 additions & 0 deletions examples/inputs-simple-sqlite/src/schema/__generated__/inputs.ts

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

Loading

0 comments on commit 78e22e3

Please sign in to comment.