mirror of
https://github.com/pbakaus/impeccable.git
synced 2026-09-12 06:06:37 +03:00
Keep the scaffolder test inside its own workspace
Two review findings on #581, both fair. The scratch app symlinked the whole of the repo's node_modules, so the scaffolder's output directory, `node_modules/.impeccable-live`, resolved to the REPO's copy. Variants were written there and survived `afterEach`, which only removed the temp dir; the next case reused the session id, and the scaffolder keeps existing variant files, so a case could parse a previous case's source against a fresh manifest. Now only `svelte` is linked, into a node_modules the workspace owns, and each case gets its own session id. Svelte's own dependencies still resolve, because node follows the link to its real path before looking for them. The comment also pointed at a `PROPS_SCRIPT_SHAPES` symbol that does not exist in the test file. Dropped the name and kept the file reference. Written with AI assistance (Claude Code). Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 5
parent
5961269cb5
commit
b7960ecde3
@@ -938,9 +938,9 @@ function collectFreeIdentifierRanges(node, scopes, emit) {
|
||||
// onto the template's own declaration: `var /** @type {...} */ (h1) = root()`.
|
||||
// That is a syntax error, so the browser's dynamic import of the variant dies
|
||||
// with "Unexpected token '('" and nothing renders. `@typedef` carries the same
|
||||
// shape without being a cast. Keep it a typedef; see PROPS_SCRIPT_SHAPES in
|
||||
// tests/live-svelte-props-script.test.mjs, which compiles what these builders
|
||||
// emit and parses the result.
|
||||
// shape without being a cast. Keep it a typedef;
|
||||
// tests/live-svelte-props-script.test.mjs compiles what these builders emit
|
||||
// and parses the result.
|
||||
export function buildPropsScriptV2(contract) {
|
||||
if (!contract || contract.length === 0) {
|
||||
return '<script>\n /** @typedef {Record<string, never>} Props */\n let {} = $props();\n</script>\n';
|
||||
|
||||
Reference in New Issue
Block a user