Some checks failed
Build & Deploy / 🔍 Prepare (push) Successful in 20s
Build & Deploy / 🧪 QA (push) Failing after 34s
Build & Deploy / 🏗️ Build (push) Has started running
Build & Deploy / 🚀 Deploy (push) Has been cancelled
Build & Deploy / 🧪 Smoke Test (push) Has been cancelled
Build & Deploy / ⚡ Lighthouse (push) Has been cancelled
Build & Deploy / 🔔 Notify (push) Has been cancelled
18 lines
1.0 KiB
Plaintext
18 lines
1.0 KiB
Plaintext
/**
|
|
* Test predefined migration for testing plugin-style module specifier imports.
|
|
* This is used in integration tests to verify that external packages (without @payloadcms/db-* prefix)
|
|
* can export predefined migrations via their package.json exports.
|
|
*
|
|
* This tests the second code path in getPredefinedMigration.ts (lines 56-72)
|
|
*
|
|
* NOTE: This is a .js file (not .ts) because Node.js with --no-experimental-strip-types
|
|
* cannot import .ts files via module specifiers. Absolute file paths work because Vitest's
|
|
* loader intercepts file:// URLs, but module specifiers are resolved by Node.js first.
|
|
*/ const imports = ``;
|
|
const upSQL = ` // Test predefined migration from payload/__testing__/predefinedMigration
|
|
payload.logger.info('Test migration UP from payload package executed')`;
|
|
const downSQL = ` // Test predefined migration DOWN from payload package
|
|
payload.logger.info('Test migration DOWN from payload package executed')`;
|
|
export { downSQL, imports, upSQL };
|
|
|
|
//# sourceMappingURL=predefinedMigration.js.map |