Skip to content

Commit

Permalink
Update dependency @capsizecss/metrics to v2 (#1447)
Browse files Browse the repository at this point in the history
[![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com)

This PR contains the following updates:

| Package | Change | Age | Adoption | Passing | Confidence |
|---|---|---|---|---|---|
| [@capsizecss/metrics](https://togithub.com/seek-oss/capsize) ([source](https://togithub.com/seek-oss/capsize/tree/HEAD/packages/metrics)) | [`1.3.0` -> `2.0.0`](https://renovatebot.com/diffs/npm/@capsizecss%2fmetrics/1.2.0/2.0.0) | [![age](https://developer.mend.io/api/mc/badges/age/npm/@capsizecss%2fmetrics/2.0.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/@capsizecss%2fmetrics/2.0.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/@capsizecss%2fmetrics/1.2.0/2.0.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/@capsizecss%2fmetrics/1.2.0/2.0.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) |

---

### Release Notes

<details>
<summary>seek-oss/capsize (@&#8203;capsizecss/metrics)</summary>

### [`v2.0.0`](https://togithub.com/seek-oss/capsize/blob/HEAD/packages/metrics/CHANGELOG.md#200)

##### Major Changes

-   [#&#8203;168](https://togithub.com/seek-oss/capsize/pull/168) [`8819ff1`](https://togithub.com/seek-oss/capsize/commit/8819ff1db53b9bb8e8cf1b3f1451a1ec49a32857) Thanks [@&#8203;mrm007](https://togithub.com/mrm007)! - Precompile Capsize packages with [Crackle]

    Migrating Capsize packages to be precompiled with [Crackle], with a key change being Crackle now handles entry points instead of [Preconstruct].

    Other benefits include:

    -   Modern module entry point syntax using the ["exports" field] with better tooling compatibility.
    -   Improved types and better ESM and CJS compatibility
    -   Better alignment between compiled code and module entry points

##### BREAKING CHANGES:

##### API changes

While technically a breaking change, consumers of Capsize's public APIs are not affected by this change.
If you are affected due to reaching into package internals, please get in touch and see if we can find a more maintainable approach.

##### TypeScript

TypeScript consumers should ensure they are using a compatible [`moduleResolution` strategy in TSConfig][moduleResolution strategy in TSConfig] — either `node16`, `nodenext` or `bundler`. This will ensure types are correctly resolved across the different module specifications.

[Crackle]: https://togithub.com/seek-oss/crackle?tab=readme-ov-file#-crackle-

[Preconstruct]: https://preconstruct.tools/

["exports" field]: https://nodejs.org/api/packages.html#exports

[`moduleResolution` strategy in tsconfig]: https://www.typescriptlang.org/tsconfig#moduleResolution

##### Minor Changes

-   [#&#8203;167](https://togithub.com/seek-oss/capsize/pull/167) [`193d5ec`](https://togithub.com/seek-oss/capsize/commit/193d5ec43b7eaf872574a4920cec69f11937945f) Thanks [@&#8203;michaeltaranto](https://togithub.com/michaeltaranto)! - xWidthAvg: Update character frequency weightings data source

    The character frequency weightings used to calculate the `xWidthAvg` metrics were previously hard coded internally, and were an adaption from a [frequency table] from Wikipedia.

    We now generate these weightings based on the abstracts from [WikiNews] articles.
    This makes it possible to add support for languages that use non-latin [unicode subsets], e.g. Thai, by adding the relevant abstract and generating the `xAvgWidth` based on the corresponding unicode subset range.

##### Will this change anything for consumers?

Given the updated `xWidthAvg` metrics are very close to the original hard coded values, we do not forsee any impact on consumers.
Even our CSS snapshot tests were unchanged, and they contain values rounded to 4 decimal places!

The result is either no or extremely minor changes to the generated fallback font CSS, with the benefit being this lays the ground work to support additional language subsets in the near future.

[frequency table]: https://en.wikipedia.org/wiki/Letter_frequency#Relative_frequencies_of_letters_in_other_languages

[WikiNews]: https://wikinews.org/

[unicode subsets]: https://www.utf8icons.com/subsets

### [`v1.3.0`](https://togithub.com/seek-oss/capsize/blob/HEAD/packages/metrics/CHANGELOG.md#130)

##### Minor Changes

-   [#&#8203;151](https://togithub.com/seek-oss/capsize/pull/151) [`aae72fd`](https://togithub.com/seek-oss/capsize/commit/aae72fddc8e45124aeb100266952b392762cdefe) Thanks [@&#8203;michaeltaranto](https://togithub.com/michaeltaranto)! - Update Google Fonts to latest

##### Patch Changes

-   [#&#8203;154](https://togithub.com/seek-oss/capsize/pull/154) [`39c6ad4`](https://togithub.com/seek-oss/capsize/commit/39c6ad4827e3e2238fedf5dbcdf4c9bbd62c311d) Thanks [@&#8203;michaeltaranto](https://togithub.com/michaeltaranto)! - entireMetricsCollection: Sort metrics by familyName

    Sort the metrics collection by `familyName`.
    Provides a nicer experience by default when looping over the dataset, while also improving the review DX when adding/editing metrics.

</details>

---

### Configuration

📅 **Schedule**: Branch creation - At any time (no schedule defined), 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.

🔕 **Ignore**: Close this PR and you won't be reminded about this update again.

---

 - [ ] 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://developer.mend.io/github/X-oss-byte/Nextjs).
  • Loading branch information
renovate[bot] authored Feb 22, 2024
1 parent f42b9e7 commit 34add75
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/next/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@
"@babel/runtime": "7.23.9",
"@babel/traverse": "7.23.9",
"@babel/types": "7.23.9",
"@capsizecss/metrics": "1.3.0",
"@capsizecss/metrics": "2.0.0",
"@edge-runtime/cookies": "4.0.3",
"@edge-runtime/ponyfill": "2.4.2",
"@edge-runtime/primitives": "4.1.0",
Expand Down

0 comments on commit 34add75

Please sign in to comment.