Skip to content

Commit

Permalink
Merge branch 'main' into bt-vitest
Browse files Browse the repository at this point in the history
  • Loading branch information
tylerbutler committed Jan 7, 2025
2 parents 07bdabd + 401cc06 commit 3357c0e
Show file tree
Hide file tree
Showing 248 changed files with 1,828 additions and 1,601 deletions.
45 changes: 45 additions & 0 deletions .changeset/nice-grapes-show.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
---
"@fluidframework/merge-tree": minor
"@fluidframework/sequence": minor
---
---
"section": legacy
---

Remove deprecated Merge-Tree and SharedString ISegment members

The current ISegment interface over-exposes a number of properties which do not have an external use case, and any external usage could result in damage to the underlying merge-tree including data corruption.
[In Fluid Framework release 2.12.0 these properties and associated types were deprecated.](https://github.com/microsoft/FluidFramework/blob/main/RELEASE_NOTES/2.12.0.md#merge-tree-and-sharedstring-isegment-deprecations-23323)

The only use case that will continue to be supported is determining if a segment is removed. For this purpose we've added the free function `segmentIsRemoved(segment: ISegment): boolean`.

For example, checking if a segment is not removed would change as follows:

```diff
- if(segment.removedSeq === undefined){
+ if(!segmentIsRemoved(segment)){
```

The following properties are removed from ISegment and its implementations:

- clientId
- index
- localMovedSeq
- localRefs
- localRemovedSeq
- localSeq
- movedClientsIds
- movedSeq
- movedSeqs
- ordinal
- removedClientIds
- removedSeq
- seq
- wasMovedOnInsert

Additionally, the following types are also removed:

- IMergeNodeCommon
- IMoveInfo
- IRemovalInfo
- LocalReferenceCollection
12 changes: 12 additions & 0 deletions .changeset/quiet-days-carry.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
---
"@fluidframework/container-runtime": minor
---
---
"section": legacy
---

Grouped batching is enabled by default and cannot be disabled

The Grouped Batching feature in the container runtime has stabilized and is now enabled by default.

The `IContainerRuntimeOptions.enableGroupedBatching` option, which allowed an application to disable grouped batching, has been removed. Grouped Batching is now considered a core part of the container runtime, and as such can no longer be disabled.
16 changes: 16 additions & 0 deletions .changeset/shy-socks-rule.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
---
"@fluid-experimental/property-changeset": patch
---
---
"section": fix
---

Fix 'Error: PR-008: Trying to remove a non-existing entry' error in IndexedCollection class

The IndexedCollection class would throw the following error when applying a changeset:

```
Error: PR-008: Trying to remove a non-existing entry:
```

The underlying problem has been fixed and this error should no longer occur.
2 changes: 1 addition & 1 deletion azure/packages/azure-local-service/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@fluidframework/azure-local-service",
"version": "2.14.0",
"version": "2.20.0",
"description": "Local implementation of the Azure Fluid Relay service for testing/development use",
"homepage": "https://fluidframework.com",
"repository": {
Expand Down
4 changes: 2 additions & 2 deletions azure/packages/azure-service-utils/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@fluidframework/azure-service-utils",
"version": "2.14.0",
"version": "2.20.0",
"description": "Helper service-side utilities for connecting to Azure Fluid Relay service",
"homepage": "https://fluidframework.com",
"repository": {
Expand Down Expand Up @@ -97,7 +97,7 @@
"@arethetypeswrong/cli": "^0.17.1",
"@biomejs/biome": "~1.9.3",
"@fluid-tools/build-cli": "^0.51.0",
"@fluidframework/azure-service-utils-previous": "npm:@fluidframework/azure-service-utils@2.12.0",
"@fluidframework/azure-service-utils-previous": "npm:@fluidframework/azure-service-utils@2.13.0",
"@fluidframework/build-common": "^2.0.3",
"@fluidframework/build-tools": "^0.51.0",
"@fluidframework/eslint-config-fluid": "^5.6.0",
Expand Down
4 changes: 2 additions & 2 deletions common/build/eslint-config-fluid/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@fluidframework/eslint-config-fluid",
"version": "5.7.0",
"version": "5.7.1",
"description": "Shareable ESLint config for the Fluid Framework",
"homepage": "https://fluidframework.com",
"repository": {
Expand Down Expand Up @@ -29,7 +29,7 @@
"test": "echo TODO: add tests"
},
"dependencies": {
"@fluid-internal/eslint-plugin-fluid": "^0.1.3",
"@fluid-internal/eslint-plugin-fluid": "^0.1.4",
"@microsoft/tsdoc": "^0.14.2",
"@rushstack/eslint-patch": "~1.4.0",
"@rushstack/eslint-plugin": "~0.13.1",
Expand Down
8 changes: 4 additions & 4 deletions common/build/eslint-config-fluid/pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

78 changes: 40 additions & 38 deletions common/build/eslint-plugin-fluid/DEV.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,38 +7,39 @@ This guide outlines the steps required to add new ESLint rules, update dependenc
### 1. Add New Rule to `eslint-plugin-fluid` (PR 1)

1. **Create the Rule**: Write the new rule following best practices for ESLint. If you need guidance, refer to [ESLint's rule documentation](https://eslint.org/docs/latest/developer-guide/working-with-rules).
- [List of Custom Rules](https://github.com/microsoft/FluidFramework/tree/main/common/build/eslint-plugin-fluid/src/rules)

- [List of Custom Rules](https://github.com/microsoft/FluidFramework/tree/main/common/build/eslint-plugin-fluid/src/rules)

2. **Testing**: Ensure the rule is thoroughly tested. Tests help validate that the rule behaves as expected across various code scenarios.

Directory structure:

```plaintext
eslint-plugin-fluid/
├── src
│ └── rules/ <!-- Contains the ESLint rule implementations -->
│ ├── rule-one.js
│ └── rule-two.js
├── test/
│ ├── example/ <!-- Example mock files to test each rule in isolation -->
│ │ ├── rule-one/
│ │ │ ├── mockFileOne.js
│ │ │ └── mockFileTwo.js
│ │ └── rule-two/
│ │ ├── mockFileOne.js
│ │ └── mockFileTwo.js
│ ├── rule-one/ <!-- Test suite for rule-one -->
│ │ └── rule-one.test.js
│ └── rule-two/ <!-- Test suite for rule-two -->
│ └── rule-two.test.js
```
Directory structure:

```plaintext
eslint-plugin-fluid/
├── src
│ └── rules/ <!-- Contains the ESLint rule implementations -->
│ ├── rule-one.js
│ └── rule-two.js
├── test/
│ ├── example/ <!-- Example mock files to test each rule in isolation -->
│ │ ├── rule-one/
│ │ │ ├── mockFileOne.js
│ │ │ └── mockFileTwo.js
│ │ └── rule-two/
│ │ ├── mockFileOne.js
│ │ └── mockFileTwo.js
│ ├── rule-one/ <!-- Test suite for rule-one -->
│ │ └── rule-one.test.js
│ └── rule-two/ <!-- Test suite for rule-two -->
│ └── rule-two.test.js
```
3. **Update Changelog**: Record the new rule in the `CHANGELOG.md` file of the `@fluid-internal/eslint-plugin-fluid` package. This provides visibility into what was added for future reference.
4. **Version Bump**: Update the version of `eslint-plugin-fluid` in its `package.json` following the [semantic versioning guidelines](https://semver.org/):
- **Patch** version for fixes (backward-compatible)
- **Minor** version for new rules (backward-compatible)
- **Major** version for breaking changes
- **Patch** version for fixes (backward-compatible)
- **Minor** version for new rules (backward-compatible)
- **Major** version for breaking changes
### 2. Publish New Version of `eslint-plugin-fluid`
Expand All @@ -55,25 +56,26 @@ In `@fluidframework/eslint-config-fluid`, update the version of `@fluid-internal
### 4. Add New Rule to the Appropriate Config
Depending on the scope of the rule, add it to one of the following configurations (NOTE: `recommended.js` extends `minimal-deprecated.js`, and `strict.js` extends `recommended.js`):
- `minimal-deprecated.js`
- `recommended.js`
- `strict.js`
- `minimal-deprecated.js`
- `recommended.js`
- `strict.js`
1. **Update Changelog**: Record the change in `eslint-config-fluid`'s `CHANGELOG.md`.
2. **Version Bump**: Update the version of `eslint-config-fluid` in its `package.json`.
3. **Fix Violations in the Repo**:
- Install the local version of `eslint-config-fluid` across relevant release groups.
- Run the linter to identify and fix any violations locally.
- To simplify integration, add the following to the `pnpmOverrides` section of the relevant `package.json` files (make sure *NOT* to check `pnpmOverrides` change in):
```json
{
"pnpmOverrides": {
"@fluidframework/eslint-config-fluid": "file:<relative-path-to-eslint-config-fluid-package>"
}
}
```
- Install the local version of `eslint-config-fluid` across relevant release groups.
- Run the linter to identify and fix any violations locally.
- To simplify integration, add the following to the `pnpmOverrides` section of the relevant `package.json` files (make sure _NOT_ to check `pnpmOverrides` change in):
```json
{
"pnpmOverrides": {
"@fluidframework/eslint-config-fluid": "file:<relative-path-to-eslint-config-fluid-package>"
}
}
```
### 5. Publish New Version of `eslint-config-fluid`
Expand Down
3 changes: 1 addition & 2 deletions common/build/eslint-plugin-fluid/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@fluid-internal/eslint-plugin-fluid",
"version": "0.1.3",
"version": "0.1.4",
"description": "Custom ESLint rules for the Fluid Framework",
"homepage": "https://fluidframework.com",
"repository": {
Expand Down Expand Up @@ -31,7 +31,6 @@
"@fluidframework/build-common": "^2.0.3",
"eslint": "^8.57.0",
"mocha": "^10.4.0",

"mocha-multi-reporters": "^1.5.1",
"prettier": "~3.2.5",
"rimraf": "^5.0.7",
Expand Down
Loading

0 comments on commit 3357c0e

Please sign in to comment.