bump dep#16
Merged
Merged
Conversation
|
Review the following changes in direct dependencies. Learn more about Socket for GitHub.
|
|
Contributor
There was a problem hiding this comment.
1 issue found across 5 files
Prompt for AI agents (unresolved issues)
Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.
<file name="src/utils/formatting.ts">
<violation number="1" location="src/utils/formatting.ts:55">
P2: Using `slice` here changes negative-index behavior and can produce outputs longer than `maxLength` for small limits (e.g., `maxLength < 3`).</violation>
</file>
Reply with feedback, questions, or to request a fix. Tag @cubic-dev-ai to re-run a review.
| return text; | ||
| } | ||
| return `${text.substring(0, maxLength - 3)}...`; | ||
| return `${text.slice(0, maxLength - 3)}...`; |
Contributor
There was a problem hiding this comment.
P2: Using slice here changes negative-index behavior and can produce outputs longer than maxLength for small limits (e.g., maxLength < 3).
Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At src/utils/formatting.ts, line 55:
<comment>Using `slice` here changes negative-index behavior and can produce outputs longer than `maxLength` for small limits (e.g., `maxLength < 3`).</comment>
<file context>
@@ -52,7 +52,7 @@ function truncate(text: string, maxLength: number): string {
return text;
}
- return `${text.substring(0, maxLength - 3)}...`;
+ return `${text.slice(0, maxLength - 3)}...`;
}
</file context>
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



Summary by cubic
Bumps dev dependencies (including
typescript@^6.0.2) and updatesultracite@^7.3.2to resolve a CLI issue; includes small code/test fixes for reliability.Dependencies
ultraciteto^7.3.2.typescriptto^6.0.2andesbuildto^0.27.4.@changesets/*,@biomejs/biome, and@types/bun.Bug Fixes
text.sliceintruncateto avoid edge cases.GH_TOKENcorrectly in tests when it was initially undefined.Written for commit b7b4222. Summary will update on new commits.
Greptile Summary
This PR bumps several dev dependencies (biome, TypeScript, ultracite, changesets, esbuild,
@types/bun) and includes two small code fixes driven by the ultracite/biome linting update.package.json/bun.lock: Dev-only version bumps. The most notable change istypescript ^5.9.3 → ^6.0.2, which is a major version jump and may introduce new type errors or changed defaults that need to be validated viabun run typecheck.src/utils/formatting.ts:String.prototype.substringreplaced withString.prototype.sliceintruncate()— a style-guide-consistent modernization with identical runtime behaviour for non-negative indices.tests/unit/auth-manager.test.ts: Theif/elsebranches in theGH_TOKENenvironment-variable restore block were swapped (!== undefined→=== undefined). Both orderings are logically equivalent; this resolves a biome/ultracite lint warning about negated conditions.Confidence Score: 4/5
typecheckpass confirms TypeScript 6 introduces no new errors..substring→.sliceswap. The TypeScript 5 → 6 major bump is the only meaningful risk, as major TS releases can tighten type-checking and break compilation; confirmingbun run typecheckpasses cleanly is the one remaining gate before merging.package.json— verifybun run typechecksucceeds under TypeScript 6.Important Files Changed
.substring()with.slice()intruncate, consistent with modern JS/TS style guide preferences.!== undefined/=== undefinedbranches in theGH_TOKENenv-var restore block — logically equivalent, resolves an ultracite/biome lint warning.Flowchart
%%{init: {'theme': 'neutral'}}%% flowchart TD A[PR: bump dep] --> B[Dev Dependency Bumps\npackage.json / bun.lock] A --> C[Code Fixes] B --> D["@biomejs/biome 2.4.3 → 2.4.8"] B --> E["typescript 5.9.3 → 6.0.2 ⚠️ major"] B --> F["ultracite 7.2.3 → 7.3.2"] B --> G["@changesets/* minor bumps"] B --> H["esbuild / @types/bun patches"] C --> I["src/utils/formatting.ts\n.substring() → .slice()"] C --> J["tests/unit/auth-manager.test.ts\nFlip undefined check order\n(lint fix, same behavior)"] E --> K{typecheck passes?} K -- yes --> L[Safe to merge] K -- no --> M[Fix TS6 type errors]Reviews (1): Last reviewed commit: "bump dep" | Re-trigger Greptile
Context used: