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 lang on relative-time day ordering #175

Merged
merged 2 commits into from
Oct 17, 2022

Conversation

keithamus
Copy link
Member

@keithamus keithamus commented Oct 17, 2022

Tests are failing locally for me, because my locale is en-GB not en-US, which means tests, that depend on method that don't allow for customisation with locale fail.

I've fixed this by making isDayFirst & makeFormatter locale aware (it takes a locale but defaults it to 'default'). Then in relative-time, it calls isDayFirst with the given locale and in local-time it calls makeFormatter with the given locale. Lastly I fixed the locale to en-US in the tests.

@keithamus keithamus requested a review from a team as a code owner October 17, 2022 09:48
Co-authored-by: Kristján Oddsson <koddsson@gmail.com>
@keithamus keithamus force-pushed the fix-lang-on-relative-time-day-ordering branch from de27411 to 4985618 Compare October 17, 2022 09:48
@primer-css
Copy link

👋 Hello and thanks for pinging us! This issue or PR has been added to our inbox and a Design Infrastructure first responder will review it soon.

  • 🎨 If this is a PR that includes a visual change, please make sure to add screenshots in the description or deploy this code to a lab machine with instructions for how to test.
  • If this is a PR that includes changes to an interaction, please include a video recording in the description.
  • ⚠️ If this is urgent, please visit us in #primer on Slack and tag the first responders listed in the channel topic.

Co-authored-by: Kristján Oddsson <koddsson@gmail.com>
@keithamus keithamus force-pushed the fix-lang-on-relative-time-day-ordering branch from c265f98 to 1ecd2cd Compare October 17, 2022 10:13
const dayFirstFormatter = makeFormatter({day: 'numeric', month: 'short'})

