mirror of
https://github.com/bilawalsidhu/gods-eye-view.git
synced 2026-11-06 03:14:00 +00:00
refactor: separate standalone Vite wiring and provider middleware
This commit is contained in:
1 parent
493acfc6aa
commit
8de1018c21
35 files changed
+8078
-7919
No files matched your search
@@ -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/);
|
||||
});
|
||||
Reference in new issue
Block a user