Skip to content
Open
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
4 changes: 4 additions & 0 deletions build-tools/packages/build-cli/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@
"build:test": "tsc --project ./src/test/tsconfig.json",
"check:biome": "biome check .",
"check:format": "npm run check:biome",
"check:inexactOptionalPropertyTypes": "tsc --project ./tsconfig.inexactOptionalPropertyTypes.json",
"ci:build:docs": "api-extractor run",
"clean": "rimraf --glob dist lib oclif.manifest.json \"**/*.tsbuildinfo\" \"**/*.build.log\" _api-extractor-temp nyc",
"clean:manifest": "rimraf --glob oclif.manifest.json",
Expand Down Expand Up @@ -192,6 +193,9 @@
"...",
"build:copy",
"build:diagrams"
],
"check:inexactOptionalPropertyTypes": [
"^tsc"
]
}
},
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"extends": "./tsconfig.json",
"compilerOptions": {
"noEmit": true,
"exactOptionalPropertyTypes": false,
"skipLibCheck": true,
},
}
8 changes: 8 additions & 0 deletions build-tools/packages/build-infrastructure/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@
"build:test": "tsc --project ./src/test/tsconfig.json",
"check:biome": "biome check .",
"check:format": "npm run check:biome",
"check:inexactOptionalPropertyTypes": "tsc --project ./tsconfig.inexactOptionalPropertyTypes.json",
"clean": "rimraf --glob dist lib \"**/*.tsbuildinfo\" \"**/*.build.log\" nyc _api-extractor-temp",
"compile": "fluid-build . --task compile",
"eslint": "eslint --quiet --format stylish src",
Expand Down Expand Up @@ -93,6 +94,13 @@
"typedoc": "^0.28.14",
"typedoc-plugin-markdown": "^4.9.0"
},
"fluidBuild": {
"tasks": {
"check:inexactOptionalPropertyTypes": [
"^tsc"
]
}
},
"oclif": {
"bin": "buildProject",
"dirname": "buildProject",
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"extends": "./tsconfig.json",
"compilerOptions": {
"noEmit": true,
"exactOptionalPropertyTypes": false,
"skipLibCheck": true,
},
}
8 changes: 8 additions & 0 deletions build-tools/packages/build-tools/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
"build:test": "tsc --project ./src/test/tsconfig.json",
"check:biome": "biome check .",
"check:format": "npm run check:biome",
"check:inexactOptionalPropertyTypes": "tsc --project ./tsconfig.inexactOptionalPropertyTypes.json",
"clean": "rimraf --glob dist lib \"**/*.tsbuildinfo\" \"**/*.build.log\" nyc",
"compile": "fluid-build . --task compile",
"eslint": "eslint --quiet --format stylish src",
Expand Down Expand Up @@ -86,5 +87,12 @@
},
"engines": {
"node": ">=22.22.2"
},
"fluidBuild": {
"tasks": {
"check:inexactOptionalPropertyTypes": [
"^tsc"
]
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,10 @@ export async function getClosestBiomeConfigPath(
stopAt?: string,
): Promise<string> {
return (await findUp)
.findUp(["biome.json", "biome.jsonc"], { cwd, stopAt })
.findUp(["biome.json", "biome.jsonc"], {
cwd,
...(stopAt === undefined ? {} : { stopAt }),
})
.then((config) => {
if (config === undefined) {
throw new Error(`Can't find biome config file`);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
*/

interface CommonOptions {
defaultRoot?: string;
root?: string;
defaultRoot: string | undefined;
root: string | undefined;
timer: boolean;
logtime: boolean;
quiet: boolean;
Expand Down
4 changes: 2 additions & 2 deletions build-tools/packages/build-tools/src/fluidBuild/fluidRepo.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,13 +38,13 @@ export class FluidRepo {
if (typeof item === "string") {
return {
directory: path.join(resolvedRoot, item),
ignoredDirs: undefined,
};
}
const directory = path.join(resolvedRoot, item.directory);
const ignoredDirs = item.ignoredDirs?.map((dir) => path.join(directory, dir));
return {
directory,
ignoredDirs: item.ignoredDirs?.map((dir) => path.join(directory, dir)),
...(ignoredDirs === undefined ? {} : { ignoredDirs }),
};
};
const loadOneEntry = (item: IFluidBuildDir, group: string): Package[] => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,14 +35,14 @@ export async function apiExtractorWorker(message: WorkerMessage): Promise<Worker
showVerboseMessages: true,
messageCallback: (message) => messages.push(message),
});
return {
code: result.succeeded ? 0 : 1,
error: result.succeeded
? undefined
: // This error does not appear to be used in fluid-build's output,
return result.succeeded
? { code: 0 }
: {
code: 1,
// This error does not appear to be used in fluid-build's output,
// but populate it with useful information anyway.
new Error(
error: new Error(
`Number of Errors: ${result.errorCount}. Messages: ${JSON.stringify(messages.map((m) => m.text))}`,
),
};
};
}
4 changes: 3 additions & 1 deletion build-tools/packages/build-tools/src/fluidBuild/tsCompile.ts
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,9 @@ export function tsCompile(
tscUtils.convertOptionPaths(commandLine.options, cwd, path.resolve),
),
host,
projectReferences: commandLine.projectReferences,
...(commandLine.projectReferences === undefined
? {}
: { projectReferences: commandLine.projectReferences }),
};
const program = incremental
? baseTs.createIncrementalProgram(param)
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"extends": "./tsconfig.json",
"compilerOptions": {
"noEmit": true,
"exactOptionalPropertyTypes": false,
"skipLibCheck": true,
},
}
1 change: 1 addition & 0 deletions build-tools/packages/build-tools/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
"module": "node16",
"moduleResolution": "node16",
"types": ["node"],
"exactOptionalPropertyTypes": true,
},
"include": ["src/**/*.ts", "src/**/*.cts"],
"exclude": ["src/test/**/*", "dist", "node_modules"],
Expand Down
8 changes: 8 additions & 0 deletions build-tools/packages/version-tools/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@
"build:test": "tsc --project ./src/test/tsconfig.json",
"check:biome": "biome check .",
"check:format": "npm run check:biome",
"check:inexactOptionalPropertyTypes": "tsc --project ./tsconfig.inexactOptionalPropertyTypes.json",
"ci:build:docs": "api-extractor run",
"clean": "rimraf --glob dist lib oclif.manifest.json \"**/*.tsbuildinfo\" \"**/*.build.log\" _api-extractor-temp nyc",
"clean:manifest": "rimraf --glob oclif.manifest.json",
Expand Down Expand Up @@ -103,6 +104,13 @@
"engines": {
"node": ">=22.22.2"
},
"fluidBuild": {
"tasks": {
"check:inexactOptionalPropertyTypes": [
"^tsc"
]
}
},
"oclif": {
"bin": "fluv",
"dirname": "fluv",
Expand Down
2 changes: 1 addition & 1 deletion build-tools/packages/version-tools/src/commands/version.ts
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,7 @@ export default class VersionCommand extends Command {
this.error(`The version you provided isn't valid: "${parsedInput}"`);
}
return {
bumpType,
...(bumpType === undefined ? {} : { bumpType }),
parsedVersion,
isFluidInternalFormat: isInternalVersionScheme(parsedVersion) === true,
};
Expand Down
1 change: 1 addition & 0 deletions build-tools/packages/version-tools/src/test/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
"outDir": "../../lib/test",
"types": ["node", "mocha", "chai"],
"skipLibCheck": true,
"exactOptionalPropertyTypes": true,
},
"include": ["./**/*"],
"references": [
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"extends": "./tsconfig.json",
"compilerOptions": {
"noEmit": true,
"exactOptionalPropertyTypes": false,
"skipLibCheck": true,
},
}
1 change: 1 addition & 0 deletions build-tools/packages/version-tools/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
"outDir": "./lib",
"types": ["node"],
"noImplicitAny": true,
"exactOptionalPropertyTypes": true,
},
"include": ["src/**/*"],
"exclude": ["src/test/**/*"],
Expand Down
10 changes: 9 additions & 1 deletion fluidBuild.config.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,14 @@ module.exports = {
script: false,
},
"lint": {
dependsOn: ["eslint", "good-fences", "depcruise", "check:exports", "check:release-tags"],
dependsOn: [
"check:inexactOptionalPropertyTypes",
"eslint",
"good-fences",
"depcruise",
"check:exports",
"check:release-tags",
],
script: false,
},
"checks": {
Expand Down Expand Up @@ -165,6 +172,7 @@ module.exports = {
// therefore we need to require both before running api-extractor.
"check:release-tags": ["tsc", "build:esnext"],
"check:are-the-types-wrong": ["tsc", "build:esnext", "api"],
"check:inexactOptionalPropertyTypes": ["^build:esnext", "^api-extractor:esnext"],
"check:format": {
dependencies: [],
script: true,
Expand Down
Loading