Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

build(client,build-tools): Upgrade biome to 1.9.3 #22721

Open
wants to merge 9 commits into
base: main
Choose a base branch
from

Conversation

tylerbutler
Copy link
Member

@tylerbutler tylerbutler commented Oct 3, 2024

Upgrade biome to 1.9.3.

Notable changes:

  • CSS files are now formatted.
  • Extra parens are added in statements where the order of operations may be confusing.

@github-actions github-actions bot added area: build Build related issues area: dds Issues related to distributed data structures area: dds: propertydds area: dds: sharedstring area: dds: tree area: dev experience Improving the experience of devs building on top of fluid area: driver Driver related issues area: examples Changes that focus on our examples area: framework Framework is a tag for issues involving the developer framework. Eg Aqueduct area: loader Loader related issues area: odsp-driver area: runtime Runtime related issues area: tests Tests to add, test infrastructure improvements, etc base: main PRs targeted against main branch labels Oct 3, 2024
@tylerbutler tylerbutler requested review from a team as code owners October 3, 2024 22:59
@github-actions github-actions bot added the dependencies Pull requests that update a dependency file label Oct 3, 2024
Copy link
Contributor

@alexvy86 alexvy86 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A couple of things but looks good to me otherwise. I love the new parentheses :)

Comment on lines +893 to +896
describe(includeStringification
? "with stringification"
: "without stringification", () => {
for (const [name, data, context] of encodingTestData.successes) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmm I'm torn about this one. The ones before where the function() declaration ended up at the end of a line didn't feel so bad for some reason, then I hit this and it felt weird, and now the other ones also feel a bit weird 🤔 . Is it configurable by any chance?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The only config we can do to influence this (maybe) is to apply a different line length to this file, but that would have other side effects. If we really don't like the changes in this file, we could use inline ignores I think.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think I'd bother if it's just me. If someone else has similar opinion maybe we can think about it.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The new line wrapping here seems fine, though I also preferred the old one I don't think its worth worrying about.

I do find it odd that the line 896 has the same indent as the one before it despite being inside a new level of nesting from the lambda. To me that looks like a biome bug which should probably be reported.

My suggestion is to go ahead with merging this update (assuming everything else is fine) but report this case as a bug.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also the choice to line wrap one member of an argument list, and put part of the next member on the same line as the last part of the first one seems odd. I'd expect putting each argument on its own line if following an argument that was line wrapped. which is how the old version worked.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

After finding a lot for cases of this same issue, but worse, I'm no longer sure we want to land this update as is. If it does bug fixes we need, then maybe, this it makes a lot of test bodies really hard to seperate from the line wrapped descriptions

…alization/EditableView.tsx

Co-authored-by: Alex Villarreal <716334+alexvy86@users.noreply.github.com>
@msfluid-bot
Copy link
Collaborator

msfluid-bot commented Oct 4, 2024

@fluid-example/bundle-size-tests: +245 Bytes
Metric NameBaseline SizeCompare SizeSize Diff
aqueduct.js 460.47 KB 460.5 KB +35 Bytes
azureClient.js 557.45 KB 557.5 KB +49 Bytes
connectionState.js 724 Bytes 724 Bytes No change
containerRuntime.js 259.74 KB 259.76 KB +14 Bytes
fluidFramework.js 405.91 KB 405.92 KB +14 Bytes
loader.js 134.34 KB 134.36 KB +14 Bytes
map.js 42.46 KB 42.46 KB +7 Bytes
matrix.js 148.63 KB 148.64 KB +7 Bytes
odspClient.js 524.41 KB 524.46 KB +49 Bytes
odspDriver.js 97.84 KB 97.86 KB +21 Bytes
odspPrefetchSnapshot.js 42.81 KB 42.82 KB +14 Bytes
sharedString.js 164.82 KB 164.83 KB +7 Bytes
sharedTree.js 396.37 KB 396.38 KB +7 Bytes
Total Size 3.31 MB 3.31 MB +245 Bytes

Baseline commit: ad35a7c

Generated by 🚫 dangerJS against fb5bd9d

},
);
it("Should wait for client 1 to leave before moving to connected state(Client 3) when client 2 " +
"got disconnected from connected state", async () => {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In my opinion, this is much harder to read, since the body of the function has the same indent as the line before it and the function declaration is at the end of a line after unrelated content. This really blurs the function body with the test arguments in a hard to visually parse way.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems like the same formatting bug we hit with the tree test, just worse since the first thing in the lambda isn't a loop.

});

it("Client 3 should wait for client 2(which got disconnected without sending any ops) to leave " +
"when client 2 already waited on client 1", async () => {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same issue again here

}
it(`No progress for ${maxReconnects} connection state changes, with pending state, should ` +
"generate telemetry event and throw an error that closes the container", async () => {
const pendingStateManager = getMockPendingStateManager();
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

again, a line starting with contents of a function at the same indent as a line before which is part of something else.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: build Build related issues area: dds: propertydds area: dds: sharedstring area: dds: tree area: dds Issues related to distributed data structures area: dev experience Improving the experience of devs building on top of fluid area: driver Driver related issues area: examples Changes that focus on our examples area: framework Framework is a tag for issues involving the developer framework. Eg Aqueduct area: loader Loader related issues area: odsp-driver area: runtime Runtime related issues area: tests Tests to add, test infrastructure improvements, etc base: main PRs targeted against main branch dependencies Pull requests that update a dependency file
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants