pipework 0.146.0 → 0.147.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,9 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.147.0
|
|
4
|
+
|
|
5
|
+
- **Fixed: test teardown waits for trace writes from every loaded copy of pipework** (#670). The set of in-flight trace writes now lives on `globalThis` under `Symbol.for('pipework.traceWrites')`, so a copy loaded by `vi.resetModules()` or `vi.isolateModules` adds to the same set the harness settles. A test that builds a second app that way no longer has its connection ended while the other copy is still writing ("Failed to persist trace close"). `server.close()` now also waits for other copies' writes.
|
|
6
|
+
|
|
3
7
|
## 0.146.0
|
|
4
8
|
|
|
5
9
|
- **Changed: a changed index is built beside the old one, then swapped in** (#668). When an index keeps its name but its columns, uniqueness, method, `where` or `with` change, the generated migration now runs `CREATE [UNIQUE] INDEX CONCURRENTLY "<name>_new"`, then `DROP INDEX CONCURRENTLY IF EXISTS "<name>"`, then `ALTER INDEX "<name>_new" RENAME TO "<name>"`, after the migration's column changes. A unique key stays enforced until its replacement is valid, and a failed build leaves only `<name>_new` to drop. It used to drop the old index first, leaving no uniqueness between the drop and the create. The migration check no longer flags `ALTER INDEX ... RENAME TO`. Removed and new indexes are unchanged; already-generated migrations are not rewritten.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pending-writes.d.ts","sourceRoot":"","sources":["../../../src/trace/runtime/pending-writes.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"pending-writes.d.ts","sourceRoot":"","sources":["../../../src/trace/runtime/pending-writes.ts"],"names":[],"mappings":"AAWA,2EAA2E;AAC3E,wBAAgB,eAAe,CAAC,KAAK,EAAE,OAAO,CAAC,IAAI,CAAC,GAAG,OAAO,CAAC,IAAI,CAAC,CAKnE;AAED,2FAA2F;AAC3F,wBAAsB,iBAAiB,IAAI,OAAO,CAAC,IAAI,CAAC,CAEvD;AAED,+CAA+C;AAC/C,wBAAgB,sBAAsB,IAAI,MAAM,CAE/C;AAED,eAAO,MAAM,uBAAuB,QAAS,CAAA;AAE7C,kGAAkG;AAClG,eAAO,MAAM,wBAAwB,QAAmC,CAAA;AAExE;;;GAGG;AACH,wBAAsB,wBAAwB,CAAC,SAAS,GAAE,MAAgC,GAAG,OAAO,CAAC,IAAI,CAAC,CAezG"}
|
|
@@ -1,7 +1,11 @@
|
|
|
1
1
|
// Trace writes are fire-and-forget; this tracks the ones in flight so the test
|
|
2
2
|
// harness can wait for them before it ends the connection they write through.
|
|
3
3
|
import { getBaseLogger } from '../../core/logging/index.js';
|
|
4
|
-
|
|
4
|
+
// Process-global so writes tracked by any copy of this module (loaded by
|
|
5
|
+
// `vi.resetModules()` / `vi.isolateModules`) are visible to the harness's settle.
|
|
6
|
+
const SLOT = Symbol.for('pipework.traceWrites');
|
|
7
|
+
const slots = globalThis;
|
|
8
|
+
const pending = (slots[SLOT] ??= new Set());
|
|
5
9
|
/** Records `write` as in flight until it settles; returns it unchanged. */
|
|
6
10
|
export function trackTraceWrite(write) {
|
|
7
11
|
pending.add(write);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pending-writes.js","sourceRoot":"","sources":["../../../src/trace/runtime/pending-writes.ts"],"names":[],"mappings":"AAAA,+EAA+E;AAC/E,8EAA8E;AAE9E,OAAO,EAAE,aAAa,EAAE,MAAM,6BAA6B,CAAA;AAE3D,MAAM,
|
|
1
|
+
{"version":3,"file":"pending-writes.js","sourceRoot":"","sources":["../../../src/trace/runtime/pending-writes.ts"],"names":[],"mappings":"AAAA,+EAA+E;AAC/E,8EAA8E;AAE9E,OAAO,EAAE,aAAa,EAAE,MAAM,6BAA6B,CAAA;AAE3D,yEAAyE;AACzE,kFAAkF;AAClF,MAAM,IAAI,GAAG,MAAM,CAAC,GAAG,CAAC,sBAAsB,CAAC,CAAA;AAC/C,MAAM,KAAK,GAAG,UAAuE,C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