test(loop-sandbox): use the public lock subpath in the test suite - #462
Open
shixi-li wants to merge 1 commit into
Open
test(loop-sandbox): use the public lock subpath in the test suite#462shixi-li wants to merge 1 commit into
shixi-li wants to merge 1 commit into
Conversation
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
Finish the migration #448 started:
loop-sandbox's test suite still imports the lock API through the legacy deep path, one line after thesrcimport that #448 already moved onto the public subpath.With this, the sandbox tests exercise the same public
/lockcontract thatsrc/sandbox.tsnow uses (bothlockPathsandlistLocksare part of the subpath surface added in-repo by #407; the npm publish of 1.3.1 is still pending perRELEASE_NOTES_DRAFT.md). Resolution is unaffected in every context that runs this test:loop-sandbox's lockfile records the dependency as a workspace link to../loop-worktree, so both local runs and the release workflow'snpm ciresolve the in-repo tree, never the registry.tools/loop-worktree/test/package-exports.test.mjsis deliberately not touched: itsdist/lock.jsimport is the guard for the legacy escape hatch (“exposes the public lock subpath and keeps legacy deep imports”), so it stays as the single intentional consumer of the deep path.Validation
cd tools/loop-sandbox && npm test— 10/10 before the change (baseline) and 10/10 after, 0 skipped (node 24, npm 11.13.0)cd tools/loop-worktree && npm test— all passing, exit 0"./dist/*"passthrough temporarily removed fromloop-worktree'sexports:/lockimport → still 10/10 (the public subpath does not depend on the legacy passthrough)dist/lock.jsimport → fails withERR_PACKAGE_PATH_NOT_EXPORTED(confirms the import line is genuinely exercised and was the last consumer riding the escape hatch outside the exports guard test)Follow-up to #407 / #448.