prisma / codemods

A Collection of Codemods for Prisma 2

Home Page:https://www.prisma.io/docs/guides/upgrade-guides/upgrading-versions/codemods

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Namespace transform breaking non-Prisma imports

jonahsnider opened this issue · comments

diff --git a/index.js b/index.js
index 011d26b..b05f60b 100644
--- a/index.js
+++ b/index.js
@@ -1,5 +1,5 @@
-import { Person as LocalPerson } from "./local-file";
-import { Person } from "@prisma/client";
+import { Prisma.Person as LocalPerson } from "./local-file";
+import { Prisma } from "@prisma/client";
 
 /** @type {Person} */
 const person = new LocalPerson();

Reproduction here and in this ZIP file prisma-codemods-issue-6-main.zip.

Hey @pizzafox this should be fixed in 0.6.1

Feel free to reopen if it is not fixed