Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: turbo cleanup #4951

Merged
merged 14 commits into from Sep 8, 2022
Merged

chore: turbo cleanup #4951

merged 14 commits into from Sep 8, 2022

Conversation

balazsorban44
Copy link
Member

@balazsorban44 balazsorban44 commented Jul 16, 2022

Turbo should take care of dependencies in dev now.

@vercel
Copy link

vercel bot commented Jul 16, 2022

The latest updates on your projects. Learn more about Vercel for Git ↗︎

1 Ignored Deployment
Name Status Preview Updated
next-auth ⬜️ Ignored (Inspect) Sep 8, 2022 at 7:05AM (UTC)

@github-actions github-actions bot added dgraph @auth/dgraph-adapter dynamodb @auth/dynamodb-adapter fauna @auth/fauna-adapter firebase @auth/firebase-adapter mikro-orm @auth/mikro-orm-adapter mongodb @auth/mongodb-adapter neo4j @auth/neo4j-adapter pouchdb @auth/pouchdb-adapter prisma @auth/prisma-adapter sequelize @auth/sequelize-adapter typeorm @auth/typeorm-adapter upstash-redis @auth/upstash-redis-adapter labels Jul 16, 2022
@balazsorban44
Copy link
Member Author

I'm not sure why this is necessary though:

next-auth/turbo.json

Lines 11 to 26 in 1872855

"@next-auth/fauna-adapter#build": {
"dependsOn": ["next-auth#build"]
},
"@next-auth/prisma-adapter#build": {
"dependsOn": ["next-auth#build"]
},
"@next-auth/typeorm-legacy-adapter#build": {
"dependsOn": ["next-auth#build"]
},
"dev": {
"cache": false,
"dependsOn": [
"@next-auth/fauna-adapter#build",
"@next-auth/prisma-adapter#build",
"@next-auth/typeorm-legacy-adapter#build"
]

I thought this should be enough:

"dev": {
  "cache": false,
  "dependsOn": ["^build"]
},

But I have to explicitly add the build of the adapters, and define that each adapter dependsOn next-auth#build (because of the types)

@balazsorban44
Copy link
Member Author

Not sure why the test fails... It works locally, but not on GitHub, even after 4ff836a. 🤔

image

Copy link
Member

@ThangHuuVu ThangHuuVu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've got some suggestions 🚀

turbo.json Outdated Show resolved Hide resolved
package.json Outdated Show resolved Hide resolved
@github-actions github-actions bot added adapters Changes related to the core code concerning database adapters typeorm-legacy labels Sep 7, 2022
@vercel vercel bot temporarily deployed to Preview September 7, 2022 08:54 Inactive
@balazsorban44
Copy link
Member Author

@ThangHuuVu what's remaining here is to clean up apps/dev:

"clean": "rm -rf .next",
"copy:css": "cpx \"../../packages/next-auth/css/**/*\" src/css --watch",
"watch:css": "cd ../../packages/next-auth && pnpm watch:css",
"dev": "concurrently \"pnpm dev:next\" \"pnpm watch:css\" \"pnpm copy:css\"",
"dev:next": "next dev",
I think this should be simplified. pnpm dev should watch next-auth (both js and CSS) and Turbo should make sure that the dev app gets the updates from there with HMR, no copying or
experimental: { externalDir: true },
should be necessary.

@github-actions github-actions bot added core Refers to `@auth/core` style labels Sep 8, 2022
@vercel vercel bot temporarily deployed to Preview September 8, 2022 06:30 Inactive
@ThangHuuVu
Copy link
Member

ThangHuuVu commented Sep 8, 2022

@ThangHuuVu what's remaining here is to clean up apps/dev:

"clean": "rm -rf .next",
"copy:css": "cpx \"../../packages/next-auth/css/**/*\" src/css --watch",
"watch:css": "cd ../../packages/next-auth && pnpm watch:css",
"dev": "concurrently \"pnpm dev:next\" \"pnpm watch:css\" \"pnpm copy:css\"",
"dev:next": "next dev",

I think this should be simplified. pnpm dev should watch next-auth (both js and CSS) and Turbo should make sure that the dev app gets the updates from there with HMR, no copying or

experimental: { externalDir: true },

should be necessary.

@balazsorban44 I added next-auth as apps/dev dependency now.
It introduces some new changes in the setup:

  • build is no longer required for dev
  • Remove copy:css
  • Bring back --parallel and add --continue for dev

apps/dev/package.json Outdated Show resolved Hide resolved
@balazsorban44 balazsorban44 merged commit 44aaa6f into main Sep 8, 2022
@balazsorban44 balazsorban44 deleted the chore/turbo-cleanup branch September 8, 2022 14:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
adapters Changes related to the core code concerning database adapters core Refers to `@auth/core` dgraph @auth/dgraph-adapter dynamodb @auth/dynamodb-adapter fauna @auth/fauna-adapter firebase @auth/firebase-adapter mikro-orm @auth/mikro-orm-adapter mongodb @auth/mongodb-adapter neo4j @auth/neo4j-adapter pouchdb @auth/pouchdb-adapter prisma @auth/prisma-adapter sequelize @auth/sequelize-adapter style typeorm @auth/typeorm-adapter typeorm-legacy upstash-redis @auth/upstash-redis-adapter
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants