Repository navigation
Conversation
Collaborator
|
Thanks for the PR and for disclosing that you maintain the fork. We’re keeping proper-lockfile. We haven’t had any issues with it here, and we keep the runtime dependencies of testcontainers on widely adopted packages. Closing. |
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
proper-lockfilehas had no release since January 2021. This replaces it inpackages/testcontainerswith@bybrave/proper-lockfile2, a drop-in fork I maintain: same API, types bundled, so@types/proper-lockfileis removed as well. The only source change is the import insrc/common/file-lock.ts;withFileLockand its retry options are unchanged.What the fork fixes that matters for
withFileLock, which several Jest workers call at once for the reaper and the port forwarder: the stale-lock takeover was done withrmdir+mkdir, so two processes that both saw a stale lock could both end up holding it (moxystudio/node-proper-lockfile#121). The fork claims stale locks atomically viarenameand has regression tests for the race. It also fixes aTypeErrorwhen a lock is released while a failed mtime update is being retried (moxystudio/node-proper-lockfile#113), and installs thesignal-exithandler on the first lock instead of atrequiretime, so requiringtestcontainersno longer changes how the host process reacts to Ctrl-C.The lockfile diff also drops the nested copy of
retryunderasync-retry: the fork usesretry@0.13, whichasync-retryalready needs, so one copy is now hoisted.Full disclosure: I maintain the fork.
Verification
npm run format,npm run lint,npm run lint:ci,npm run knip,npm run check-compiles,npm run check-engines:testcontainersandnpm run build --workspace packages/testcontainers: all pass.npm install --package-lock-onlyleavespackage-lock.jsonunchanged.npx vitest run packages/testcontainers/src/reaper packages/testcontainers/src/port-forwarder: 15 passed.withFileLockfrom 8 concurrent callers: never more than one inside the lock, all 8 ran.npm-publish.yml) needs write access, so a maintainer would have to run it; the change touches only a runtime dependency oftestcontainers.Not breaking
Runtime dependency swap with the same API and CommonJS entry point. The fork's
enginesisnode >=18, below this package's>= 22.22;check-enginesconfirms theenginesfield still matches the dependency graph. No public API or docs change.