@fluidframework/map 2.0.0-dev.4.1.0.148229 → 2.0.0-dev.4.2.0.153917
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.
- package/CHANGELOG.md +5 -0
- package/README.md +20 -0
- package/dist/directory.d.ts +1 -6
- package/dist/directory.d.ts.map +1 -1
- package/dist/directory.js +29 -23
- package/dist/directory.js.map +1 -1
- package/dist/packageVersion.d.ts +1 -1
- package/dist/packageVersion.js +1 -1
- package/dist/packageVersion.js.map +1 -1
- package/lib/directory.d.ts +1 -6
- package/lib/directory.d.ts.map +1 -1
- package/lib/directory.js +29 -23
- package/lib/directory.js.map +1 -1
- package/lib/packageVersion.d.ts +1 -1
- package/lib/packageVersion.js +1 -1
- package/lib/packageVersion.js.map +1 -1
- package/package.json +15 -15
- package/src/directory.ts +29 -24
- package/src/packageVersion.ts +1 -1
package/lib/packageVersion.js
CHANGED
|
@@ -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,wBAAwB,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-dev.4.
|
|
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,wBAAwB,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-dev.4.2.0.153917\";\n"]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fluidframework/map",
|
|
3
|
-
"version": "2.0.0-dev.4.
|
|
3
|
+
"version": "2.0.0-dev.4.2.0.153917",
|
|
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-dev.4.
|
|
41
|
-
"@fluidframework/core-interfaces": "2.0.0-dev.4.
|
|
42
|
-
"@fluidframework/datastore-definitions": "2.0.0-dev.4.
|
|
43
|
-
"@fluidframework/driver-utils": "2.0.0-dev.4.
|
|
40
|
+
"@fluidframework/container-utils": "2.0.0-dev.4.2.0.153917",
|
|
41
|
+
"@fluidframework/core-interfaces": "2.0.0-dev.4.2.0.153917",
|
|
42
|
+
"@fluidframework/datastore-definitions": "2.0.0-dev.4.2.0.153917",
|
|
43
|
+
"@fluidframework/driver-utils": "2.0.0-dev.4.2.0.153917",
|
|
44
44
|
"@fluidframework/protocol-definitions": "^1.1.0",
|
|
45
|
-
"@fluidframework/runtime-definitions": "2.0.0-dev.4.
|
|
46
|
-
"@fluidframework/runtime-utils": "2.0.0-dev.4.
|
|
47
|
-
"@fluidframework/shared-object-base": "2.0.0-dev.4.
|
|
45
|
+
"@fluidframework/runtime-definitions": "2.0.0-dev.4.2.0.153917",
|
|
46
|
+
"@fluidframework/runtime-utils": "2.0.0-dev.4.2.0.153917",
|
|
47
|
+
"@fluidframework/shared-object-base": "2.0.0-dev.4.2.0.153917",
|
|
48
48
|
"path-browserify": "^1.0.1"
|
|
49
49
|
},
|
|
50
50
|
"devDependencies": {
|
|
51
|
-
"@fluid-internal/stochastic-test-utils": "2.0.0-dev.4.
|
|
52
|
-
"@fluid-internal/test-dds-utils": "2.0.0-dev.4.
|
|
53
|
-
"@fluid-tools/benchmark": "0.47.0
|
|
54
|
-
"@fluid-tools/build-cli": "^0.
|
|
51
|
+
"@fluid-internal/stochastic-test-utils": "2.0.0-dev.4.2.0.153917",
|
|
52
|
+
"@fluid-internal/test-dds-utils": "2.0.0-dev.4.2.0.153917",
|
|
53
|
+
"@fluid-tools/benchmark": "^0.47.0",
|
|
54
|
+
"@fluid-tools/build-cli": "^0.15.0",
|
|
55
55
|
"@fluidframework/build-common": "^1.1.0",
|
|
56
|
-
"@fluidframework/build-tools": "^0.
|
|
56
|
+
"@fluidframework/build-tools": "^0.15.0",
|
|
57
57
|
"@fluidframework/eslint-config-fluid": "^2.0.0",
|
|
58
58
|
"@fluidframework/map-previous": "npm:@fluidframework/map@2.0.0-internal.4.0.0",
|
|
59
|
-
"@fluidframework/mocha-test-setup": "2.0.0-dev.4.
|
|
60
|
-
"@fluidframework/test-runtime-utils": "2.0.0-dev.4.
|
|
59
|
+
"@fluidframework/mocha-test-setup": "2.0.0-dev.4.2.0.153917",
|
|
60
|
+
"@fluidframework/test-runtime-utils": "2.0.0-dev.4.2.0.153917",
|
|
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
|
@@ -743,29 +743,30 @@ export class SharedDirectory
|
|
|
743
743
|
}
|
|
744
744
|
|
|
745
745
|
/**
|
|
746
|
-
* This checks if there is pending delete op for local delete for a
|
|
746
|
+
* This checks if there is pending delete op for local delete for a any subdir in the relative path.
|
|
747
747
|
* @param relativePath - path of sub directory.
|
|
748
748
|
* @returns - true if there is pending delete.
|
|
749
749
|
*/
|
|
750
750
|
private isSubDirectoryDeletePending(relativePath: string): boolean {
|
|
751
|
-
const parentSubDir = this.getParentDirectory(relativePath);
|
|
752
|
-
const index = relativePath.lastIndexOf(posix.sep);
|
|
753
|
-
const dirName = relativePath.substring(index + 1);
|
|
754
|
-
return !!parentSubDir?.isSubDirectoryDeletePending(dirName);
|
|
755
|
-
}
|
|
756
|
-
|
|
757
|
-
/**
|
|
758
|
-
* Gets the parent directory of a sub directory.
|
|
759
|
-
* @param relativePath - path of sub directory of which parent needs to be find out.
|
|
760
|
-
*/
|
|
761
|
-
private getParentDirectory(relativePath: string): SubDirectory | undefined {
|
|
762
751
|
const absolutePath = this.makeAbsolute(relativePath);
|
|
763
752
|
if (absolutePath === posix.sep) {
|
|
764
|
-
return
|
|
753
|
+
return false;
|
|
765
754
|
}
|
|
766
|
-
|
|
767
|
-
const
|
|
768
|
-
|
|
755
|
+
let currentParent = this.root;
|
|
756
|
+
const nodeList = absolutePath.split(posix.sep);
|
|
757
|
+
let start = 1;
|
|
758
|
+
while (start < nodeList.length) {
|
|
759
|
+
const subDirName = nodeList[start];
|
|
760
|
+
if (currentParent.isSubDirectoryDeletePending(subDirName)) {
|
|
761
|
+
return true;
|
|
762
|
+
}
|
|
763
|
+
currentParent = currentParent.getSubDirectory(subDirName) as SubDirectory;
|
|
764
|
+
if (currentParent === undefined) {
|
|
765
|
+
return true;
|
|
766
|
+
}
|
|
767
|
+
start += 1;
|
|
768
|
+
}
|
|
769
|
+
return false;
|
|
769
770
|
}
|
|
770
771
|
|
|
771
772
|
/**
|
|
@@ -780,8 +781,8 @@ export class SharedDirectory
|
|
|
780
781
|
localOpMetadata,
|
|
781
782
|
) => {
|
|
782
783
|
const subdir = this.getWorkingDirectory(op.path) as SubDirectory | undefined;
|
|
783
|
-
// If there is pending delete op for
|
|
784
|
-
// to delete this subDirectory.
|
|
784
|
+
// If there is pending delete op for any subDirectory in the op.path, then don't apply the this op
|
|
785
|
+
// as we are going to delete this subDirectory.
|
|
785
786
|
if (subdir && !this.isSubDirectoryDeletePending(op.path)) {
|
|
786
787
|
subdir.processClearMessage(msg, op, local, localOpMetadata);
|
|
787
788
|
}
|
|
@@ -807,8 +808,8 @@ export class SharedDirectory
|
|
|
807
808
|
localOpMetadata,
|
|
808
809
|
) => {
|
|
809
810
|
const subdir = this.getWorkingDirectory(op.path) as SubDirectory | undefined;
|
|
810
|
-
// If there is pending delete op for
|
|
811
|
-
// to delete this subDirectory.
|
|
811
|
+
// If there is pending delete op for any subDirectory in the op.path, then don't apply the this op
|
|
812
|
+
// as we are going to delete this subDirectory.
|
|
812
813
|
if (subdir && !this.isSubDirectoryDeletePending(op.path)) {
|
|
813
814
|
subdir.processDeleteMessage(msg, op, local, localOpMetadata);
|
|
814
815
|
}
|
|
@@ -836,8 +837,8 @@ export class SharedDirectory
|
|
|
836
837
|
localOpMetadata,
|
|
837
838
|
) => {
|
|
838
839
|
const subdir = this.getWorkingDirectory(op.path) as SubDirectory | undefined;
|
|
839
|
-
// If there is pending delete op for
|
|
840
|
-
// to delete this subDirectory.
|
|
840
|
+
// If there is pending delete op for any subDirectory in the op.path, then don't apply the this op
|
|
841
|
+
// as we are going to delete this subDirectory.
|
|
841
842
|
if (subdir && !this.isSubDirectoryDeletePending(op.path)) {
|
|
842
843
|
const context = local ? undefined : this.makeLocal(op.key, op.path, op.value);
|
|
843
844
|
subdir.processSetMessage(msg, op, context, local, localOpMetadata);
|
|
@@ -866,7 +867,9 @@ export class SharedDirectory
|
|
|
866
867
|
localOpMetadata,
|
|
867
868
|
) => {
|
|
868
869
|
const parentSubdir = this.getWorkingDirectory(op.path) as SubDirectory | undefined;
|
|
869
|
-
|
|
870
|
+
// If there is pending delete op for any subDirectory in the op.path, then don't apply the this op
|
|
871
|
+
// as we are going to delete this subDirectory.
|
|
872
|
+
if (parentSubdir && !this.isSubDirectoryDeletePending(op.path)) {
|
|
870
873
|
parentSubdir.processCreateSubDirectoryMessage(msg, op, local, localOpMetadata);
|
|
871
874
|
}
|
|
872
875
|
},
|
|
@@ -895,7 +898,9 @@ export class SharedDirectory
|
|
|
895
898
|
localOpMetadata,
|
|
896
899
|
) => {
|
|
897
900
|
const parentSubdir = this.getWorkingDirectory(op.path) as SubDirectory | undefined;
|
|
898
|
-
|
|
901
|
+
// If there is pending delete op for any subDirectory in the op.path, then don't apply the this op
|
|
902
|
+
// as we are going to delete this subDirectory.
|
|
903
|
+
if (parentSubdir && !this.isSubDirectoryDeletePending(op.path)) {
|
|
899
904
|
parentSubdir.processDeleteSubDirectoryMessage(msg, op, local, localOpMetadata);
|
|
900
905
|
}
|
|
901
906
|
},
|
package/src/packageVersion.ts
CHANGED