@fluidframework/container-loader 2.4.0-297027 → 2.4.0-297385

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -5,5 +5,5 @@
5
5
  * THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY
6
6
  */
7
7
  export declare const pkgName = "@fluidframework/container-loader";
8
- export declare const pkgVersion = "2.4.0-297027";
8
+ export declare const pkgVersion = "2.4.0-297385";
9
9
  //# sourceMappingURL=packageVersion.d.ts.map
@@ -5,5 +5,5 @@
5
5
  * THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY
6
6
  */
7
7
  export const pkgName = "@fluidframework/container-loader";
8
- export const pkgVersion = "2.4.0-297027";
8
+ export const pkgVersion = "2.4.0-297385";
9
9
  //# sourceMappingURL=packageVersion.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"packageVersion.js","sourceRoot":"","sources":["../src/packageVersion.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,MAAM,CAAC,MAAM,OAAO,GAAG,kCAAkC,CAAC;AAC1D,MAAM,CAAC,MAAM,UAAU,GAAG,cAAc,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n *\n * THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY\n */\n\nexport const pkgName = \"@fluidframework/container-loader\";\nexport const pkgVersion = \"2.4.0-297027\";\n"]}
1
+ {"version":3,"file":"packageVersion.js","sourceRoot":"","sources":["../src/packageVersion.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,MAAM,CAAC,MAAM,OAAO,GAAG,kCAAkC,CAAC;AAC1D,MAAM,CAAC,MAAM,UAAU,GAAG,cAAc,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n *\n * THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY\n */\n\nexport const pkgName = \"@fluidframework/container-loader\";\nexport const pkgVersion = \"2.4.0-297385\";\n"]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fluidframework/container-loader",
3
- "version": "2.4.0-297027",
3
+ "version": "2.4.0-297385",
4
4
  "description": "Fluid container loader",
5
5
  "homepage": "https://fluidframework.com",
6
6
  "repository": {
@@ -117,13 +117,13 @@
117
117
  "temp-directory": "nyc/.nyc_output"
118
118
  },
119
119
  "dependencies": {
120
- "@fluid-internal/client-utils": "2.4.0-297027",
121
- "@fluidframework/container-definitions": "2.4.0-297027",
122
- "@fluidframework/core-interfaces": "2.4.0-297027",
123
- "@fluidframework/core-utils": "2.4.0-297027",
124
- "@fluidframework/driver-definitions": "2.4.0-297027",
125
- "@fluidframework/driver-utils": "2.4.0-297027",
126
- "@fluidframework/telemetry-utils": "2.4.0-297027",
120
+ "@fluid-internal/client-utils": "2.4.0-297385",
121
+ "@fluidframework/container-definitions": "2.4.0-297385",
122
+ "@fluidframework/core-interfaces": "2.4.0-297385",
123
+ "@fluidframework/core-utils": "2.4.0-297385",
124
+ "@fluidframework/driver-definitions": "2.4.0-297385",
125
+ "@fluidframework/driver-utils": "2.4.0-297385",
126
+ "@fluidframework/telemetry-utils": "2.4.0-297385",
127
127
  "@types/events_pkg": "npm:@types/events@^3.0.0",
128
128
  "@ungap/structured-clone": "^1.2.0",
129
129
  "debug": "^4.3.4",
@@ -134,13 +134,13 @@
134
134
  "devDependencies": {
135
135
  "@arethetypeswrong/cli": "^0.15.2",
136
136
  "@biomejs/biome": "~1.8.3",
137
- "@fluid-internal/client-utils": "2.4.0-297027",
138
- "@fluid-internal/mocha-test-setup": "2.4.0-297027",
139
- "@fluid-private/test-loader-utils": "2.4.0-297027",
137
+ "@fluid-internal/client-utils": "2.4.0-297385",
138
+ "@fluid-internal/mocha-test-setup": "2.4.0-297385",
139
+ "@fluid-private/test-loader-utils": "2.4.0-297385",
140
140
  "@fluid-tools/build-cli": "^0.46.0",
141
141
  "@fluidframework/build-common": "^2.0.3",
142
142
  "@fluidframework/build-tools": "^0.46.0",
143
- "@fluidframework/container-loader-previous": "npm:@fluidframework/container-loader@2.3.0",
143
+ "@fluidframework/container-loader-previous": "npm:@fluidframework/container-loader@~2.3.0",
144
144
  "@fluidframework/eslint-config-fluid": "^5.4.0",
145
145
  "@microsoft/api-extractor": "7.47.8",
146
146
  "@types/debug": "^4.1.5",
@@ -166,7 +166,7 @@
166
166
  },
167
167
  "typeValidation": {
168
168
  "broken": {},
169
- "entrypoint": "internal"
169
+ "entrypoint": "legacy"
170
170
  },
171
171
  "scripts": {
172
172
  "api": "fluid-build . --task api",
package/src/container.ts CHANGED
@@ -1045,8 +1045,7 @@ export class Container
1045
1045
  }
1046
1046
 
1047
1047
  public dispose(error?: ICriticalContainerError): void {
1048
- this._deltaManager.dispose(error);
1049
- this.verifyClosed();
1048
+ this.verifyClosedAfter(() => this._deltaManager.dispose(error));
1050
1049
  }
1051
1050
 
1052
1051
  public close(error?: ICriticalContainerError): void {
@@ -1054,20 +1053,30 @@ export class Container
1054
1053
  // 2. We need to ensure that we deliver disconnect event to runtime properly. See connectionStateChanged
1055
1054
  // handler. We only deliver events if container fully loaded. Transitioning from "loading" ->
1056
1055
  // "closing" will lose that info (can also solve by tracking extra state).
1057
- this._deltaManager.close(error);
1058
- this.verifyClosed();
1056
+ this.verifyClosedAfter(() => this._deltaManager.close(error));
1059
1057
  }
1060
1058
 
1061
- private verifyClosed(): void {
1062
- assert(
1063
- this.connectionState === ConnectionState.Disconnected,
1064
- 0x0cf /* "disconnect event was not raised!" */,
1065
- );
1059
+ private verifyClosedAfterCalls = 0;
1060
+ private verifyClosedAfter(callback: () => void): void {
1061
+ this.verifyClosedAfterCalls++;
1062
+ try {
1063
+ callback();
1064
+ } finally {
1065
+ this.verifyClosedAfterCalls--;
1066
+ }
1066
1067
 
1067
- assert(
1068
- this._lifecycleState === "closed" || this._lifecycleState === "disposed",
1069
- 0x314 /* Container properly closed */,
1070
- );
1068
+ // We only want to verify connectionState and lifecycleState after close/dispose has fully finished
1069
+ if (this.verifyClosedAfterCalls === 0) {
1070
+ assert(
1071
+ this.connectionState === ConnectionState.Disconnected,
1072
+ 0x0cf /* "disconnect event was not raised!" */,
1073
+ );
1074
+
1075
+ assert(
1076
+ this._lifecycleState === "closed" || this._lifecycleState === "disposed",
1077
+ 0x314 /* Container properly closed */,
1078
+ );
1079
+ }
1071
1080
  }
1072
1081
 
1073
1082
  private closeCore(error?: ICriticalContainerError): void {
@@ -6,4 +6,4 @@
6
6
  */
7
7
 
8
8
  export const pkgName = "@fluidframework/container-loader";
9
- export const pkgVersion = "2.4.0-297027";
9
+ export const pkgVersion = "2.4.0-297385";