Skip to content

Commit cabe9dc

Browse files
authored
fix: more tests and bump version (#225)
1 parent fe05c5c commit cabe9dc

File tree

13 files changed

+18
-75
lines changed

13 files changed

+18
-75
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "zenstack-monorepo",
3-
"version": "1.0.0-alpha.48",
3+
"version": "1.0.0-alpha.49",
44
"description": "",
55
"scripts": {
66
"build": "pnpm -r build",

packages/language/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@zenstackhq/language",
3-
"version": "1.0.0-alpha.48",
3+
"version": "1.0.0-alpha.49",
44
"displayName": "ZenStack modeling language compiler",
55
"description": "ZenStack modeling language compiler",
66
"homepage": "https://zenstack.dev",

packages/next/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@zenstackhq/next",
3-
"version": "1.0.0-alpha.48",
3+
"version": "1.0.0-alpha.49",
44
"displayName": "ZenStack Next.js integration",
55
"description": "ZenStack Next.js integration",
66
"homepage": "https://zenstack.dev",

packages/plugins/react/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "@zenstackhq/react",
33
"displayName": "ZenStack plugin and runtime for ReactJS",
4-
"version": "1.0.0-alpha.48",
4+
"version": "1.0.0-alpha.49",
55
"description": "ZenStack plugin and runtime for ReactJS",
66
"main": "index.js",
77
"repository": {

packages/plugins/trpc/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "@zenstackhq/trpc",
33
"displayName": "ZenStack plugin for tRPC",
4-
"version": "1.0.0-alpha.48",
4+
"version": "1.0.0-alpha.49",
55
"description": "ZenStack plugin for tRPC",
66
"main": "index.js",
77
"repository": {

packages/runtime/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "@zenstackhq/runtime",
33
"displayName": "ZenStack Runtime Library",
4-
"version": "1.0.0-alpha.48",
4+
"version": "1.0.0-alpha.49",
55
"description": "Runtime of ZenStack for both client-side and server-side environments.",
66
"repository": {
77
"type": "git",

packages/schema/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"publisher": "zenstack",
44
"displayName": "ZenStack Language Tools",
55
"description": "A toolkit for building secure CRUD apps with Next.js + Typescript",
6-
"version": "1.0.0-alpha.48",
6+
"version": "1.0.0-alpha.49",
77
"author": {
88
"name": "ZenStack Team"
99
},

packages/schema/tests/generator/prisma-generator.test.ts

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ describe('Prisma generator test', () => {
6262
expect(content).toContain(`/// @TypeGraphQL.field(name: 'bar')`);
6363
});
6464

65-
it('enum mapping', async () => {
65+
it('model and field mapping', async () => {
6666
const model = await loadModel(`
6767
datasource db {
6868
provider = 'postgresql'
@@ -77,7 +77,9 @@ describe('Prisma generator test', () => {
7777
7878
model User {
7979
id Int @id
80-
role Role @default(CUSTOMER)
80+
role Role @default(CUSTOMER) @map('_role')
81+
82+
@@map('_User')
8183
}
8284
`);
8385

@@ -89,6 +91,8 @@ describe('Prisma generator test', () => {
8991
});
9092

9193
const content = fs.readFileSync(name, 'utf-8');
94+
expect(content).toContain(`@@map("_User")`);
95+
expect(content).toContain(`@map("_role")`);
9296
expect(content).toContain(`@@map("_Role")`);
9397
expect(content).toContain(`@map("admin")`);
9498
expect(content).toContain(`@map("customer")`);

packages/schema/tests/schema/validation/attribute-validation.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -172,7 +172,7 @@ describe('Attribute tests', () => {
172172
${prelude}
173173
model A {
174174
id String @id
175-
x Int
175+
x Int @map("_x")
176176
y String
177177
@@map("__A")
178178
}

packages/sdk/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@zenstackhq/sdk",
3-
"version": "1.0.0-alpha.48",
3+
"version": "1.0.0-alpha.49",
44
"description": "ZenStack plugin development SDK",
55
"main": "index.js",
66
"scripts": {

0 commit comments

Comments
 (0)