-
Notifications
You must be signed in to change notification settings - Fork 2.6k
Conversation
@@ -90,6 +92,7 @@ | |||
"<rootDir>/node_modules/fbjs/lib/UserAgentData.js", | |||
"<rootDir>/node_modules/fbjs-scripts/", | |||
"<rootDir>/node_modules/immutable/", | |||
"<rootDir>/node_modules/object-assign/", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why did this change?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code now has require('object-assign')
because I brought that plugin over to the preset. Jest will mock that and so a bunch of tests fail.
👍 otherwise. Do you know if there's any difference with the new class helpers? |
It looks like the biggest change is actually that the preset has "loose" classes turned on (which maybe it shouldn't…) but we weren't doing that previously in this project (but we were in most others). So there are probably some subtle things there. |
Hey @zpao I see that your blocking issues facebook/fbjs#147 and facebook/fbjs#148 are merged, is there any way to make this PR work now? |
Seems like the script is missing. I guess the PR is just a little outdated. Really looking forward to get all the flow-types …
|
I merged this with @zpao – did you forget to commit |
I'll be coming back to this shortly. |
@facebook-github-bot import |
Thanks for importing. If you are an FB employee go to Phabricator to review. |
Ideally we'd use something local and based on Babel 6 but that's a bit more work, it looks like there still isn't a drop-in replacement so this will do.
Node 6 and npm 3 appear to work fine, not seeing any issues with Flow nor Jest.
d9a1898
Summary: > I've done this before, it'll only take a few minutes > — zpao, before he realized upgrading Babel was a prereq The main goal here was to generate `.js.flow` files and fix facebookarchive#366. Then I needed to upgrade Babel, which meant using the new fbjs preset, which then needed to be updated as it wasn't as done as we thought since Draft has different considerations than fbjs. So now we need facebook/fbjs#147 and facebook/fbjs#148 to land there and ship before we can take this. The [diff of lib/](https://gist.github.com/zpao/32c511aa1151aef1009eccb4f1cf0a5f) is pretty boring. Mostly it's a result of a few things: - the helpers are different, this is particularly noticeable for classes - code generation around comments got better - previously block comments near rewritten nodes (notably `require`) would be moved but now stay where they should - conversely there are a bunch of newlines being inserted now. win some, lose some. - a few errant `__esModule` markers Closes facebookarchive#389 Reviewed By: hellendag Differential Revision: D3512297 fbshipit-source-id: 440de7b0f8110a850d20aa2dc420fd5638e1878a
Summary: > I've done this before, it'll only take a few minutes > — zpao, before he realized upgrading Babel was a prereq The main goal here was to generate `.js.flow` files and fix #366. Then I needed to upgrade Babel, which meant using the new fbjs preset, which then needed to be updated as it wasn't as done as we thought since Draft has different considerations than fbjs. So now we need facebook/fbjs#147 and facebook/fbjs#148 to land there and ship before we can take this. The [diff of lib/](https://gist.github.com/zpao/32c511aa1151aef1009eccb4f1cf0a5f) is pretty boring. Mostly it's a result of a few things: - the helpers are different, this is particularly noticeable for classes - code generation around comments got better - previously block comments near rewritten nodes (notably `require`) would be moved but now stay where they should - conversely there are a bunch of newlines being inserted now. win some, lose some. - a few errant `__esModule` markers Closes facebookarchive/draft-js#389 Reviewed By: hellendag Differential Revision: D3512297 fbshipit-source-id: 440de7b0f8110a850d20aa2dc420fd5638e1878a
Summary: > I've done this before, it'll only take a few minutes > — zpao, before he realized upgrading Babel was a prereq The main goal here was to generate `.js.flow` files and fix #366. Then I needed to upgrade Babel, which meant using the new fbjs preset, which then needed to be updated as it wasn't as done as we thought since Draft has different considerations than fbjs. So now we need facebook/fbjs#147 and facebook/fbjs#148 to land there and ship before we can take this. The [diff of lib/](https://gist.github.com/zpao/32c511aa1151aef1009eccb4f1cf0a5f) is pretty boring. Mostly it's a result of a few things: - the helpers are different, this is particularly noticeable for classes - code generation around comments got better - previously block comments near rewritten nodes (notably `require`) would be moved but now stay where they should - conversely there are a bunch of newlines being inserted now. win some, lose some. - a few errant `__esModule` markers Closes facebookarchive/draft-js#389 Reviewed By: hellendag Differential Revision: D3512297 fbshipit-source-id: 440de7b0f8110a850d20aa2dc420fd5638e1878a
Summary: > I've done this before, it'll only take a few minutes > — zpao, before he realized upgrading Babel was a prereq The main goal here was to generate `.js.flow` files and fix #366. Then I needed to upgrade Babel, which meant using the new fbjs preset, which then needed to be updated as it wasn't as done as we thought since Draft has different considerations than fbjs. So now we need facebook/fbjs#147 and facebook/fbjs#148 to land there and ship before we can take this. The [diff of lib/](https://gist.github.com/zpao/32c511aa1151aef1009eccb4f1cf0a5f) is pretty boring. Mostly it's a result of a few things: - the helpers are different, this is particularly noticeable for classes - code generation around comments got better - previously block comments near rewritten nodes (notably `require`) would be moved but now stay where they should - conversely there are a bunch of newlines being inserted now. win some, lose some. - a few errant `__esModule` markers Closes facebookarchive/draft-js#389 Reviewed By: hellendag Differential Revision: D3512297 fbshipit-source-id: 440de7b0f8110a850d20aa2dc420fd5638e1878a
The main goal here was to generate
.js.flow
files and fix #366. Then I needed to upgrade Babel, which meant using the new fbjs preset, which then needed to be updated as it wasn't as done as we thought since Draft has different considerations than fbjs. So now we need facebook/fbjs#147 and facebook/fbjs#148 to land there and ship before we can take this.The diff of lib/ is pretty boring. Mostly it's a result of a few things:
require
) would be moved but now stay where they should__esModule
markers are gone, which is good. Looks like those were a result of the type exports being erroneously detected as real exports. This also means that type-only "modules" are now empty. It might be good to filter those out in the future but in the mean time I don't think they hurt except that there are a few more files.