Skip to content

Commit

Permalink
Merge branch 'main' of https://github.com/Microsoft/FluidFramework in…
Browse files Browse the repository at this point in the history
…to RuntimeCompatibility
  • Loading branch information
vladsud committed Mar 23, 2024
2 parents 1de728a + fb8fb7d commit a209315
Showing 259 changed files with 1,757 additions and 984 deletions.
13 changes: 13 additions & 0 deletions .changeset/lazy-keys-sink.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
---
"fluid-framework": minor
"@fluidframework/fluid-static": minor
"@fluidframework/map": minor
"@fluidframework/shared-object-base": minor
"@fluidframework/tree": minor
---

Replace SharedObjectClass with new ISharedObjectKind type.

The static objects used as SharedObjectClass now explicitly implement the new ISharedObjectKind type.
SharedObjectClass has been removed as ISharedObjectKind now fills that role.
LoadableObjectCtor has been inlined as it only had one use: an external user of it can replace it with `(new (...args: any[]) => T)`.
10 changes: 10 additions & 0 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
@@ -104,6 +104,16 @@
"type": "node",
"args": ["list", "--private", "-g", "build-tools", "-v"],
},
{
// Runs the `flub modify fluid-imports` command with a debugger attached.
"name": "flub modify fluid-imports",
"program": "${workspaceFolder}/build-tools/packages/build-cli/bin/dev.js",
"cwd": "${workspaceFolder}/packages/framework/aqueduct",
"request": "launch",
"skipFiles": ["<node_internals>/**"],
"type": "node",
"args": ["modify", "fluid-imports", "-v"],
},
{
// Runs the `flub generate upcoming` command with a debugger attached.
"name": "flub generate upcoming",
2 changes: 1 addition & 1 deletion azure/packages/azure-local-service/package.json
Original file line number Diff line number Diff line change
@@ -35,7 +35,7 @@
"tinylicious": "^4.0.0"
},
"devDependencies": {
"@biomejs/biome": "^1.6.1",
"@biomejs/biome": "^1.6.2",
"@fluidframework/build-common": "^2.0.3",
"@fluidframework/build-tools": "^0.34.0",
"@fluidframework/eslint-config-fluid": "^5.1.0",
2 changes: 1 addition & 1 deletion azure/packages/azure-service-utils/package.json
Original file line number Diff line number Diff line change
@@ -83,7 +83,7 @@
},
"devDependencies": {
"@arethetypeswrong/cli": "^0.13.3",
"@biomejs/biome": "^1.6.1",
"@biomejs/biome": "^1.6.2",
"@fluid-tools/build-cli": "^0.34.0",
"@fluidframework/azure-service-utils-previous": "npm:@fluidframework/[email protected]",
"@fluidframework/build-common": "^2.0.3",
2 changes: 1 addition & 1 deletion azure/packages/test/scenario-runner/package.json
Original file line number Diff line number Diff line change
@@ -92,7 +92,7 @@
"uuid": "^9.0.0"
},
"devDependencies": {
"@biomejs/biome": "^1.6.1",
"@biomejs/biome": "^1.6.2",
"@fluid-tools/build-cli": "^0.34.0",
"@fluidframework/build-common": "^2.0.3",
"@fluidframework/build-tools": "^0.34.0",
2 changes: 1 addition & 1 deletion biome.json
Original file line number Diff line number Diff line change
@@ -54,7 +54,7 @@
},
"overrides": [
{
"include": ["**/.vscode/*.json", "**/tsconfig*.json", "**/api-extractor*.json"],
"include": ["**/*.jsonc", "**/.vscode/*.json", "**/tsconfig*.json", "**/api-extractor*.json"],
"json": {
"parser": {
"allowComments": true,
6 changes: 3 additions & 3 deletions build-tools/biome.jsonc
Original file line number Diff line number Diff line change
@@ -3,9 +3,9 @@
"extends": ["../biome.json"],
"organizeImports": {
// TODO: Will be enabled in a separate change.
"enabled": false
"enabled": false,
},
"formatter": {
"enabled": true
}
"enabled": true,
},
}
2 changes: 1 addition & 1 deletion build-tools/package.json
Original file line number Diff line number Diff line change
@@ -64,7 +64,7 @@
"temp-directory": "nyc/.nyc_output"
},
"devDependencies": {
"@biomejs/biome": "^1.6.1",
"@biomejs/biome": "^1.6.2",
"@commitlint/cli": "^17.6.6",
"@commitlint/config-conventional": "^17.6.6",
"@commitlint/cz-commitlint": "^17.5.0",
3 changes: 3 additions & 0 deletions build-tools/packages/build-cli/.eslintrc.cjs
Original file line number Diff line number Diff line change
@@ -50,6 +50,9 @@ module.exports = {
// In commands, destructuring is useful in some places but makes others less legible, so consistency isn't preferred.
"unicorn/consistent-destructuring": "off",

// This package is currently CJS-only.
"unicorn/prefer-module": "off",

// Deprecated in 2018: https://eslint.org/blog/2018/11/jsdoc-end-of-life/
"valid-jsdoc": "off",

1 change: 1 addition & 0 deletions build-tools/packages/build-cli/README.md
Original file line number Diff line number Diff line change
@@ -44,6 +44,7 @@ USAGE
* [`flub info`](docs/info.md) - Get info about the repo, release groups, and packages.
* [`flub list`](docs/list.md) - List packages in a release group in topological order.
* [`flub merge`](docs/merge.md) - Sync branches depending on the batch size passed
* [`flub modify`](docs/modify.md) - Modify commands are used to modify projects to add or remove dependencies, update Fluid imports, etc.
* [`flub release`](docs/release.md) - Release commands are used to manage the Fluid release process.
* [`flub rename-types`](docs/rename-types.md) - Renames type declaration files from .d.ts to .d.mts.
* [`flub run`](docs/run.md) - Generate a report from input bundle stats collected through the collect bundleStats command.
271 changes: 271 additions & 0 deletions build-tools/packages/build-cli/data/rawApiLevels.jsonc

Large diffs are not rendered by default.

31 changes: 31 additions & 0 deletions build-tools/packages/build-cli/docs/modify.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
`flub modify`
=============

Modify commands are used to modify projects to add or remove dependencies, update Fluid imports, etc.

* [`flub modify fluid-imports`](#flub-modify-fluid-imports)

## `flub modify fluid-imports`

Rewrite imports for Fluid Framework APIs to use the correct subpath import (/alpha, /beta. etc.)

```
USAGE
$ flub modify fluid-imports [-v | --quiet] [--tsconfig <value>] [--data <value>] [--organize] [--onlyInternal]
FLAGS
--data=<value> Path to a data file containing raw API level data.
--onlyInternal Use /internal for all non-public APIs instead of /alpha or /beta.
--organize Organize the imports in any file that is modified. Note that this can make it more difficult to
see the rewritten import changes.
--tsconfig=<value> [default: ./tsconfig.json] Path to a tsconfig file that will be used to load project files.
LOGGING FLAGS
-v, --verbose Enable verbose logging.
--quiet Disable all logging.
DESCRIPTION
Rewrite imports for Fluid Framework APIs to use the correct subpath import (/alpha, /beta. etc.)
```

_See code: [src/commands/modify/fluid-imports.ts](https://github.com/microsoft/FluidFramework/blob/main/build-tools/packages/build-cli/src/commands/modify/fluid-imports.ts)_
5 changes: 4 additions & 1 deletion build-tools/packages/build-cli/package.json
Original file line number Diff line number Diff line change
@@ -105,7 +105,7 @@
"sort-package-json": "1.57.0",
"strip-ansi": "^6.0.1",
"table": "^6.8.1",
"ts-morph": "^17.0.1",
"ts-morph": "^21.0.1",
"type-fest": "^2.19.0"
},
"devDependencies": {
@@ -184,6 +184,9 @@
"generate": {
"description": "Generate commands are used to create/update code, docs, readmes, etc."
},
"modify": {
"description": "Modify commands are used to modify projects to add or remove dependencies, update Fluid imports, etc."
},
"release": {
"description": "Release commands are used to manage the Fluid release process."
}
4 changes: 2 additions & 2 deletions build-tools/packages/build-cli/src/BasePackageCommand.ts
Original file line number Diff line number Diff line change
@@ -157,6 +157,6 @@ function listNames(strings: string[] | undefined): string {
return strings === undefined
? ""
: strings.length > 10
? `${strings.length}`
: `${strings.length} (${strings.join(", ")})`;
? `${strings.length}`
: `${strings.length} (${strings.join(", ")})`;
}
4 changes: 2 additions & 2 deletions build-tools/packages/build-cli/src/commands/bump/deps.ts
Original file line number Diff line number Diff line change
@@ -223,7 +223,7 @@ export default class DepsCommand extends BaseCommand<typeof DepsCommand> {
/* prerelease */ flags.prerelease,
/* writeChanges */ !flags.testMode,
this.logger,
)
)
: await npmCheckUpdates(
context,
flags.releaseGroup ?? flags.package, // if undefined the whole repo will be checked
@@ -233,7 +233,7 @@ export default class DepsCommand extends BaseCommand<typeof DepsCommand> {
/* prerelease */ flags.prerelease,
/* writeChanges */ !flags.testMode,
this.logger,
);
);

if (updatedPackages.length > 0) {
if (shouldInstall) {
Original file line number Diff line number Diff line change
@@ -97,7 +97,7 @@ export default class GenerateChangeLogCommand extends BaseCommand<
const packagesToCheck = isReleaseGroup(releaseGroup)
? context.packagesInReleaseGroup(releaseGroup)
: // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
[context.fullPackageMap.get(releaseGroup)!];
[context.fullPackageMap.get(releaseGroup)!];

const installed = await FluidRepo.ensureInstalled(packagesToCheck);

Loading

0 comments on commit a209315

Please sign in to comment.