-
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
Changes from 8 commits
1b33ffb
738f313
a73de92
cc924a2
9cf4847
ea85b65
0d7765e
9e88abe
567f51f
2e6b4a4
80efeb3
57a6ee0
0670962
2eaa4f4
ddc54b0
a127b30
acac406
dba77e7
9efda93
057f1de
98bcc9c
285f318
33f5eba
ab3b459
83ffd5e
1a3d563
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
workspace-experimental true |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,6 @@ | ||
{ | ||
"lerna": "2.0.0", | ||
"lerna": "2.4.0", | ||
"npmClient": "yarn", | ||
"useWorkspaces": true, | ||
"version": "independent" | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,6 +3,9 @@ | |
"version": "1.32.0", | ||
"private": true, | ||
"description": "A React UI toolkit for the web.", | ||
"workspaces": [ | ||
"packages/*" | ||
], | ||
"scripts": { | ||
"bootstrap": "lerna bootstrap", | ||
"build:landing": "(cd packages/site-landing; npm run build)", | ||
|
@@ -16,23 +19,23 @@ | |
"serve": "http-server docs" | ||
}, | ||
"dependencies": { | ||
"@types/assertion-error": "1.0.30", | ||
"@types/chai": "3.5.2", | ||
"@types/classnames": "0.0.31", | ||
"@types/dom4": "1.5.20", | ||
"@types/enzyme": "2.8.0", | ||
"@types/mocha": "2.2.32", | ||
"@types/pure-render-decorator": "0.2.27", | ||
"@types/react": "0.14.40", | ||
"@types/react-addons-css-transition-group": "0.14.17", | ||
"@types/react-addons-transition-group": "0.14.17", | ||
"@types/react-dom": "15.5.0", | ||
"@types/tether": "1.1.27", | ||
"autoprefixer": "^7.1.2", | ||
"@types/assertion-error": "^1.0.30", | ||
"@types/chai": "^4.0.4", | ||
"@types/classnames": "^2.2.3", | ||
"@types/dom4": "^1.5.20", | ||
"@types/enzyme": "^2.8.0", | ||
"@types/mocha": "^2.2.43", | ||
"@types/pure-render-decorator": "^0.2.28", | ||
"@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", | ||
"@types/tether": "^1.4.3", | ||
"autoprefixer": "^7.1.5", | ||
"better-handlebars": "github:wmeldon/better-handlebars", | ||
"chai": "^4.1.0", | ||
"chai": "^4.1.2", | ||
"del": "^3.0.0", | ||
"documentalist": "^0.0.6", | ||
"documentalist": "^0.0.8", | ||
"enzyme": "^2.9.1", | ||
"gulp": "^3.9.1", | ||
"gulp-concat": "^2.6.1", | ||
|
@@ -46,60 +49,60 @@ | |
"gulp-rename": "^1.2.2", | ||
"gulp-replace": "^0.6.1", | ||
"gulp-sass": "^3.1.0", | ||
"gulp-sourcemaps": "^2.6.0", | ||
"gulp-sourcemaps": "^2.6.1", | ||
"gulp-strip-css-comments": "^1.2.0", | ||
"gulp-stylelint": "^4.0.0", | ||
"gulp-stylelint": "^5.0.0", | ||
"gulp-tslint": "^8.1.2", | ||
"gulp-typescript": "^3.2.1", | ||
"gulp-typescript": "^3.2.2", | ||
"gulp-util": "^3.0.8", | ||
"highlights": "^3.0.1", | ||
"http-server": "^0.10.0", | ||
"istanbul-instrumenter-loader": "^0.2.0", | ||
"json-loader": "^0.5.4", | ||
"karma": "^1.7.0", | ||
"istanbul-instrumenter-loader": "^3.0.0", | ||
"json-loader": "^0.5.7", | ||
"karma": "^1.7.1", | ||
"karma-chai": "^0.1.0", | ||
"karma-chrome-launcher": "^2.2.0", | ||
"karma-coverage": "^1.1.1", | ||
"karma-firefox-launcher": "^1.0.1", | ||
"karma-mocha": "^1.3.0", | ||
"karma-mocha-reporter": "^2.2.3", | ||
"karma-mocha-reporter": "^2.2.5", | ||
"karma-phantomjs-launcher": "^1.0.4", | ||
"karma-phantomjs-shim": "^1.4.0", | ||
"karma-phantomjs-shim": "^1.5.0", | ||
"karma-sinon": "^1.0.5", | ||
"karma-sourcemap-loader": "^0.3.7", | ||
"karma-webpack": "^2.0.4", | ||
"karma-webpack": "^2.0.5", | ||
"language-less": "github:atom/language-less", | ||
"language-typescript": "github:giladgray/language-typescript#10.1.15", | ||
"lerna": "^2.0.0", | ||
"lerna": "^2.4.0", | ||
"lodash": "^4.17.4", | ||
"marked": "^0.3.6", | ||
"merge-stream": "^1.0.1", | ||
"mocha": "^3.4.2", | ||
"mocha": "^4.0.1", | ||
"node-sass-package-importer": "^3.0.4", | ||
"npm-run-all": "^4.0.2", | ||
"phantomjs-prebuilt": "^2.1.14", | ||
"postcss-import": "^10.0.0", | ||
"postcss-url": "^7.1.1", | ||
"prettier": "^1.7.0", | ||
"npm-run-all": "^4.1.1", | ||
"phantomjs-prebuilt": "^2.1.15", | ||
"postcss-import": "^11.0.0", | ||
"postcss-url": "^7.1.2", | ||
"prettier": "^1.7.4", | ||
"react": "^15.5.1", | ||
"react-dom": "^15.5.1", | ||
"react-test-renderer": "^15.5.4", | ||
"run-sequence": "^2.0.0", | ||
"run-sequence": "^2.2.0", | ||
"sinon": "^1.17.6", | ||
"sorted-object": "^2.0.1", | ||
"source-map-loader": "^0.2.1", | ||
"source-map-loader": "^0.2.2", | ||
"string-replace-loader": "^1.3.0", | ||
"stylelint": "^8.0.0", | ||
"stylelint": "^8.2.0", | ||
"stylelint-config-palantir": "^2.1.0", | ||
"stylelint-config-standard": "^17.0.0", | ||
"stylelint-scss": "^1.5.1", | ||
"ts-loader": "^1.3.3", | ||
"ts-quick-docs": "^0.5.1", | ||
"stylelint-scss": "^2.1.0", | ||
"ts-loader": "^3.0.3", | ||
"ts-quick-docs": "^0.5.3", | ||
"tslint": "^5.7.0", | ||
"tslint-config-prettier": "^1.5.0", | ||
"tslint-plugin-prettier": "^1.1.0", | ||
"tslint-config-prettier": "^1.6.0", | ||
"tslint-plugin-prettier": "^1.3.0", | ||
"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 commentThe 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 commentThe 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. |
||
"vinyl-source-stream": "^1.1.0", | ||
"webpack": "^1.13.2" | ||
}, | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -42,9 +42,9 @@ export abstract class AbstractComponent<P, S> extends React.Component<P, S> { | |
* @returns a "cancel" function that will clear timeout when invoked. | ||
*/ | ||
public setTimeout(callback: () => void, timeout?: number) { | ||
const handle = setTimeout(callback, timeout); | ||
const handle = window.setTimeout(callback, timeout); | ||
this.timeoutIds.push(handle); | ||
return () => clearTimeout(handle); | ||
return () => window.clearTimeout(handle); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. curious: why add the There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. with dependency hoisting, we get There was a problem hiding this comment. Choose a reason for hiding this commentThe 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 commentThe 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 commentThe reason will be displayed to describe this comment to others. Learn more. what do you think about tslint |
||
} | ||
|
||
/** | ||
|
@@ -53,7 +53,7 @@ export abstract class AbstractComponent<P, S> extends React.Component<P, S> { | |
public clearTimeouts = () => { | ||
if (this.timeoutIds.length > 0) { | ||
for (const timeoutId of this.timeoutIds) { | ||
clearTimeout(timeoutId); | ||
window.clearTimeout(timeoutId); | ||
} | ||
this.timeoutIds = []; | ||
} | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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 commentThe 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 commentThe 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 |
||
const onClick = sinon.spy(); | ||
const wrapper = shallow(<Callout label="label" onClick={onClick} />); | ||
assert.strictEqual(wrapper.prop("label"), "label"); | ||
assert.strictEqual(wrapper.prop("onClick"), onClick); | ||
}); | ||
|
||
it("renders optional title element", () => { | ||
const title = "I am the title"; | ||
const wrapper = shallow(<Callout title={title} />); | ||
|
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.