Skip to content

Commit e001d69

Browse files
committed
fix: update js-yaml to patched release
1 parent fcfbb3e commit e001d69

5 files changed

Lines changed: 21 additions & 12 deletions

File tree

npm-shrinkwrap.json

Lines changed: 4 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package-lock.json

Lines changed: 4 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -204,7 +204,7 @@
204204
"bun": "1.3.14",
205205
"chalk": "^4.1.2",
206206
"commander": "^14.0.2",
207-
"js-yaml": "^4.2.0",
207+
"js-yaml": "^4.3.1",
208208
"node-pty": "^1.1.0",
209209
"omelette": "^0.4.17",
210210
"open": "^10.1.0",
@@ -244,7 +244,7 @@
244244
},
245245
"overrides": {
246246
"cosmiconfig": {
247-
"js-yaml": "4.2.0"
247+
"js-yaml": "4.3.1"
248248
},
249249
"adm-zip": "0.6.0",
250250
"sharp": "0.35.3",

src/isolation-manager.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2387,8 +2387,10 @@ class IsolationManager {
23872387
try {
23882388
const { resolveWorktreeComposeTeardown } = require('../lib/compose-utils');
23892389
teardown = resolveWorktreeComposeTeardown(worktreeInfo.path);
2390-
} catch {
2391-
// Best-effort: compose teardown support may be unavailable
2390+
} catch (error) {
2391+
console.warn(
2392+
`[IsolationManager] Skipping Docker Compose teardown in ${worktreeInfo.path}: ${error.message}`
2393+
);
23922394
}
23932395
if (teardown.shouldTeardown) {
23942396
try {

tests/worktree-compose-cleanup.test.js

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,9 @@ describe('Worktree Docker Compose Cleanup', function () {
148148

149149
it('should still remove the worktree when lib/compose-utils cannot be loaded', function () {
150150
const origSpawnSync = childProcess.spawnSync;
151+
const origWarn = console.warn;
151152
const calls = [];
153+
const warnings = [];
152154

153155
childProcess.spawnSync = function (command, args, opts) {
154156
calls.push({ command, args, cwd: opts?.cwd });
@@ -157,6 +159,7 @@ describe('Worktree Docker Compose Cleanup', function () {
157159
}
158160
return { status: 0, stdout: '', stderr: '' };
159161
};
162+
console.warn = (message) => warnings.push(message);
160163

161164
try {
162165
delete require.cache[require.resolve('../src/isolation-manager')];
@@ -191,8 +194,12 @@ describe('Worktree Docker Compose Cleanup', function () {
191194
),
192195
'worktree removal should still proceed'
193196
);
197+
assert.deepStrictEqual(warnings, [
198+
`[IsolationManager] Skipping Docker Compose teardown in ${fakeWorktreePath}: Cannot find module 'js-yaml'`,
199+
]);
194200
} finally {
195201
childProcess.spawnSync = origSpawnSync;
202+
console.warn = origWarn;
196203
delete require.cache[require.resolve('../src/isolation-manager')];
197204
}
198205
});

0 commit comments

Comments
 (0)