flub is a build and release tool for the Fluid Framework GitHub repositories. flub is intended to replace the existing fluid build-tools, primarily by reusing existing build-tools functionality and wrapping it in a more consistent, maintainable CLI using oclif.
$ npm install -g @fluid-tools/build-cli
$ flub COMMAND
running command...
$ flub (--version|-V)
@fluid-tools/build-cli/0.0.0
$ flub --help [COMMAND]
USAGE
$ flub COMMAND
...
flub autocomplete
- Display autocomplete installation instructions.flub bump
- Bump the version of packages, release groups, and their dependencies.flub check
- Check commands are used to verify repo state, apply policy, etc.flub commands
- List all flub commands.flub exec
- Run a shell command in the context of a package or release group.flub generate
- Generate commands are used to create/update code, docs, readmes, etc.flub help
- Display help for flub.flub info
- Get info about the repo, release groups, and packages.flub list
- List packages in a release group in topological order.flub merge
- Sync branches depending on the batch size passedflub modify
- Modify commands are used to modify projects to add or remove dependencies, update Fluid imports, etc.flub promote
- Promote commands are used to promote packages published to an npm registry.flub publish
- Publish commands are used to publish packages to an npm registry.flub release
- Release commands are used to manage the Fluid release process.flub rename-types
- Renames type declaration files from .d.ts to .d.mts.flub run
- Generate a report from input bundle stats collected through the collect bundleStats command.flub transform
- Transform commands are used to transform code, docs, etc. into alternative forms.flub typetests
- Updates configuration for type tests in package.json files. If the previous version changes after running preparation, then npm install must be run before building.
This package outputs its build files to lib/
instead of dist/
like most of our other packages. The reason is that
oclif uses the lib folder by convention, and there are oclif bugs that can be avoided by putting stuff in lib. See the
PR here for an example: microsoft#12155
Due to oclif/core#630, the build:manifest
node script uses an experimental flag. This can be
removed once we have upgraded to Node 16 in the repo.
The release
command provides a testMode
flag, which subclasses are expected to check when handling states. If in
test mode, all handled states should immediately return true. This enables tests to verify that new states are handled
in some way. Other commands could adopt this, but only the release command
uses it today.
The release
command also provides a state
flag that can be used to initialize the state machine to a specific state.
This is intended for testing.
There are some VS Code launch targets like flub generate typetests
that may work in some cases.
To run a locally built version of flub in contexts where the invocation of flub is done via package.json scripts, use a pnpm override. 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"
This approach can be used with flub generate typetests
to ensure that the --level
configuration 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_@[email protected]/node_modules/@fluid-tools/build-cli/lib/commands/generate/typetests.js
).
There are many ways to contribute to Fluid.
- Participate in Q&A in our GitHub Discussions.
- Submit bugs and help us verify fixes as they are checked in.
- Review the source code changes.
- Contribute bug fixes.
Detailed instructions for working in the repo can be found in the Wiki.
This project has adopted the Microsoft Open Source Code of Conduct. For more information see the Code of Conduct FAQ or contact [email protected] with any additional questions or comments.
This project may contain Microsoft trademarks or logos for Microsoft projects, products, or services. Use of these trademarks or logos must follow Microsoft’s Trademark & Brand Guidelines. Use of Microsoft trademarks or logos in modified versions of this project must not cause confusion or imply Microsoft sponsorship.
Not finding what you're looking for in this README? Check out fluidframework.com.
Still not finding what you're looking for? Please file an issue.
Thank you!
This project may contain Microsoft trademarks or logos for Microsoft projects, products, or services.
Use of these trademarks or logos must follow Microsoft's Trademark & Brand Guidelines.
Use of Microsoft trademarks or logos in modified versions of this project must not cause confusion or imply Microsoft sponsorship.