Skip to content

chore(deps): update vitest monorepo to v2 (major) - #39

Merged
RedStar071 merged 2 commits into
mainfrom
renovate/major-vitest-monorepo
Sep 22, 2024
Merged

RedStar071 merged 2 commits into
mainfrom
renovate/major-vitest-monorepo

Conversation

@renovate

@renovate renovate Bot commented Aug 4, 2024 •

Copy link
Copy Markdown
Contributor

This PR contains the following updates:

Package Change Age Adoption Passing Confidence
@vitest/coverage-v8 (source) ^1.6.0 -> ^2.1.1 age adoption passing confidence
vitest (source) ^1.6.0 -> ^2.1.1 age adoption passing confidence

Release Notes

vitest-dev/vitest (@​vitest/coverage-v8)

v2.1.1

Compare Source

   🐞 Bug Fixes
    View changes on GitHub

v2.1.0

Compare Source

This release makes another big change to the Browser Mode by introducing locators API:

test('renders blog posts', async () => {
  const screen = page.render(<Blog />)

  await expect.element(screen.getByRole('heading', { name: 'Blog' })).toBeInTheDocument()

  const [firstPost] = screen.getByRole('listitem').all()

  await firstPost.getByRole('button', { name: 'Delete' }).click()

  expect(screen.getByRole('listitem').all()).toHaveLength(3)
})

You can use either vitest-browser-vue, vitest-browser-svelte or vitest-browser-react to render components and make assertions using locators. Locators are also available on the page object from @vitest/browser/context.

   🚀 Features
   🐞 Bug Fixes
    View changes on GitHub

v2.0.5

Compare Source

   🚀 Features
   🐞 Bug Fixes
    View changes on GitHub

v2.0.4

Compare Source

   🐞 Bug Fixes
    View changes on GitHub

v2.0.3

Compare Source

   🚀 Features
   🐞 Bug Fixes
    View changes on GitHub

v2.0.2

Compare Source

v2.0.1

Compare Source

   🐞 Bug Fixes
    View changes on GitHub

v2.0.0

Compare Source

Vitest 2.0 is here! This release page lists all changes made to the project during the beta. For the migration guide, please refer to the documentation.

🚨 Breaking Changes
🚀 Features
🐞 Bug Fixes

Configuration

📅 Schedule: Branch creation - "before 12pm on Sunday" (UTC), 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 these updates again.


  • If you want to rebase/retry this PR, check this box

This PR was generated by Mend Renovate. View the repository job log.

@renovate
renovate Bot requested a review from RedStar071 as a code owner August 4, 2024 17:58
@renovate renovate Bot added the dependencies label Aug 4, 2024
@codecov

codecov Bot commented Aug 5, 2024 •

Copy link
Copy Markdown

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 71.92%. Comparing base (f6c89a1) to head (5076a00).
Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main      #39      +/-   ##
==========================================
- Coverage   74.08%   71.92%   -2.17%     
==========================================
  Files          90       90              
  Lines        4060     2810    -1250     
  Branches      292      208      -84     
==========================================
- Hits         3008     2021     -987     
+ Misses       1052      789     -263     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@renovate
renovate Bot force-pushed the renovate/major-vitest-monorepo branch from 3f5e669 to 1dc3c70 Compare August 21, 2024 12:23
@renovate
renovate Bot force-pushed the renovate/major-vitest-monorepo branch from 1dc3c70 to c84c850 Compare September 12, 2024 15:09
@renovate
renovate Bot force-pushed the renovate/major-vitest-monorepo branch from c84c850 to 645f230 Compare September 13, 2024 18:53
@RedStar071
RedStar071 requested review from RedStar071 and removed request for RedStar071 September 22, 2024 13:42
@RedStar071
RedStar071 merged commit e666c51 into main Sep 22, 2024
@RedStar071
RedStar071 deleted the renovate/major-vitest-monorepo branch September 22, 2024 13:43
RedStar071 added a commit that referenced this pull request Jul 27, 2026
## Summary
- Replace `blacksmith-*vcpu-ubuntu-2404[-arm]` runner labels with the
equivalent `depot-ubuntu-24.04[-arm]-{4,8}` labels across
CI/autofix/update-tlds workflows.
- Pass `depotProject: 10f7gg2mqd` to the shared
`reusable-publish-image.yml` workflow (now Depot-based) for the Docker
publish jobs.

