Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6,927 changes: 3,799 additions & 3,128 deletions package-lock.json

Large diffs are not rendered by default.

8 changes: 5 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "prisma-schema-dsl",
"version": "1.1.5",
"version": "1.2.0",
"description": "JavaScript interface for Prisma Schema DSL",
"main": "dist/index.js",
"scripts": {
Expand All @@ -24,16 +24,18 @@
},
"license": "MIT",
"dependencies": {
"@prisma/sdk": "^2.13.1",
"@prisma/internals": "^4.6.1",
"@types/lodash.isempty": "^4.4.6",
"lodash.isempty": "^4.4.0",
"prisma-schema-dsl-types": "^1.0.1",
"typescript": "^4.1.3"
},
"devDependencies": {
"@types/jest": "^26.0.19",
"jest": "^26.6.3",
"prettier": "^2.2.1",
"ts-jest": "^26.4.4"
"ts-jest": "^26.4.4",
"ts-toolbelt": "^9.6.0"
},
"jest": {
"preset": "ts-jest",
Expand Down
2 changes: 1 addition & 1 deletion src/builders.spec.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { ScalarType } from "./types";
import { ScalarType } from "prisma-schema-dsl-types";
import {
createScalarField,
createObjectField,
Expand Down
2 changes: 1 addition & 1 deletion src/builders.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ import {
UUID,
ScalarFieldDefault,
Enum,
} from "./types";
} from "prisma-schema-dsl-types";

const NAME_REGEXP = /[A-Za-z][A-Za-z0-9_]*/;
export const OPTIONAL_LIST_ERROR_MESSAGE =
Expand Down
1 change: 0 additions & 1 deletion src/index.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,2 @@
export * from "./builders";
export * from "./types";
export { print } from "./print";
4 changes: 2 additions & 2 deletions src/print.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ import {
CUID,
NOW,
Enum,
} from "./types";
} from "prisma-schema-dsl-types";

const EXAMPLE_DOCUMENTATION = "Example Documentation";
const EXAMPLE_ENUM_NAME = "ExampleEnumName";
Expand Down Expand Up @@ -426,6 +426,6 @@ model Order {
],
];
test.each(cases)("print(%s)", async (name, schema, expected) => {
expect(await print(schema)).toBe(expected);
expect(await await print(schema)).toBe(expected + "\n");
});
});
4 changes: 2 additions & 2 deletions src/print.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ import {
CallExpression,
ScalarFieldDefault,
Enum,
} from "./types";
import { formatSchema } from "@prisma/sdk";
} from "prisma-schema-dsl-types";
import { formatSchema } from "@prisma/internals";

type Relation = {
name?: string | null;
Expand Down
135 changes: 0 additions & 135 deletions src/types.ts

This file was deleted.