Skip to content
This repository has been archived by the owner on Oct 25, 2023. It is now read-only.

Upgrade to PostCSS 8.x #59

Open
rzhw opened this issue Nov 9, 2020 · 2 comments
Open

Upgrade to PostCSS 8.x #59

rzhw opened this issue Nov 9, 2020 · 2 comments
Labels

Comments

@rzhw
Copy link
Contributor

rzhw commented Nov 9, 2020

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.

@rzhw rzhw added the P1 label Nov 9, 2020
@arlyon
Copy link

arlyon commented Dec 18, 2020

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
Copy link
Contributor Author

rzhw commented Dec 21, 2020

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

rules_postcss/BUILD

Lines 47 to 65 in e5ac2fb

pkg_npm(
name = "npm_package",
srcs = [
"BUILD",
"index.bzl",
"LICENSE",
"package.bzl",
"package.json",
"README.md",
],
deps = [
"//internal:package_contents",
"//internal/autoprefixer:package_contents",
"//internal/rtlcss:package_contents",
],
substitutions = {
"@build_bazel_rules_postcss//": "@npm//@bazel/postcss/",
},
)
).

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.

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

No branches or pull requests

2 participants