## Test plan
- [ ] Confirm the Depot GitHub App is installed on the
`wolfstar-project` org
- [ ] Watch CI on this PR to confirm jobs are picked up by Depot runners
- [ ] Watch a Docker publish run to confirm the image builds/pushes via
Depot

<!-- codesmith:footer -->
---
<a
href="https://app.blacksmith.sh/wolfstar-project/codesmith/wolfstar/pr/227"><picture><source
media="(prefers-color-scheme: dark)"
srcset="https://pr-comments-assets.blacksmith.sh/codesmith/view-with-codesmith-dark-v2.svg"><source
media="(prefers-color-scheme: light)"
srcset="https://pr-comments-assets.blacksmith.sh/codesmith/view-with-codesmith-light-v2.svg"><img
alt="View with [code]smith"
src="https://pr-comments-assets.blacksmith.sh/codesmith/view-with-codesmith-dark-v2.svg"></picture></a>
<sup>Need help on this PR? Tag <code>@codesmith-bot</code> with what you
need. Autofix is enabled.</sup>

<!-- codesmith:autofix:enabled -->
<!-- /codesmith:footer -->

<!-- greptile_comment -->

<details><summary><h3>Confidence Score: 5/5</h3></summary>

The PR appears safe to merge.

No blocking failure remains.
</details>

