Skip to content

Conversation

@romainmenke
Copy link
Member

  • postcss-preset-env and a few more plugins now use the new test suite.
  • fixed sourcemaps in image-set-function
  • some plugins can throw, extended postcss-tape to handle this

I also created an issue to remove these exceptions as it goes against plugin best practices.

AtRule: {
mixin(node, { postcss }) {
node.replaceWith(postcss().process('& .in{ &.deep { color: blue; }}', {from : 'mixin.css'}).root);
node.replaceWith(postcss.parse('& .in{ &.deep { color: blue; }}', {from : 'mixin.css'}));
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This was triggering PostCSS to warn about now having any plugins.
Using .parse resolves this.

const media = postcss.atRule({
name: 'media',
params: `(-webkit-min-device-pixel-ratio: ${dpr}), (min-resolution: ${dpi}dpi)`,
source: decl.source,
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This fixes the sourcemaps issue

Copy link
Member

@Antonio-Laguna Antonio-Laguna left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great!

@romainmenke romainmenke merged commit 14d5db2 into 7.3--philosophical-mayfly-9d15adc344 Jan 21, 2022
@romainmenke romainmenke deleted the apply-new-test-suite-to-more-plugons-and-sourcemap-fix--reliable-fin-whale-a7dbd25e43 branch January 21, 2022 07:46
romainmenke added a commit that referenced this pull request Jan 31, 2022
* 7.3

* add `postcss-is-pseudo-class` to `postcss-preset-env` and `cli` (#159)

* add postcss-is-pseudo-class to preset-env and cli

* add test

* cli : emit warnings (#164)

* cli : emit warnings

* update change log

* Adding debug option (#163)

* Updating dependencies

* Simplifying Object usaging

* Clearer stage

* Adding debug

* Adding documentation

* Useful on issues too

* eslint enforce radix in parseInt

* Naive approach to using result.warn

* Clamping

* Switching for better clarity

* Update plugin-packs/postcss-preset-env/src/index.js

Co-authored-by: Romain Menke <11521496+romainmenke@users.noreply.github.com>

* Update plugin-packs/postcss-preset-env/src/index.js

Co-authored-by: Romain Menke <11521496+romainmenke@users.noreply.github.com>

* 7.3

* add `postcss-is-pseudo-class` to `postcss-preset-env` and `cli` (#159)

* add postcss-is-pseudo-class to preset-env and cli

* add test

* Updating CHANGELOG

* Fixing link

* Fixing changelog

Co-authored-by: romainmenke <romainmenke@gmail.com>
Co-authored-by: Romain Menke <11521496+romainmenke@users.noreply.github.com>

* Disable javascript features (#167)

* Updating dependencies

* Simplifying Object usaging

* Clearer stage

* Adding debug

* Adding documentation

* Useful on issues too

* eslint enforce radix in parseInt

* Naive approach to using result.warn

* Clamping

* Switching for better clarity

* Update plugin-packs/postcss-preset-env/src/index.js

Co-authored-by: Romain Menke <11521496+romainmenke@users.noreply.github.com>

* Update plugin-packs/postcss-preset-env/src/index.js

Co-authored-by: Romain Menke <11521496+romainmenke@users.noreply.github.com>

* 7.3

* add `postcss-is-pseudo-class` to `postcss-preset-env` and `cli` (#159)

* add postcss-is-pseudo-class to preset-env and cli

* add test

* Updating CHANGELOG

* Fixing link

* Fixing changelog

* Moving to separate file

* Adding option that disables client side polyfills

* Adding useful logging to debug mode

* Consistency

* Adding meaningful tests

* Updating README

* Update plugin-packs/postcss-preset-env/README.md

Co-authored-by: Romain Menke <11521496+romainmenke@users.noreply.github.com>

* Adding missing library

Co-authored-by: romainmenke <romainmenke@gmail.com>
Co-authored-by: Romain Menke <11521496+romainmenke@users.noreply.github.com>

* apply new test suite to more plugins and sourcemap fixes

* Revert "apply new test suite to more plugins and sourcemap fixes"

This reverts commit b94037e.

* apply new test suite to more plugins and sourcemap fixes (#182)

* apply new test suite to more plugins and sourcemap fixes

* cleanup dev dependencies

* Removing Can I Use Lite (#185)

* Getting things up to date

* Creating a query for browsers from given browser support

* Updating tests

* Moving to cssdb feature

* Using the new logic with logs too

* Allowing `.` for float versions

* Updating package

* flip disableClientSidePolyfills (#189)

* :any-link fixes (#183)

* :any-link fixes

* update tests

* update tests

* make it work without :is

* postcss-hwb-function in preset-env / cli (#190)

* postcss-hwb-function in preset-env / cli

* add a test for hwb in preset-env

* merge

* add a shortcut to rewrite expect files and log warnings (#193)

* add a shortcut to rewrite expect files

* emit warnings if they don't match

* Adding Opacity Percent Feature (#196)

* Updating badges (#197)

* Replacing all chat badges

* Adding package phobia

#165

* Adding PostCSS clamp (#198)

* Adding postcss-clamp

* Updating CHANGELOG

* New test for preserve: true with every feature enabled

* postcss-is-pseudo-class : better warnings and skip (#199)

* wip

* wip

* wip

* wip

* wip

* finish

* Getting ready-er

* Integrate font & display plugins (#205)

* Adding two new plugins

* Adding missing plugins to the CLI

* postcss-is-pseudo-class : browser tests and transform in 2 stages (#212)

* postcss-is-pseudo-class : browser tests

* postcss-is-pseudo-class: 2 stage transform

* cleanup

* postcss-preset-env: filter features by implementation status (#211)

* postcss-preset-env: filter by implementation status

* tweak

* fix insertBefore/insertAfter

* fix

* few more tests and simplify postcss-tape expect/result option

* fix

* update docs

* postcss-preset-env: pin some features to stage: 1 (#213)

* Adding more to the README (#207)

* Adding more to the README

#202

* Updating docs

* Update plugin-packs/postcss-preset-env/README.md

Co-authored-by: Romain Menke <11521496+romainmenke@users.noreply.github.com>

* Update plugin-packs/postcss-preset-env/README.md

Co-authored-by: Romain Menke <11521496+romainmenke@users.noreply.github.com>

* Update plugin-packs/postcss-preset-env/README.md

Co-authored-by: Romain Menke <11521496+romainmenke@users.noreply.github.com>

* Update plugin-packs/postcss-preset-env/README.md

Co-authored-by: Romain Menke <11521496+romainmenke@users.noreply.github.com>

* Update plugin-packs/postcss-preset-env/README.md

Co-authored-by: Romain Menke <11521496+romainmenke@users.noreply.github.com>

Co-authored-by: Romain Menke <11521496+romainmenke@users.noreply.github.com>

* Updating CSSDB to latest version

* Tests fixing

* Test after building

* Upgrading all deps

* Updating packages

Co-authored-by: Antonio Laguna <sombragriselros@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants