-
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
dom4 v2 + updated polyfills #2043
Conversation
remove table index es6-shim importPreview: documentation | landing | table |
packages/docs-app/src/blueprint.md
Outdated
|
||
- `Map` | ||
- `Set` | ||
- `Array.from` |
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.
👍
@@ -4,8 +4,6 @@ | |||
* Licensed under the terms of the LICENSE file distributed with this project. | |||
*/ | |||
|
|||
import "es6-shim"; |
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.
you need to add polyfills to docs-app and landing-app. I suggest core-js submodules.
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.
truth. we're using es6-shim
in devDeps in every package for tests. should I switch wholesale over to core-js
?
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.
yeah, switch wholesale
[PoC] use core-js instead of es6-shim, test-commons polyfillsPreview: documentation | landing | table |
applyPolyfills() functionPreview: documentation | landing | table |
import * as Enzyme from "enzyme"; | ||
import * as Adapter from "enzyme-adapter-react-16"; | ||
|
||
Enzyme.configure({ adapter: new Adapter() }); |
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.
@adidahiya thoughts?
packages/test-commons/bootstrap.js
Outdated
*/ | ||
|
||
import "./lib/cjs/polyfill"; | ||
import "./lib/cjs/enzymeConfigure" |
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.
added this js file in root rather than reaching into /lib/cjs/
use test-commons/bootstrap in all test suites, remove es6-shim entirelyPreview: documentation | landing | table |
Array.fill polyfill required for tablePreview: 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.
lgtm, just small comments
packages/datetime/package.json
Outdated
@@ -39,9 +39,6 @@ | |||
"@blueprintjs/karma-build-scripts": "^0.4.0", | |||
"@blueprintjs/node-build-scripts": "^0.4.0", | |||
"@blueprintjs/test-commons": "^0.4.0", | |||
"enzyme": "^3.3.0", |
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.
you still need enzyme
here to adhere to no-implicit-dependencies
(which we need to turn on at some point)
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.
just enzyme, right? no adapter?
@@ -0,0 +1,9 @@ | |||
/* |
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.
just inline this into bootstrap.js
* Require the minimal set of ES2015+ polyfills from `core-js` library. | ||
* See "NPM Installation" section of docs homepage for more information. | ||
*/ | ||
import "core-js/fn/array/fill"; |
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.
make this a JS file. no point in compiling this with tsc
bring back enzyme depPreview: documentation | landing | table |
Fixes #2032
Changes proposed in this pull request:
Array.from
andArray.fill
ES2015 polyfills, in addition to already requiredMap/Set
dom4
to v2.0query
=>querySelector
queryAll
=>Array.from(querySelectorAll)
es6-shim
with minimalcore-js
submodulestest-commons/bootstrap
module imports polyfills and configuresenzyme
. imported as first line of all karma suites.