Skip to content

Resolve promises in the console#1619

Merged
thedavidprice merged 3 commits intomainfrom
ds-console-await-promises
Jan 12, 2021
Merged

Resolve promises in the console#1619
thedavidprice merged 3 commits intomainfrom
ds-console-await-promises

Conversation

@jtoar
Copy link
Copy Markdown
Contributor

@jtoar jtoar commented Jan 9, 2021

Another way of abstracting away the need for top-level await in the redwood console, by automatically resolving promises (cc @mojombo from today's contributor's meetup).

A really nice copy-paste fix I took from the resources referenced in #1613 (comment) ("hack the eval").

Also tagging @peterp just in case you want to take a look at this one too. Guled brought up the good point that even if we enable top-level await, it might be annoying to have to type "await ..." all the time.

@github-actions
Copy link
Copy Markdown

github-actions Bot commented Jan 9, 2021

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

Install this PR by running yarn rw upgrade --pr 1619:0.22.1-2f94a00

@peterp
Copy link
Copy Markdown
Member

peterp commented Jan 9, 2021

Nice!

Comment thread packages/cli/src/commands/console.js
@thedavidprice thedavidprice merged commit c6adf9d into main Jan 12, 2021
@thedavidprice thedavidprice deleted the ds-console-await-promises branch January 12, 2021 23:11
@thedavidprice thedavidprice added this to the next release milestone Jan 12, 2021
dac09 added a commit to dac09/redwood that referenced this pull request Jan 14, 2021
…ender-p1

* 'main' of github.com:redwoodjs/redwood:
  v0.23.0
  GH Action PR Comment: Formatting
  add learn.rwjs.com repo to contributors (redwoodjs#1634)
  update PR Package Action formatting
  Updated All-Contributors Data (redwoodjs#1621)
  sync yarn.lock (redwoodjs#1632)
  Resolve promises in the console (redwoodjs#1619)
  Replace prisma deprecated fineOne() -> findUnique() (redwoodjs#1629)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants