From a5a987e3f46717fe5e5e575ab5d21f7ecb9391bf Mon Sep 17 00:00:00 2001 From: Josh GM Walker <56300765+Josh-Walker-GM@users.noreply.github.com> Date: Thu, 8 Aug 2024 16:40:19 +0100 Subject: [PATCH 1/3] comment out db import line --- packages/create-redwood-app/templates/js/scripts/seed.js | 3 +-- packages/create-redwood-app/templates/ts/scripts/seed.ts | 3 +-- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/packages/create-redwood-app/templates/js/scripts/seed.js b/packages/create-redwood-app/templates/js/scripts/seed.js index ed7d229f3cf5..e45078268a39 100644 --- a/packages/create-redwood-app/templates/js/scripts/seed.js +++ b/packages/create-redwood-app/templates/js/scripts/seed.js @@ -1,5 +1,4 @@ -// eslint-disable-next-line no-unused-vars -import { db } from 'api/src/lib/db' +// import { db } from 'api/src/lib/db' // Manually apply seeds via the `yarn rw prisma db seed` command. // diff --git a/packages/create-redwood-app/templates/ts/scripts/seed.ts b/packages/create-redwood-app/templates/ts/scripts/seed.ts index c0b5473072b0..945465a3a4a2 100644 --- a/packages/create-redwood-app/templates/ts/scripts/seed.ts +++ b/packages/create-redwood-app/templates/ts/scripts/seed.ts @@ -1,5 +1,4 @@ -// eslint-disable-next-line @typescript-eslint/no-unused-vars -import { db } from 'api/src/lib/db' +// import { db } from 'api/src/lib/db' // Manually apply seeds via the `yarn rw prisma db seed` command. // From 3fd95ff1bbea80b84f721eb3da014f9e1f443da6 Mon Sep 17 00:00:00 2001 From: Josh GM Walker <56300765+Josh-Walker-GM@users.noreply.github.com> Date: Thu, 8 Aug 2024 16:50:07 +0100 Subject: [PATCH 2/3] update rebuild script --- tasks/test-project/codemods/seed.js | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/tasks/test-project/codemods/seed.js b/tasks/test-project/codemods/seed.js index 58e3cca2d06e..bdb1b917b129 100644 --- a/tasks/test-project/codemods/seed.js +++ b/tasks/test-project/codemods/seed.js @@ -65,5 +65,13 @@ export default (file, api) => { const j = api.jscodeshift const root = j(file.source) - return root.find(j.TryStatement).insertBefore(createPosts).toSource() + let newSource = root.find(j.TryStatement).insertBefore(createPosts).toSource() + + // Uncomment the db import line + newSource = newSource.replace( + "// import { db } from 'api/src/lib/db'", + "import { db } from 'api/src/lib/db'", + ) + + return newSource } From 7affda75d8286fc9036695776eac7ac31e02689e Mon Sep 17 00:00:00 2001 From: Josh GM Walker <56300765+Josh-Walker-GM@users.noreply.github.com> Date: Thu, 8 Aug 2024 16:58:51 +0100 Subject: [PATCH 3/3] update fixture --- __fixtures__/test-project/scripts/seed.ts | 1 - __fixtures__/test-project/web/package.json | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/__fixtures__/test-project/scripts/seed.ts b/__fixtures__/test-project/scripts/seed.ts index 3fa44e0fd0ec..ae1c274634c0 100644 --- a/__fixtures__/test-project/scripts/seed.ts +++ b/__fixtures__/test-project/scripts/seed.ts @@ -1,4 +1,3 @@ -// eslint-disable-next-line @typescript-eslint/no-unused-vars import { db } from 'api/src/lib/db' // Manually apply seeds via the `yarn rw prisma db seed` command. diff --git a/__fixtures__/test-project/web/package.json b/__fixtures__/test-project/web/package.json index 120309fcb040..c3196c27ffd3 100644 --- a/__fixtures__/test-project/web/package.json +++ b/__fixtures__/test-project/web/package.json @@ -27,6 +27,6 @@ "postcss": "^8.4.41", "postcss-loader": "^8.1.1", "prettier-plugin-tailwindcss": "^0.5.12", - "tailwindcss": "^3.4.7" + "tailwindcss": "^3.4.9" } }