Skip to content

Commit

Permalink
chore(fwtools): handle existing resolutions in tarsync (#9840)
Browse files Browse the repository at this point in the history
Currently there's a `@graphql-codegen` package in canary that doesn't
exist at the published version we have to set a resolution for (see
dotansimha/graphql-code-generator#9808). `yarn
rwfw project:tarsync` overwrites the resolutions, so you have to add it
back after running the command which is annoying. This just makes it add
the tarball resolutions to the existing ones:

```json5
  "resolutions": {
    // This is now preserved
    "@graphql-codegen/visitor-plugin-common": "4.0.1",
    "@redwoodjs/fastify-plugin-streaming": "./tarballs/redwoodjs-fastify-plugin-streaming.tgz",
    "@redwoodjs/api": "./tarballs/redwoodjs-api.tgz",
    "@redwoodjs/api-server": "./tarballs/redwoodjs-api-server.tgz",
    // ...
  }
```
  • Loading branch information
jtoar committed Jan 17, 2024
1 parent 4c9bda1 commit c9426e3
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion tasks/framework-tools/tarsync.mjs
Expand Up @@ -90,7 +90,10 @@ async function main() {
projectPackageJsonPath,
{
...projectPackageJson,
resolutions,
resolutions: {
...projectPackageJson.resolutions,
...resolutions,
},
},
{
spaces: 2,
Expand Down

0 comments on commit c9426e3

Please sign in to comment.