-
Notifications
You must be signed in to change notification settings - Fork 9.4k
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
[chrome-launcher] Publish type definitions instead of source TypeScript files #2898
[chrome-launcher] Publish type definitions instead of source TypeScript files #2898
Conversation
094d879
to
0368c62
Compare
I agree with publishing the |
lgtm. thanks! |
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.
looks like formatting needs to be done for this change. Can fix with cd chrome-launcher && yarn format
(and can check locally that it worked with yarn test-launcher-formatting
)
Yeah, I actually noticed that my change to .npmignore would ignore the I wasn't seeing the formatting error locally, but I actually realized that it's because of a similar globbing issue: the current |
0368c62
to
dcb9474
Compare
@brendankenny I just added a change to I've also updated my commit that touched |
So one final thought: I should probably also update the chrome-launcher I see two options here:
EDIT: I was mistaken. node-glob doesn't have any more options to negate patterns than standard shell file-expansion. I'll go ahead and implement the first option. |
Alright. I just did the first option, though I didn't make a shared function. Apparently importing scripts with a relative path is not a solved problem in bash, and I don't feel like going down that rabbit hole right now. |
cc98521
to
0365137
Compare
@samccone can you take another look? |
@samccone I ran |
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.
Thanks for making this fix! LGTM
…pt files (GoogleChrome/lighthouse#2898) * install rimraf types * enable outputting declaration files * disable publishing typescript files * do not check formatting of d.ts files * do not format d.ts files
This should fix #2896 and reduce errors caused by different ts versions, ts configs, and ts declaration file versions.
In general, this PR enables the option in chrome-launcher's tsconfig to produce declaration files and updates the .npmignore to ignore
.ts
files.One additional change was the addition of the
@types/rimraf
package. This had to be done, as the compiler was complaining about exporting a private type.