Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion PACKAGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,7 @@ The dependencies between layers are enforced by the layer-check command._

| Packages | Layer Dependencies |
| --- | --- |
| - [@fluid-private/changelog-generator-wrapper](/packages/tools/changelog-generator-wrapper) (private)</br>- [@fluidframework/devtools](/packages/tools/devtools/devtools)</br>- [@fluid-internal/devtools-browser-extension](/packages/tools/devtools/devtools-browser-extension) (private)</br>- [@fluidframework/devtools-core](/packages/tools/devtools/devtools-core)</br>- [@fluid-private/devtools-test-app](/packages/tools/devtools/devtools-test-app) (private)</br>- [@fluid-internal/devtools-view](/packages/tools/devtools/devtools-view) (private)</br>- [@fluid-tools/fetch-tool](/packages/tools/fetch-tool)</br>- [@fluidframework/fluid-runner](/packages/tools/fluid-runner)</br>- [@fluid-internal/replay-tool](/packages/tools/replay-tool) (private)</br>- [@fluid-tools/markdown-magic](/tools/markdown-magic) (private)</br>- [@fluid-tools/build-cli](/build-tools/packages/build-cli)</br>- [@fluid-tools/build-infrastructure](/build-tools/packages/build-infrastructure)</br>- [@fluidframework/build-tools](/build-tools/packages/build-tools)</br>- [@fluidframework/bundle-size-tools](/build-tools/packages/bundle-size-tools)</br>- [@fluid-tools/version-tools](/build-tools/packages/version-tools)</br>- [@fluid-tools/api-markdown-documenter](/tools/api-markdown-documenter)</br>- [@fluid-internal/getkeys](/tools/getkeys) (private)</br>- [@fluidframework/test-tools](/tools/test-tools) | - [Core-Interfaces](#Core-Interfaces)</br>- [Driver-Definitions](#Driver-Definitions)</br>- [Container-Definitions](#Container-Definitions)</br>- [Core-Utils](#Core-Utils)</br>- [Client-Utils](#Client-Utils)</br>- [Telemetry-Utils](#Telemetry-Utils)</br>- [Other-Utils](#Other-Utils)</br>- [Tool-Utils](#Tool-Utils)</br>- [Driver](#Driver)</br>- [Loader](#Loader)</br>- [Runtime](#Runtime)</br>- [Framework](#Framework)</br>- [Routerlicious-Driver](#Routerlicious-Driver)</br>- [Test-Utils](#Test-Utils)</br>- [Examples](#Examples)</br>&nbsp;</br>&nbsp;</br>&nbsp; |
| - [@fluid-private/changelog-generator-wrapper](/packages/tools/changelog-generator-wrapper) (private)</br>- [@fluidframework/devtools](/packages/tools/devtools/devtools)</br>- [@fluid-internal/devtools-browser-extension](/packages/tools/devtools/devtools-browser-extension) (private)</br>- [@fluidframework/devtools-core](/packages/tools/devtools/devtools-core)</br>- [@fluid-private/devtools-test-app](/packages/tools/devtools/devtools-test-app) (private)</br>- [@fluid-internal/devtools-view](/packages/tools/devtools/devtools-view) (private)</br>- [@fluid-tools/fetch-tool](/packages/tools/fetch-tool)</br>- [@fluidframework/fluid-runner](/packages/tools/fluid-runner)</br>- [@fluid-internal/replay-tool](/packages/tools/replay-tool) (private)</br>- [@fluid-tools/markdown-magic](/tools/markdown-magic) (private)</br>- [@fluid-tools/build-cli](/build-tools/packages/build-cli)</br>- [@fluid-tools/build-infrastructure](/build-tools/packages/build-infrastructure)</br>- [@fluidframework/build-tools](/build-tools/packages/build-tools)</br>- [@fluid-tools/version-tools](/build-tools/packages/version-tools)</br>- [@fluid-tools/api-markdown-documenter](/tools/api-markdown-documenter)</br>- [@fluid-internal/getkeys](/tools/getkeys) (private)</br>- [@fluidframework/test-tools](/tools/test-tools) | - [Core-Interfaces](#Core-Interfaces)</br>- [Driver-Definitions](#Driver-Definitions)</br>- [Container-Definitions](#Container-Definitions)</br>- [Core-Utils](#Core-Utils)</br>- [Client-Utils](#Client-Utils)</br>- [Telemetry-Utils](#Telemetry-Utils)</br>- [Other-Utils](#Other-Utils)</br>- [Tool-Utils](#Tool-Utils)</br>- [Driver](#Driver)</br>- [Loader](#Loader)</br>- [Runtime](#Runtime)</br>- [Framework](#Framework)</br>- [Routerlicious-Driver](#Routerlicious-Driver)</br>- [Test-Utils](#Test-Utils)</br>- [Examples](#Examples)</br>&nbsp;</br>&nbsp; |

### Tests

Expand Down
5 changes: 1 addition & 4 deletions build-tools/.github/copilot-instructions.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ This is the **build-tools** release group for the Fluid Framework monorepo. It c
| `@fluidframework/build-tools` | Core build infrastructure, `fluid-build` CLI | `dist/` | CommonJS |
| `@fluid-tools/build-infrastructure` | Workspace and release group abstractions | `lib/` (ESM), `dist/` (CJS) | Dual |
| `@fluid-tools/version-tools` (fluv) | Semantic versioning utilities CLI | `lib/` | CommonJS |
| `@fluidframework/bundle-size-tools` | Bundle size analysis utilities | `dist/` | CommonJS |

## Build Commands

Expand Down Expand Up @@ -54,8 +53,7 @@ Packages have workspace dependencies and must build in order:
1. `version-tools` (no internal deps)
2. `build-tools` (depends on version-tools)
3. `build-infrastructure` (depends on version-tools)
4. `bundle-size-tools` (no internal deps)
5. `build-cli` (depends on all above)
4. `build-cli` (depends on all above)

The `fluid-build` task scheduler handles this automatically via `pnpm build`.

Expand Down Expand Up @@ -141,7 +139,6 @@ build-tools/
│ ├── build-cli/ # flub CLI (ESM)
│ ├── build-infrastructure/ # Workspace abstractions (dual ESM/CJS)
│ ├── build-tools/ # fluid-build CLI (CommonJS)
│ ├── bundle-size-tools/ # Bundle analysis (CommonJS)
│ └── version-tools/ # fluv CLI (CommonJS)
├── biome.jsonc # Formatter config
├── .syncpackrc.yml # Dep version rules
Expand Down
1 change: 0 additions & 1 deletion build-tools/.syncpackrc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,6 @@ semverGroups:
- "@fluid-tools/build-infrastructure"
- "@fluid-tools/version-tools"
- "@fluidframework/build-tools"
- "@fluidframework/bundle-size-tools"
- "@fluidframework/build-tools-bin"
packages:
- "**"
Expand Down
2 changes: 1 addition & 1 deletion build-tools/DEV.md
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ The following dependencies are pinned to older major versions because newer vers
- Latest: `^15.x`
- Issue: Version 15 has incompatible type definitions and breaks bundle size analysis tools
- Error: `Types have separate declarations of a private property` and `Type is missing properties`
- Used in: `build-cli`, `bundle-size-tools`
- Used in: `build-cli`
- Note: Pinned at `^11.2.0` to maintain compatibility; upgrade blocked until type issues resolved

#### API/Structure Breaking Changes
Expand Down
1 change: 0 additions & 1 deletion build-tools/feeds/internal-build.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
@fluid-tools/version-tools
@fluidframework/bundle-size-tools
@fluidframework/build-tools
@fluid-tools/build-infrastructure
@fluid-tools/build-cli
1 change: 0 additions & 1 deletion build-tools/feeds/internal-test.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
@fluid-tools/version-tools
@fluidframework/bundle-size-tools
@fluidframework/build-tools
@fluid-tools/build-infrastructure
@fluid-tools/build-cli
1 change: 0 additions & 1 deletion build-tools/feeds/public.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
@fluid-tools/version-tools
@fluidframework/bundle-size-tools
@fluidframework/build-tools
@fluid-tools/build-infrastructure
@fluid-tools/build-cli
6 changes: 2 additions & 4 deletions build-tools/packages/build-cli/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -82,8 +82,7 @@ For client that is:
```
"@fluid-tools/build-cli": "file:./build-tools/packages/build-cli",
"@fluidframework/build-tools": "file:./build-tools/packages/build-tools",
"@fluid-tools/version-tools": "file:./build-tools/packages/version-tools",
"@fluidframework/bundle-size-tools": "file:./build-tools/packages/bundle-size-tools"
"@fluid-tools/version-tools": "file:./build-tools/packages/version-tools"
```

This approach can be used with `flub generate typetests` to ensure that the `--entrypoint` configuration, if any, from the scripts is included, and can be done from a JavaScript Debug console to debug, though breakpoints will need to be set in the `.js` files in `node_modules` (for example in `node_modules/.pnpm/file+build-tools+packages+build-cli_@types+node@18.19.1/node_modules/@fluid-tools/build-cli/lib/commands/generate/typetests.js`).
Expand All @@ -93,8 +92,7 @@ Alternatively, `link:` overrides give similar results and are known to support s
```
"@fluid-tools/build-cli": "link:./build-tools/packages/build-cli",
"@fluidframework/build-tools": "link:./build-tools/packages/build-tools",
"@fluid-tools/version-tools": "link:./build-tools/packages/version-tools",
"@fluidframework/bundle-size-tools": "link:./build-tools/packages/bundle-size-tools"
"@fluid-tools/version-tools": "link:./build-tools/packages/version-tools"
```

Either pattern requires `pnpm i --no-frozen-lockfile` after setting `overrides`. If any build-tools package `dependencies` are updated when using `file:`, be sure to rerun for both workspaces.
Expand Down
2 changes: 1 addition & 1 deletion build-tools/packages/build-cli/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,6 @@
"@fluid-tools/build-infrastructure": "workspace:~",
"@fluid-tools/version-tools": "workspace:~",
"@fluidframework/build-tools": "workspace:~",
"@fluidframework/bundle-size-tools": "workspace:~",
"@github/copilot-sdk": "^0.2.2",
"@inquirer/prompts": "^8.0.1",
"@microsoft/api-extractor": "^7.58.1",
Expand Down Expand Up @@ -168,6 +167,7 @@
"@types/semver": "^7.7.1",
"@types/sort-json": "^2.0.3",
"@types/unist": "^3.0.3",
"@types/webpack-bundle-analyzer": "^4.7.0",
"@types/xml2js": "^0.4.14",
"c8": "^10.1.3",
"chai": "^6.2.1",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,13 @@
* Licensed under the MIT License.
*/

import { getAzureDevopsApi } from "@fluidframework/bundle-size-tools";
import type { IAzureDevopsBuildCoverageConstants } from "../library/azureDevops/constants.js";
import {
getBaselineBuildMetrics,
getBuildArtifactForSpecificBuild,
type IBuildMetrics,
} from "../library/azureDevops/getBaselineBuildMetrics.js";
import { getAzureDevopsApi } from "../library/bundleSizeDiff/index.js";
import type { CommandLogger } from "../logging.js";
import { type CodeCoverageComparison, compareCodeCoverage } from "./compareCodeCoverage.js";
import { getCoverageMetricsFromArtifact } from "./getCoverageMetrics.js";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,13 @@

import { mkdir, rm, writeFile } from "node:fs/promises";
import path from "node:path";
import { Flags } from "@oclif/core";
import {
ADOSizeComparator,
type BundleComparison,
bundlesContainNoChanges,
getAzureDevopsApi,
} from "@fluidframework/bundle-size-tools";
import { Flags } from "@oclif/core";
} from "../../library/bundleSizeDiff/index.js";

import { BaseCommand } from "../../library/commands/base.js";

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

import { strict as assert } from "node:assert";
import { getZipObjectFromArtifact } from "@fluidframework/bundle-size-tools";
import type { WebApi } from "azure-devops-node-api";
import type { Build } from "azure-devops-node-api/interfaces/BuildInterfaces.js";
import { BuildResult } from "azure-devops-node-api/interfaces/BuildInterfaces.js";
import type JSZip from "jszip";
import type { CommandLogger } from "../../logging.js";
import { getZipObjectFromArtifact } from "../bundleSizeDiff/index.js";
import type { IAzureDevopsBuildCoverageConstants } from "./constants.js";
import { getBuild, getBuilds } from "./utils.js";

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
* Utilities for interacting with ADO APIs to fetch build data.
*/

import { getAzureDevopsApi } from "@fluidframework/bundle-size-tools";
import type { IBuildApi } from "azure-devops-node-api/BuildApi.js";
import type { Build, Timeline } from "azure-devops-node-api/interfaces/BuildInterfaces.js";
import {
Expand All @@ -16,6 +15,7 @@ import {
BuildResult,
BuildStatus,
} from "azure-devops-node-api/interfaces/BuildInterfaces.js";
import { getAzureDevopsApi } from "../bundleSizeDiff/index.js";
import type { AdoBuildRecord, AdoTimeline, BuildPerfMode } from "./types.js";

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,11 @@ import type { WebApi } from "azure-devops-node-api";
import type JSZip from "jszip";
import type { BundleAnalyzerPlugin } from "webpack-bundle-analyzer";

import { unzipStream } from "../utilities";
import { unzipStream } from "../utilities/index.js";
import {
type BundleFileData,
getAnalyzerFilePathsFromFolder,
} from "./getBundleFilePathsFromFolder";
} from "./getBundleFilePathsFromFolder.js";

/**
* Gets a list of `analyzer.json` paths from the zip archive (one per source package).
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,24 +4,24 @@
*/

import type { WebApi } from "azure-devops-node-api";
import { BuildResult, BuildStatus } from "azure-devops-node-api/interfaces/BuildInterfaces";
import { BuildResult, BuildStatus } from "azure-devops-node-api/interfaces/BuildInterfaces.js";
import type JSZip from "jszip";
import { join } from "path";

import type { BundleComparison } from "../BundleBuddyTypes";
import { compareBundles } from "../compareBundles";
import { getBaselineCommit, getBuilds } from "../utilities";
import type { BundleComparison } from "../BundleBuddyTypes.js";
import { compareBundles } from "../compareBundles.js";
import { getBaselineCommit, getBuilds } from "../utilities/index.js";
import {
getAnalyzerJsonFromZip,
getAnalyzerPathsFromZipObject,
getZipObjectFromArtifact,
} from "./AdoArtifactFileProvider";
import type { IADOConstants } from "./Constants";
} from "./AdoArtifactFileProvider.js";
import type { IADOConstants } from "./Constants.js";
import {
getAnalyzerJsonFromFileSystem,
getAnalyzerPathsFromFileSystem,
} from "./FileSystemBundleFileProvider";
import { getBundleSummariesFromAnalyzer } from "./getBundleSummaries";
} from "./FileSystemBundleFileProvider.js";
import { getBundleSummariesFromAnalyzer } from "./getBundleSummaries.js";

