Skip to content

Conversation

@bvaughn
Copy link
Contributor

@bvaughn bvaughn commented Sep 3, 2018

This is mostly all rote search-and-replace.

The only commit that seems sketchy is the last one– c84b3d6. I couldn't get our packages or suspense fixtures to install correctly. Yarn seemed to want to pull the schedule dependency from NPM even though I'd told it to install the local version. This resulted in two packages being installed: one in node_modules and one in node_modules/react-dom/node_modules. So I added a pre script to remove the redundant one.

We can also test our fixtures without this hack by publishing schedule version 0.2.0 to NPM (which will also unblock the React Native sync).

I'm going to step away for a bit (holiday in the US) but I'll check back later... 😄

"scripts": {
"build": "rm -f output.js && browserify ./input.js -o output.js"
"build": "rm -f output.js && browserify ./input.js -o output.js",
"prebuild": "rm -rf ./node_modules/react-dom/node_modules/schedule"
Copy link
Collaborator

Choose a reason for hiding this comment

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

Sketchy. :/ If we can't figure out how to make Yarn work with this, let's just remove dependencies completely, and then make this cp -r ../../../../build/node_modules/* ./node_modules/?

@pull-bot
Copy link

pull-bot commented Sep 3, 2018

Details of bundled changes.

Comparing: 8a1e396...f2132a7

schedule

File Filesize Diff Gzip Diff Prev Size Current Size Prev Gzip Current Gzip ENV
schedule.development.js n/a n/a 0 B 19.17 KB 0 B 5.74 KB UMD_DEV
schedule.production.min.js n/a n/a 0 B 3.16 KB 0 B 1.53 KB UMD_PROD
schedule.development.js n/a n/a 0 B 15.34 KB 0 B 4.61 KB NODE_DEV
schedule.production.min.js n/a n/a 0 B 2.78 KB 0 B 1.22 KB NODE_PROD
Schedule-dev.js n/a n/a 0 B 15.57 KB 0 B 4.66 KB FB_WWW_DEV
Schedule-prod.js n/a n/a 0 B 7.72 KB 0 B 1.9 KB FB_WWW_PROD
schedule-tracking.development.js n/a n/a 0 B 10.83 KB 0 B 2.62 KB NODE_DEV
schedule-tracking.production.min.js n/a n/a 0 B 765 B 0 B 386 B NODE_PROD
schedule-tracking.profiling.min.js n/a n/a 0 B 2.89 KB 0 B 997 B NODE_PROFILING
ScheduleTracking-dev.js n/a n/a 0 B 10.43 KB 0 B 2.35 KB FB_WWW_DEV
ScheduleTracking-prod.js n/a n/a 0 B 949 B 0 B 428 B FB_WWW_PROD
ScheduleTracking-profiling.js n/a n/a 0 B 6.8 KB 0 B 1.25 KB FB_WWW_PROFILING

Generated by 🚫 dangerJS

@bvaughn
Copy link
Contributor Author

bvaughn commented Sep 3, 2018

That's interesting. CI is failing on yarn test-build which definitely works for me locally.

"loose-envify": "^1.1.0",
"object-assign": "^4.1.1",
"prop-types": "^15.6.2",
"react-scheduler": "^0.1.0-alpha-1"
Copy link
Collaborator

Choose a reason for hiding this comment

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

Just wanna confirm this was intentional.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yeah, it was– but I'm not sure it was the right decision. Still poking around locally. May revert this.

Copy link
Collaborator

Choose a reason for hiding this comment

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

If we don't reference it in CJS then it makes sense to me.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I thought so too, but it results in the scheduler methods (e.g. cancelScheduledWork) being embedded in the package, so... I re-added it.

Copy link
Collaborator

Choose a reason for hiding this comment

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

If it embeds scheduler methods it means it always imports them regardless. So this is bad by itself (we don't expect them to be in CJS builds). Are they not getting tree shaken due to init time side effects? This might mean our approach with __UMD__ is not enough and we actually need to fork that file.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The approach seems to be working fine. At least, the bundles look good to me. Removing this dep causes troubles though.

There may be a reasonable explanation. I'm not going to dig into it today though. (Holiday.)

I think this PR is good at this point. The deposit was already there so it's at least not new from this PR.

"version": "0.1.0-alpha-1",
"name": "schedule",
"version": "0.2.0",
"private": true,
Copy link
Collaborator

Choose a reason for hiding this comment

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

Need to remove this flag?

Copy link
Collaborator

@gaearon gaearon left a comment

Choose a reason for hiding this comment

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

ok

@gaearon gaearon merged commit b92f947 into facebook:master Sep 3, 2018
jetoneza pushed a commit to jetoneza/react that referenced this pull request Jan 23, 2019
* Git moved packages/react-scheduler -> packages/schedule

* Global find+replace 'react-scheduler' -> 'schedule'

* Global find+replace 'ReactScheduler' -> 'Scheduler'

* Renamed remaining files "ReactScheduler" -> "Schedule"

* Add thank-you note to schedule package README

* Replaced schedule package versions 0.1.0-alpha-1 -> 0.2.0

* Patched our local fixtures to work around Yarn install issue

* Removed some fixture hacks
NMinhNguyen referenced this pull request in enzymejs/react-shallow-renderer Jan 29, 2020
* Git moved packages/react-scheduler -> packages/schedule

* Global find+replace 'react-scheduler' -> 'schedule'

* Global find+replace 'ReactScheduler' -> 'Scheduler'

* Renamed remaining files "ReactScheduler" -> "Schedule"

* Add thank-you note to schedule package README

* Replaced schedule package versions 0.1.0-alpha-1 -> 0.2.0

* Patched our local fixtures to work around Yarn install issue

* Removed some fixture hacks
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