Skip to content

Commit

Permalink
Automation: main-next integrate
Browse files Browse the repository at this point in the history
  • Loading branch information
msfluid-bot committed Dec 12, 2023
2 parents 425e143 + b3b6cd4 commit 73c5e53
Show file tree
Hide file tree
Showing 285 changed files with 7,306 additions and 3,113 deletions.
9 changes: 9 additions & 0 deletions .changeset/loose-comics-wonder.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
---
"@fluidframework/container-runtime": minor
---

GC: Tombstoned objects will fail to load by default

Previously, by default Tombstoned objects would merely trigger informational logs, with an option via config
to also cause errors to be thrown on load. Now failure to load is the default, with an option to disable it if necessary.
This reflects the purpose of Tombstone stage which is to mimic the user experience of having objects deleted.
3 changes: 0 additions & 3 deletions azure/packages/azure-client/api-extractor.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
{
"$schema": "https://developer.microsoft.com/json-schemas/api-extractor/v7/api-extractor.schema.json",
"extends": "../../../common/build/build-common/api-extractor-base.json",
"dtsRollup": {
"enabled": true
},
"messages": {
"extractorMessageReporting": {
// TODO: Add missing documentation and remove this rule override
Expand Down
5 changes: 1 addition & 4 deletions azure/packages/azure-service-utils/api-extractor.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
{
"$schema": "https://developer.microsoft.com/json-schemas/api-extractor/v7/api-extractor.schema.json",
"extends": "../../../common/build/build-common/api-extractor-base.json",
"dtsRollup": {
"enabled": true
}
"extends": "../../../common/build/build-common/api-extractor-base.json"
}
2 changes: 1 addition & 1 deletion common/build/build-common/api-extractor-base.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
* Configures how the .d.ts rollup file will be generated.
*/
"dtsRollup": {
"enabled": false,
"enabled": true,
"alphaTrimmedFilePath": "<projectFolder>/dist/<unscopedPackageName>-alpha.d.ts",
"betaTrimmedFilePath": "<projectFolder>/dist/<unscopedPackageName>-beta.d.ts",
"publicTrimmedFilePath": "<projectFolder>/dist/<unscopedPackageName>-public.d.ts",
Expand Down
8 changes: 4 additions & 4 deletions common/lib/common-definitions/pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 4 additions & 4 deletions common/lib/common-utils/pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 4 additions & 4 deletions common/lib/protocol-definitions/pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions docs/api-markdown-documenter/render-api-documentation.js
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,8 @@ async function renderApiDocumentation() {
: DefaultPolicies.defaultFileNamePolicy(apiItem);
},
frontMatter: (apiItem) => createHugoFrontMatter(apiItem, config, customRenderers),
// TODO: enable the following once we have finished gettings the repo's release tags sorted out for 2.0.
// minimumReleaseLevel: ReleaseTag.Beta, // Don't include `@alpha` or `@internal` items in docs published to the public website.
});

console.log("Generating API documentation...");
Expand Down
2 changes: 1 addition & 1 deletion docs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
"start": "hugo server"
},
"dependencies": {
"@fluid-tools/api-markdown-documenter": "^0.11.1",
"@fluid-tools/api-markdown-documenter": "^0.11.3",
"@fluid-tools/markdown-magic": "file:../tools/markdown-magic",
"@fluidframework/build-common": "^2.0.0",
"@rushstack/node-core-library": "^3.59.4",
Expand Down
16 changes: 7 additions & 9 deletions docs/pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@
*/

module.exports = {
extends: [require.resolve("@fluidframework/eslint-config-fluid/minimal"), "prettier"],
extends: [require.resolve("@fluidframework/eslint-config-fluid/recommended"), "prettier"],
rules: {},
};
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,12 @@ This app demonstrates how to create a simple tree data structure and build a Rea
## Gettting started

All the code required to set up the Fluid Framework and SharedTree data structure is in the `fluid.ts` source file. Most of this code will be the same for any app. However, because SharedTree is still in the alpha stage, the code to set it up isn't optimized yet.

You can run this example using the following steps:

1. To kick off the example, update the credentials in the `clientProps.ts` file by replacing siteUrl, driveId, and clientId with your own.
1. Run `pnpm install` and `pnpm run build:fast --nolint` from the `FluidFramework` root directory.
- For an even faster build, you can add the package name to the build command, like this:
`pnpm run build:fast --nolint @fluid-example/shared-tree-demo`
1. Run `pnpm start` from this directory and open <http://localhost:8080> in a web browser to see the app running.
1. Login with your M365 tenant email and password to see the example in action on your web browser.
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@
"webpack:dev": "webpack --env development"
},
"dependencies": {
"@azure/msal-browser": "^2.34.0",
"@fluid-experimental/odsp-client": "workspace:~",
"@fluid-experimental/tree2": "workspace:~",
"@fluidframework/container-definitions": "workspace:~",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,26 +6,21 @@ import { OdspClientProps, OdspConnectionConfig } from "@fluid-experimental/odsp-
import { OdspTestTokenProvider } from "./tokenProvider";

export interface OdspTestCredentials {
siteUrl: string;
driveId: string;
clientId: string;
clientSecret: string;
username: string;
password: string;
}

/**
* Default test credentials for odsp-client.
*/
const clientCreds: OdspTestCredentials = {
clientId: "<client_id>",
clientSecret: "<client_secret>",
username: "<email_id>",
password: "<password>",
export const props: OdspTestCredentials = {
siteUrl: "<site__url>",
driveId: "<drive__id>",
clientId: "<client__id>",
};

const connectionConfig: OdspConnectionConfig = {
tokenProvider: new OdspTestTokenProvider(clientCreds), // Token provider using the provided test credentials.
siteUrl: "<site_url>",
driveId: "<raas_drive_id>",
tokenProvider: new OdspTestTokenProvider(props.clientId),
siteUrl: props.siteUrl,
driveId: props.driveId,
};

export const clientProps: OdspClientProps = {
Expand Down
66 changes: 37 additions & 29 deletions examples/service-clients/odsp-client/shared-tree-demo/src/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,16 +13,15 @@ import { treeConfiguration, Letter } from "./schema";
import "./output.css";
import { ReactApp } from "./reactApp";

async function start() {
// create the root element for React
async function start(): Promise<void> {
const app = document.createElement("div");
app.id = "app";
document.body.appendChild(app);
document.body.append(app);

// Get the root item id from the URL
// If there is no item id, then the app will make
// a new container.
let itemId = location.hash.substring(1);
let itemId: string = location.hash.slice(1);
const createNew = itemId.length === 0;
let container: IFluidContainer;

Expand Down Expand Up @@ -55,39 +54,48 @@ async function start() {
if (createNew) {
const used: { x: number; y: number }[] = [];
let id = 0;
"HELLOWORLD"
.repeat(500)
.split("")
.map((character) => {
const x = Math.round(
Math.floor((Math.random() * (canvasSize.x * cellSize.x)) / cellSize.x) *
cellSize.x,
[..."HELLOWORLD".repeat(500)].map((character) => {
const x = Math.round(
Math.floor((Math.random() * (canvasSize.x * cellSize.x)) / cellSize.x) * cellSize.x,
);
const y = Math.round(
Math.floor((Math.random() * (canvasSize.y * cellSize.y)) / cellSize.y) * cellSize.y,
);
if (!used.some((element) => element.x === x && element.y === y)) {
const pos = { x, y };
used.push(pos);
appData.root.letters.insertAtEnd(
// TODO: error when not adding wrapping [] is inscrutable
new Letter({
position: pos,
character,
id: id.toString(),
}),
);
const y = Math.round(
Math.floor((Math.random() * (canvasSize.y * cellSize.y)) / cellSize.y) *
cellSize.y,
);
if (!used.find((element) => element.x === x && element.y === y)) {
const pos = { x, y };
used.push(pos);
appData.root.letters.insertAtEnd(
// TODO: error when not adding wrapping [] is inscrutable
new Letter({
position: pos,
character,
id: id.toString(),
}),
);
id++;
}
});
id++;
}
});

// Update the application state or components without forcing a full page reload
ReactDOM.render(
<ReactApp
data={appData}
container={container}
canvasSize={canvasSize}
cellSize={cellSize}
/>,
app,
);

// If the app is in a `createNew` state - no itemId, and the container is detached, we attach the container.
// This uploads the container to the service and connects to the collaboration session.
itemId = await container.attach();

// The newly attached container is given a unique ID that can be used to access the container in another session
// eslint-disable-next-line require-atomic-updates
location.hash = itemId;
}
}

// eslint-disable-next-line unicorn/prefer-top-level-await
start().catch(console.error);
Loading

0 comments on commit 73c5e53

Please sign in to comment.