-
Notifications
You must be signed in to change notification settings - Fork 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
Update test harness #7523
Update test harness #7523
Conversation
Render tests are failing due to Chrome version update. Some of the visual differences are not trivial; I need more time to investigate. |
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.
Impressive effort!
However, two things stand out as particularly problematic
- the patches, this doesn't seem like something we should be dealing with if at all possible
- the extensive changes to the jupyter module, which I really would like to see as a separate PR. Given the low amount of maintainer bandwidth that component has, I would prefer for work there to be isolated and carefully reviewed rather than shoehorned in via a monster infrastructure PR.
const deck = globalThis.deck || {}; | ||
|
||
// Check if peer dependencies are included | ||
if (!deck.LineLayer) { | ||
throw new Error('@deck.gl/layers is not found'); | ||
} | ||
|
||
module.exports = Object.assign(deck, deckGLLayers); | ||
export default Object.assign(deck, deckglAggregationLayers); |
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.
Maybe this comment is best resolved at a later stage by creating two separate bundle.ts scripts, but...
I think we should aim to build scripts that support the new dynamic import
script syntax. And if so a default export is not what one would expect from such a "type: module" script. That module should only export its actual symbols.
Also splitting the side effect (Object.assign
) from the export would be a little clearer as they are quite different.
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 can test it. The bundles are not currently used via require()
anyways, but via the global window.deck
object.
@@ -27,7 +27,7 @@ | |||
], | |||
"sideEffects": false, | |||
"scripts": { | |||
"build-debugger": "webpack ./bundle/debug.js -p -o ./debug.min.js --config ../../scripts/bundle.config.js", | |||
"build-debugger": "webpack ./bundle/debug.ts -p -o ./debug.min.js --config ../../scripts/bundle.config.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.
Interesting, what does build-debugger
do?
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.
modules/core/src/lib/init.ts
Outdated
@@ -25,17 +25,19 @@ import log from '../utils/log'; | |||
import {register} from '../debug'; | |||
import jsonLoader from '../utils/json-loader'; | |||
|
|||
const _global: any = globalThis; |
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.
This does not look right. You should be able to declare global
or just use globalThis['DECK_VERSION']
.
43393bb
to
79f4271
Compare
79f4271
to
b39d6cf
Compare
b39d6cf
to
5e39d82
Compare
|
||
let failed = false; | ||
// @ts-expect-error browserTestDriver_finish injected by BrowserTestDriver |
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.
Nit for later: Might be nice to get rid of the ts-expect-errors here?
declare global {
var browserTestDriver_fail: any; // Or maybe better function type.
...
}
With this PR:
ts-node
instead of@babel/register
, which gives us type check and behavior more consistent with the TS specvite
instead ofwebpack
. It is much faster and again better with type checks. The eventual goal is to move away from the outdated webpack 4 dependency.There is a lot happening here, see a summary below.
Change List
ocular-dev-tools
,react
,probe.gl
require()
calls from source and tests.vite
does not polyfill the browser environment as aggressively aswebpack
)d3
andtiny-sdf
are oftype: 'module'
and cannot be imported from commonjs under Node.ts-node
has experimental support for esm modules, however module aliasing does not work yet. For now I'm patching these packages locally to add a cjs entry point.