@loancrate/prisma-schema-parser
Advanced tools
Comparing version 2.0.0 to 3.0.0
@@ -9,7 +9,5 @@ declare function peg$SyntaxError(message: any, expected: any, found: any, location: any): Error; | ||
} | ||
declare function peg$parse(input: any, options: any): { | ||
kind: string; | ||
declarations: any; | ||
}; | ||
declare function peg$parse(input: any, options: any): any; | ||
export declare let StartRules: string[]; | ||
export { peg$SyntaxError as SyntaxError, peg$parse as parse }; | ||
//# sourceMappingURL=parser.d.ts.map |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.getArgumentValuesObject = exports.getArgumentValuesArray = exports.getArgumentValues = exports.getExpressionValue = exports.getArgumentTypeError = exports.readFieldReferencesArgument = exports.asFieldReferencesArgument = exports.readFieldReferenceArgument = exports.asFieldReferenceArgument = exports.readStringArgument = exports.asStringArgument = exports.readNumberArgument = exports.asNumberArgument = exports.readBooleanArgument = exports.asBooleanArgument = exports.getArgumentExpression = exports.getArgument = exports.findArgument = exports.findAllAttributes = exports.findFirstAttribute = exports.getEnumAttributes = exports.getModelAttributes = exports.getDeclarationAttributes = exports.hasFieldAttributes = exports.hasBlockAttributes = exports.getDeclarationName = void 0; | ||
exports.getDeclarationName = getDeclarationName; | ||
exports.hasBlockAttributes = hasBlockAttributes; | ||
exports.hasFieldAttributes = hasFieldAttributes; | ||
exports.getDeclarationAttributes = getDeclarationAttributes; | ||
exports.getModelAttributes = getModelAttributes; | ||
exports.getEnumAttributes = getEnumAttributes; | ||
exports.findFirstAttribute = findFirstAttribute; | ||
exports.findAllAttributes = findAllAttributes; | ||
exports.findArgument = findArgument; | ||
exports.getArgument = getArgument; | ||
exports.getArgumentExpression = getArgumentExpression; | ||
exports.asBooleanArgument = asBooleanArgument; | ||
exports.readBooleanArgument = readBooleanArgument; | ||
exports.asNumberArgument = asNumberArgument; | ||
exports.readNumberArgument = readNumberArgument; | ||
exports.asStringArgument = asStringArgument; | ||
exports.readStringArgument = readStringArgument; | ||
exports.asFieldReferenceArgument = asFieldReferenceArgument; | ||
exports.readFieldReferenceArgument = readFieldReferenceArgument; | ||
exports.asFieldReferencesArgument = asFieldReferencesArgument; | ||
exports.readFieldReferencesArgument = readFieldReferencesArgument; | ||
exports.getArgumentTypeError = getArgumentTypeError; | ||
exports.getExpressionValue = getExpressionValue; | ||
exports.getArgumentValues = getArgumentValues; | ||
exports.getArgumentValuesArray = getArgumentValuesArray; | ||
exports.getArgumentValuesObject = getArgumentValuesObject; | ||
const no_case_1 = require("no-case"); | ||
@@ -15,2 +40,3 @@ const format_1 = require("./format"); | ||
case "type": | ||
case "view": | ||
case "typeAlias": | ||
@@ -22,3 +48,2 @@ return `${(0, no_case_1.noCase)(decl.kind)} ${decl.name.value}`; | ||
} | ||
exports.getDeclarationName = getDeclarationName; | ||
function hasBlockAttributes(decl) { | ||
@@ -29,2 +54,3 @@ switch (decl.kind) { | ||
case "type": | ||
case "view": | ||
return true; | ||
@@ -34,3 +60,2 @@ } | ||
} | ||
exports.hasBlockAttributes = hasBlockAttributes; | ||
function hasFieldAttributes(decl) { | ||
@@ -45,3 +70,2 @@ switch (decl.kind) { | ||
} | ||
exports.hasFieldAttributes = hasFieldAttributes; | ||
function getDeclarationAttributes(decl) { | ||
@@ -53,2 +77,3 @@ switch (decl.kind) { | ||
case "type": | ||
case "view": | ||
return getModelAttributes(decl); | ||
@@ -63,19 +88,14 @@ case "enumValue": | ||
} | ||
exports.getDeclarationAttributes = getDeclarationAttributes; | ||
function getModelAttributes(decl) { | ||
return decl.members.filter((m) => m.kind === "blockAttribute"); | ||
} | ||
exports.getModelAttributes = getModelAttributes; | ||
function getEnumAttributes(decl) { | ||
return decl.members.filter((m) => m.kind === "blockAttribute"); | ||
} | ||
exports.getEnumAttributes = getEnumAttributes; | ||
function findFirstAttribute(attributes, name) { | ||
return attributes?.find((attribute) => (0, format_1.joinPath)(attribute.path.value) === name); | ||
} | ||
exports.findFirstAttribute = findFirstAttribute; | ||
function findAllAttributes(attributes, name) { | ||
return (attributes?.filter((attribute) => (0, format_1.joinPath)(attribute.path.value) === name) ?? []); | ||
} | ||
exports.findAllAttributes = findAllAttributes; | ||
function findArgument(args, name, position) { | ||
@@ -98,3 +118,2 @@ if (args) { | ||
} | ||
exports.findArgument = findArgument; | ||
function getArgument(args, name, position) { | ||
@@ -107,7 +126,5 @@ const arg = findArgument(args, name, position); | ||
} | ||
exports.getArgument = getArgument; | ||
function getArgumentExpression(arg) { | ||
return arg.kind === "namedArgument" ? arg.expression : arg; | ||
} | ||
exports.getArgumentExpression = getArgumentExpression; | ||
function asBooleanArgument(arg) { | ||
@@ -121,3 +138,2 @@ if (arg) { | ||
} | ||
exports.asBooleanArgument = asBooleanArgument; | ||
function readBooleanArgument(arg) { | ||
@@ -130,3 +146,2 @@ const value = asBooleanArgument(arg); | ||
} | ||
exports.readBooleanArgument = readBooleanArgument; | ||
function asNumberArgument(arg) { | ||
@@ -140,3 +155,2 @@ if (arg) { | ||
} | ||
exports.asNumberArgument = asNumberArgument; | ||
function readNumberArgument(arg) { | ||
@@ -149,3 +163,2 @@ const value = asNumberArgument(arg); | ||
} | ||
exports.readNumberArgument = readNumberArgument; | ||
function asStringArgument(arg) { | ||
@@ -159,3 +172,2 @@ if (arg) { | ||
} | ||
exports.asStringArgument = asStringArgument; | ||
function readStringArgument(arg) { | ||
@@ -168,3 +180,2 @@ const value = asStringArgument(arg); | ||
} | ||
exports.readStringArgument = readStringArgument; | ||
function asFieldReferenceArgument(arg) { | ||
@@ -178,3 +189,2 @@ if (arg) { | ||
} | ||
exports.asFieldReferenceArgument = asFieldReferenceArgument; | ||
function readFieldReferenceArgument(arg) { | ||
@@ -187,3 +197,2 @@ const value = asFieldReferenceArgument(arg); | ||
} | ||
exports.readFieldReferenceArgument = readFieldReferenceArgument; | ||
function asFieldReferencesArgument(arg) { | ||
@@ -200,3 +209,2 @@ if (arg) { | ||
} | ||
exports.asFieldReferencesArgument = asFieldReferencesArgument; | ||
function readFieldReferencesArgument(arg) { | ||
@@ -209,3 +217,2 @@ const value = asFieldReferencesArgument(arg); | ||
} | ||
exports.readFieldReferencesArgument = readFieldReferencesArgument; | ||
function getArgumentTypeError(arg, expectedType) { | ||
@@ -224,3 +231,2 @@ let message = `${expectedType} expected`; | ||
} | ||
exports.getArgumentTypeError = getArgumentTypeError; | ||
function getExpressionValue(expr) { | ||
@@ -238,3 +244,2 @@ switch (expr.kind) { | ||
} | ||
exports.getExpressionValue = getExpressionValue; | ||
function getArgumentValues(args) { | ||
@@ -246,7 +251,5 @@ if (args.every((arg) => arg.kind === "namedArgument")) { | ||
} | ||
exports.getArgumentValues = getArgumentValues; | ||
function getArgumentValuesArray(args) { | ||
return args.map((arg) => getExpressionValue(arg.kind === "namedArgument" ? arg.expression : arg)); | ||
} | ||
exports.getArgumentValuesArray = getArgumentValuesArray; | ||
function getArgumentValuesObject(args) { | ||
@@ -259,3 +262,2 @@ return Object.fromEntries(args.map((arg) => { | ||
} | ||
exports.getArgumentValuesObject = getArgumentValuesObject; | ||
//# sourceMappingURL=access.js.map |
@@ -5,6 +5,6 @@ export interface PrismaSchema { | ||
} | ||
export declare type PrismaDeclaration = SchemaDeclaration | FieldDeclaration | EnumValue; | ||
export declare type SchemaDeclaration = ModelDeclaration | EnumDeclaration | TypeAlias | ConfigBlock | CommentBlock; | ||
export type PrismaDeclaration = SchemaDeclaration | FieldDeclaration | EnumValue; | ||
export type SchemaDeclaration = ModelDeclaration | EnumDeclaration | TypeAlias | ConfigBlock | CommentBlock; | ||
export interface ModelDeclaration { | ||
kind: "model" | "type"; | ||
kind: "model" | "type" | "view"; | ||
name: NameNode; | ||
@@ -14,3 +14,3 @@ members: ModelDeclarationMember[]; | ||
} | ||
export declare type ModelDeclarationMember = FieldDeclaration | BlockAttribute | CommentBlock; | ||
export type ModelDeclarationMember = FieldDeclaration | BlockAttribute | CommentBlock; | ||
export interface FieldDeclaration { | ||
@@ -24,4 +24,4 @@ kind: "field"; | ||
} | ||
export declare type PrismaType = BaseType | ListType | OptionalType | RequiredType; | ||
export declare type BaseType = TypeId | UnsupportedType; | ||
export type PrismaType = BaseType | ListType | OptionalType | RequiredType; | ||
export type BaseType = TypeId | UnsupportedType; | ||
export interface TypeId { | ||
@@ -53,3 +53,3 @@ kind: "typeId"; | ||
} | ||
export declare type EnumDeclarationMember = EnumValue | BlockAttribute | CommentBlock; | ||
export type EnumDeclarationMember = EnumValue | BlockAttribute | CommentBlock; | ||
export interface EnumValue { | ||
@@ -75,3 +75,3 @@ kind: "enumValue"; | ||
} | ||
export declare type ConfigBlockMember = Config | CommentBlock; | ||
export type ConfigBlockMember = Config | CommentBlock; | ||
export interface Config { | ||
@@ -84,4 +84,4 @@ kind: "config"; | ||
} | ||
export declare type SchemaAttribute = BlockAttribute | FieldAttribute; | ||
export declare type BlockAttributed = ModelDeclaration | EnumDeclaration; | ||
export type SchemaAttribute = BlockAttribute | FieldAttribute; | ||
export type BlockAttributed = ModelDeclaration | EnumDeclaration; | ||
export interface BlockAttribute { | ||
@@ -94,3 +94,3 @@ kind: "blockAttribute"; | ||
} | ||
export declare type FieldAttributed = FieldDeclaration | EnumValue | TypeAlias; | ||
export type FieldAttributed = FieldDeclaration | EnumValue | TypeAlias; | ||
export interface FieldAttribute { | ||
@@ -102,3 +102,3 @@ kind: "fieldAttribute"; | ||
} | ||
export declare type SchemaArgument = NamedArgument | SchemaExpression; | ||
export type SchemaArgument = NamedArgument | SchemaExpression; | ||
export interface NamedArgument { | ||
@@ -114,3 +114,3 @@ kind: "namedArgument"; | ||
} | ||
export declare type SchemaExpression = ScalarLiteral | PathExpression | ArrayExpression | FunctionCall; | ||
export type SchemaExpression = ScalarLiteral | PathExpression | ArrayExpression | FunctionCall; | ||
export interface ScalarLiteral<T = string | number | boolean> { | ||
@@ -138,3 +138,3 @@ kind: "literal"; | ||
} | ||
export declare type TrailingComment = Comment | DocComment; | ||
export type TrailingComment = Comment | DocComment; | ||
export interface Comment { | ||
@@ -159,3 +159,3 @@ kind: "comment"; | ||
} | ||
export declare type PrismaAstNode = PrismaSchema | PrismaDeclaration | PrismaType | SchemaAttribute | SchemaArgument | Config | NameNode | TrailingComment; | ||
export type PrismaAstNode = PrismaSchema | PrismaDeclaration | PrismaType | SchemaAttribute | SchemaArgument | Config | NameNode | TrailingComment; | ||
//# sourceMappingURL=ast.d.ts.map |
import "error-cause/auto"; | ||
import { EnumDeclaration, EnumValue, FieldDeclaration, ModelDeclaration, SchemaArgument, SchemaExpression } from "./ast"; | ||
export declare type SortOrder = "Asc" | "Desc"; | ||
export type SortOrder = "Asc" | "Desc"; | ||
export declare function isSortOrder(v: unknown): v is SortOrder; | ||
@@ -55,3 +55,3 @@ export declare function asSortOrder(s: string): SortOrder; | ||
declare const referentialActions: readonly ["Cascade", "Restrict", "NoAction", "SetNull", "SetDefault"]; | ||
export declare type ReferentialAction = typeof referentialActions[number]; | ||
export type ReferentialAction = (typeof referentialActions)[number]; | ||
export declare function isReferentialAction(v: unknown): v is ReferentialAction; | ||
@@ -58,0 +58,0 @@ export declare function asReferentialAction(s: string): ReferentialAction; |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.applyOptional = exports.findMapBlockAttribute = exports.findMapFieldAttribute = exports.readReferentialActionArgument = exports.findRelationFieldAttribute = exports.asReferentialAction = exports.isReferentialAction = exports.readOpsArgument = exports.findIndexBlockAttributes = exports.findUniqueBlockAttributes = exports.findUniqueFieldAttribute = exports.findDefaultFieldAttribute = exports.findIdBlockAttribute = exports.findIdFieldAttribute = exports.asSortOrder = exports.isSortOrder = void 0; | ||
exports.isSortOrder = isSortOrder; | ||
exports.asSortOrder = asSortOrder; | ||
exports.findIdFieldAttribute = findIdFieldAttribute; | ||
exports.findIdBlockAttribute = findIdBlockAttribute; | ||
exports.findDefaultFieldAttribute = findDefaultFieldAttribute; | ||
exports.findUniqueFieldAttribute = findUniqueFieldAttribute; | ||
exports.findUniqueBlockAttributes = findUniqueBlockAttributes; | ||
exports.findIndexBlockAttributes = findIndexBlockAttributes; | ||
exports.readOpsArgument = readOpsArgument; | ||
exports.isReferentialAction = isReferentialAction; | ||
exports.asReferentialAction = asReferentialAction; | ||
exports.findRelationFieldAttribute = findRelationFieldAttribute; | ||
exports.readReferentialActionArgument = readReferentialActionArgument; | ||
exports.findMapFieldAttribute = findMapFieldAttribute; | ||
exports.findMapBlockAttribute = findMapBlockAttribute; | ||
exports.applyOptional = applyOptional; | ||
const catch_unknown_1 = require("catch-unknown"); | ||
@@ -11,3 +26,2 @@ require("error-cause/auto"); | ||
} | ||
exports.isSortOrder = isSortOrder; | ||
function asSortOrder(s) { | ||
@@ -19,7 +33,5 @@ if (!isSortOrder(s)) { | ||
} | ||
exports.asSortOrder = asSortOrder; | ||
function findIdFieldAttribute(decl) { | ||
return parseUniqueAttributeWith(decl, "id", parseIdFieldAttribute); | ||
} | ||
exports.findIdFieldAttribute = findIdFieldAttribute; | ||
function parseIdFieldAttribute(attr) { | ||
@@ -58,3 +70,2 @@ return { | ||
} | ||
exports.findIdBlockAttribute = findIdBlockAttribute; | ||
function parseIdBlockAttribute(attr) { | ||
@@ -74,11 +85,8 @@ return { | ||
} | ||
exports.findDefaultFieldAttribute = findDefaultFieldAttribute; | ||
function findUniqueFieldAttribute(decl) { | ||
return parseUniqueAttributeWith(decl, "unique", parseIdFieldAttribute); | ||
} | ||
exports.findUniqueFieldAttribute = findUniqueFieldAttribute; | ||
function findUniqueBlockAttributes(decl) { | ||
return parseAttributesWith(decl, "unique", parseIdBlockAttribute); | ||
} | ||
exports.findUniqueBlockAttributes = findUniqueBlockAttributes; | ||
function findIndexBlockAttributes(decl) { | ||
@@ -90,3 +98,2 @@ return parseAttributesWith(decl, "index", (attr) => ({ | ||
} | ||
exports.findIndexBlockAttributes = findIndexBlockAttributes; | ||
function readOpsArgument(arg) { | ||
@@ -102,3 +109,2 @@ const expr = (0, access_1.getArgumentExpression)(arg); | ||
} | ||
exports.readOpsArgument = readOpsArgument; | ||
const referentialActions = [ | ||
@@ -114,3 +120,2 @@ "Cascade", | ||
} | ||
exports.isReferentialAction = isReferentialAction; | ||
function asReferentialAction(s) { | ||
@@ -122,3 +127,2 @@ if (!isReferentialAction(s)) { | ||
} | ||
exports.asReferentialAction = asReferentialAction; | ||
function findRelationFieldAttribute(decl) { | ||
@@ -133,3 +137,2 @@ return parseUniqueAttributeWith(decl, "relation", (attr) => ({ | ||
} | ||
exports.findRelationFieldAttribute = findRelationFieldAttribute; | ||
function readReferentialActionArgument(arg) { | ||
@@ -142,11 +145,8 @@ const expr = (0, access_1.getArgumentExpression)(arg); | ||
} | ||
exports.readReferentialActionArgument = readReferentialActionArgument; | ||
function findMapFieldAttribute(decl) { | ||
return parseUniqueAttributeWith(decl, "map", parseMapAttribute); | ||
} | ||
exports.findMapFieldAttribute = findMapFieldAttribute; | ||
function findMapBlockAttribute(decl) { | ||
return parseUniqueAttributeWith(decl, "map", parseMapAttribute); | ||
} | ||
exports.findMapBlockAttribute = findMapBlockAttribute; | ||
function parseMapAttribute(attr) { | ||
@@ -196,3 +196,2 @@ return { | ||
} | ||
exports.applyOptional = applyOptional; | ||
//# sourceMappingURL=attributes.js.map |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.joinPath = exports.formatSourceRange = exports.formatSourceLocation = exports.formatAst = void 0; | ||
exports.formatAst = formatAst; | ||
exports.formatSourceLocation = formatSourceLocation; | ||
exports.formatSourceRange = formatSourceRange; | ||
exports.joinPath = joinPath; | ||
const visit_1 = require("./visit"); | ||
@@ -15,2 +18,5 @@ const formatReducer = { | ||
}, | ||
view({ name, members }) { | ||
return `view ${name} {\n${members.join("\n")}\n}`; | ||
}, | ||
enum({ name, members }) { | ||
@@ -113,7 +119,5 @@ return `enum ${name} {\n${members.join("\n")}\n}`; | ||
} | ||
exports.formatAst = formatAst; | ||
function formatSourceLocation(loc) { | ||
return `${loc.line}:${loc.column}`; | ||
} | ||
exports.formatSourceLocation = formatSourceLocation; | ||
function formatSourceRange(loc) { | ||
@@ -126,7 +130,5 @@ const { start, end } = loc; | ||
} | ||
exports.formatSourceRange = formatSourceRange; | ||
function joinPath(path) { | ||
return path.join("."); | ||
} | ||
exports.joinPath = joinPath; | ||
//# sourceMappingURL=format.js.map |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.parsePrismaExpression = exports.parsePrismaType = exports.parsePrismaSchema = void 0; | ||
exports.parsePrismaSchema = parsePrismaSchema; | ||
exports.parsePrismaType = parsePrismaType; | ||
exports.parsePrismaExpression = parsePrismaExpression; | ||
const parser_1 = require("./__generated__/parser"); | ||
@@ -8,7 +10,5 @@ function parsePrismaSchema(source) { | ||
} | ||
exports.parsePrismaSchema = parsePrismaSchema; | ||
function parsePrismaType(source) { | ||
return (0, parser_1.parse)(source, { startRule: "field_type" }); | ||
} | ||
exports.parsePrismaType = parsePrismaType; | ||
function parsePrismaExpression(source) { | ||
@@ -19,3 +19,2 @@ return (0, parser_1.parse)(source, { | ||
} | ||
exports.parsePrismaExpression = parsePrismaExpression; | ||
//# sourceMappingURL=parse.js.map |
@@ -6,12 +6,12 @@ import { PrismaAstNode } from "./ast"; | ||
} | ||
export declare type PrismaAstVisitor = { | ||
export type PrismaAstVisitor = { | ||
readonly [T in PrismaAstNode as T["kind"]]?: PrismaAstNodeVisitor<T>; | ||
}; | ||
export declare function visitAst<T extends PrismaAstNode>(node: T, visitor: PrismaAstVisitor): void; | ||
declare type ReducedField<T, R> = T extends null | undefined ? T : T extends PrismaAstNode ? R : T extends ReadonlyArray<PrismaAstNode> ? ReadonlyArray<R> : T; | ||
declare type ReducedNode<T, R> = { | ||
type ReducedField<T, R> = T extends null | undefined ? T : T extends PrismaAstNode ? R : T extends ReadonlyArray<PrismaAstNode> ? ReadonlyArray<R> : T; | ||
type ReducedNode<T, R> = { | ||
[K in keyof T]: ReducedField<T[K], R>; | ||
}; | ||
export declare type PrismaAstNodeReducer<T extends PrismaAstNode, R> = (node: ReducedNode<T, R>) => R; | ||
export declare type PrismaAstReducer<R> = { | ||
export type PrismaAstNodeReducer<T extends PrismaAstNode, R> = (node: ReducedNode<T, R>) => R; | ||
export type PrismaAstReducer<R> = { | ||
readonly [T in PrismaAstNode as T["kind"]]?: PrismaAstNodeReducer<T, R>; | ||
@@ -18,0 +18,0 @@ }; |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.reduceAst = exports.visitAst = void 0; | ||
exports.visitAst = visitAst; | ||
exports.reduceAst = reduceAst; | ||
const nestedNodeMap = { | ||
@@ -8,2 +9,3 @@ schema: ["declarations"], | ||
type: ["name", "members"], | ||
view: ["name", "members"], | ||
enum: ["name", "members"], | ||
@@ -56,3 +58,2 @@ datasource: ["name", "members"], | ||
} | ||
exports.visitAst = visitAst; | ||
function reduceAst(node, reducer) { | ||
@@ -67,3 +68,2 @@ const keys = nestedNodeMap[node.kind]; | ||
} | ||
exports.reduceAst = reduceAst; | ||
function reduceField(node, key, reducer) { | ||
@@ -70,0 +70,0 @@ const value = node[key]; |
{ | ||
"name": "@loancrate/prisma-schema-parser", | ||
"version": "2.0.0", | ||
"version": "3.0.0", | ||
"description": "Prisma Schema Parser", | ||
@@ -27,3 +27,3 @@ "keywords": [ | ||
"build": "rm -rf dist && tsc --project tsconfig.build.json", | ||
"lint": "eslint src --ext .ts", | ||
"lint": "eslint src", | ||
"generate-peggy": "./scripts/generate-peggy.sh", | ||
@@ -36,22 +36,22 @@ "prepare": "npm run generate-peggy && npm run build", | ||
"dependencies": { | ||
"catch-unknown": "^1.0.0", | ||
"error-cause": "^1.0.4", | ||
"catch-unknown": "^2.0.0", | ||
"error-cause": "^1.0.8", | ||
"no-case": "^3.0.4", | ||
"type-fest": "^2.19.0" | ||
"type-fest": "^4.30.2" | ||
}, | ||
"devDependencies": { | ||
"@tsconfig/node16": "^1.0.3", | ||
"@types/error-cause": "^1.0.1", | ||
"@types/jest": "^28.1.6", | ||
"@types/node": "^18.0.6", | ||
"@typescript-eslint/eslint-plugin": "^5.30.7", | ||
"@typescript-eslint/parser": "^5.30.7", | ||
"eslint": "^8.20.0", | ||
"husky": "^8.0.1", | ||
"jest": "^28.1.3", | ||
"lint-staged": "^13.0.3", | ||
"peggy": "^2.0.1", | ||
"prettier": "^2.7.1", | ||
"ts-jest": "^28.0.7", | ||
"typescript": "^4.7.4" | ||
"@tsconfig/node22": "^22.0.0", | ||
"@types/error-cause": "^1.0.4", | ||
"@types/jest": "^29.5.14", | ||
"@types/node": "^22.10.2", | ||
"@typescript-eslint/eslint-plugin": "^8.18.1", | ||
"@typescript-eslint/parser": "^8.18.1", | ||
"eslint": "^9.17.0", | ||
"husky": "^9.1.7", | ||
"jest": "^29.7.0", | ||
"lint-staged": "^15.2.11", | ||
"peggy": "^4.2.0", | ||
"prettier": "^3.4.2", | ||
"ts-jest": "^29.2.5", | ||
"typescript": "^5.7.2" | ||
}, | ||
@@ -58,0 +58,0 @@ "lint-staged": { |
@@ -40,3 +40,3 @@ # Prisma Schema Parser and Formatter | ||
const ast = parsePrismaSchema( | ||
readFileSync("test-data/schema.prisma", { encoding: "utf8" }) | ||
readFileSync("test-data/schema.prisma", { encoding: "utf8" }), | ||
); | ||
@@ -43,0 +43,0 @@ // ... manipulate the schema ... |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
220278
3411
+ Addedcatch-unknown@2.0.0(transitive)
+ Addedtype-fest@4.31.0(transitive)
- Removedcatch-unknown@1.0.0(transitive)
- Removedtype-fest@2.19.0(transitive)
Updatedcatch-unknown@^2.0.0
Updatederror-cause@^1.0.8
Updatedtype-fest@^4.30.2