bazelbuild / rules_postcss

PostCSS rules for Bazel
Apache License 2.0
10 stars 13 forks source link

Upgrade to PostCSS 8.x #59

Open rzhw opened 3 years ago

rzhw commented 3 years ago

PostCSS 8.0 was released in September of 2020, and brings performance improvements and reduced node_modules impact.

We should update to use PostCSS 8.x.

Any released version of these build rules should be correspondingly bumped to >= 0.6.0 from our current 0.5.x version.

arlyon commented 3 years ago

I have working changes locally with the following packages:

    "dependencies": {
        "@types/node": "^14.14.14",
        "autoprefixer": "^10.1.0",
        "minimist": "1.2.5",
        "postcss": "^8.0.0",
        "rtlcss": "^3.0.0",
        "typescript": "^4.1.3"
    },
    "devDependencies": {
        "@bazel/typescript": "^2.3.1",
        "@bazel/worker": "^2.0.0"
    }

I am happy to upstream, if I can get some pointers on how to test. I'd like to essentially include my test package and run it against the 'working' one I hacked together earlier to compare outputs, but none of the imports are in @npm form. How do you recommend I test?

rzhw commented 3 years ago

Thanks for taking a look! Did you mean you have a locally modified version of the package from npm, that works with PostCSS 8.0?

If that's the case, you should be able to clone this repo, apply the changes you've made and run bazel test //tests/... to test. You can substitute load("@npm//@bazel/postcss/ to load("@build_bazel_rules_postcss//, as it's the only substitution (which is listed in https://github.com/bazelbuild/rules_postcss/blob/e5ac2fbf79c17db96d5331bff0fa9fbb12d2c5b8/BUILD#L47-L65).

We also have tests that run when you create a pull request, so if you apply your changes and still aren't sure you can also upload a pull request and assign me for review.