Skip to content

deps: bump vitest from 5.0.5 to 5.1.0 in the vitest group - #77

Merged
cldmv-bot[bot] merged 1 commit into
nextfrom
dependabot/npm_and_yarn/next/vitest-89a00228e4
Nov 11, 2026
Merged

cldmv-bot[bot] merged 1 commit into
nextfrom
dependabot/npm_and_yarn/next/vitest-89a00228e4

Conversation

@dependabot

@dependabot dependabot Bot commented on behalf of github Nov 11, 2026

Copy link
Copy Markdown

Bumps the vitest group with 1 update: vitest.

Updates vitest from 5.0.5 to 5.1.0

Release notes

Sourced from vitest's releases.

v5.1.0

   🚀 Features

   🐞 Bug Fixes

... (truncated)

Commits

Dependabot compatibility score

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


Dependabot commands and options

You can trigger Dependabot actions by commenting on this PR:

  • @dependabot rebase will rebase this PR
  • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
  • @dependabot show <dependency name> ignore conditions will show all of the ignore conditions of the specified dependency
  • @dependabot ignore <dependency name> major version will close this group update PR and stop Dependabot creating any more for the specific dependency's major version (unless you unignore this specific dependency's major version or upgrade to it yourself)
  • @dependabot ignore <dependency name> minor version will close this group update PR and stop Dependabot creating any more for the specific dependency's minor version (unless you unignore this specific dependency's minor version or upgrade to it yourself)
  • @dependabot ignore <dependency name> will close this group update PR and stop Dependabot creating any more for the specific dependency (unless you unignore this specific dependency or upgrade to it yourself)
  • @dependabot unignore <dependency name> will remove all of the ignore conditions of the specified dependency
  • @dependabot unignore <dependency name> <ignore condition> will remove the ignore condition of the specified dependency and ignore conditions

@cldmv-bot cldmv-bot Bot added the type: dependencies Relates to dependency updates, version bumps, or package management label Nov 11, 2026

@cldmv-bot cldmv-bot Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Auto-approved by CLDMV-bot: minor bump from 5.0.5 to 5.1.0.

@cldmv-bot
cldmv-bot Bot enabled auto-merge November 11, 2026 09:34
@cldmv-bot
cldmv-bot Bot merged commit 1dfd9b3 into next Nov 11, 2026
31 checks passed
@dependabot
dependabot Bot deleted the dependabot/npm_and_yarn/next/vitest-89a00228e4 branch November 11, 2026 09:36
@cldmv-bot cldmv-bot Bot mentioned this pull request Nov 11, 2026
cldmv-bot Bot added a commit that referenced this pull request Nov 30, 2026
# `@cldmv/envm` v1.2.0 Changelog

**Release Date**: November 2026
**Release Type**: Minor
**Branch**: `release/1.2.0`

---

## Overview

`require("@cldmv/envm")` now returns the `envManager` object itself, so `require(x).set(…)` works. It still carries `.envManager`, and gains `.default`, so every v1.1.0 call keeps working. The CommonJS entry is the generic CLDMV shim, and `dist/` is built one file per module instead of as tsup bundles, so the CLI no longer ships a second copy of the library.

This release also fixes three bugs. A typo'd or missing scope was accepted and silently did nothing, or wrote the system registry on Windows. The CLI could take a flag as a value or edit the wrong variable. And `backup.purge()` never deleted backups by age. Test coverage goes from about 33% to about 98%.

---

## ✨ Features

### `require()` returns `envManager` itself ([#87](#87), [#89](#89))

`src/index.cjs` is now the generic CLDMV CommonJS shim. After the Node.js version guard it loads `./index.mjs` through `require(esm)`. The ESM entry has one export, `envManager`, so the shim returns that object, with `.default` and `.envManager` both pointing back at it. v1.1.0's entry was `module.exports = require("./index.mjs")`, which returned the module namespace.

