Replies: 7 comments
-
|
Hi! We have actually been planning on injecting synthetic steps into the build graph (such as running We will update this issue when we have a concrete timeline. |
Beta Was this translation helpful? Give feedback.
-
|
There is an easy workaround. Just create a script in the root package.json Then you can add "//#package-deps": {
"inputs": ["**/package.json", ".npmrc", ".npmignore", "pnpm-workspace.yaml"],
"outputs": ["pnpm-lock.yaml"]
},
"build": {
"dependsOn": ["//#package-deps"]
}also for bonus points you can add postinstall scripts to generate prisma clients or anything else like that |
Beta Was this translation helpful? Give feedback.
-
|
@jakeleventhal I did think about that but wasn't sure if there was some kind of edge case to know about. On CI we'd probably not want this just because we try to avoid installing all our dependencies, but for sure locally this seems like an easy win. |
Beta Was this translation helpful? Give feedback.
-
|
@arlyon I guess it's worth asking...do you see any issue with that approach? |
Beta Was this translation helpful? Give feedback.
-
|
Beta Was this translation helpful? Give feedback.
-
|
I think for this usecase the package-deps script is a good choice. I have been experimenting with using turbo and wrapping flask (or other arbitrary toolchains) and we plan on coming up with a convention for this type of task (which will be inherited by default when using one of the supported node ecosystem package managers). To answer Q2 @maschwenk, you can use a negative glob to prevent package jsons in node_modules from being included if you wanted to be on the safe side ( |
Beta Was this translation helpful? Give feedback.
-
|
Has there been any progress on this feature or opinions formed after using the |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Which project is this feature idea for?
Turborepo
Describe the feature you'd like to request
Sometimes our build scripts can fail because we need to
pnpm install. For turbo to be a one-stop shop, it would be ideal ifpnpm installwas a pre-req. Almost every turbo task has a dependency onpnpm install.Describe the solution you'd like
Turborepo knows when the lockfile has changed (I think this is part of the cache invalidation?), so it seems to follow that I should be able to define a
buildtask that depends onpnpm installbeing run, and (maybe?) it should be able to be cached if the lockfile has not changed.Describe alternatives you've considered
🤷🏼 ?
WEB-957
TURBO-1143
Beta Was this translation helpful? Give feedback.
All reactions