Skip to content

update to latest PostCSS - #134

Merged
ota-meshi merged 2 commits into
ota-meshi:masterfrom
romainmenke:master
Jan 14, 2025
Merged

ota-meshi merged 2 commits into
ota-meshi:masterfrom
romainmenke:master

Conversation

@romainmenke

Copy link
Copy Markdown
Contributor

PostCSS 8.4.x started using Node.source.input.css more and more in various methods.
Mostly when calculating source positions (e.g. positionInside, rangeBy, ...).

This conflicted with how postcss-html was implemented, so we added a new field through which custom syntax plugins can provide the entire document source.

const root = syntax.parse(
	cssSource,
	{
		document: htmlSource,
		map: false,
	},
);

This is mostly important for linters where accurate positioning in the original source files is important.

@romainmenke

Copy link
Copy Markdown
Contributor Author

@ota-meshi shall I open a separate PR to address CI?
Either bumping the versions to node 18, 20, 22 or adding a lockfile where transient dependencies still support node 12 should fix CI.

@ota-meshi

Copy link
Copy Markdown
Owner

Yeah, I worked around the issue by downgrading some of the dependencies.

@ota-meshi ota-meshi left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

Thank you for this PR! I will release it.

@ota-meshi
ota-meshi merged commit 4d40cbc into ota-meshi:master Jan 14, 2025
@romainmenke

Copy link
Copy Markdown
Contributor Author

Thank you @ota-meshi for the speedy review 🙇

DennisRasey pushed a commit to DennisRasey/forgejo that referenced this pull request Jan 19, 2025
This PR contains the following updates:

| Package | Type | Update | Change |
|---|---|---|---|
| [postcss](https://postcss.org/) ([source](https://github.com/postcss/postcss)) | dependencies | minor | [`8.4.49` -> `8.5.1`](https://renovatebot.com/diffs/npm/postcss/8.4.49/8.5.1) |
| [postcss-html](https://github.com/ota-meshi/postcss-html) | devDependencies | minor | [`1.7.0` -> `1.8.0`](https://renovatebot.com/diffs/npm/postcss-html/1.7.0/1.8.0) |

---

### Release Notes

<details>
<summary>postcss/postcss (postcss)</summary>

### [`v8.5.1`](https://github.com/postcss/postcss/blob/HEAD/CHANGELOG.md#851)

[Compare Source](postcss/postcss@8.5.0...8.5.1)

-   Fixed backwards compatibility for complex cases (by [@&#8203;romainmenke](https://github.com/romainmenke)).

### [`v8.5.0`](https://github.com/postcss/postcss/releases/tag/8.5.0): 8.5 “Duke Alloces”

[Compare Source](postcss/postcss@8.4.49...8.5.0)

<img src="https://github.com/user-attachments/assets/6ef654a0-d675-4ba0-a670-e28ef27062f5" align="right" width="200" height="200" alt="President Alloces seal">

PostCSS 8.5 brought API to work better with non-CSS sources like HTML, Vue.js/Svelte sources or CSS-in-JS.

[@&#8203;romainmenke](https://github.com/romainmenke) during [his work](postcss/postcss#1995) on [Stylelint](https://stylelint.io) added `Input#document` in additional to `Input#css`.

```js
root.source.input.document //=> "<p>Hello</p>
                           //    <style>
                           //    p {
                           //      color: green;
                           //    }
                           //    </style>"
root.source.input.css      //=> "p {
                           //      color: green;
                           //    }"

```

#### Thanks to Sponsors

This release was possible thanks to our community.

If your company wants to support the sustainability of front-end infrastructure or wants to give some love to PostCSS, you can join our supporters by:

-   [**Tidelift**](https://tidelift.com/) with a Spotify-like subscription model supporting all projects from your lock file.
-   Direct donations at [**GitHub Sponsors**](https://github.com/sponsors/ai) or [**Open Collective**](https://opencollective.com/postcss#section-contributors).

</details>

<details>
<summary>ota-meshi/postcss-html (postcss-html)</summary>

### [`v1.8.0`](https://github.com/ota-meshi/postcss-html/releases/tag/v1.8.0)

[Compare Source](ota-meshi/postcss-html@v1.7.0...v1.8.0)

#### What's Changed

-   update to latest PostCSS by [@&#8203;romainmenke](https://github.com/romainmenke) in ota-meshi/postcss-html#134

**Full Changelog**: ota-meshi/postcss-html@v1.7.0...v1.8.0

</details>

---

### Configuration

📅 **Schedule**: Branch creation - "* 0-3 * * *" (UTC), Automerge - "* 0-3 * * *" (UTC).

🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

👻 **Immortal**: This PR will be recreated if closed unmerged. Get [config help](https://github.com/renovatebot/renovate/discussions) if that's undesired.

---

 - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box

---

This PR has been generated by [Renovate Bot](https://github.com/renovatebot/renovate).
<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzOS4xMDYuMCIsInVwZGF0ZWRJblZlciI6IjM5LjEwNi4wIiwidGFyZ2V0QnJhbmNoIjoiZm9yZ2VqbyIsImxhYmVscyI6WyJkZXBlbmRlbmN5LXVwZ3JhZGUiLCJ0ZXN0L25vdC1uZWVkZWQiXX0=-->

Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/6562
Reviewed-by: Gusted <[email protected]>
Co-authored-by: Renovate Bot <[email protected]>
Co-committed-by: Renovate Bot <[email protected]>
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.

2 participants