/**
* Result of a size comparison against a baseline build, discriminated by `kind`.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@
import { promises as fsPromises } from "fs";
import type { BundleAnalyzerPlugin } from "webpack-bundle-analyzer";

import { getAllFilesInDirectory } from "../utilities";
import { getAllFilesInDirectory } from "../utilities/index.js";
import {
type BundleFileData,
getAnalyzerFilePathsFromFolder,
} from "./getBundleFilePathsFromFolder";
} from "./getBundleFilePathsFromFolder.js";

/**
* Returns a list of `analyzer.json` paths from the given folder (one per source package).
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@

import type { BundleAnalyzerPlugin } from "webpack-bundle-analyzer";

import type { BundleMetricSet, BundleSummaries } from "../BundleBuddyTypes";
import type { BundleFileData } from "./getBundleFilePathsFromFolder";
import type { BundleMetricSet, BundleSummaries } from "../BundleBuddyTypes.js";
import type { BundleFileData } from "./getBundleFilePathsFromFolder.js";

export interface GetBundleSummariesFromAnalyzerArgs {
bundlePaths: BundleFileData[];
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,19 +7,19 @@ export {
getAnalyzerJsonFromZip,
getAnalyzerPathsFromZipObject,
getZipObjectFromArtifact,
} from "./AdoArtifactFileProvider";
export { ADOSizeComparator, SizeComparison } from "./AdoSizeComparator";
export { IADOConstants } from "./Constants";
} from "./AdoArtifactFileProvider.js";
export { ADOSizeComparator, SizeComparison } from "./AdoSizeComparator.js";
export { IADOConstants } from "./Constants.js";
export {
getAnalyzerJsonFromFileSystem,
getAnalyzerPathsFromFileSystem,
} from "./FileSystemBundleFileProvider";
export { getAzureDevopsApi } from "./getAzureDevopsApi";
} from "./FileSystemBundleFileProvider.js";
export { getAzureDevopsApi } from "./getAzureDevopsApi.js";
export {
BundleFileData,
getAnalyzerFilePathsFromFolder,
} from "./getBundleFilePathsFromFolder";
} from "./getBundleFilePathsFromFolder.js";
export {
GetBundleSummariesFromAnalyzerArgs,
getBundleSummariesFromAnalyzer,
} from "./getBundleSummaries";
} from "./getBundleSummaries.js";
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* Licensed under the MIT License.
*/

