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
[infra] Remove custom import remapping in tests #2845
Conversation
|
@@ -14,114 +14,142 @@ | |||
"type": "module", | |||
"exports": { | |||
".": { | |||
"types": "./development/lit-html.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.
So does this take the place of having to copy types to the root of the package? Can we remove treemirror now? Or do we still need it for back-compat with older TypeScript versions.
} | ||
|
||
const browserPresets = { | ||
// Default set of Playwright browsers to test when running locally. | ||
local: [ | ||
'chromium', // keep browsers on separate lines | ||
'firefox', // to make it easier to comment out | ||
'webkit', // individual browsers | ||
// 'firefox', // to make it easier to comment out |
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.
Uncomment
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.
Yes, I'm going to put all this back in place. I uploaded and made a draft PR to show what I had done so far and talk about the renaming problem I ran into.
} | ||
|
||
const browserPresets = { | ||
// Default set of Playwright browsers to test when running locally. | ||
local: [ | ||
'chromium', // keep browsers on separate lines | ||
'firefox', // to make it easier to comment out | ||
'webkit', // individual browsers | ||
// 'firefox', // to make it easier to comment out |
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.
Remove debugging comment-outs
@@ -176,12 +172,13 @@ export default { | |||
'../lit-html/development/**/*_test.(js|html)', | |||
'../reactive-element/development/**/*_test.(js|html)', | |||
], | |||
nodeResolve: true, | |||
nodeResolve: { | |||
exportConditions: [exportCondition], |
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!
@@ -1,57 +0,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.
I think this file is referenced in a bunch of Wireit dependencies, can all be removed now.
@@ -862,7 +864,7 @@ suite('lit-html', () => { | |||
}); | |||
|
|||
test.skip('renders a Symbol to an attribute', () => { | |||
render(html`<div foo=${Symbol('A')}></div>`, container); | |||
render(html`<div foo=${Symbol('A') as any}></div>`, container); |
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 do we need the cast 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.
Something with TS 4.7
@@ -19,6 +19,11 @@ import { | |||
} from './lit-html.js'; | |||
export type {Template} from './lit-html.js'; | |||
|
|||
const DEV_MODE = true; | |||
|
|||
console.log('DEV_MODE', DEV_MODE); |
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.
Remove debugging
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 will when this is ready to go
@@ -19,6 +19,11 @@ import { | |||
} from './lit-html.js'; | |||
export type {Template} from './lit-html.js'; | |||
|
|||
const DEV_MODE = true; | |||
|
|||
console.log('DEV_MODE', DEV_MODE); |
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.
Remove debugging
packages/lit-html/package.json
Outdated
@@ -264,7 +292,7 @@ | |||
"output": [] | |||
}, | |||
"test:prod": { | |||
"command": "MODE=prod node ../tests/run-web-tests.js \"development/**/*_test.(js|html)\" --config ../tests/web-test-runner.config.js", | |||
"command": "MODE=prod node ../tests/run-web-tests.js \"development/**/lit-html_test.js\" --config ../tests/web-test-runner.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.
Is this debugging? We want to keep the *
.
@@ -58,7 +58,7 @@ | |||
} | |||
], | |||
"settings": { | |||
"typescript.tsdk": "node_modules/typescript/lib", | |||
"typescript.tsdk": "lit-html/node_modules/typescript/lib", |
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.
Debugging?
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 is just so I don't see errors in VS code that aren't there when building due to the difference TS versions. If we can figure out the renaming issue, this I would upgrade the rest of the repo. This wouldn't be merged as-is.
Superseded by #3132 |
Attempts to fix #2844 for just the lit-html package.
There's a perplexing problem with
private-ssr-support.js
though, where the identifiers it uses to pull off values from lit-html's private exports object (_$LH
) are being minified differently than the identifiers inlit-html.js
, leading toprivate-ssr-support.js
export object having incorrect values.