Skip to content
This repository was archived by the owner on Dec 19, 2024. It is now read-only.

Implement flow support for unsaved docs as per #84#88

Merged
orta merged 6 commits intoflow:masterfrom
Gozala:try
Mar 16, 2017
Merged

Implement flow support for unsaved docs as per #84#88
orta merged 6 commits intoflow:masterfrom
Gozala:try

Conversation

@Gozala
Copy link
Copy Markdown
Contributor

@Gozala Gozala commented Mar 16, 2017

Implement flow support for unsaved docs as per #84

  • Add playground/.flowconfig blank file to workaround flow’s requirement to have .flowconfig file (see Use defaults when no .flowconfig present facebook/flow#389)
  • Add playground/try.js blank file that will be used as file parameter when running flow check-contents so that playground will be treated as project root & defaults will be used for flow configuration.
  • Made changes to flowDiagnostics module so that untitled js documents with @flow pragma are type checked with flow similar to how flowptype.org/try does it.

P.S.: This pull is based off #87 so relevant changes are starting from c5aa338

Gozala added 6 commits March 14, 2017 17:08
- `isWatching` got deprecated in favor of `isBackground`.
- latest vscode does not recognizes version `0.3.2`.
- Adds status indicator inspired by one in vscode-jest, that is shown spinner when flow is type busy.
- Adds `flow.showStatus` setting so that status indicator can be disabled if not desired.
- Add `playground/.flowconfig` blank file to workaround flow’s requirement to have `.flowconfig` file (see facebook/flow#389)
- Add `playground/try.js` blank file that will be used as file parameter when running `flow check-contents` so that `playground` will be treated as project root & defaults will be used for flow configuration.
- Made changes to flowDiagnostics module so that untitled js documents with @flow pragma are type checked with flow similar to how flowptype.org/try does it.
Comment thread lib/utils/util.js
export function hasFlowPragma(content:string) {
const hasPragma =
content.startsWith('/* @flow */') ||
content.startsWith('// @flow\n') ||
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

these two are a nice touch

@orta
Copy link
Copy Markdown
Contributor

orta commented Mar 16, 2017

Yeah, this all looks 👍 to me - I'm currently on my honeymoon, so don't really have time to set it up and test all these changes locally. Can anyone watching the repo give this PR a whirl, mainly to confirm everything feels good?

@Gozala any chance you can add some quick notes in the CHANGELOG for your last 2 PRs and this?

Thanks - these have been some great contributions

@Gozala
Copy link
Copy Markdown
Contributor Author

Gozala commented Mar 16, 2017

Yeah, this all looks 👍 to me - I'm currently on my honeymoon, so don't really have time to set it up and test all these changes locally

That's too many reviews for the honeymoon :)

@Gozala any chance you can add some quick notes in the CHANGELOG for your last 2 PRs and this?

Sure I'll make a separate pull request for that.

Thanks - these have been some great contributions

Happy to help, especially since it directly impacts my productivity 😉

Gozala added a commit to Gozala/flow-for-vscode that referenced this pull request Mar 16, 2017
orta added a commit that referenced this pull request Mar 16, 2017
Describe changes from #85 #87 #88 in changelog
@orta
Copy link
Copy Markdown
Contributor

orta commented Mar 16, 2017

Hah, yeah, but my wife likes to sleep a lot - so I get some time to keep juggling all the OSS balls.

@orta
Copy link
Copy Markdown
Contributor

orta commented Mar 16, 2017

Alright, this is looking good to me. I've given it a test run, and verified all of the pervious behaviour. Feels great 👍

screen shot 2017-03-17 at 07 36 56

@orta orta merged commit edb8c54 into flow:master Mar 16, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants