flow icon indicating copy to clipboard operation
flow copied to clipboard

Add @flowtyped scope resolution before actual Node resolution

Open goodmind opened this issue 6 years ago • 6 comments

Proof of concept for #7750

Issues

  • Depends on flow-typed NPM migration

  • Clashes with (in particular if there would be migration period from old libdefs to .js.flow)

[libs]
node_modules/@flowtyped

goodmind avatar May 24 '19 16:05 goodmind

@nmote this doesn't actually work if this and [libs] .json fix both get merged, because @flowtyped is still using libdefs

goodmind avatar May 25 '19 00:05 goodmind

I tried to implement there this feature request #4917. Not sure how slower this makes dependency resolving, this basically reads package.json on every import

goodmind avatar Jun 02 '19 02:06 goodmind

@jedwards1211 I think you would be interested to check this out?

goodmind avatar Jun 02 '19 02:06 goodmind

Thanks, though I've never found time to learn much OCaml so it's hard for me to tell exactly what this is doing...what do you mean by versioned .js.flow? I didn't see anything in your proposal repo about it

jedwards1211 avatar Jun 03 '19 18:06 jedwards1211

@jedwards1211 check tests in this PR, they're in JS. I still didn't updated proposal, because when I profiled this it increases time of dependency resolution significantly :\

goodmind avatar Jun 04 '19 01:06 goodmind

https://github.com/facebook/flow/tree/d4176e0a9b0487bd1abee050d0db2fba94521bfd/tests/declaration_files_node_versions Particurarly package.json of node_modules

goodmind avatar Jun 04 '19 01:06 goodmind