Skip to content

Commit 4e82df5

Browse files
authored
Merge branch 'main' into eslint-dep-upgrade
2 parents 5e25e7a + 3c8f360 commit 4e82df5

119 files changed

Lines changed: 3658 additions & 1293 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.changeset/lazy-lies-enjoy.md

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
---
2+
"@fluidframework/map": minor
3+
"__section": legacy
4+
---
5+
6+
Add legacy beta map compatibility interfaces
7+
8+
New legacy beta map interfaces make it possible to type legacy map-like DDS APIs against Fluid's stable map abstraction while preserving the legacy DDS `get` and `set` APIs.
9+
10+
```typescript
11+
import type { FluidMapLegacy, IDirectoryBeta, ISharedMapBeta } from "@fluidframework/map/legacy";
12+
13+
declare const directory: IDirectoryBeta;
14+
declare const sharedMap: ISharedMapBeta;
15+
16+
const directoryMap: FluidMapLegacy<string, unknown> = directory;
17+
const sharedMapAsLegacyMap: FluidMapLegacy<string, unknown> = sharedMap;
18+
```

.changeset/petite-pillows-wave.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
---
2+
"fluid-framework": minor
3+
"@fluidframework/tree": minor
4+
"__section": fix
5+
---
6+
Add SharedTreeOptionsBeta.healUnresolvableIdentifiersOnDecode to recover documents with corrupted identifiers
7+
8+
A SharedTree bug can result in corrupted documents due to their attach summary compressing identifier-field values in a way that cannot be uncompressed.
9+
This bug manifested as remote clients processing the op throwing an error with the message "Unknown op space ID.".
10+
11+
This change adds an option (`healUnresolvableIdentifiersOnDecode`) to `configuredSharedTreeBetaLegacy` which will allow documents affected by this bug to load again when enabled.
12+
Enabling this option carries some risk, see documentation on the interface itself for more details.
13+
14+
#### Who is affected
15+
16+
Only SharedTrees attached to a container that was already attached can be impacted.
17+
Furthermore, this bug only occurs when the attached tree contains [`identifier`](https://fluidframework.com/docs/api/tree/schemafactory-class#identifier-property) fields which contain implicitly generated default values.

.changeset/salty-colts-appear.md

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
---
2+
"@fluidframework/core-interfaces": minor
3+
"__section": deprecation
4+
---
5+
6+
Deprecate LogLevel.default and LogLevel.error
7+
8+
`LogLevel.default` and `LogLevel.error` in `@fluidframework/core-interfaces` are deprecated in favor of the semantically clearer `LogLevel.info` and `LogLevel.essential`.
9+
10+
#### Migration
11+
12+
The recommended replacement for `LogLevel.default` depends on how the value is used:
13+
14+
- For an **event's default `logLevel`** (e.g. the `logLevel` argument to `ITelemetryBaseLogger.send`), the recommendation is `LogLevel.essential`.
15+
- For a logger's **default `minLogLevel`** (the threshold that filters events), `LogLevel.info` is the recommendation.
16+
17+
The replacement for `LogLevel.error` should always be `LogLevel.essential`.
18+
19+
See [issue #26969](https://github.com/microsoft/FluidFramework/issues/26969) for full guidance and removal tracking (planned for v3.0).

.changeset/twenty-rivers-spend.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
---
2+
"fluid-framework": minor
3+
"@fluidframework/tree": minor
4+
"__section": fix
5+
---
6+
Fix a SharedTree document corruption bug
7+
8+
A SharedTree bug which could corrupt documents when attaching them to containers has been fixed.
9+
See `healUnresolvableIdentifiersOnDecode` on `configuredSharedTreeBetaLegacy` for a potential mitigation path for documents that were already corrupted by this bug.
10+
11+
#### Who is affected
12+
13+
Only SharedTrees attached to a container that was already attached can be impacted.
14+
Furthermore, this bug only occurs when the attached tree contains [`identifier`](https://fluidframework.com/docs/api/tree/schemafactory-class#identifier-property) fields which contain implicitly generated default values.

common/build/eslint-config-fluid/CHANGELOG.md

Lines changed: 48 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,55 @@
11
# @fluidframework/eslint-config-fluid Changelog
22

3-
## vNext
3+
## [11.0.0](https://github.com/microsoft/FluidFramework/releases/tag/eslint-config-fluid_v11.0.0)
44

5-
### ⚠ BREAKING CHANGES
5+
### Breaking: node 22 is now the minimum supported node version
66

7-
- Node 22 is now the minimum supported Node.js version. This aligns with the standing Node upgrade policy as Node 20 reaches end-of-life on April 30, 2026.
7+
Node 22 is now the minimum supported Node.js version. This aligns with the standing Node upgrade policy as Node 20 reached end-of-life on April 30, 2026.
8+
9+
### Breaking: import-x/order disabled
10+
11+
The `import-x/order` rule has been disabled. Prefer using formatting tools like Biome to handle import sorting.
12+
13+
### Breaking: ESLint 8 legacy configs no longer exported
14+
15+
This package now uses ESLint flat config format exclusively. The legacy `.eslintrc` format is no longer supported.
16+
The package root now exports the named flat and server configs directly from `@fluidframework/eslint-config-fluid`.
17+
18+
**Requirements:**
19+
20+
- ESLint 9 (recommended), or
21+
- ESLint 8.21+ with `ESLINT_USE_FLAT_CONFIG=true` environment variable
22+
23+
**Migration:**
24+
25+
Replace your `.eslintrc.cjs`:
26+
27+
```javascript
28+
// OLD - .eslintrc.cjs (no longer supported)
29+
module.exports = { extends: ["@fluidframework/eslint-config-fluid/strict"] };
30+
```
31+
32+
With `eslint.config.mts`:
33+
34+
```javascript
35+
// NEW - eslint.config.mts
36+
import { strict } from "@fluidframework/eslint-config-fluid";
37+
export default [...strict];
38+
```
39+
40+
For ESLint 8.21+ users, set the environment variable:
41+
42+
```bash
43+
ESLINT_USE_FLAT_CONFIG=true eslint .
44+
```
45+
46+
**Removed files:**
47+
48+
- `base.js`, `minimal-deprecated.js`, `recommended.js`, `strict.js`, `strict-biome.js`, `index.js`
49+
50+
**Removed dependency:**
51+
52+
- `@eslint/eslintrc` (FlatCompat no longer needed)
853

954
## [10.0.0](https://github.com/microsoft/FluidFramework/releases/tag/eslint-config-fluid_v10.0.0)
1055

common/build/eslint-config-fluid/README.md

Lines changed: 50 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -2,20 +2,46 @@
22

33
This package contains a shared ESLint config used by all the packages in the Fluid Framework repo.
44

5-
It exports the following shared ESLint configs:
5+
## Requirements
66

7-
## ESLint 9 Flat Config Support
7+
- **ESLint 9** (recommended), or
8+
- **ESLint 8.21+** with `ESLINT_USE_FLAT_CONFIG=true` environment variable
89

9-
This package supports **ESLint 9 flat config format** via the `flat.mjs` export. Packages can use `eslint.config.mjs` files that import from this module.
10+
This package uses ESLint's flat config format exclusively. Legacy `.eslintrc` format is not supported.
1011

11-
For flat config (ESLint 9), import from `@fluidframework/eslint-config-fluid/flat.mjs`:
12+
## Usage
13+
14+
Import the desired configuration and spread it into your `eslint.config.mts`:
1215

1316
```javascript
14-
// eslint.config.mjs
15-
import { strict } from "@fluidframework/eslint-config-fluid/flat.mjs";
17+
// eslint.config.mts
18+
import { strict } from "@fluidframework/eslint-config-fluid";
1619
export default [...strict];
1720
```
1821

22+
The package root exports the standard flat and server configs. For specialized cases, explicit subpaths are also available:
23+
`@fluidframework/eslint-config-fluid/flat.mts` and `@fluidframework/eslint-config-fluid/server.mts`.
24+
25+
### ESLint 8.21+ Users
26+
27+
If you're using ESLint 8.21-8.x, you must enable flat config support via environment variable:
28+
29+
```bash
30+
ESLINT_USE_FLAT_CONFIG=true eslint .
31+
```
32+
33+
Or in your npm scripts:
34+
35+
```json
36+
{
37+
"scripts": {
38+
"lint": "cross-env ESLINT_USE_FLAT_CONFIG=true eslint ."
39+
}
40+
}
41+
```
42+
43+
**Note:** ESLint 8.x flat config support was experimental. We recommend upgrading to ESLint 9 for the best experience.
44+
1945
### Modular Structure
2046

2147
The flat config is organized into a modular structure for maintainability:
@@ -34,7 +60,6 @@ eslint-config-fluid/
3460
│ ├── base.mts # Base config builder with all plugins
3561
│ ├── overrides.mts # Shared overrides (test files, React, JS files)
3662
│ └── factory.mts # Config factory functions
37-
└── [legacy files] # Legacy eslintrc-style configs (deprecated)
3863
```
3964

4065
This structure ensures:
@@ -48,29 +73,34 @@ This structure ensures:
4873

4974
### Recommended
5075

51-
This is the standard config for use in Fluid Framework libraries.
52-
It is also the default library export.
76+
The standard named config for use in Fluid Framework libraries.
5377

54-
This configuration is recommended for all libraries in the repository, though use of the [strict](#strict) config is preferred whenever reasonable.
78+
```javascript
79+
import { recommended } from "@fluidframework/eslint-config-fluid";
80+
export default [...recommended];
81+
```
5582

56-
**Legacy format:** Imported via `@fluidframework/eslint-config-fluid` (or `@fluidframework/eslint-config-fluid/recommended`).
57-
**Flat config:** Import `recommended` from `@fluidframework/eslint-config-fluid/flat.mjs`.
83+
This configuration is recommended for all libraries in the repository, though use of the [strict](#strict) config is preferred whenever reasonable.
5884

5985
### Strict
6086

61-
The strictest config for use in Fluid Framework libraries.
62-
Recommended for highest code quality enforcement.
87+
The strictest config for use in Fluid Framework libraries. Recommended for highest code quality enforcement.
6388

64-
In particular, use of this config is encouraged for libraries with public facing APIs, and those used as external-facing examples (e.g. those mentioned on `fluidframework.com`).
89+
```javascript
90+
import { strict } from "@fluidframework/eslint-config-fluid";
91+
export default [...strict];
92+
```
6593

66-
**Legacy format:** Imported via `@fluidframework/eslint-config-fluid/strict`.
67-
**Flat config:** Import `strict` from `@fluidframework/eslint-config-fluid/flat.mjs`.
94+
Use of this config is encouraged for libraries with public facing APIs, and those used as external-facing examples (e.g. those mentioned on `fluidframework.com`).
6895

6996
### Strict-Biome
7097

71-
A version of the "strict" config that disables rules that are supported by Biome's "recommended" lint config.
72-
This config is intended to be used in projects that use both eslint and Biome for linting.
73-
This config is considered experimental.
98+
A version of the "strict" config that disables rules covered by Biome's "recommended" lint config. Intended for projects using both ESLint and Biome.
99+
100+
```javascript
101+
import { strictBiome } from "@fluidframework/eslint-config-fluid";
102+
export default [...strictBiome];
103+
```
74104

75105
## Changing the lint config
76106

0 commit comments

Comments
 (0)