diff --git a/.changeset/all-heads-lay.md b/.changeset/all-heads-lay.md index cd1c01d20c25..7993eac60945 100644 --- a/.changeset/all-heads-lay.md +++ b/.changeset/all-heads-lay.md @@ -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. diff --git a/.changeset/light-pears-hammer.md b/.changeset/light-pears-hammer.md index 9c1fcb1522fa..17637c3bbcc2 100644 --- a/.changeset/light-pears-hammer.md +++ b/.changeset/light-pears-hammer.md @@ -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. diff --git a/.changeset/many-gifts-strive.md b/.changeset/many-gifts-strive.md index 9351b97c2417..68ba47a9b6f5 100644 --- a/.changeset/many-gifts-strive.md +++ b/.changeset/many-gifts-strive.md @@ -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 diff --git a/.changeset/quick-chairs-smile.md b/.changeset/quick-chairs-smile.md new file mode 100644 index 000000000000..47569a15889d --- /dev/null +++ b/.changeset/quick-chairs-smile.md @@ -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. diff --git a/.github/labeler-areas.yml b/.github/labeler-areas.yml index bc367fa16578..98f2f825285b 100644 --- a/.github/labeler-areas.yml +++ b/.github/labeler-areas.yml @@ -81,7 +81,6 @@ - server/routerlicious/.changeset/** dependencies: - - lerna-package-lock.json - package-lock.json - pnpm-lock.yaml diff --git a/.pnpmfile.cjs b/.pnpmfile.cjs new file mode 100644 index 000000000000..e4a6a48d9cf3 --- /dev/null +++ b/.pnpmfile.cjs @@ -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; + }, + }, +}; diff --git a/.prettierignore b/.prettierignore index 5881ab3762bc..3b1e205b4acd 100644 --- a/.prettierignore +++ b/.prettierignore @@ -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 diff --git a/README.md b/README.md index 1013f3eb2207..e2cf4c45da10 100644 --- a/README.md +++ b/README.md @@ -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, diff --git a/RELEASE_NOTES/2.21.0.md b/RELEASE_NOTES/2.21.0.md new file mode 100644 index 000000000000..2df5dd4d1235 --- /dev/null +++ b/RELEASE_NOTES/2.21.0.md @@ -0,0 +1,112 @@ + + +# 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! diff --git a/azure/packages/azure-service-utils/package.json b/azure/packages/azure-service-utils/package.json index 912b3241c8ea..a3278a318b9b 100644 --- a/azure/packages/azure-service-utils/package.json +++ b/azure/packages/azure-service-utils/package.json @@ -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", diff --git a/biome.jsonc b/biome.jsonc index a6d5f6e2a221..224f15613d23 100644 --- a/biome.jsonc +++ b/biome.jsonc @@ -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", diff --git a/build-tools/packages/build-cli/docs/generate.md b/build-tools/packages/build-cli/docs/generate.md index 09575d915fee..618dd547b4df 100644 --- a/build-tools/packages/build-cli/docs/generate.md +++ b/build-tools/packages/build-cli/docs/generate.md @@ -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 @@ -86,8 +86,7 @@ USAGE FLAGS -i, --includeInternalVersions= Include Fluid internal versions. - --base= The base version. This will be read from lerna.json/package.json if not - provided. + --base= The base version. This will be read from package.json if not provided. --build= (required) The CI build number. --packageTypes=