feat: bit update should update dependencies in env.jsonc#10128
feat: bit update should update dependencies in env.jsonc#10128zkochan wants to merge 15 commits intoteambit:masterfrom
Conversation
fc8d0a2 to
c9dd8ce
Compare
There was a problem hiding this comment.
Pull request overview
This pull request adds support for updating dependencies in env.jsonc files when running the bit update command. Previously, bit update only updated dependencies in workspace.jsonc and component configurations, but did not handle dependencies defined in environment component's env.jsonc files.
Key changes:
- Introduces a new
jsonc-utilscomponent for parsing and modifying JSONC files while preserving formatting - Extends dependency resolution to include dependencies from env.jsonc files
- Implements logic to update env.jsonc files with new dependency versions, including special handling for peerDependencies' supportedRange
Reviewed changes
Copilot reviewed 10 out of 10 changed files in this pull request and generated 12 comments.
Show a summary per file
| File | Description |
|---|---|
| scopes/toolbox/json/jsonc-utils/jsonc-utils.ts | New utility functions for parsing, stringifying, and updating JSONC files while preserving formatting (indentation, newlines, comments) |
| scopes/toolbox/json/jsonc-utils/index.ts | Exports for the new jsonc-utils component |
| scopes/toolbox/json/jsonc-utils/jsonc-utils.docs.mdx | Comprehensive documentation for the jsonc-utils utility with examples and use cases |
| scopes/dependencies/dependency-resolver/get-all-policy-pkgs.ts | Adds 'env-jsonc' as a new CurrentPkgSource type to track where dependencies are defined |
| scopes/dependencies/dependency-resolver/dependency-resolver.main.runtime.ts | Implements getEnvJsoncPolicyPkgs() to extract dependencies from env.jsonc files and integrates them into the dependency resolution flow |
| scopes/workspace/install/install.main.runtime.ts | Implements updateEnvJsoncPolicies() to write updated dependency versions back to env.jsonc files and integrates it into the update workflow |
| scopes/workspace/install/pick-outdated-pkgs.ts | Updates unique name generation and adds context rendering for env-jsonc dependencies in the interactive selection UI |
| scopes/workspace/install/pick-outdated-pkgs.spec.ts | Updates test expectations to match new unique naming scheme with index suffixes |
| e2e/harmony/dependencies/env-jsonc-policies.e2e.ts | Adds end-to-end tests verifying that bit update correctly updates env.jsonc files and handles supportedRange for peerDependencies |
| .bitmap | Registers the new json/jsonc-utils component in the workspace |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
scopes/dependencies/dependency-resolver/dependency-resolver.main.runtime.ts
Outdated
Show resolved
Hide resolved
scopes/dependencies/dependency-resolver/dependency-resolver.main.runtime.ts
Outdated
Show resolved
Hide resolved
scopes/dependencies/dependency-resolver/dependency-resolver.main.runtime.ts
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 10 out of 10 changed files in this pull request and generated 6 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
scopes/dependencies/dependency-resolver/dependency-resolver.main.runtime.ts
Outdated
Show resolved
Hide resolved
scopes/dependencies/dependency-resolver/dependency-resolver.main.runtime.ts
Outdated
Show resolved
Hide resolved
scopes/dependencies/dependency-resolver/dependency-resolver.main.runtime.ts
Outdated
Show resolved
Hide resolved
scopes/dependencies/dependency-resolver/dependency-resolver.main.runtime.ts
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 11 out of 11 changed files in this pull request and generated 5 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
scopes/dependencies/dependency-resolver/dependency-resolver.main.runtime.ts
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 11 out of 11 changed files in this pull request and generated 9 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
scopes/dependencies/dependency-resolver/dependency-resolver.main.runtime.ts
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 11 out of 11 changed files in this pull request and generated 5 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
scopes/dependencies/dependency-resolver/dependency-resolver.main.runtime.ts
Show resolved
Hide resolved
scopes/dependencies/dependency-resolver/dependency-resolver.main.runtime.ts
Show resolved
Hide resolved
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 14 out of 14 changed files in this pull request and generated 1 comment.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 14 out of 14 changed files in this pull request and generated 6 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Proposed Changes