refactor(#182): migrate project-root module to runtime path

This commit is contained in:
Tom Boucher
2026-05-24 21:38:49 -04:00
parent 22e9c1de62
commit c46dfc4a7f
7 changed files with 15 additions and 14 deletions

View File

@@ -53,8 +53,8 @@ const GENERATORS = [
},
{
script: 'gen-project-root.mjs',
dist: 'sdk/dist/project-root/index.js',
ts: 'sdk/src/project-root/index.ts',
dist: 'sdk/dist/runtime/project-root.js',
ts: 'sdk/src/runtime/project-root.ts',
},
{
script: 'gen-workstream-inventory-builder.mjs',

View File

@@ -2,7 +2,7 @@
/**
* CJS parity test — project-root module
*
* For every fixture from sdk/src/project-root/index.test.ts, asserts that
* For every fixture from sdk/src/runtime/project-root.test.ts, asserts that
* both the SDK (ESM, via dynamic import) and the generated CJS artifact
* return identical paths. This confirms that the generator correctly
* captures the function body and that all dependencies (sep, dirname,
@@ -21,7 +21,7 @@ const { findProjectRoot: findProjectRootCjs } = require('../get-shit-done/bin/li
// SDK ESM — loaded once before all tests via dynamic import
let findProjectRootSdk;
before(async () => {
const mod = await import('../sdk/dist/project-root/index.js');
const mod = await import('../sdk/dist/runtime/project-root.js');
findProjectRootSdk = mod.findProjectRoot;
});