<sub>Reviews (2): Last reviewed commit: ["Merge branch &#39;main&#39;
into
ci/migrate-blac..."](b13f821)
| [Re-trigger
Greptile](https://app.greptile.com/api/retrigger?id=47421015)</sub>

<!-- /greptile_comment -->
RedStar071 added a commit that referenced this pull request Oct 7, 2026
### ❓ Type of change

- [x] ✨ New feature
- [x] ⚠️ Breaking change

### 📚 Description

Includes the zalgo rule of #260, so merge that one first.

A server could only configure one rule per type: one word filter, one
link filter, and so on, each with a single set of actions and
exemptions. This brings what Dyno does: several named rules, for example
a word filter that only deletes and a second one, with other words, that
bans.

Rules are now rows of `GuildAutoModerationRule` instead of settings. A
server has up to 25, as many of one type as it wants, each with its own
options, actions, threshold and exempt roles and channels. `/automod
create|edit|delete|list|show|add|remove|ignore` manages them, and so do
`GET/POST /guilds/:guild/automod/rules` and `GET/PATCH/DELETE
/guilds/:guild/automod/rules/:rule` for the dashboard.

Things a reviewer should know:

- When a message infringes several rules of the same type, only the
first enabled one is applied. Rules of different types still all run, as
before.
- The `Mentions` rule (`automodMentions*` and its overrides table) had
no listener, so it is dropped rather than migrated.
- The cap of 25 rules and of 200 entries per list are my picks. Say if
you want other numbers.
- Writes are queued per server and read the rule from the database
first, so two edits at once no longer undo each other within a process.
Across shards the window is one read and one write wide; the unique
index on the name covers the case that would leave a rule unreachable.
- Not sure about `/automod ignore` toggling. Separate
`ignore`/`unignore` subcommands would be clearer, but cost command size.

### ⚠️ Breaking Changes

- The `/automod-<type>` commands are gone, replaced by `/automod`.
- The `automod<Type>*` keys are gone from the settings, so from
`GET/PATCH /guilds/:guild/settings` too. The dashboard has to use the
new routes. `automodChannel` and `automodTrackNative` stay.

### 📝 Migration

Two Prisma 8 migrations, on top of the baseline and the zalgo one from
#260. The tables of the old rules are `@@control(external)`, so the drop
is a migration of its own, not part of the first.

```sh
# 1. Before the deploy: the table, the enum and the unique index on the lowercase name, and one rule per enabled
#    configuration of the old tables. The old tables stay, so the build that is running keeps working and a rollback has them.
prisma db migrate --db "$DATABASE_URL" --to 20261007T1312_add_automod_rules

# 2. Once the deploy is verified: drops the old tables (and the zalgo one). There is no way back after it.
prisma db migrate --db "$DATABASE_URL"
```

Rules edited with the old commands between the two steps are not carried
over. Then `stars commands deploy`.

> 🤖 AI disclosure: [Wolfstar Agent
Kit](https://github.com/wolfstar-project/wolfstar-agent-kit) modified
this description. [My AI open-source
policy](https://harlanzw.com/blog/ai-in-open-source).

<!-- greptile_comment -->

<!-- greptile_summary -->

<h2><a
href="https://app.greptile.com/api/retrigger?id=76196422"><picture><source
media="(prefers-color-scheme: dark)"
srcset="https://greptile-static-assets.s3.amazonaws.com/badges/RetriggerDark.svg?v=2"><source
media="(prefers-color-scheme: light)"
srcset="https://greptile-static-assets.s3.amazonaws.com/badges/Retrigger.svg?v=2"><img
alt="Retrigger"
src="https://greptile-static-assets.s3.amazonaws.com/badges/Retrigger.svg?v=2"
align="right"></picture></a>Confidence Score: 3/5</h2>

<!-- greptile-risk -->

Not safe to merge until concurrent edits preserve both successful
changes and migrated filters retain their existing entries; the
exemption-list display problem is non-blocking.

<!-- greptile_confidence_score:3 -->

<sub>Reviews (1) · Last reviewed commit: ["Merge branch
&#39;feat/automod-zalgo&#39; into
f..."](a4016c7)
· [Reviewed by
Greptile](https://www.greptile.com/?utm_source=greptile_expert&utm_medium=github&utm_campaign=code_reviews&utm_content=wolfstar-project/wolfstar)</sub>

<!-- /greptile_comment -->
RedStar071 added a commit that referenced this pull request Oct 12, 2026
### 🔗 Linked issue

Resolves #275

### ❓ Type of change

- [ ] 📖 Documentation
- [ ] 🐞 Bug fix
- [ ] 👌 Enhancement
- [x] ✨ New feature
- [ ] 🧹 Chore
- [ ] ⚠️ Breaking change

### 📚 Description

Setting the bot up in a second server meant redoing every setting and
every auto-moderation rule by hand, and there was no copy to go back to
after changing a lot. `/settings server export` answers with a JSON file
of the settings that do not depend on the server and its rules, and
`/settings server import` shows what a file would change and asks before
it writes anything.

What a reviewer should look at:

- Roles, channels, users and permission nodes stay out of the file, and
so do the exempt roles and channels of the rules. An import leaves them
as the server has them. A setting that is not one of the file is refused
instead of skipped, so a hand-written file never looks like it did
something it did not.
- A file with one problem is refused whole, with all its problems.
Settings and rules are written in one database transaction, worked out
again under their locks when the administrator confirms.
- With an `automod` section, the rules of the server become the ones of
the file. A rule with the same name and type is edited in place and
keeps its ID and its exempt roles and channels. Settings the file does
not have are left alone.

Questions:

- **`/settings server` is now a group.** Discord does not allow a
subcommand that has subcommands, so the menu moved to `/settings server
menu` and `export` and `import` sit next to it, as the issue says. Would
you rather keep `/settings server` as the menu and have `/settings
export` and `/settings import`?
- **Replace or merge the rules?** I went with replace, since a restore
of a backup should give back the server it was taken from. A merge would
keep the rules the file does not name.

> 🤖 AI disclosure: [Wolfstar Agent
Kit](https://github.com/wolfstar-project/wolfstar-agent-kit) modified
this description. [My AI open-source
policy](https://harlanzw.com/blog/ai-in-open-source).







<!-- greptile_comment -->

<!-- greptile_summary -->

<h2><a
href="https://app.greptile.com/api/retrigger?id=78640607"><picture><source
media="(prefers-color-scheme: dark)"
srcset="https://greptile-static-assets.s3.amazonaws.com/badges/RetriggerDark.svg?v=2"><source
media="(prefers-color-scheme: light)"
srcset="https://greptile-static-assets.s3.amazonaws.com/badges/Retrigger.svg?v=2"><img
alt="Retrigger"
src="https://greptile-static-assets.s3.amazonaws.com/badges/Retrigger.svg?v=2"
align="right"></picture></a>Confidence Score: 5/5</h2>

<!-- greptile-impact-verdict --> No blocking findings remain in this
review; the outstanding repeated-click issue affects the displayed
result rather than the import itself and is non-blocking.

<!-- greptile_confidence_score:5 -->

<sub>Reviews (4) · Last reviewed commit: ["Merge branch &#39;V7&#39;
into
feat/settings-exp..."](5fe65e0)
· [Reviewed by
Greptile](https://www.greptile.com/?utm_source=greptile_expert&utm_medium=github&utm_campaign=code_reviews&utm_content=wolfstar-project/wolfstar)</sub>

<!-- /greptile_comment -->
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant