Skip to content

Commit f6651da

Browse files
authored
Fixed InkingManager ES compatibility issues, SharedMap v2 clear() bug in LiveCanvas, and upgraded Fluid version (#775)
1 parent 0066390 commit f6651da

File tree

34 files changed

+1238
-860
lines changed

34 files changed

+1238
-860
lines changed

ensure-packages-built.js

Lines changed: 37 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -9,27 +9,33 @@ const fs = require("fs");
99
ensurePackagesBuilt();
1010
/**
1111
* if packages are not built or if they are old builds then:
12-
*
12+
*
1313
* 1. run npm install from "packages/live-share-react".
1414
* live-share-react uses all other live-share packages as dependencies, hence will install all packages needed to build live-share packages.
1515
* 2. run npm run build:packages from root
1616
*/
1717
async function ensurePackagesBuilt() {
1818
const rootFolderPath = await getRootFolder();
19-
const currentGitHash = await getGitHash()
19+
const currentGitHash = await getGitHash();
2020

21-
const packagesNotBuilt = !fs.existsSync(`${rootFolderPath}/node_modules/@microsoft/live-share-react/bin`);
21+
const packagesNotBuilt = !fs.existsSync(
22+
`${rootFolderPath}/node_modules/@microsoft/live-share-react/bin`
23+
);
2224
const isOldBuild = currentGitHash !== getBuildData()?.lastGitHashBuilt;
2325
if (packagesNotBuilt || isOldBuild) {
2426
await npmInstallFromLiveShareReact();
2527
build();
2628
}
2729

2830
async function getGitHash() {
29-
const currentGitHash = childProcess.spawn("git", ["rev-parse", "HEAD"], {
30-
shell: true,
31-
cwd: process.cwd(),
32-
});
31+
const currentGitHash = childProcess.spawn(
32+
"git",
33+
["rev-parse", "HEAD"],
34+
{
35+
shell: true,
36+
cwd: process.cwd(),
37+
}
38+
);
3339
return new Promise((resolve, reject) => {
3440
currentGitHash.stdout.on("data", (data) => {
3541
const hash = data.toString().slice(0, -1);
@@ -40,15 +46,19 @@ async function ensurePackagesBuilt() {
4046
reject(code);
4147
}
4248
});
43-
})
49+
});
4450
}
4551

4652
async function getRootFolder() {
47-
const rootDir = childProcess.spawn("git", ["rev-parse", " --show-toplevel"], {
48-
shell: true,
49-
cwd: process.cwd(),
50-
});
51-
53+
const rootDir = childProcess.spawn(
54+
"git",
55+
["rev-parse", " --show-toplevel"],
56+
{
57+
shell: true,
58+
cwd: process.cwd(),
59+
}
60+
);
61+
5262
return new Promise((resolve, reject) => {
5363
rootDir.stdout.on("data", (data) => {
5464
const path = data.toString().slice(0, -1);
@@ -59,7 +69,7 @@ async function ensurePackagesBuilt() {
5969
reject(code);
6070
}
6171
});
62-
})
72+
});
6373
}
6474

6575
// live-share-react uses all other live-share packages as dependencies
@@ -70,24 +80,28 @@ async function ensurePackagesBuilt() {
7080
cwd: `${rootFolderPath}/packages/live-share-react`,
7181
stdio: "inherit",
7282
});
73-
83+
7484
installProcess.on("close", (code) => {
7585
if (code == 0) {
7686
resolve();
7787
} else {
7888
reject(code);
7989
}
8090
});
81-
})
91+
});
8292
}
8393