// Private: Determine if the day should be formatted before the month name in
// the user's current locale. For example, `9 Jun` for en-GB and `Jun 9`
// for en-US.
//
// Returns true if the day appears before the month.
export function isDayFirst(): boolean {
if (dayFirst !== null) {
Copy link

@lukasoppermann lukasoppermann Oct 17, 2022

Choose a reason for hiding this comment

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

@keithamus I only medium understand what is happening, but can we safely remove this check? Is this covered by locale in dayFirst because it will just get out of the if if dayFirst === null?

Copy link
Member Author

Choose a reason for hiding this comment

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

dayFirst cannot be null as it is a const assigned to an object.

@lukasoppermann
Copy link

Seems legit.

Copy link

@siddharthkp siddharthkp left a comment

Choose a reason for hiding this comment

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

LGTM!

@keithamus keithamus merged commit c50a703 into main Oct 17, 2022
@keithamus keithamus deleted the fix-lang-on-relative-time-day-ordering branch October 17, 2022 14:12
andrewpollock pushed a commit to google/osv.dev that referenced this pull request Nov 29, 2022
[![Mend
Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com)

This PR contains the following updates:

| Package | Change | Age | Adoption | Passing | Confidence |
|---|---|---|---|---|---|
| [@github/time-elements](https://togithub.com/github/time-elements) |
[`3.1.4` ->
`3.6.0`](https://renovatebot.com/diffs/npm/@github%2ftime-elements/3.1.4/3.6.0)
|
[![age](https://badges.renovateapi.com/packages/npm/@github%2ftime-elements/3.6.0/age-slim)](https://docs.renovatebot.com/merge-confidence/)
|
[![adoption](https://badges.renovateapi.com/packages/npm/@github%2ftime-elements/3.6.0/adoption-slim)](https://docs.renovatebot.com/merge-confidence/)
|
[![passing](https://badges.renovateapi.com/packages/npm/@github%2ftime-elements/3.6.0/compatibility-slim/3.1.4)](https://docs.renovatebot.com/merge-confidence/)
|
[![confidence](https://badges.renovateapi.com/packages/npm/@github%2ftime-elements/3.6.0/confidence-slim/3.1.4)](https://docs.renovatebot.com/merge-confidence/)
|
| [css-loader](https://togithub.com/webpack-contrib/css-loader) |
[`6.7.1` ->
`6.7.2`](https://renovatebot.com/diffs/npm/css-loader/6.7.1/6.7.2) |
[![age](https://badges.renovateapi.com/packages/npm/css-loader/6.7.2/age-slim)](https://docs.renovatebot.com/merge-confidence/)
|
[![adoption](https://badges.renovateapi.com/packages/npm/css-loader/6.7.2/adoption-slim)](https://docs.renovatebot.com/merge-confidence/)
|
[![passing](https://badges.renovateapi.com/packages/npm/css-loader/6.7.2/compatibility-slim/6.7.1)](https://docs.renovatebot.com/merge-confidence/)
|
[![confidence](https://badges.renovateapi.com/packages/npm/css-loader/6.7.2/confidence-slim/6.7.1)](https://docs.renovatebot.com/merge-confidence/)
|
| [highlight.js](https://highlightjs.org/)
([source](https://togithub.com/highlightjs/highlight.js)) | [`11.6.0` ->
`11.7.0`](https://renovatebot.com/diffs/npm/highlight.js/11.6.0/11.7.0)
|
[![age](https://badges.renovateapi.com/packages/npm/highlight.js/11.7.0/age-slim)](https://docs.renovatebot.com/merge-confidence/)
|
[![adoption](https://badges.renovateapi.com/packages/npm/highlight.js/11.7.0/adoption-slim)](https://docs.renovatebot.com/merge-confidence/)
|
[![passing](https://badges.renovateapi.com/packages/npm/highlight.js/11.7.0/compatibility-slim/11.6.0)](https://docs.renovatebot.com/merge-confidence/)
|
[![confidence](https://badges.renovateapi.com/packages/npm/highlight.js/11.7.0/confidence-slim/11.6.0)](https://docs.renovatebot.com/merge-confidence/)
|
| [lit](https://lit.dev/) ([source](https://togithub.com/lit/lit)) |
[`2.4.0` -> `2.4.1`](https://renovatebot.com/diffs/npm/lit/2.4.0/2.4.1)
|
[![age](https://badges.renovateapi.com/packages/npm/lit/2.4.1/age-slim)](https://docs.renovatebot.com/merge-confidence/)
|
[![adoption](https://badges.renovateapi.com/packages/npm/lit/2.4.1/adoption-slim)](https://docs.renovatebot.com/merge-confidence/)
|
[![passing](https://badges.renovateapi.com/packages/npm/lit/2.4.1/compatibility-slim/2.4.0)](https://docs.renovatebot.com/merge-confidence/)
|
[![confidence](https://badges.renovateapi.com/packages/npm/lit/2.4.1/confidence-slim/2.4.0)](https://docs.renovatebot.com/merge-confidence/)
|
|
[mini-css-extract-plugin](https://togithub.com/webpack-contrib/mini-css-extract-plugin)
| [`2.6.1` ->
`2.7.0`](https://renovatebot.com/diffs/npm/mini-css-extract-plugin/2.6.1/2.7.0)
|
[![age](https://badges.renovateapi.com/packages/npm/mini-css-extract-plugin/2.7.0/age-slim)](https://docs.renovatebot.com/merge-confidence/)
|
[![adoption](https://badges.renovateapi.com/packages/npm/mini-css-extract-plugin/2.7.0/adoption-slim)](https://docs.renovatebot.com/merge-confidence/)
|
[![passing](https://badges.renovateapi.com/packages/npm/mini-css-extract-plugin/2.7.0/compatibility-slim/2.6.1)](https://docs.renovatebot.com/merge-confidence/)
|
[![confidence](https://badges.renovateapi.com/packages/npm/mini-css-extract-plugin/2.7.0/confidence-slim/2.6.1)](https://docs.renovatebot.com/merge-confidence/)
|
| [sass](https://togithub.com/sass/dart-sass) | [`1.55.0` ->
`1.56.1`](https://renovatebot.com/diffs/npm/sass/1.55.0/1.56.1) |
[![age](https://badges.renovateapi.com/packages/npm/sass/1.56.1/age-slim)](https://docs.renovatebot.com/merge-confidence/)
|
[![adoption](https://badges.renovateapi.com/packages/npm/sass/1.56.1/adoption-slim)](https://docs.renovatebot.com/merge-confidence/)
|
[![passing](https://badges.renovateapi.com/packages/npm/sass/1.56.1/compatibility-slim/1.55.0)](https://docs.renovatebot.com/merge-confidence/)
|
[![confidence](https://badges.renovateapi.com/packages/npm/sass/1.56.1/confidence-slim/1.55.0)](https://docs.renovatebot.com/merge-confidence/)
|
| [webpack](https://togithub.com/webpack/webpack) | [`5.74.0` ->
`5.75.0`](https://renovatebot.com/diffs/npm/webpack/5.74.0/5.75.0) |
[![age](https://badges.renovateapi.com/packages/npm/webpack/5.75.0/age-slim)](https://docs.renovatebot.com/merge-confidence/)
|
[![adoption](https://badges.renovateapi.com/packages/npm/webpack/5.75.0/adoption-slim)](https://docs.renovatebot.com/merge-confidence/)
|
[![passing](https://badges.renovateapi.com/packages/npm/webpack/5.75.0/compatibility-slim/5.74.0)](https://docs.renovatebot.com/merge-confidence/)
|
[![confidence](https://badges.renovateapi.com/packages/npm/webpack/5.75.0/confidence-slim/5.74.0)](https://docs.renovatebot.com/merge-confidence/)
|

---

### Release Notes

<details>
<summary>github/time-elements</summary>

###
[`v3.6.0`](https://togithub.com/github/relative-time-element/releases/tag/v3.6.0)

[Compare
Source](https://togithub.com/github/time-elements/compare/v3.5.2...v3.6.0)

#### What's Changed

- add JSX IntrinsicElement types by
[@&#8203;keithamus](https://togithub.com/keithamus) in
[github/relative-time-element#214

**Full Changelog**:
github/relative-time-element@v3.5.2...v3.6.0

###
[`v3.5.2`](https://togithub.com/github/relative-time-element/releases/tag/v3.5.2)

[Compare
Source](https://togithub.com/github/time-elements/compare/v3.5.1...v3.5.2)

#### What's Changed

- avoid updating during update call by
[@&#8203;keithamus](https://togithub.com/keithamus) in
[github/relative-time-element#215
- Switch to promise batching on attributechangedcallback by
[@&#8203;keithamus](https://togithub.com/keithamus) in
[github/relative-time-element#216

**Full Changelog**:
github/relative-time-element@v3.5.1...v3.5.2

###
[`v3.5.1`](https://togithub.com/github/relative-time-element/releases/tag/v3.5.1)

[Compare
Source](https://togithub.com/github/time-elements/compare/v3.5.0...v3.5.1)

#### What's Changed

- fix typo in observed attributes by
[@&#8203;keithamus](https://togithub.com/keithamus) in
[github/relative-time-element#212

**Full Changelog**:
github/relative-time-element@v3.5.0...v3.5.1

###
[`v3.5.0`](https://togithub.com/github/relative-time-element/releases/tag/v3.5.0)

[Compare
Source](https://togithub.com/github/time-elements/compare/v3.4.1...v3.5.0)

#### What's Changed

This release moves define calls into separate files, allowing import of
each element without triggering the custom element definition. In
addition it attempts to safely use globals so that it can be imported
into NodeJS without error.

- move customElements define calls to index.js and refactor by
[@&#8203;keithamus](https://togithub.com/keithamus) in
[github/relative-time-element#209
- Ensure HTMLElement exists in all contexts by
[@&#8203;keithamus](https://togithub.com/keithamus) in
[github/relative-time-element#211
- add `define` export for custom element registration by
[@&#8203;keithamus](https://togithub.com/keithamus) in
[github/relative-time-element#210

**Full Changelog**:
github/relative-time-element@v3.4.1...v3.5.0

###
[`v3.4.1`](https://togithub.com/github/relative-time-element/releases/tag/v3.4.1)

[Compare
Source](https://togithub.com/github/time-elements/compare/v3.4.0...v3.4.1)

#### What's Changed

- use `Intl` without window prefix by
[@&#8203;keithamus](https://togithub.com/keithamus) in
[github/relative-time-element#208

**Full Changelog**:
github/relative-time-element@v3.4.0...v3.4.1

###
[`v3.4.0`](https://togithub.com/github/relative-time-element/releases/tag/v3.4.0)

[Compare
Source](https://togithub.com/github/time-elements/compare/v3.3.0...v3.4.0)

#### What's Changed

- Strftime localisation by
[@&#8203;keithamus](https://togithub.com/keithamus) in
[github/relative-time-element#206
- Add some localised dates as examples by
[@&#8203;keithamus](https://togithub.com/keithamus) in
[github/relative-time-element#207

(Thanks [@&#8203;brunoprietog](https://togithub.com/brunoprietog) for
the bug report!)

**Full Changelog**:
github/relative-time-element@v3.3.0...v3.4.0

###
[`v3.3.0`](https://togithub.com/github/relative-time-element/releases/tag/v3.3.0)

[Compare
Source](https://togithub.com/github/time-elements/compare/v3.2.5...v3.3.0)

##### What's Changed

- add elapsed time format by
[@&#8203;keithamus](https://togithub.com/keithamus) in
[github/relative-time-element#204

**Full Changelog**:
github/relative-time-element@v3.2.5...v3.3.0

###
[`v3.2.5`](https://togithub.com/github/relative-time-element/releases/tag/v3.2.5)

[Compare
Source](https://togithub.com/github/time-elements/compare/v3.2.4...v3.2.5)

#### What's Changed

- ensure invalid dates fallback to lightdom textcontent by
[@&#8203;keithamus](https://togithub.com/keithamus) in
[github/relative-time-element#203

**Full Changelog**:
github/relative-time-element@v3.2.4...v3.2.5

###
[`v3.2.4`](https://togithub.com/github/relative-time-element/releases/tag/v3.2.4)

[Compare
Source](https://togithub.com/github/time-elements/compare/v3.2.3...v3.2.4)

#### What's Changed

- fix bug in Intl detection by
[@&#8203;keithamus](https://togithub.com/keithamus) in
[github/relative-time-element#201

**Full Changelog**:
github/relative-time-element@v3.2.3...v3.2.4

###
[`v3.2.3`](https://togithub.com/github/relative-time-element/releases/tag/v3.2.3)

[Compare
Source](https://togithub.com/github/time-elements/compare/v3.2.2...v3.2.3)

#### What's Changed

- [add tests for realtime
updates](https://togithub.com/github/relative-time-element/commit/a3ffb11df16ae8d9d33874d3c2f346caac653424)
- [actually call update rather than just getting
it](https://togithub.com/github/relative-time-element/commit/a376de11b9f59799fc8c881ed97962d945c4ca65)

**Full Changelog**:
github/relative-time-element@v3.2.2...v3.2.3

###
[`v3.2.2`](https://togithub.com/github/relative-time-element/releases/tag/v3.2.2)

[Compare
Source](https://togithub.com/github/time-elements/compare/v3.2.1...v3.2.2)

#### What's Changed

- [ensure first observer is called at correct
time](https://togithub.com/github/relative-time-element/commit/e7c4e8d38c40dc3afe9d82448ca17f41f173aa9f)

**Full Changelog**:
github/relative-time-element@v3.2.1...v3.2.2

###
[`v3.2.1`](https://togithub.com/github/relative-time-element/releases/tag/v3.2.1)

[Compare
Source](https://togithub.com/github/time-elements/compare/v3.2.0...v3.2.1)

#### What's Changed

- avoid eagerly calling this.update() by
[@&#8203;keithamus](https://togithub.com/keithamus) in
[github/relative-time-element#200

**Full Changelog**:
github/relative-time-element@v3.2.0...v3.2.1

###
[`v3.2.0`](https://togithub.com/github/relative-time-element/releases/tag/v3.2.0)

[Compare
Source](https://togithub.com/github/time-elements/compare/v3.1.4...v3.2.0)

#### What's Changed

This release includes a large rewrite of the component with many new
features that allow for fine-grained control over the display of the
date. Existing uses will work as they always have, but a set of new
attributes provide detailed control about how dates get rendered!

- Update README.md by
[@&#8203;josepmartins](https://togithub.com/josepmartins) in
[github/relative-time-element#171
- Fix closing tag for `time-until` in documentation by
[@&#8203;meduzen](https://togithub.com/meduzen) in
[github/relative-time-element#172
- move AOR to primer by
[@&#8203;keithamus](https://togithub.com/keithamus) in
[github/relative-time-element#173
- fix lang on relative-time day ordering by
[@&#8203;keithamus](https://togithub.com/keithamus) in
[github/relative-time-element#175
- Custom format by [@&#8203;keithamus](https://togithub.com/keithamus)
in
[github/relative-time-element#177
- switch from karma to web-test-runner by
[@&#8203;keithamus](https://togithub.com/keithamus) in
[github/relative-time-element#178
- Use esbuild by [@&#8203;keithamus](https://togithub.com/keithamus) in
[github/relative-time-element#179
- Split strftime out by
[@&#8203;keithamus](https://togithub.com/keithamus) in
[github/relative-time-element#180
- add tense to relative-time by
[@&#8203;keithamus](https://togithub.com/keithamus) in
[github/relative-time-element#181
- simplify time-until/ago elements by
[@&#8203;keithamus](https://togithub.com/keithamus) in
[github/relative-time-element#182
- Extract tostring from relative time into element by
[@&#8203;keithamus](https://togithub.com/keithamus) in
[github/relative-time-element#183
- Add threshold by [@&#8203;keithamus](https://togithub.com/keithamus)
in
[github/relative-time-element#184
- Refactor relative time by
[@&#8203;koddsson](https://togithub.com/koddsson) in
[github/relative-time-element#185
- Inline utilities only used in `<relative-time>` by
[@&#8203;koddsson](https://togithub.com/koddsson) in
[github/relative-time-element#186
- Inline extended time element into relative time by
[@&#8203;keithamus](https://togithub.com/keithamus) in
[github/relative-time-element#187
- add relative-time tests for local-time by
[@&#8203;keithamus](https://togithub.com/keithamus) in
[github/relative-time-element#188
- add setters for all attributes by
[@&#8203;keithamus](https://togithub.com/keithamus) in
[github/relative-time-element#189
- RelativeTimeElement: Progressive time update intervals by
[@&#8203;keithamus](https://togithub.com/keithamus) in
[github/relative-time-element#190
- Add custome elements manifest by
[@&#8203;keithamus](https://togithub.com/keithamus) in
[github/relative-time-element#191
- Switch element to defining content within ShadowDOM by
[@&#8203;keithamus](https://togithub.com/keithamus) in
[github/relative-time-element#193
- Update readme by [@&#8203;keithamus](https://togithub.com/keithamus)
in
[github/relative-time-element#192
- Local time refactor by
[@&#8203;keithamus](https://togithub.com/keithamus) in
[github/relative-time-element#194
- add tests for ponyfills by
[@&#8203;keithamus](https://togithub.com/keithamus) in
[github/relative-time-element#195
- refactor relative-time to remove RelativeTimeFormat by
[@&#8203;keithamus](https://togithub.com/keithamus) in
[github/relative-time-element#196
- inline utils functions by
[@&#8203;keithamus](https://togithub.com/keithamus) in
[github/relative-time-element#197
- Make duration class by
[@&#8203;keithamus](https://togithub.com/keithamus) in
[github/relative-time-element#198
- Minor cleanups by [@&#8203;keithamus](https://togithub.com/keithamus)
in
[github/relative-time-element#199

#### New Contributors

- [@&#8203;josepmartins](https://togithub.com/josepmartins) made their
first contribution in
[github/relative-time-element#171
- [@&#8203;meduzen](https://togithub.com/meduzen) made their first
contribution in
[github/relative-time-element#172

**Full Changelog**:
github/relative-time-element@v3.1.4...v3.2.0

</details>

<details>
<summary>webpack-contrib/css-loader</summary>

###
[`v6.7.2`](https://togithub.com/webpack-contrib/css-loader/blob/HEAD/CHANGELOG.md#&#8203;672-httpsgithubcomwebpack-contribcss-loadercomparev671v672-2022-11-13)

[Compare
Source](https://togithub.com/webpack-contrib/css-loader/compare/v6.7.1...v6.7.2)

</details>

<details>
<summary>highlightjs/highlight.js</summary>

###
[`v11.7.0`](https://togithub.com/highlightjs/highlight.js/blob/HEAD/CHANGES.md#Version-1170)

[Compare
Source](https://togithub.com/highlightjs/highlight.js/compare/11.6.0...11.7.0)

New Grammars:

- added 3rd party LookML grammar to SUPPORTED_LANGUAGES [Josh Temple][]
- added 3rd party FunC grammar to SUPPORTED_LANGUAGES \[Nikita
Sobolev]\[]
- Added 3rd party Flix grammar to SUPPORTED_LANGUAGES [The Flix
Organisation][]
-   Added 3rd party RVT grammar to SUPPORTED_LANGUAGES [Sopitive][]

Grammars:

-   enh(scheme) add `scm` alias for Scheme [matyklug18][]
-   fix(typescript) patterns like `<T =` are not JSX [Josh Goebel][]
-   fix(bash) recognize the `((` keyword [Nick Chambers][]
-   enh(Ruby) misc improvements (kws, class names, etc)  [Josh Goebel][]
- fix(js) do not flag `import()` as a function, rather a keyword
[nathnolt][]
-   fix(bash) recognize the `((` keyword [Nick Chambers][]
-   fix(nix) support escaped dollar signs in strings [h7x4][]
-   enh(cmake) support bracket comments [Hirse][]
-   enh(java) add yield keyword to java [MBoegers][]
-   enh(java) add permits keyword to java [MBoegers][]
- fix(javascript/typescript) correct identifier matching when using
numbers [Lachlan Heywood][]

Improvements:

-   Documentation typo fix by [Eddymens][]

[matyklug18]: https://togithub.com/matyklug18

[Josh Goebel]: https://togithub.com/joshgoebel

[Josh Temple]: https://togithub.com/joshtemple

[nathnolt]: https://togithub.com/nathnolt

[Nick Chambers]: https://togithub.com/uplime

[h7x4]: https://togithub.com/h7x4

[Hirse]: https://togithub.com/Hirse

[The Flix Organisation]: https://togithub.com/flix

[MBoegers]: https://togithub.com/MBoegers

[Lachlan Heywood]: https://togithub.com/lachieh

[Eddymens]: https://togithub.com/eddymens

[Sopitive]: https://togithub.com/Sopitive

</details>

<details>
<summary>lit/lit</summary>

###
[`v2.4.1`](https://togithub.com/lit/lit/blob/HEAD/packages/lit/CHANGELOG.md#&#8203;241)

[Compare
Source](https://togithub.com/lit/lit/compare/lit@2.4.0...lit@2.4.1)

##### Patch Changes

- [#&#8203;3374](https://togithub.com/lit/lit/pull/3374)
[`bb098950`](https://togithub.com/lit/lit/commit/bb0989507f73f1e6d484199e3767eed39ebbaf22)
- Initializers added to subclasses are no longer improperly added to
superclass.

</details>

<details>
<summary>webpack-contrib/mini-css-extract-plugin</summary>

###
[`v2.7.0`](https://togithub.com/webpack-contrib/mini-css-extract-plugin/blob/HEAD/CHANGELOG.md#&#8203;270-httpsgithubcomwebpack-contribmini-css-extract-plugincomparev261v270-2022-11-16)

[Compare
Source](https://togithub.com/webpack-contrib/mini-css-extract-plugin/compare/v2.6.1...v2.7.0)

##### Features

- add function support for locals (loader)
([#&#8203;985](https://togithub.com/webpack-contrib/mini-css-extract-plugin/issues/985))
([65519d0](https://togithub.com/webpack-contrib/mini-css-extract-plugin/commit/65519d0701b3c5d60585468b8220159cbbfbe6b8))

#####
[2.6.1](https://togithub.com/webpack-contrib/mini-css-extract-plugin/compare/v2.6.0...v2.6.1)
(2022-06-15)

##### Bug Fixes

- do not attempt hot reloading when emit is false
([#&#8203;953](https://togithub.com/webpack-contrib/mini-css-extract-plugin/issues/953))
([b426f04](https://togithub.com/webpack-contrib/mini-css-extract-plugin/commit/b426f04961846991e8ca671c6a4d48e6a83a46c2))

</details>

<details>
<summary>sass/dart-sass</summary>

###
[`v1.56.1`](https://togithub.com/sass/dart-sass/blob/HEAD/CHANGELOG.md#&#8203;1561)

[Compare
Source](https://togithub.com/sass/dart-sass/compare/1.56.0...1.56.1)

##### Embedded Sass

- Importer results now validate that `contents` is actually a string and
whether
    `sourceMapUrl` is an absolute URL.

###
[`v1.56.0`](https://togithub.com/sass/dart-sass/blob/HEAD/CHANGELOG.md#&#8203;1560)

[Compare
Source](https://togithub.com/sass/dart-sass/compare/1.55.0...1.56.0)

- **Potentially breaking change:** To match the CSS spec, SassScript
expressions
beginning with `not` or `(` are no longer supported at the beginning of
    parenthesized sections of media queries. For example,

    ```scss
    @&#8203;media (width >= 500px) and (not (grid))
    ```

    will now be emitted unchanged, instead of producing

    ```scss
    @&#8203;media (width >= 500px) and (false)
    ```

See [the Sass website](https://sass-lang.com/d/media-logic) for details.

- **Potentially breaking bug fix:** Angle units like `rad` or `turn` are
now
    properly converted to equivalent `deg` values for `hsl()`, `hsla()`,
    `adjust-hue()`, `color.adjust()`, and `color.change()`.

See [the Sass website](https://sass-lang.com/d/function-units#hue) for
    details.

- Fix indentation for selectors that span multiple lines in a `@media`
query.

- Emit a deprecation warning when passing `$alpha` values with units to
`color.adjust()` or `color.change()`. This will be an error in Dart Sass
    2.0.0.

See [the Sass website](https://sass-lang.com/d/function-units#alpha) for
    details.

- Emit a deprecation warning when passing a `$weight` value with no
units or
with units other than `%` to `color.mix()`. This will be an error in
Dart Sass
    2.0.0.

See [the Sass website](https://sass-lang.com/d/function-units#weight)
for
    details.

- Emit a deprecation warning when passing `$n` values with units to
`list.nth()`
    or `list.set-nth()`. This will be an error in Dart Sass 2.0.0.

See [the Sass website](https://sass-lang.com/d/function-units#index) for
    details.

- Improve existing deprecation warnings to wrap `/`-as-division
suggestions in
    `calc()` expressions.

- Properly mark the warning for passing numbers with units to `random()`
as a
    deprecation warning.

- Fix a bug where `@extend` could behave unpredicatably when used along
with
`meta.load-css()` and shared modules that contained no CSS themselves
but
    loaded CSS from other modules.

##### Dart API

-   Emit a deprecation warning when passing a `sassIndex` with units to
`Value.sassIndexToListIndex()`. This will be an error in Dart Sass
2.0.0.

##### JS API

- Importer results now validate whether `contents` is actually a string
type.

-   Importer result argument errors are now rendered correctly.

</details>

<details>
<summary>webpack/webpack</summary>

###
[`v5.75.0`](https://togithub.com/webpack/webpack/releases/tag/v5.75.0)

[Compare
Source](https://togithub.com/webpack/webpack/compare/v5.74.0...v5.75.0)

### Bugfixes

-   `experiments.*` normalize to `false` when opt-out
-   avoid `NaN%`
-   show the correct error when using a conflicting chunk name in code
-   HMR code tests existance of `window` before trying to access it
-   fix `eval-nosources-*` actually exclude sources
- fix race condition where no module is returned from processing module
-   fix position of standalong semicolon in runtime code

### Features

- add support for `@import` to extenal CSS when using experimental CSS
in node
-   add `i64` support to the deprecated WASM implementation

### Developer Experience

-   expose `EnableWasmLoadingPlugin`
-   add more typings
- generate getters instead of readonly properties in typings to allow
overriding them

</details>

---

### Configuration

📅 **Schedule**: Branch creation - "before 6am on monday" in timezone
Australia/Sydney, Automerge - At any time (no schedule defined).

🚦 **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://togithub.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 [Mend
Renovate](https://www.mend.io/free-developer-tools/renovate/). View
repository job log
[here](https://app.renovatebot.com/dashboard#github/google/osv.dev).

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNC4zMC40IiwidXBkYXRlZEluVmVyIjoiMzQuNDAuMiJ9-->
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.

4 participants