Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/main' into MainToNext0406b
Browse files Browse the repository at this point in the history
  • Loading branch information
heliocliu committed Apr 6, 2022
2 parents a763e40 + ce39d61 commit 3a98079
Show file tree
Hide file tree
Showing 227 changed files with 17,537 additions and 30,058 deletions.
8 changes: 8 additions & 0 deletions BREAKING.md
Original file line number Diff line number Diff line change
Expand Up @@ -98,13 +98,21 @@ You can start by returning default code details that were passed into the code l
## 0.58 Upcoming changes
- [Doing operations not allowed on deleted sub directory](#Doing-operations-not-allowed-on-deleted-sub-directory)
- [IDirectory extends IDisposable](#IDirectory-extends-IDisposable)
- [raiseContainerWarning removed from IContainerContext](#raiseContainerWarning-removed-from-IContainerContext)
- [`IContainerRuntimeBase.setFlushMode` is deprecated](#icontainerruntimebasesetflushmode-is-deprecated)

### Doing operations not allowed on deleted sub directory
Users will not be allowed to do operations on a deleted directory. Users can subscribe to `disposed` event to know if a sub directory is deleted. Accessing deleted sub directory will throw `UsageError` exception now.

### IDirectory extends IDisposable
IDirectory has started extending IDisposable. This means that users implementing the IDirectory interface needs to implement IDisposable too now.

### raiseContainerWarning removed from IContainerContext
`raiseContainerWarning` property will be removed from `IContainerContext` interface and `ContainerContext` class. Please refer to [raiseContainerWarning property](#Remove-raisecontainerwarning-property) for more details.

### `IContainerRuntimeBase.setFlushMode` is deprecated
`IContainerRuntimeBase.setFlushMode` is deprecated and will be removed in a future release. FlushMode will become an immutable property for the container runtime, optionally provided at creation time via the `IContainerRuntimeOptions` interface. See [#9480](https://github.com/microsoft/FluidFramework/issues/9480#issuecomment-1084790977)

## 0.58 Breaking changes
- [Move IntervalType from merge-tree to sequence package](#Move-IntervalType-from-merge-tree-to-sequence-package)
- [Remove logger property from IContainerContext](#Remove-logger-property-from-IContainerContext)
Expand Down
11 changes: 7 additions & 4 deletions api-report/container-runtime.api.md
Original file line number Diff line number Diff line change
Expand Up @@ -250,6 +250,8 @@ export interface IAckSummaryResult {
// @public
export interface IBaseSummarizeResult {
readonly error: any;
// (undocumented)
readonly minimumSequenceNumber: number;
readonly referenceSequenceNumber: number;
// (undocumented)
readonly stage: "base";
Expand Down Expand Up @@ -311,12 +313,13 @@ export interface IConnectableRuntime {

// @public
export interface IContainerRuntimeOptions {
readonly flushMode?: FlushMode;
// (undocumented)
gcOptions?: IGCRuntimeOptions;
loadSequenceNumberVerification?: "close" | "log" | "bypass";
readonly gcOptions?: IGCRuntimeOptions;
readonly loadSequenceNumberVerification?: "close" | "log" | "bypass";
// (undocumented)
summaryOptions?: ISummaryRuntimeOptions;
useDataStoreAliasing?: boolean;
readonly summaryOptions?: ISummaryRuntimeOptions;
readonly useDataStoreAliasing?: boolean;
}

// @public
Expand Down
2 changes: 2 additions & 0 deletions api-report/map.api.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ export class DirectoryFactory {
// @public
export interface IDirectory extends Map<string, any>, IEventProvider<IDirectoryEvents>, Partial<IDisposable> {
readonly absolutePath: string;
countSubDirectory?(): number;
createSubDirectory(subdirName: string): IDirectory;
deleteSubDirectory(subdirName: string): boolean;
get<T = any>(key: string): T | undefined;
Expand Down Expand Up @@ -170,6 +171,7 @@ export class SharedDirectory extends SharedObject<ISharedDirectoryEvents> implem
// @internal (undocumented)
protected applyStashedOp(): void;
clear(): void;
countSubDirectory(): number;
static create(runtime: IFluidDataStoreRuntime, id?: string): SharedDirectory;
createSubDirectory(subdirName: string): IDirectory;
delete(key: string): boolean;
Expand Down
1 change: 1 addition & 0 deletions api-report/routerlicious-driver.api.md
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,7 @@ export interface IRouterliciousDriverPolicies {

// @public
export interface ITokenProvider {
documentPostCreateCallback?(documentId: string, creationToken: string): Promise<void>;
fetchOrdererToken(tenantId: string, documentId?: string, refresh?: boolean): Promise<ITokenResponse>;
fetchStorageToken(tenantId: string, documentId: string, refresh?: boolean): Promise<ITokenResponse>;
}
Expand Down
2 changes: 2 additions & 0 deletions api-report/runtime-definitions.api.md
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,7 @@ export interface IContainerRuntimeBase extends IEventProvider<IContainerRuntimeB
readonly logger: ITelemetryBaseLogger;
orderSequentially(callback: () => void): void;
request(request: IRequest): Promise<IResponse>;
// @deprecated
setFlushMode(mode: FlushMode): void;
submitSignal(type: string, content: any): void;
// (undocumented)
Expand Down Expand Up @@ -378,6 +379,7 @@ export type NamedFluidDataStoreRegistryEntry = [string, Promise<FluidDataStoreRe
// @public (undocumented)
export type SummarizeInternalFn = (fullTree: boolean, trackState: boolean) => Promise<ISummarizeInternalResult>;


// (No @packageDocumentation comment for this package)

```
2 changes: 1 addition & 1 deletion api-report/sequence.api.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ export type DeserializeCallback = (properties: PropertySet) => void;
// @public (undocumented)
export interface IIntervalCollectionEvent<TInterval extends ISerializableInterval> extends IEvent {
// (undocumented)
(event: "addInterval" | "deleteInterval", listener: (interval: TInterval, local: boolean, op: ISequencedDocumentMessage) => void): any;
(event: "addInterval" | "changeInterval" | "deleteInterval", listener: (interval: TInterval, local: boolean, op: ISequencedDocumentMessage) => void): any;
// (undocumented)
(event: "propertyChanged", listener: (interval: TInterval, propertyArgs: PropertySet) => void): any;
}
Expand Down
13 changes: 13 additions & 0 deletions api-report/tree.api.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
## API Report File for "@fluid-internal/tree"

> Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/).
```ts

// @public (undocumented)
export const _ = "Force index.d.ts generation from ApiExtractor.";


// (No @packageDocumentation comment for this package)

```
19 changes: 0 additions & 19 deletions common/build/eslint-config-fluid/.eslintrc.js

This file was deleted.

33 changes: 33 additions & 0 deletions common/build/eslint-config-fluid/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,37 @@ It exports the following shared ESLint configs:
- `recommended`: The recommended config for Fluid Framework packages.
- `strict`: The strictest config; intended for packages with public facing APIs.

## Changing the lint config

If you want to change the shared lint config (that is, this package), you need to do the following:

1. Make the change in the config.
2. Publish a pre-release package.
3. Update the core packages to use the pre-release lint config.

When updating the lint config (step 1), run `npm run print-config` and commit any resulting changes.

### Tracking lint config changes over time

One question that comes up often when we make changes to our lint config is, "what changed?" This applies even when we
don't make any changes other than upgrading deps, because the dependency upgrade might include a new rule.

ESLint provides a way to print the config that would apply to a file (`--print-config`), so we use this capability to
print out the applied config as a JSON file. As we make changes to the config, we can print out the config again and get
a diff to review as part of a PR -- just like we do with API reports for code changes.

## Scripts

<!-- AUTO-GENERATED-CONTENT:START (SCRIPTS) -->
| Script | Description |
|--------|-------------|
| `build` | Build the package. |
| `build:ci` | Build the package -- called as part of CI. |
| `cleanup-printed-configs` | Clean up the printed configs. Removes the `parser` property and sorts the JSON. |
| `print-config` | Print all the eslint configs. |
| `print-config:default` | Print the eslint config for regular TypeScript files (`eslint --config index.js --print-config src/file.ts`). |
| `print-config:test` | Print the eslint config for test files (`eslint --config index.js --print-config src/test/file.ts`). |
<!-- AUTO-GENERATED-CONTENT:END -->

See [GitHub](https://github.com/microsoft/FluidFramework) for more details on the Fluid Framework and packages within.

2 changes: 1 addition & 1 deletion common/build/eslint-config-fluid/minimal.js
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ module.exports = {
},
{
// Rules only for test files
"files": ["src/test/**"],
"files": ["*.spec.ts", "src/test/**"],
"rules": {
"@typescript-eslint/unbound-method": "off", // This rule has false positives in many of our test projects.
}
Expand Down
Loading

0 comments on commit 3a98079

Please sign in to comment.