Skip to content
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

Fix ProcessOptions interface #1902

Merged
merged 1 commit into from Dec 2, 2023
Merged

Fix ProcessOptions interface #1902

merged 1 commit into from Dec 2, 2023

Conversation

ferreira-tb
Copy link
Contributor

If I do something like:

const result = await postcss([plugin1, plugin2]).process(css)

This would correctly log the warning below:

Without `from` option PostCSS could generate wrong source map and will not find Browserslist config. Set it to CSS file path or to `undefined` to prevent this warning.

As explained, changing to process(css, { from: undefined }) prevent the warning. However, when exactOptionalPropertyTypes is set to true in the tsconfig.json it's not possible to do that at all, as undefined wouldn't be an allowed type.

TSConfig Reference: exactOptionalPropertyTypes

This PR only adds undefined to the type.

@ai
Copy link
Member

ai commented Dec 1, 2023

LGTM. I will release it tomorrow.

@ai ai merged commit 1918533 into postcss:main Dec 2, 2023
7 checks passed
@ai
Copy link
Member

ai commented Dec 2, 2023

Thanks. Released at 8.4.32.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants