Skip to content

Abstract away NODE_OPTIONS exp. await flag for console#1603

Closed
jtoar wants to merge 2 commits intomainfrom
ds-rw-console-top-level-await
Closed

Abstract away NODE_OPTIONS exp. await flag for console#1603
jtoar wants to merge 2 commits intomainfrom
ds-rw-console-top-level-await

Conversation

@jtoar
Copy link
Copy Markdown
Contributor

@jtoar jtoar commented Jan 7, 2021

The console command requires the NODE_OPTIONS env var to be set to --experimental-repl-await. This PR makes it so that the console command spawns an execa child process to configure it automatically so that users don't have to.

This solution's based on the comment here: nodejs/node#13209 (comment).

@github-actions
Copy link
Copy Markdown

github-actions Bot commented Jan 7, 2021

📦 Packages for this PR can be downloaded from
https://rw-pr-redwoodjs-com.s3.amazonaws.com/1603/create-redwood-app-0.21.0-fcd64f1.tgz
https://rw-pr-redwoodjs-com.s3.amazonaws.com/1603/redwoodjs-api-0.21.0-fcd64f1.tgz
https://rw-pr-redwoodjs-com.s3.amazonaws.com/1603/redwoodjs-api-server-0.21.0-fcd64f1.tgz
https://rw-pr-redwoodjs-com.s3.amazonaws.com/1603/redwoodjs-auth-0.21.0-fcd64f1.tgz
https://rw-pr-redwoodjs-com.s3.amazonaws.com/1603/redwoodjs-cli-0.21.0-fcd64f1.tgz
https://rw-pr-redwoodjs-com.s3.amazonaws.com/1603/redwoodjs-core-0.21.0-fcd64f1.tgz
https://rw-pr-redwoodjs-com.s3.amazonaws.com/1603/redwoodjs-dev-server-0.21.0-fcd64f1.tgz
https://rw-pr-redwoodjs-com.s3.amazonaws.com/1603/redwoodjs-eslint-config-0.21.0-fcd64f1.tgz
https://rw-pr-redwoodjs-com.s3.amazonaws.com/1603/redwoodjs-eslint-plugin-redwood-0.21.0-fcd64f1.tgz
https://rw-pr-redwoodjs-com.s3.amazonaws.com/1603/redwoodjs-forms-0.21.0-fcd64f1.tgz
https://rw-pr-redwoodjs-com.s3.amazonaws.com/1603/redwoodjs-internal-0.21.0-fcd64f1.tgz
https://rw-pr-redwoodjs-com.s3.amazonaws.com/1603/redwoodjs-router-0.21.0-fcd64f1.tgz
https://rw-pr-redwoodjs-com.s3.amazonaws.com/1603/redwoodjs-structure-0.21.0-fcd64f1.tgz
https://rw-pr-redwoodjs-com.s3.amazonaws.com/1603/redwoodjs-testing-0.21.0-fcd64f1.tgz
https://rw-pr-redwoodjs-com.s3.amazonaws.com/1603/redwoodjs-web-0.21.0-fcd64f1.tgz

Install this PR by running yarn rw upgrade --pr 1603:0.21.0-fcd64f1

@thedavidprice
Copy link
Copy Markdown
Contributor

Current Issues:

  • in case of no existing Prisma Client, rw console will throw
  • seems to auto-execute the repl every time CLI commands are run

Most likely need to resolve post the release of v0.22. Hold off on promotion and including in Tutorial 2 until fixed and in a release.

@thedavidprice thedavidprice requested a review from peterp January 7, 2021 16:19
@thedavidprice
Copy link
Copy Markdown
Contributor

@peterp This is a weird one all around. Could you take a look and see if you have some ideas for how to better approach in general?

@peterp
Copy link
Copy Markdown
Member

peterp commented Jan 12, 2021

@jtoar I think we can close this now?

@peterp
Copy link
Copy Markdown
Member

peterp commented Jan 17, 2021

Closing this because we merged something else in #1619

@peterp peterp closed this Jan 17, 2021
@thedavidprice thedavidprice deleted the ds-rw-console-top-level-await branch January 18, 2021 05:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants