@fluidframework/map 2.0.0-internal.5.3.0 → 2.0.0-internal.5.3.2

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/map";
8
- export declare const pkgVersion = "2.0.0-internal.5.3.0";
8
+ export declare const pkgVersion = "2.0.0-internal.5.3.2";
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/map";
8
- export const pkgVersion = "2.0.0-internal.5.3.0";
8
+ export const pkgVersion = "2.0.0-internal.5.3.2";
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,qBAAqB,CAAC;AAC7C,MAAM,CAAC,MAAM,UAAU,GAAG,sBAAsB,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/map\";\nexport const pkgVersion = \"2.0.0-internal.5.3.0\";\n"]}
1
+ {"version":3,"file":"packageVersion.js","sourceRoot":"","sources":["../src/packageVersion.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,MAAM,CAAC,MAAM,OAAO,GAAG,qBAAqB,CAAC;AAC7C,MAAM,CAAC,MAAM,UAAU,GAAG,sBAAsB,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/map\";\nexport const pkgVersion = \"2.0.0-internal.5.3.2\";\n"]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fluidframework/map",
3
- "version": "2.0.0-internal.5.3.0",
3
+ "version": "2.0.0-internal.5.3.2",
4
4
  "description": "Distributed map",
5
5
  "homepage": "https://fluidframework.com",
6
6
  "repository": {
@@ -37,27 +37,27 @@
37
37
  "dependencies": {
38
38
  "@fluidframework/common-definitions": "^0.20.1",
39
39
  "@fluidframework/common-utils": "^1.1.1",
40
- "@fluidframework/container-utils": ">=2.0.0-internal.5.3.0 <2.0.0-internal.5.4.0",
41
- "@fluidframework/core-interfaces": ">=2.0.0-internal.5.3.0 <2.0.0-internal.5.4.0",
42
- "@fluidframework/datastore-definitions": ">=2.0.0-internal.5.3.0 <2.0.0-internal.5.4.0",
43
- "@fluidframework/driver-utils": ">=2.0.0-internal.5.3.0 <2.0.0-internal.5.4.0",
40
+ "@fluidframework/container-utils": ">=2.0.0-internal.5.3.2 <2.0.0-internal.5.4.0",
41
+ "@fluidframework/core-interfaces": ">=2.0.0-internal.5.3.2 <2.0.0-internal.5.4.0",
42
+ "@fluidframework/datastore-definitions": ">=2.0.0-internal.5.3.2 <2.0.0-internal.5.4.0",
43
+ "@fluidframework/driver-utils": ">=2.0.0-internal.5.3.2 <2.0.0-internal.5.4.0",
44
44
  "@fluidframework/protocol-definitions": "^1.1.0",
45
- "@fluidframework/runtime-definitions": ">=2.0.0-internal.5.3.0 <2.0.0-internal.5.4.0",
46
- "@fluidframework/runtime-utils": ">=2.0.0-internal.5.3.0 <2.0.0-internal.5.4.0",
47
- "@fluidframework/shared-object-base": ">=2.0.0-internal.5.3.0 <2.0.0-internal.5.4.0",
45
+ "@fluidframework/runtime-definitions": ">=2.0.0-internal.5.3.2 <2.0.0-internal.5.4.0",
46
+ "@fluidframework/runtime-utils": ">=2.0.0-internal.5.3.2 <2.0.0-internal.5.4.0",
47
+ "@fluidframework/shared-object-base": ">=2.0.0-internal.5.3.2 <2.0.0-internal.5.4.0",
48
48
  "path-browserify": "^1.0.1"
49
49
  },
50
50
  "devDependencies": {
51
- "@fluid-internal/stochastic-test-utils": ">=2.0.0-internal.5.3.0 <2.0.0-internal.5.4.0",
52
- "@fluid-internal/test-dds-utils": ">=2.0.0-internal.5.3.0 <2.0.0-internal.5.4.0",
51
+ "@fluid-internal/stochastic-test-utils": ">=2.0.0-internal.5.3.2 <2.0.0-internal.5.4.0",
52
+ "@fluid-internal/test-dds-utils": ">=2.0.0-internal.5.3.2 <2.0.0-internal.5.4.0",
53
53
  "@fluid-tools/benchmark": "^0.48.0",
54
54
  "@fluid-tools/build-cli": "^0.21.0",
55
55
  "@fluidframework/build-common": "^1.2.0",
56
56
  "@fluidframework/build-tools": "^0.21.0",
57
57
  "@fluidframework/eslint-config-fluid": "^2.0.0",
58
58
  "@fluidframework/map-previous": "npm:@fluidframework/map@2.0.0-internal.5.2.0",
59
- "@fluidframework/mocha-test-setup": ">=2.0.0-internal.5.3.0 <2.0.0-internal.5.4.0",
60
- "@fluidframework/test-runtime-utils": ">=2.0.0-internal.5.3.0 <2.0.0-internal.5.4.0",
59
+ "@fluidframework/mocha-test-setup": ">=2.0.0-internal.5.3.2 <2.0.0-internal.5.4.0",
60
+ "@fluidframework/test-runtime-utils": ">=2.0.0-internal.5.3.2 <2.0.0-internal.5.4.0",
61
61
  "@microsoft/api-extractor": "^7.34.4",
62
62
  "@types/mocha": "^9.1.1",
63
63
  "@types/node": "^14.18.38",
package/src/directory.ts CHANGED
@@ -1250,7 +1250,7 @@ class SubDirectory extends TypedEventEmitter<IDirectoryEvents> implements IDirec
1250
1250
  const isNew = this.createSubDirectoryCore(
1251
1251
  subdirName,
1252
1252
  true,
1253
- -1,
1253
+ this.getLocalSeq(),
1254
1254
  this.runtime.clientId ?? "detached",
1255
1255
  );
1256
1256
  const subDir = this._subdirectories.get(subdirName);
@@ -1274,6 +1274,17 @@ class SubDirectory extends TypedEventEmitter<IDirectoryEvents> implements IDirec
1274
1274
  return subDir;
1275
1275
  }
1276
1276
 
1277
+ /**
1278
+ * @returns A sequenceNumber which should be used for local changes.
1279
+ * @remarks - While detached, 0 is used rather than -1 to represent a change which should be universally known (as opposed to known
1280
+ * only by the local client). This ensures that if the directory is later attached, none of its data needs to be updated (the values
1281
+ * last set while detached will now be known to any new client, until they are changed).
1282
+ * TODO: Convert these conventions to named constants. The semantics used here match those for merge-tree.
1283
+ */
1284
+ private getLocalSeq(): number {
1285
+ return this.directory.isAttached() ? -1 : 0;
1286
+ }
1287
+
1277
1288
  /**
1278
1289
  * {@inheritDoc IDirectory.getSubDirectory}
1279
1290
  */
@@ -1661,7 +1672,12 @@ class SubDirectory extends TypedEventEmitter<IDirectoryEvents> implements IDirec
1661
1672
  ): ICreateSubDirLocalOpMetadata {
1662
1673
  this.throwIfDisposed();
1663
1674
  // Create the sub directory locally first.
1664
- this.createSubDirectoryCore(op.subdirName, true, -1, this.runtime.clientId ?? "detached");
1675
+ this.createSubDirectoryCore(
1676
+ op.subdirName,
1677
+ true,
1678
+ this.getLocalSeq(),
1679
+ this.runtime.clientId ?? "detached",
1680
+ );
1665
1681
  this.updatePendingSubDirMessageCount(op);
1666
1682
 
1667
1683
  const localOpMetadata: ICreateSubDirLocalOpMetadata = {
@@ -6,4 +6,4 @@
6
6
  */
7
7
 
8
8
  export const pkgName = "@fluidframework/map";
9
- export const pkgVersion = "2.0.0-internal.5.3.0";
9
+ export const pkgVersion = "2.0.0-internal.5.3.2";