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

Fix: Fixes an error seen with the Configure Fastify codemod for v3-rc #6336

Merged
merged 3 commits into from
Sep 3, 2022

Conversation

dthyresson
Copy link
Contributor

When running

npx @redwoodjs/codemods@canary configure-fastify

Spawning 1 workers...
Sending 1 files to free worker...
⠸ Configure Fastify
 ERR /Users/xxx/redwood.toml Transformation error (Topic reference is used, but the pipelineOperator plugin was not passed a "proposal": "hack" or "smart" option. (1:0))
SyntaxError: Topic reference is used, but the pipelineOperator plugin was not passed a "proposal": "hack" or "smart" option. (1:0)
    at instantiate (/Users/xxx/.npm/_npx/6af5e84efc8d7cdf/node_modules/@babel/parser/lib/index.js:72:32)
    at constructor (/Users/xxx/.npm/_npx/6af5e84efc8d7cdf/node_modules/@babel/parser/lib/index.js:366:12)
    at TypeScriptParserMixin.raise (/Users/xxx/.npm/_npx/6af5e84efc8d7cdf/node_modules/@babel/parser/lib/index.js:3453:19)
    at TypeScriptParserMixin.testTopicReferenceConfiguration (/Users/xxx/.npm/_npx/6af5e84efc8d7cdf/node_modules/@babel/parser/lib/index.js:13322:20)

This was likely due to the codemod trying to use the tool file as a target -- and the tool file has comments # that were being treated as a pipeline operator topic token (perhaps?).

This fix removes the tool from the target.

@dthyresson dthyresson added the release:fix This PR is a fix label Sep 2, 2022
@jtoar jtoar marked this pull request as ready for review September 3, 2022 04:53
@jtoar jtoar enabled auto-merge (squash) September 3, 2022 04:54
@jtoar jtoar merged commit 085f705 into redwoodjs:main Sep 3, 2022
@redwoodjs-bot redwoodjs-bot bot added this to the next-release milestone Sep 3, 2022
jtoar added a commit that referenced this pull request Sep 3, 2022
…#6336)

* Fix codemod error when trying to deal w/ toml

* target api/server.config.{js,ts}, prettify

Co-authored-by: Dominic Saadi <[email protected]>
@dthyresson
Copy link
Contributor Author

Thanks @jtoar !

@jtoar jtoar modified the milestones: next-release, v3.0.0 Sep 14, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
release:fix This PR is a fix
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

2 participants