Граф коммитов

8 Коммитов

Автор SHA1 Сообщение Дата
Tyler Butler dda812637f
build(client): Update build-tools dependencies to latest (0.44) (#22297)
Updated the following:

  client (release group)

Dependencies on build-tools updated:

  @fluid-tools/build-cli: 0.44.0
  @fluidframework/build-tools: 0.44.0
  @fluidframework/bundle-size-tools: 0.44.0
  @fluid-tools/version-tools: 0.44.0

I also made two small changes to the root Biome config and the
test-snapshots Biome config. The configs exposed a case where `git
ls-files` will return a path to a directory - if that directory is a
submodule. These config changes enable the Biome task caching to work
even with this ls-files oddity by ensuring the directory path doesn't
make it into the cached file list.
2024-08-23 00:49:37 +00:00
Tyler Butler 5b3811e137
improvement(fluid-build): Support include/ignore settings in Biome task (#21826)
When the Biome fluid-build task was added it didn't support reading
Biome config files. Thadded the capability to read Biome config
files, including following `extends` values and merging the resulting
include/ignore settings across the files/formatter/linter settings. The
BiomeTask now uses this capability to enumerate the files to consider
when caching. While we don't use Biome for linting today, I tried to
make the code as general-purpose as possible so we could easily adapt
the task for linting in the future.

I added some test data and test cases. They're not exhaustive but they
cover the critical stuff and exercise the recursive loading.


[AB#9090](https://dev.azure.com/fluidframework/235294da-091d-4c29-84fc-cdfc3d90890b/_workitems/edit/9090)
2024-08-19 20:30:58 +00:00
Alex Villarreal d8d5396019
Ignore benchmark tests' output reports in biome formatting (#22216)
## Description

Adds the paths where benchmark tests generate reports to the list of
things ignored by biome when formatting or checking for formatting. Ran
into a build error in an environment where I had one of these output
files from a previous run of benchmark tests.
2024-08-15 12:59:39 -05:00
Jason Hartman b70b836ee2
tools(client+build-tools): update Biome to 1.8.3 (#21869)
Changes:
1. Remove production dependency in
@fluid-example/bubblebench-shared-tree
2. Update versions to ~1.8.3 (and set config to want ~)
3. Handle deprecations
a. Replace "javascript.formatter.trailingComma" with "...trailingCommas"
   b. Replace cli argument `--apply` with `--write`
4. Apply formatting updates
5. Add Biome to npm-package-json-script-dep
6. Remove unused `--formatter-enabled=true` from commands
7. Add missing biome devDeps in build-tools

Under 1.7.3 VS Code extensions users could experience server connection failures and need 1.8 version to get support from Biome. See [biomejs/biome-vscode#261](https://github.com/biomejs/biome-vscode/issues/261)
2024-07-12 21:26:58 +00:00
Tyler Butler c7ff2ae091
build(client): Tag asserts for RC5 release (#21457)
Tags asserts for the RC5 release.

Command used:

```shell
pnpm policy-check:asserts
```

Also updated the biome config to properly exclude the generated file,
and updated scripts to call `format` instead of `pretty-quick`.
2024-06-19 12:46:40 -07:00
Tyler Butler 7b712f217c
build: Remove biome.lspBin workspace setting and update biome configuration (#21496)
Makes the following biome-related config changes:

- Removes the `biome.lspBin` workspace setting. The value does not work
on Windows, and the setting cannot vary per platform. Without the
setting the extension seems to find biome on all platforms.
- Updates the ignore settings in biome to better handle things like
common packages, which were previously ignored when using Format on
Save. I also picked up additional patterns from the prettier ignore
file, including ignores for test collateral that is breaking some
builds.
- Treat tsdoc files as JSONC-without-trailing-commas.
2024-06-18 15:28:42 -07:00
Tyler Butler c17c13634e
build(client): Enable biome as default formatter (#21298)
## Summary

The client release group is updated to use biome for formatting instead
of prettier.

## Changes

1. The `format` script in each package now calls biome instead of
prettier.
2. The root `format` task runs a single biome command from the root
instead of running format in every package.
3. The vscode root workspace settings have been updated to set the biome
extension as the default formatter.
4. The root biome config is now in JSONC instead of JSON.
5. Paths outside the client and build-tools release groups are ignored
in the biome config because they're not using biome (yet).

## Known issues

- Despite best efforts, formatting back and forth between biome and
prettier is not 100% fidelity. Some changes that biome makes prettier
does not revert, though it also doesn't start failing or anything. You
can see examples by running `pnpm format && pnpm format:prettier` from
the root and looking and the remaining changes.
- Reformatting does sometimes cause lint disable statements to get
misplaced and they have to be manually fixed up.
2024-06-17 16:57:07 -07:00
Tyler Butler 6d9b7891fc
build(client): Add biome formatting scripts (#19380)
## Summary

Adds several scripts that can be run to convert projects in the client
release group to use the biome formatter. The process can be effectively
reversed by running another script, so projects can switch between
prettier and biome using the scripts and the build will continue to
work.

After enabling biome formatting, you can manually format using biome
with the `format:biome`script.

Once projects are completely on biome and we no longer need to port
changes between prettier branches and biome branches, then we can remove
prettier completely using the remove-prettier script. We should only do
that once the last release branch using prettier is no longer in
service.

## Scripts

### add-biome.sh

This script adds biome formatting scripts to a project. It also adds a
local biome config file to the project if needed.

The `format:prettier` and `check:prettier` tasks are left intact, and
the `format` task still calls prettier. This
enables one to manually format using biome while leaving the overall
build using prettier.

After running this script, you can clean up the package.json files by
running `pnpm policy-check:fix`.

**This PR includes the changes made by running this script across the
client release group.**

### enable-biome.sh

This script enables biome formatting in a project. It updates the
`format` and `check:format` scripts to call biome. It
should only be run on projects that have already had biome added to it.

### enable-prettier.sh

This script enables prettier formatting in a project. It updates the
`format` and `check:format` scripts to call
prettier. It's the opposite of the enable-biome.sh script.

### remove-prettier.sh

Once a project is completely switched to biome and no longer needs
prettier, this script will remove the prettier
dependency and any related scripts and config files.
2024-06-11 11:13:59 -07:00