Skip to content

Commit

Permalink
Merge branch 'main' into zhangxin/profile499
Browse files Browse the repository at this point in the history
  • Loading branch information
zhangxin511 authored Feb 3, 2025
2 parents 98441eb + 0f877b4 commit b15c789
Show file tree
Hide file tree
Showing 181 changed files with 1,484 additions and 581 deletions.
5 changes: 3 additions & 2 deletions .changeset/all-heads-lay.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,14 @@
---
---
"section": fix
"highlight": true
---

SharedMap, SharedIntervalCollection and AttributableMap now error on unrecognized Ops
SharedMap, SharedIntervalCollection and AttributableMap now throw an error when they encounter unrecognized Ops

To avoid future versions of DDSes with new Op types causing silent data corruption and de-sync between clients,
DDSes should error when unable to apply an Op.
This prevents data loss and corruption scenarios like a summary client using old code discarding all ops from newer clients.
This prevents data loss and corruption scenarios like a summary client using old code discarding all Ops from newer clients.

If updating applications using SharedMap, SharedIntervalCollection and AttributableMap use a newer version which adds Ops types in the future,
old clients which are old enough to be from before this fix will ignore the new ops instead of erroring.
Expand Down
5 changes: 3 additions & 2 deletions .changeset/light-pears-hammer.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
"section": deprecation
---

`supportedFeatures` is deprecated in `IContainerContext`
The IContainerContext.supportedFeatures property is now deprecated

This was an optional property that was used internally to communicate features supported by the Loader layer to Runtime. This has been replaced with an internal-only functionality.
The `IContainerContext.supportedFeatures` optional property was used internally to communicate features supported by the
Loader layer to the Runtime layer. This has since been replaced with functionality that is not exposed externally.
4 changes: 2 additions & 2 deletions .changeset/many-gifts-strive.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@
"section": deprecation
---

Deprecate unnecessary exports of container-runtime package
Many unnecessary exports have been deprecated in the container-runtime package

The following types in the `@fluidframework/container-runtime` are deprecated. These types are unnecessary for external users of this package.
The following types in the `@fluidframework/container-runtime` package are now deprecated. These types are unnecessary for external users of this package.

- currentDocumentVersionSchema
- DeletedResponseHeaderKey
Expand Down
13 changes: 13 additions & 0 deletions .changeset/quick-chairs-smile.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
---
"@fluidframework/azure-client": minor
---
---
"section": deprecation
---

ITokenClaims and ScopeType types are now deprecated

The `ITokenClaims` and `ScopeType` types in `@fluidframework/azure-client` are now deprecated. These were isolated types
re-exported for convenience but they do not directly interact with typical azure-client APIs.

