-
Notifications
You must be signed in to change notification settings - Fork 1k
Get the Analyzer fully running in browsers #4322
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
Conversation
🦋 Changeset detectedLatest commit: 44270f9 The changes in this PR will be included in the next version bump. This PR includes changesets to release 7 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
📊 Tachometer Benchmark ResultsSummarynop-update
render
update
update-reflect
Resultsthis-change
render
update
update-reflect
this-change, tip-of-tree, previous-release
render
update
nop-update
this-change, tip-of-tree, previous-release
render
update
this-change, tip-of-tree, previous-release
render
update
update-reflect
|
|
The size of lit-html.js and lit-core.min.js are as expected. |
rictic
left 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.
Do we want to remove NodeJS typings from the analyzer package? Or only make them available in specific files?
That wouldn't help with typescript.sys but hopefully we won't run into that again
| "noImplicitOverride": true, | ||
| "skipLibCheck": true, | ||
| "types": ["node"] | ||
| "types": ["node", "mocha"] |
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 think ultimately the safest thing here would be to have separate tsconfigs:
- The main library code, no node typings
- The node test code and package-analyzer function, with node typings
- Maybe a third with browser typings if they were needed in browser tests.
Not having Node typings would have caught the place where we imported path.
kevinpschaaf
left 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.
LGTM
Co-authored-by: Augustine Kim <[email protected]>
This PR fixes a few cases where the analyzer was relying on Node-specific behavior, so that the analyzer can now run cleanly in browsers.
To test this the PR creates separate test:server and test:browser scripts where the browser test uses a Rollup-built JS module for typescript and a copy of the server tests' InMemoryAnalyzer itself with some fixes for running outside node.
The InMemoryAnalyzer code is a bit messy, but it's test code. I think we should probably offer a supported InMemoryAnalyzer at some point, derived from out test versions.
The test changes are in the first two commits, the fixes in the third.