-
Notifications
You must be signed in to change notification settings - Fork 951
Unify lane.updateDependents into lane.components via skipWorkspace flag #10331
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
Open
davidfirst
wants to merge
32
commits into
master
Choose a base branch
from
rearchitect-update-dependents-skipworkspace
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 25 commits
Commits
Show all changes
32 commits
Select commit
Hold shift + click to select a range
bcbca82
refactor(lane): unify lane.updateDependents into lane.components via …
davidfirst 8eb6a1d
fix(merge,importer): always fetch all lane entries; prefetch main obj…
davidfirst 444e8fc
feat(snapping,export): cascade hidden lane entries through autotag an…
davidfirst 89d0848
feat(snapping,reset): scenario 1, 5, 6, 7, 8, 9 of cascade spec passing
davidfirst 0f537a6
feat(snapping): scope-side reverse cascade for _snap --update-dependents
davidfirst 4db4c92
test: remove cascade spec copy from bit4/e2e
davidfirst de49bbb
Merge branch 'master' into rearchitect-update-dependents-skipworkspace
davidfirst 524c937
fix(lane): updateDependents setter sets hasChanged and validates version
davidfirst a5fbfff
refactor(snapping): simplify addToUpdateDependentsInLane; bound concu…
davidfirst 712bc05
Merge branch 'master' into rearchitect-update-dependents-skipworkspace
davidfirst 5a7c490
perf+fix: cache updateDependents getter in hot path; include hidden i…
davidfirst e64892d
fix(lane,sources): isEqual covers hidden entries; bound override-bran…
davidfirst 263288f
Merge branch 'master' into rearchitect-update-dependents-skipworkspace
davidfirst a65c567
fix(lane): isEqual covers skipWorkspace and isDeleted flips
davidfirst f269bd4
fix(reset): invalidate cached divergeData before checking for residua…
davidfirst 4973029
fix(reset): use setDivergeData(fromCache=false) instead of touching p…
davidfirst 893268c
fix(reset,lane): bitmap restore for soft-deleted, lane invariants
davidfirst 4a24ecc
Merge remote-tracking branch 'origin/master' into rearchitect-update-…
davidfirst ce7eda3
fix(status,reset): hide cascade updateDependents from workspace-stage…
davidfirst e2cf284
fix(reset): walk lane parent chain for lane components, not main head
davidfirst 1fe9242
fix(export): drop misleading 'files not tracked' warning for hidden u…
davidfirst 568fead
address copilot review: jsdoc, dead LaneProps field, O(N) classification
davidfirst e930911
fix(merge-lanes): refresh hidden updateDependents on workspace 'bit l…
davidfirst 3a8ae12
test(lanes): port updateDependents cascade scenarios to bit e2e suite
davidfirst b374175
Merge branch 'master' into rearchitect-update-dependents-skipworkspace
davidfirst 5291546
docs(component-list): merge consecutive JSDoc blocks on listExportPen…
davidfirst 0af9333
test(lanes): remove cascade scenarios that require 'bit sign' (not in…
davidfirst 521b67b
test(lanes): destroy helper temp dirs before reassigning in scenario 4
davidfirst ba768e6
test(lanes): add scenario 14 — bit lane history with hidden updateDep…
davidfirst 701d039
feat(lanes): record updateDependents in lane history and rewind them …
davidfirst 0800fbb
fix(merge-lanes): use merged ConsumerComponent for hidden cascade snaps
davidfirst 2680dae
fix(lanes): treat history.updateDependents as authoritative on checko…
davidfirst File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,29 @@ | ||
| import { execFileSync } from 'child_process'; | ||
| import path from 'path'; | ||
| import type { SnapDataPerCompRaw } from '@teambit/snapping'; | ||
|
|
||
| /** | ||
| * In-process invocation of `SnappingMain.snapFromScope` against a bare scope path. Spawns | ||
| * `snap-from-scope-runner.js` so each call gets a fresh Node process — `loadBit` accumulates | ||
| * module-level state across in-process invocations and that state leaks into downstream | ||
| * shell-spawned `bit` commands when many scenarios share a single test process. Used by e2e tests | ||
| * that need to seed `lane.updateDependents` (hidden cascade entries with `skipWorkspace: true`) | ||
| * on a remote lane. | ||
| */ | ||
| export default class SnappingHelper { | ||
| async snapFromScope( | ||
| scopePath: string, | ||
| snapData: SnapDataPerCompRaw[], | ||
| options: { | ||
| lane?: string; | ||
| updateDependents?: boolean; | ||
| push?: boolean; | ||
| message?: string; | ||
| } = {} | ||
| ): Promise<void> { | ||
| const runnerPath = path.resolve(__dirname, 'snap-from-scope-runner.js'); | ||
| execFileSync('node', [runnerPath, scopePath, JSON.stringify(snapData), JSON.stringify(options)], { | ||
| stdio: 'inherit', | ||
|
davidfirst marked this conversation as resolved.
|
||
| }); | ||
|
davidfirst marked this conversation as resolved.
davidfirst marked this conversation as resolved.
davidfirst marked this conversation as resolved.
|
||
| } | ||
| } | ||
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,37 @@ | ||
| /* eslint-disable no-console */ | ||
| /** | ||
| * Standalone subprocess runner for `helper.snapping.snapFromScope`. The helper spawns this script | ||
| * via `child_process` so each invocation gets a clean Node process — `loadBit` mutates module-level | ||
| * state that doesn't fully reset between in-process calls, and accumulating that state across many | ||
| * scenarios in one process surfaces as "Version X not found in scope" failures during downstream | ||
| * shell-spawned `bit` commands. | ||
| * | ||
| * argv: <scopePath> <snapDataJson> <optionsJson> | ||
| */ | ||
| import { loadBit } from '@teambit/bit'; | ||
| import type { SnappingMain } from '@teambit/snapping'; | ||
| import { SnappingAspect } from '@teambit/snapping'; | ||
|
|
||
| async function main(): Promise<void> { | ||
| const [, , scopePath, snapDataJson, optionsJson] = process.argv; | ||
| const snapData = JSON.parse(snapDataJson); | ||
| const options = JSON.parse(optionsJson); | ||
|
|
||
| const harmony = await loadBit(scopePath); | ||
| const snapping = harmony.get<SnappingMain>(SnappingAspect.id); | ||
| await snapping.snapFromScope(snapData, { | ||
| lane: options.lane, | ||
| updateDependents: options.updateDependents, | ||
| push: options.push, | ||
| message: options.message, | ||
| build: false, | ||
| disableTagAndSnapPipelines: true, | ||
| }); | ||
| } | ||
|
|
||
| main() | ||
| .then(() => process.exit(0)) | ||
| .catch((err) => { | ||
| console.error(err); | ||
| process.exit(1); | ||
| }); |
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
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.