import type { BundleComparison, BundleSummaries } from "./BundleBuddyTypes";
import type { BundleComparison, BundleSummaries } from "./BundleBuddyTypes.js";

/**
* Compares all the bundle summaries for a "baseline" and a "compare" bundle.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,18 +17,18 @@ export {
getZipObjectFromArtifact,
IADOConstants,
SizeComparison,
} from "./ADO";
} from "./ADO/index.js";
export {
BundleComparison,
BundleMetric,
BundleMetricSet,
BundleSummaries,
} from "./BundleBuddyTypes";
export { bundlesContainNoChanges, compareBundles } from "./compareBundles";
} from "./BundleBuddyTypes.js";
export { bundlesContainNoChanges, compareBundles } from "./compareBundles.js";
export {
GetBuildOptions,
getAllFilesInDirectory,
getBaselineCommit,
getBuilds,
unzipStream,
} from "./utilities";
} from "./utilities/index.js";
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
*/

import type { WebApi } from "azure-devops-node-api";
import type { Build } from "azure-devops-node-api/interfaces/BuildInterfaces";
import type { Build } from "azure-devops-node-api/interfaces/BuildInterfaces.js";

export interface GetBuildOptions {
// The ADO project name
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* Licensed under the MIT License.
*/

export { getAllFilesInDirectory } from "./getAllFilesInDirectory";
export { GetBuildOptions, getBuilds } from "./getBuilds";
export { getBaselineCommit } from "./gitCommands";
export { unzipStream } from "./unzipStream";
export { getAllFilesInDirectory } from "./getAllFilesInDirectory.js";
export { GetBuildOptions, getBuilds } from "./getBuilds.js";
export { getBaselineCommit } from "./gitCommands.js";
export { unzipStream } from "./unzipStream.js";
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,7 @@
* Licensed under the MIT License.
*/

import type JSZip from "jszip";
import { loadAsync } from "jszip";
import JSZip from "jszip";

function readStreamAsBuffer(stream: NodeJS.ReadableStream): Promise<Buffer> {
return new Promise((resolve, reject) => {
Expand All @@ -23,5 +22,5 @@ function readStreamAsBuffer(stream: NodeJS.ReadableStream): Promise<Buffer> {
}

export async function unzipStream(stream: NodeJS.ReadableStream): Promise<JSZip> {
return loadAsync(await readStreamAsBuffer(stream));
return JSZip.loadAsync(await readStreamAsBuffer(stream));
}
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,8 @@ describe("flub test-only-filter", () => {
);
const output: jsonOutput = JSON.parse(stdout) as jsonOutput;
const { selected, filtered } = output;
expect(selected.length).to.equal(5);
expect(filtered.length).to.equal(5);
expect(selected.length).to.equal(4);
expect(filtered.length).to.equal(4);
});

it(`--private filter`, async () => {
Expand Down
Loading
Loading