refactor: separate standalone Vite wiring and provider middleware

This commit is contained in:
Sameh Khamis committed 2026-09-11 18:08:01 -07:00
1 parent 493acfc6aa
commit 8de1018c21
35 files changed
+8078 -7919

No files matched your search

+14
View File
@@ -75,3 +75,17 @@ test('dynamic imports obey the same component ownership rule', async (t) => {
await writeFile(path.join(root, 'startup.js'), 'export const app = 2;');
await assert.rejects(checkPackageBoundaries(root), /unowned module.*startup/);
});
test('a Node build export must be explicitly classified and scoped', async (t) => {
const root = await fixture(t);
await writeFile(path.join(root, 'package.json'), JSON.stringify({
name: 'boundary-fixture', type: 'module', exports: { './feature': { node: './entry.js' } },
}));
await writeFile(path.join(root, 'scripts/package-boundaries.json'), JSON.stringify({
feature: { runtime: 'node', exports: ['./feature'], modules: ['entry.js'], external: [] },
}));
assert.deepEqual(await checkPackageBoundaries(root), [{ name: 'feature', exports: 1, modules: 1 }]);
await writeFile(path.join(root, 'entry.js'), "import './startup.js'; export const value = 1;");
await writeFile(path.join(root, 'startup.js'), 'export const app = 2;');
await assert.rejects(checkPackageBoundaries(root), /unowned module.*startup/);
});