Skip to content

Bump @fluidframework/test-utils from 1.4.0 to 2.91.0 in /packages/live-share-media#840

Open
dependabot[bot] wants to merge 1 commit intomainfrom
dependabot/npm_and_yarn/packages/live-share-media/fluidframework/test-utils-2.91.0
Open

Bump @fluidframework/test-utils from 1.4.0 to 2.91.0 in /packages/live-share-media#840
dependabot[bot] wants to merge 1 commit intomainfrom
dependabot/npm_and_yarn/packages/live-share-media/fluidframework/test-utils-2.91.0

Conversation

@dependabot
Copy link
Copy Markdown
Contributor

@dependabot dependabot bot commented on behalf of github Mar 23, 2026

Bumps @fluidframework/test-utils from 1.4.0 to 2.91.0.

Release notes

Sourced from @​fluidframework/test-utils's releases.

Fluid Framework v2.91.0 (minor)

Contents

  • ✨ New Features
    • [Adds withDefault API to allow defining default values for required and optional fields (#26502)](#user-content-adds-withdefault-api-to-allow-defining-default-values-for-required-and-optional-fields-26502)

✨ New Features

Adds withDefault API to allow defining default values for required and optional fields (#26502)

The withDefault API is now available on SchemaFactoryAlpha. It allows you to specify default values for fields, making them optional in constructors even when the field is marked as required in the schema. This provides a better developer experience by reducing boilerplate when creating objects.

The withDefault API wraps a field schema and defines a default value to use when the field is not provided during construction. The default value must be of an allowed type of the field. You can provide defaults in two ways:

  • A value: When a value is provided directly, the data is copied for each use to ensure independence between instances
  • A generator function: A function that is called each time to produce a fresh value

Defaults are evaluated eagerly during node construction.

Required fields with defaults

import { SchemaFactoryAlpha, TreeAlpha } from "@fluidframework/tree/alpha";
const sf = new SchemaFactoryAlpha("example");
class Person extends sf.objectAlpha("Person", {
name: sf.required(sf.string),
age: sf.withDefault(sf.required(sf.number), -1),
role: sf.withDefault(sf.required(sf.string), "guest"),
}) {}
// Before: all fields were required
// const person = new Person({ name: "Alice", age: -1, role: "guest" });
// After: fields with defaults are optional
const person = new Person({ name: "Alice" });
// person.age === -1
// person.role === "guest"
// You can still provide values to override the defaults
const admin = new Person({ name: "Bob", age: 30, role: "admin" });

Optional fields with custom defaults

Optional fields (sf.optional) already default to undefined, but withDefault allows you to specify a different default value:

... (truncated)

Changelog

Sourced from @​fluidframework/test-utils's changelog.

2.91.0

Dependency updates only.

2.90.0

Dependency updates only.

2.83.0

Dependency updates only.

2.82.0

Dependency updates only.

2.81.0

Dependency updates only.

2.80.0

Dependency updates only.

2.74.0

Dependency updates only.

2.73.0

Dependency updates only.

2.72.0

Dependency updates only.

2.71.0

Dependency updates only.

2.70.0

Minor Changes

  • Removed deprecated export of MinimumVersionForCollab from @​fluidframework/container-runtime (#25309) 776cb1ce31

    Removed the deprecated re-export of MinimumVersionForCollab from @​fluidframework/container-runtime. This type should now be imported from @​fluidframework/runtime-definitions. See the Fluid Framework 2.52.0 release notes for details.

... (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 this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)

@dependabot dependabot bot added dependencies Pull requests that update a dependency file javascript Pull requests that update javascript code labels Mar 23, 2026
Bumps [@fluidframework/test-utils](https://github.com/microsoft/FluidFramework/tree/HEAD/packages/test/test-utils) from 1.4.0 to 2.91.0.
- [Release notes](https://github.com/microsoft/FluidFramework/releases)
- [Changelog](https://github.com/microsoft/FluidFramework/blob/main/packages/test/test-utils/CHANGELOG.md)
- [Commits](https://github.com/microsoft/FluidFramework/commits/client_v2.91.0/packages/test/test-utils)

---
updated-dependencies:
- dependency-name: "@fluidframework/test-utils"
  dependency-version: 2.91.0
  dependency-type: direct:development
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
@dependabot dependabot bot force-pushed the dependabot/npm_and_yarn/packages/live-share-media/fluidframework/test-utils-2.91.0 branch from ea45617 to 52e7a7b Compare April 2, 2026 20:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dependencies Pull requests that update a dependency file javascript Pull requests that update javascript code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants