-
Notifications
You must be signed in to change notification settings - Fork 1
fix: change biome package to @biomejs/biome #81
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
fix: change biome package to @biomejs/biome #81
Conversation
Signed-off-by: Sonia_Sandler <sandler.sonia@gmail.com>
Signed-off-by: Sonia_Sandler <sandler.sonia@gmail.com>
Signed-off-by: Sonia_Sandler <sandler.sonia@gmail.com>
04788e3 to
65958b5
Compare
📝 WalkthroughWalkthroughUpdates Biome linter and formatter to version 2.3.9 with new centralized configuration, consolidates ESLint rules, refactors authentication flow logic with explicit type checks and error handling, and introduces a Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Areas requiring extra attention:
Pre-merge checks❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 1
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
⛔ Files ignored due to path filters (1)
pnpm-lock.yamlis excluded by!**/pnpm-lock.yaml
📒 Files selected for processing (11)
biome.jsonc(1 hunks)eslint.config.mjs(1 hunks)package.json(1 hunks)src/auth-flows-helpers.spec.ts(4 hunks)src/auth-flows-helpers.ts(2 hunks)src/auth-flows.spec.ts(6 hunks)src/auth-flows.ts(4 hunks)src/extension.spec.ts(1 hunks)src/github-scopes.ts(1 hunks)src/provider-session-manager.spec.ts(5 hunks)src/provider-session-manager.ts(4 hunks)
🧰 Additional context used
🧬 Code graph analysis (5)
src/auth-flows-helpers.ts (2)
src/auth-flows.ts (2)
IGitHubDeviceCodeResponse(28-34)sessionId(26-26)src/config.ts (1)
config(19-21)
src/auth-flows-helpers.spec.ts (1)
src/auth-flows-helpers.ts (1)
waitForDeviceCodeAccessToken(25-100)
src/provider-session-manager.spec.ts (2)
src/auth-flows.ts (2)
PATFlow(81-120)deviceFlow(37-78)src/provider-session-manager.ts (1)
AUTHENTICATION_SESSIONS_KEY(23-23)
src/auth-flows.spec.ts (2)
src/auth-flows.ts (3)
sessionId(26-26)deviceFlow(37-78)PATFlow(81-120)src/config.ts (1)
config(19-21)
src/auth-flows.ts (2)
src/config.ts (1)
config(19-21)src/github-scopes.ts (1)
GITHUB_SCOPES(19-32)
🪛 Gitleaks (8.30.0)
src/auth-flows-helpers.spec.ts
[high] 56-56: Discovered a GitHub OAuth Access Token, posing a risk of compromised GitHub account integrations and data leaks.
(github-oauth)
🔇 Additional comments (20)
src/provider-session-manager.spec.ts (2)
22-38: Formatting changes look good.These are consistent formatting adjustments aligned with the new Biome configuration. The test mock structure and behavior remain unchanged.
116-150: Test parameterization formatting is clean.The
test.eachstructure with destructured parameters is well-formatted and maintains the original test logic.eslint.config.mjs (1)
43-43: LGTM - Simplified project configuration.The
TYPESCRIPT_PROJECTSarray consolidation is a clean simplification. The singletsconfig.jsonreference is appropriate for this extension project.src/github-scopes.ts (1)
19-32: Formatting improvements applied consistently.The type signature spacing correction and inline array formatting align with the new Biome style configuration. The scope mappings are unchanged.
src/extension.spec.ts (1)
30-33: Formatting adjustments look good.Consistent indentation applied to the mock object structure.
biome.jsonc (1)
1-45: Well-structured Biome configuration.The configuration is comprehensive and appropriate:
- Line width of 120 provides reasonable flexibility
- Single quotes align with the ESLint configuration
- Disabling
organizeImportsin assist is correct since ESLint'ssimple-import-sorthandles import ordering (avoiding conflicts)- Style rules set to
errorenforce consistent code stylesrc/provider-session-manager.ts (3)
21-28: Formatting adjustments to imports and field initialization.The import and
onDidChangeSessionsinitialization formatting aligns with the new Biome style configuration.
46-72: Whitespace adjustments in createSession method.Formatting-only changes to the method body. The authentication flow logic remains unchanged.
73-98: Formatting updates to getSessions and removeSession.The method logic remains intact. The error handling for non-existent session IDs (line 85) and the session entry recreation when empty (lines 93-95) are correctly implemented.
src/auth-flows-helpers.spec.ts (3)
47-59: Formatting updates to test data objects.The response examples are reformatted to single-line properties. Note: The static analysis warning about the OAuth token at line 56 is a false positive—this is example data from GitHub's official documentation used for testing response parsing, not a real credential.
61-71: Improved fetch mock setup formatting.The mock Response structure is well-formatted and correctly includes both
ok: trueand thejsonmock function to match the real fetch API behavior.
87-95: Assertion formatting looks good.The expected session object formatting is consistent with the project's new style guidelines.
src/auth-flows-helpers.ts (3)
25-29: LGTM!The multi-line function signature improves readability. The parameter types and return type are clear and properly annotated.
43-58: Good defensive addition with explicit Response typing and ok check.The explicit
Responsetype annotation improves type safety, and theresponse.okcheck properly guards against non-2xx responses before attempting to parse JSON. This prevents potential JSON parsing errors on error responses.
66-81: Clearer separation of OAuth error handling branches.The distinct
ifblocks forslow_down,expired_token, andaccess_deniedimprove readability compared to a chained structure. The behavior is preserved while making each error condition more explicit and easier to modify independently.src/auth-flows.spec.ts (2)
52-58: Formatting-only changes; tests remain functionally equivalent.The object property keys are now unquoted (valid JavaScript identifiers), and whitespace is normalized. No changes to test logic or assertions.
126-148: LGTM!Multi-line formatting for the prompt string and assertion objects improves readability without affecting test behavior.
src/auth-flows.ts (3)
28-34: LGTM!Interface property formatting normalized. The type definitions remain correct and clear.
39-48: LGTM!Multi-line formatting for URI construction and fetch options improves readability while preserving the device code flow functionality.
100-102: Clearer scope expansion logic with multi-line chaining.The optional chaining and
flatMaptransformation are now easier to follow. The logic correctly expands scopes usingGITHUB_SCOPESwhile preserving the original scope in the result.
jeffmaury
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
No issue related ?
|
@jeffmaury no, I found it out through the GitHub security alerts and immediately went to change it |
Changes the
biomepackage to@biomejs/biome