[#87](#87) switched to the shim when it still returned the bare object with no names, which would have broken `require(x).envManager` and `const { envManager } = require(x)`. [#89](#89) puts `.default` and the ESM name back on it before any release, so nothing that worked in v1.1.0 breaks. Measured against the built package:

| `require("@cldmv/envm")`            | v1.1.0           | v1.2.0                                      |
| ----------------------------------- | ---------------- | ------------------------------------------- |
| result                              | `{ envManager }` | the `envManager` object                     |
| `.envManager.set`                   | function         | function (`.envManager` is the same object) |
| `const { envManager } = require(x)` | works            | works                                       |
| `.set`                              | `undefined`      | function                                    |
| `.default`                          | `undefined`      | the same object                             |

ESM `import { envManager } from "@cldmv/envm"` is unchanged.

---

## 🐛 Bug Fixes

### An unknown or missing scope is refused ([#94](#94), fixes [#95](#95))

Scope must be `session`, `user` or `system`, but nothing checked it. On POSIX, `envManager.set("FOO", "bar", { scope: "usre" })` did nothing and reported nothing. On Windows, anything that wasn't `session` or `user` read and wrote `HKLM\SYSTEM\...\Environment`. The CLI ran with the bad scope, and `--scope` with no value became `session`. The new `src/scope.mjs` checks the scope in both platform backends, in backup listing and in the CLI before anything is read or written. A bad scope now throws `Invalid scope "bogus". Valid scopes: session, user, system`, and the CLI reports a `--scope` with no value as missing.

### The CLI no longer takes a flag as a value or edits the wrong variable ([#94](#94), fixes [#90](#90))

`envm set FOO --scope user` stored the literal value `--scope`, and `envm path append --values /q` without `--name` appended to a variable called `append`, leaving PATH alone. The CLI now parses its arguments properly. A value flag never takes another `--flag` as its value, and the positional name after `path` is read after the op. A missing name, value, `--values` or backup id fails with a usage message instead of running with `undefined`.

### `backup.purge()` deletes backups by age ([#93](#93), fixes [#91](#91))

The backup file timestamp was turned back into a date by replacing every dash with a colon, including those in the date part, so the result was always an Invalid Date and `maxAgeDays` never removed anything. Only the time part's dashes are converted now, so backups older than `maxAgeDays` are purged. The CLI's exit-time purge is fixed by the same change.

---

## 🔧 Build

### `dist/` is one file per module, no bundle ([#97](#97), fixes [#85](#85))

The two tsup bundles are replaced by `scripts/build.mjs`, which runs esbuild over every `src/**/*.mjs` file with `bundle: false` and the `node14` target. Each module is minified on its own with names kept and written to the same path under `dist/`. `dist/cli.mjs` imports the library from `dist/` instead of carrying its own copy, and `src/index.cjs` is still copied verbatim. The entry points and `exports` are unchanged.

---

## 🔧 CI & tooling

- Test coverage goes from about 33% to about 98%, with tests for the POSIX and Windows backends, backups, the PATH helpers and the CLI ([#92](#92), fixes [#3](#3)).
- `test:cjs` runs the CommonJS entry check, and the new `test:dist` runs the Vitest suite against the built `dist/` ([#76](#76)).
- The Vitest config sets the `envm-dev` condition with `devCondition()`, replacing a `test.nodeOptions` setting that Vitest ignored ([#74](#74)).
- `ci.yml` is synced with the CLDMV/.github v4.43.0 template ([#84](#84)), and superseded CI runs on `next` and `hotfixes` are cancelled ([#88](#88), fixes [#86](#86)).
- The `sync-release-notes` companion workflow keeps GitHub Release bodies and tags in step with these changelog files ([#82](#82)).
- File headers are restamped with fix-headers 2.6.1 and 2.6.2, which write `@Filename` without a leading slash ([#96](#96), [#98](#98)).

## 📚 Documentation

- **NEW:** [docs/changelog/v1/v1.2.0.md](https://github.com/CLDMV/envm/blob/v1.2.0/docs/changelog/v1/v1.2.0.md), this changelog.
- README: the CommonJS section shows `require()` returning `envManager` ([#87](#87), [#89](#89)), and What's New is promoted to v1.2.0.

## 🔧 Dependencies

Development dependencies only; envm still has no runtime dependencies.

- **CLDMV dev tools** ([#78](#78), [#96](#96), [#98](#98)): `@cldmv/vitest-runner` 1.5.6 → 1.11.5, `@cldmv/configs` 1.3.0 → 1.5.1 and `@cldmv/fix-headers` 2.2.4 → 2.6.2, with `@cldmv/jsonv` and `@cldmv/prettier-plugin-jsonv` → 1.2.4.
- `vitest` and `@vitest/coverage-v8` 5.0.5 → 5.1.2 ([#77](#77), [#96](#96)).
- `esbuild` added and `tsup` removed ([#97](#97)).

---

## Upgrade notes

- No breaking changes. Drop-in for v1.1.0: `require(x).envManager`, `const { envManager } = require(x)` and ESM `import` work as before, and `require(x).set(…)` and `require(x).default` are new.
- A scope other than `session`, `user` or `system` now throws instead of silently doing nothing, or writing system scope on Windows. Check any computed scope values.
- `envm set NAME --scope …` with no value now fails with a usage message instead of storing `--scope`.



<details>
<summary>👥 Contributors</summary>

- @Shinrai

</details>

---

<!-- coverage-start -->

![coverage](https://img.shields.io/badge/coverage-97.9%25-brightgreen?style=for-the-badge&logo=vitest&logoColor=white)

| Metric | Coverage |
|--------|----------|
| Statements | 99.2% |
| Branches   | 95.0% |
| Functions  | 98.6% |
| Lines      | 99.1% |

*Avg: **97.9%** · `4f52d80` · Node lts/**

<!-- coverage-end -->

<!-- co-authors -->

Co-authored-by: Shinrai <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

type: dependencies Relates to dependency updates, version bumps, or package management

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants