-
Notifications
You must be signed in to change notification settings - Fork 2.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
📦 Switch to Yarn workspaces; overhaul build system #1741
Conversation
I think our version of webpack doesn't like resolving |
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.
love where this is going! mostly got some questions about reasoning behind some of these changes
package.json
Outdated
"tslint-react": "^3.2.0", | ||
"typescript": "~2.2.1", | ||
"typescript": "~2.4.2", |
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.
😱 hooray! is this a safe change for .d.ts compatibility?
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.
Should be safe since we're not using new features, but there are no guarantees. I would just highlight the small chance of breaking syntax in the release notes and if something does come up, file it as a low priority issue to fix in the future. I don't want to wait until the next major version to upgrade typescript.
this.timeoutIds.push(handle); | ||
return () => clearTimeout(handle); | ||
return () => window.clearTimeout(handle); |
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.
curious: why add the window
reference?
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.
with dependency hoisting, we get @types/node
at the root. the global setTimeout
resolves to node's setTimeout
before it sees window.setTimeout
in lib.d.ts. so we make this more explicit
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.
would be cool to add a code comment to that effect
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.
it's pretty obvious when you make the mistake. it's a compile error. the typedef takes you to a different file. not going to add a comment
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.
what do you think about tslint ban
ning non-window references to set/clearTimeout/Interval
? particularly clearTimeout
, which does not produce a compiler error.
@@ -29,13 +29,6 @@ describe("<Callout>", () => { | |||
assert.isTrue(wrapper.hasClass(Classes.INTENT_DANGER)); | |||
}); | |||
|
|||
it("spreads HTML props", () => { |
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 remove this test?
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.
I didn't find it very useful, and it was using invalid HTML props
@@ -14,7 +14,7 @@ const Heading: React.SFC<IHeadingTag> = ({ level, route, value }) => | |||
React.createElement( | |||
`h${level}`, | |||
{ className: "docs-title" }, | |||
<a className="docs-anchor" key="anchor" name={route} />, |
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.
wait I think this attribute is critical to functionality! there's a selector that checks the name
attr (although something is currently broken #1682)
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.
name
is not a valid HTML anchor attribute according to the latest lib.d.ts
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.
data-name
then please
@@ -1,5 +1,5 @@ | |||
{ | |||
"name": "blueprintjs.com/docs", | |||
"name": "@blueprintjs/site-docs", |
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.
idea behind the previous name was that it's obvious that the package is not published. I'm sure you ran into the issue where /
is an invalid char in yarn package names. how about blueprintjs.com-docs
?
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.
I find it weird that this monorepo doesn't follow the standard of using a single NPM scope. "private": true
should make that publishing fact obvious enough.
|
||
// borrowed from https://github.com/TypeStrong/ts-loader | ||
|
||
declare var require: { |
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.
awesome that we can delete this! where does the type info come from now?
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.
@types/node
at the root
"@types/react": "^16.0.14", | ||
"@types/react-addons-css-transition-group": "^15.0.3", | ||
"@types/react-addons-transition-group": "^15.0.1", | ||
"@types/react-dom": "^16.0.1", |
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.
🎆 awesome sauce! although might it be more accurate to use the latest 15.x types instead?
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.
The types are basically the same and it's much easier to upgrade everything to latest; we won't be able to use new features at runtime anyway since we run react 15 in development.
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.
definitely buy the upgrade/similarity arguments, but my concern with this change is that new features are available at compile time but not at run time.
if you're not concerned then I'm chill.
remove localResolve support -- not necessary with hoisting
@adidahiya I think the build stuff is now in a good state here! Tasks are working and development is possible. Now, all that remains should be some test fixes to get a passing build! @cmslewis would you mind contributing fixes for the table tests? |
recent changes lgtm |
Comment out broken tests :/Preview: documentation | landing | table |
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.
is it safe for me to approve this?
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.
not safe, as docs site does not load (table and landing are good though)
# Conflicts: # packages/site-docs/src/require-shim.d.ts # packages/site-landing/src/require-shim.d.ts # packages/table/preview/require-shim.d.ts
Merge remote-tracking branch 'origin/master' into ad/workspacesPreview: documentation | landing | table |
Merge remote-tracking branch 'origin/master' into ad/workspacesPreview: documentation | landing | table |
Remove Gulpfile.jsPreview: documentation | landing | table |
ready to go |
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.
🔥
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.
🚢 🚢 🚢 🚢 🚢 🚢 🚢 🚢 🚢
Fixes #1031.
Fixes #116.
Fixes #436.
Fixes #1527.
Fixes #780.
See #1786 for more details about the build system overhaul.
Changes proposed in this pull request:
engines
inpackage.json
because this all probably still works in Node 6... (no it's not worth testing for it in CI, if we get bug report we can just bumpengines
to the range we care about)