See [issue #23702](https://github.com/microsoft/FluidFramework/issues/23702) for details and alternatives.
1 change: 0 additions & 1 deletion .github/labeler-areas.yml
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,6 @@
- server/routerlicious/.changeset/**

dependencies:
- lerna-package-lock.json
- package-lock.json
- pnpm-lock.yaml

Expand Down
89 changes: 89 additions & 0 deletions .pnpmfile.cjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,89 @@
/*!
* Copyright (c) Microsoft Corporation and contributors. All rights reserved.
* Licensed under the MIT License.
*/

/*
* .pnpmfile.cjs is a pnpm hook file that allows modification of package.json content
* (in memory) of the packages that are being installed.
* https://pnpm.io/pnpmfile
*
* This implementation is based on https://gist.github.com/dvins/33b8fb52480149d37cdeb98890244c5b.
* Changes:
* - Added support for complete dependency removal (specify null for newVersion)
* - Apply stylistic and naming preferences and comment cleanup
* - Specify remapPeerDependencies for local needs
*/

//@ts-check

// https://pnpm.io/pnpmfile
// https://github.com/pnpm/pnpm/issues/4214
// https://github.com/pnpm/pnpm/issues/5391

const remapPeerDependencies = [
// @fluidframework/azure-client 1.x declares a peerDependency on fluid-framework but does not require it.
// It should have been an optional peer dependency. We just remove it.
{
package: "@fluidframework/azure-client",
packageVersionPrefix: "1.",
peerDependency: "fluid-framework",
newVersion: null,
},
];

// Only emit the checking banner once.
// And only if engaged. Some pnpm uses expect specific output (like `pnpm list`) and may break if anything is emitted.
let emittedCheckBanner = false;

function overridesPeerDependencies(pkg) {
if (!emittedCheckBanner) {
console.log(`Checking for package peerDependency overrides`);
emittedCheckBanner = true;
}

if (!pkg.peerDependencies) {
return;
}

const applicableRemapPeerDependencies = remapPeerDependencies.filter(
(remap) =>
remap.package === pkg.name && pkg.version.startsWith(remap.packageVersionPrefix),
);

if (applicableRemapPeerDependencies.length === 0) {
return;
}

console.log(` - Checking ${pkg.name}@${pkg.version}`);
for (const dep of applicableRemapPeerDependencies) {
if (dep.peerDependency in pkg.peerDependencies) {
console.log(
` - Overriding ${pkg.name}@${pkg.version} peerDependency ${dep.peerDependency}@${pkg.peerDependencies[dep.peerDependency]}`,
);

// First add a new dependency to the package, if defined, and then remove the peer dependency.
if (dep.newVersion) {
// This approach has the added advantage that scoped overrides should now work, too.
pkg.dependencies[dep.peerDependency] = dep.newVersion;
}
delete pkg.peerDependencies[dep.peerDependency];

const newDep = pkg.dependencies[dep.peerDependency];
console.log(
newDep
? ` - Overrode ${pkg.name}@${pkg.version} peerDependency to ${dep.peerDependency}@${newDep} (as full dependency)`
: ` - Removed ${pkg.name}@${pkg.version} peerDependency`,
);
}
}
}

module.exports = {
hooks: {
readPackage(pkg, _context) {
overridesPeerDependencies(pkg);
return pkg;
},
},
};
3 changes: 0 additions & 3 deletions .prettierignore
Original file line number Diff line number Diff line change
Expand Up @@ -101,9 +101,6 @@ tools/markdown-magic/test/include.md
# github config yaml files are prone to breaking when reformatted
.github/**/*.yml

# Autogenerated file
.github/fabricbot.json

# These are actually templates, not pure YAML files
**/templates/*.yaml

Expand Down
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,13 +52,13 @@ Here's the list of release group workspaces:
- [./experimental](./experimental) (Published in the `@fluid-experimental/` namespace)
- [./examples](./examples) (Not published, live in the `@fluid-example/` namespace)
- [./azure](./azure). (Published in the `@fluidframework/` namespace)
- routerlicious (Reference Fluid Ordering Service) (Rooted in [./server/routerlicious](./server/routerlicious). Configured by [./server/routerlicious/lerna.json](server/routerlicious/lerna.json))
- routerlicious (Reference Fluid Ordering Service) (Rooted in [./server/routerlicious](./server/routerlicious). Configured by [./server/routerlicious/pnpm-workspace.yaml](server/routerlicious/pnpm-workspace.yaml))
- [Packages](./server/routerlicious/packages) (Published in the `@fluidframework/` namespace)
- gitrest (Rooted in [./server/gitrest](./server/gitrest). Configured by [./server/gitrest/lerna.json](./server/gitrest/lerna.json))
- gitrest (Rooted in [./server/gitrest](./server/gitrest). Configured by [./server/gitrest/pnpm-workspace.yaml](./server/gitrest/pnpm-workspace.yaml))
- [Packages](./server/gitrest/packages) (Published in the `@fluidframework/` namespace)
- historian (Rooted in [./server/historian](./server/historian). Configured by [./server/historian/lerna.json](./server/historian/lerna.json))
- historian (Rooted in [./server/historian](./server/historian). Configured by [./server/historian/pnpm-workspace.yaml](./server/historian/pnpm-workspace.yaml))
- [Packages](./server/historian/packages) (Published in the `@fluidframework/` namespace)
- build-tools (Rooted in [./build-tools](./build-tools). Configured by [./build-tools/lerna.json](./build-tools/lerna.json))
- build-tools (Rooted in [./build-tools](./build-tools). Configured by [./build-tools/pnpm-workspace.yaml](./build-tools/pnpm-workspace.yaml))
- [Packages](./build-tools/packages) (Published in a mix of `@fluidframework/` and `@fluid-tools/` namespaces)

Here's a list of other sets of other packages (each package within these groups is versioned independently,
Expand Down
112 changes: 112 additions & 0 deletions RELEASE_NOTES/2.21.0.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,112 @@
<!-- THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. -->

# Fluid Framework v2.21.0

## Contents

- [🐛 Bug Fixes](#-bug-fixes)
- [SharedMap, SharedIntervalCollection and AttributableMap now throw an error when they encounter unrecognized Ops (#23659)](#sharedmap-sharedintervalcollection-and-attributablemap-now-throw-an-error-when-they-encounter-unrecognized-ops-23659)
- [⚠️ Deprecations](#️-deprecations)
- [Many unnecessary exports have been deprecated in the container-runtime package (#23607)](#many-unnecessary-exports-have-been-deprecated-in-the-container-runtime-package-23607)
- [The IContainerContext.supportedFeatures property is now deprecated (#22877)](#the-icontainercontextsupportedfeatures-property-is-now-deprecated-22877)
- [ITokenClaims and ScopeType types are now deprecated (#23703)](#itokenclaims-and-scopetype-types-are-now-deprecated-23703)

## 🐛 Bug Fixes

### SharedMap, SharedIntervalCollection and AttributableMap now throw an error when they encounter unrecognized Ops ([#23659](https://github.com/microsoft/FluidFramework/issues/23659))

To avoid future versions of DDSes with new Op types causing silent data corruption and de-sync between clients, DDSes should error when unable to apply an Op. This prevents data loss and corruption scenarios like a summary client using old code discarding all Ops from newer clients.

If updating applications using SharedMap, SharedIntervalCollection and AttributableMap use a newer version which adds Ops types in the future, old clients which are old enough to be from before this fix will ignore the new ops instead of erroring. Therefore it may be useful to ensure this update is deployed as widely as possible before migrating any to newer versions which add new op formats to these DDSes.

#### Change details

Commit: [`3dd4208`](https://github.com/microsoft/FluidFramework/commit/3dd4208dd329a9200c4405f07e302b0ab1ff6159)

Affected packages:

- @fluid-experimental/attributable-map
- @fluidframework/map
- @fluidframework/sequence

[⬆️ Table of contents](#contents)

## ⚠️ Deprecations

### Many unnecessary exports have been deprecated in the container-runtime package ([#23607](https://github.com/microsoft/FluidFramework/issues/23607))

The following types in the `@fluidframework/container-runtime` package are now deprecated. These types are unnecessary for external users of this package.

- currentDocumentVersionSchema
- DeletedResponseHeaderKey
- DocumentSchemaValueType
- DocumentsSchemaController
- GCFeatureMatrix
- GCNodeType
- GCVersion
- IBlobManagerLoadInfo
- ICancellableSummarizerController
- ICancellationToken
- IConnectableRuntime
- IContainerRuntimeMetadata
- ICreateContainerMetadata
- IDocumentSchema
- IDocumentSchemaChangeMessage
- IDocumentSchemaCurrent
- IDocumentSchemaFeatures
- IGCMetadata
- IGCStats
- IMarkPhaseStats
- IRefreshSummaryAckOptions
- ISerializedElection
- ISubmitSummaryOptions
- ISummarizerInternalsProvider
- ISummarizerRuntime
- ISummaryCancellationToken
- ISummaryMetadataMessage
- ISweepPhaseStats
- Summarizer

#### Change details

Commit: [`3da5b42`](https://github.com/microsoft/FluidFramework/commit/3da5b427ef406799abade04196e43bb6d66d898d)

Affected packages:

- @fluidframework/container-runtime

[⬆️ Table of contents](#contents)

### The IContainerContext.supportedFeatures property is now deprecated ([#22877](https://github.com/microsoft/FluidFramework/issues/22877))

The `IContainerContext.supportedFeatures` optional property was used internally to communicate features supported by the Loader layer to the Runtime layer. This has since been replaced with functionality that is not exposed externally.

#### Change details

Commit: [`4c06412`](https://github.com/microsoft/FluidFramework/commit/4c06412bb365d680430f83b87c456d132d9da1be)

Affected packages:

- @fluidframework/container-definitions

[⬆️ Table of contents](#contents)

### ITokenClaims and ScopeType types are now deprecated ([#23703](https://github.com/microsoft/FluidFramework/issues/23703))

The `ITokenClaims` and `ScopeType` types in `@fluidframework/azure-client` are now deprecated. These were isolated types re-exported for convenience but they do not directly interact with typical azure-client APIs.

See [issue #23702](https://github.com/microsoft/FluidFramework/issues/23702) for details and alternatives.

#### Change details

Commit: [`f679945`](https://github.com/microsoft/FluidFramework/commit/f67994577597aae6dc8b42f3c6557c744adc0964)

Affected packages:

- @fluidframework/azure-client

[⬆️ Table of contents](#contents)

### 🛠️ Start Building Today!

Please continue to engage with us on GitHub [Discussion](https://github.com/microsoft/FluidFramework/discussions) and [Issue](https://github.com/microsoft/FluidFramework/issues) pages as you adopt Fluid Framework!
2 changes: 1 addition & 1 deletion azure/packages/azure-service-utils/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@
"ci:build:api-reports:current": "api-extractor run --config api-extractor/api-extractor.current.json",
"ci:build:api-reports:legacy": "api-extractor run --config api-extractor/api-extractor.legacy.json",
"ci:build:docs": "api-extractor run",
"clean": "rimraf --glob dist lib \"*.d.ts\" \"**/*.tsbuildinfo\" \"**/*.build.log\" _api-extractor-temp",
"clean": "rimraf --glob dist lib {alpha,beta,internal,legacy}.d.ts \"**/*.tsbuildinfo\" \"**/*.build.log\" _api-extractor-temp",
"eslint": "eslint --format stylish src",
"eslint:fix": "eslint --format stylish src --fix --fix-type problem,suggestion,layout",
"format": "npm run format:biome",
Expand Down
3 changes: 0 additions & 3 deletions biome.jsonc
Original file line number Diff line number Diff line change
Expand Up @@ -86,9 +86,6 @@
// This is a test file
"tools/markdown-magic/test/include.md",

// Autogenerated file
".github/fabricbot.json",

// These are actually templates, not pure YAML files
"**/templates/*.yaml",

Expand Down
9 changes: 4 additions & 5 deletions build-tools/packages/build-cli/docs/generate.md
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ _See code: [src/commands/generate/assertTags.ts](https://github.com/microsoft/Fl

## `flub generate buildVersion`

This command is used to compute the version number of Fluid packages. The release version number is based on what's in the lerna.json/package.json. The CI pipeline will supply the build number and branch to determine the prerelease suffix if it is not a tagged build
This command is used to compute the version number of Fluid packages. The release version number is based on what's in the release group root package.json. The CI pipeline will supply the build number and branch to determine the prerelease suffix if it is not a tagged build.

```
USAGE
Expand All @@ -86,8 +86,7 @@ USAGE
FLAGS
-i, --includeInternalVersions=<value> Include Fluid internal versions.
--base=<value> The base version. This will be read from lerna.json/package.json if not
provided.
--base=<value> The base version. This will be read from package.json if not provided.
--build=<value> (required) The CI build number.
--packageTypes=<option> [default: none] If provided, the version generated will include extra strings
based on the TypeScript types that are expected to be used. This flag should
Expand All @@ -106,8 +105,8 @@ LOGGING FLAGS
DESCRIPTION
This command is used to compute the version number of Fluid packages. The release version number is based on what's in
the lerna.json/package.json. The CI pipeline will supply the build number and branch to determine the prerelease
suffix if it is not a tagged build
the release group root package.json. The CI pipeline will supply the build number and branch to determine the
prerelease suffix if it is not a tagged build.
EXAMPLES
$ flub generate buildVersion
Expand Down
Loading

0 comments on commit b15c789

Please sign in to comment.