8494
function build() {
85-
const buildProcess = childProcess.spawn("npm", ["run", "build:packages"], {
86-
shell: true,
87-
cwd: rootFolderPath,
88-
stdio: "inherit",
89-
});
90-
95+
const buildProcess = childProcess.spawn(
96+
"npm",
97+
["run", "build:packages"],
98+
{
99+
shell: true,
100+
cwd: rootFolderPath,
101+
stdio: "inherit",
102+
}
103+
);
104+
91105
buildProcess.on("close", (code) => {
92106
if (code === 0) {
93107
fs.writeFileSync(
@@ -109,4 +123,4 @@ async function ensurePackagesBuilt() {
109123
return undefined;
110124
}
111125
}
112-
}
126+
}

internal/test-utils/package.json

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -24,28 +24,28 @@
2424
"tsc": "tsc"
2525
},
2626
"dependencies": {
27-
"@fluid-experimental/attributor": "^2.0.0-rc.1",
28-
"@fluid-experimental/sequence-deprecated": "^2.0.0-rc.1",
29-
"@fluidframework/agent-scheduler": "^2.0.0-rc.1",
27+
"@fluid-experimental/attributor": "^2.0.0-rc.2.0.0",
28+
"@fluid-experimental/sequence-deprecated": "^2.0.0-rc.2.0.0",
29+
"@fluidframework/agent-scheduler": "^2.0.0-rc.2.0.0",
3030
"@fluidframework/aqueduct": "^2.0.0-rc.1.0.3",
31-
"@fluidframework/cell": "^2.0.0-rc.1",
31+
"@fluidframework/cell": "^2.0.0-rc.2.0.0",
3232
"@fluidframework/container-loader": "^2.0.0-rc.1.0.3",
3333
"@fluidframework/container-runtime": "^2.0.0-rc.1.0.4",
34-
"@fluidframework/core-interfaces": "^2.0.0-rc.1",
35-
"@fluidframework/core-utils": "^2.0.0-rc.1",
36-
"@fluidframework/counter": "^2.0.0-rc.1",
34+
"@fluidframework/core-interfaces": "^2.0.0-rc.2.0.0",
35+
"@fluidframework/core-utils": "^2.0.0-rc.2.0.0",
36+
"@fluidframework/counter": "^2.0.0-rc.2.0.0",
3737
"@fluidframework/datastore-definitions": "^2.0.0-rc.1.0.4",
38-
"@fluidframework/driver-definitions": "^2.0.0-rc.1",
39-
"@fluidframework/local-driver": "^2.0.0-rc.1",
38+
"@fluidframework/driver-definitions": "^2.0.0-rc.2.0.0",
39+
"@fluidframework/local-driver": "^2.0.0-rc.2.0.0",
4040
"@fluidframework/map": "^2.0.0-rc.1.0.4",
41-
"@fluidframework/matrix": "^2.0.0-rc.1",
42-
"@fluidframework/ordered-collection": "^2.0.0-rc.1",
41+
"@fluidframework/matrix": "^2.0.0-rc.2.0.0",
42+
"@fluidframework/ordered-collection": "^2.0.0-rc.2.0.0",
4343
"@fluidframework/register-collection": "^2.0.0-rc.1.0.4",
4444
"@fluidframework/runtime-definitions": "^2.0.0-rc.1.0.4",
4545
"@fluidframework/sequence": "^2.0.0-rc.1.0.4",
4646
"@fluidframework/server-local-server": "^3.1.0-237980",
4747
"@fluidframework/telemetry-utils": "^2.0.0-rc.1.0.4",
48-
"@fluidframework/test-driver-definitions": "^2.0.0-rc.1",
48+
"@fluidframework/test-driver-definitions": "^2.0.0-rc.2.0.0",
4949
"@fluidframework/test-utils": "^2.0.0-rc.1.0.3"
5050
},
5151
"devDependencies": {

internal/test-utils/src/describeCompat.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,9 @@ function createCompatSuite(
3333

3434
before(async function () {
3535
try {
36-
provider =
37-
await getVersionedTestObjectProviderFromApis(apis);
36+
provider = await getVersionedTestObjectProviderFromApis(
37+
apis
38+
);
3839
} catch (error) {
3940
const logger = createChildLogger({
4041
logger: getTestLogger?.(),

0 commit comments

Comments
 (0)