Mark first-party generated files with .gen; preserve third-party conventions
This commit is contained in:
@@ -28,7 +28,10 @@ test("React preset applies its browser build script and shared-platform imports"
|
||||
await applyStructure(await planStructure(root, request));
|
||||
assert.match(await fs.readFile(path.join(root, "src/impl/sourceGet.ts"), "utf8"), /component.js\?browser-source/);
|
||||
assert.match(await fs.readFile(path.join(root, "flake.nix"), "utf8"), /browserSources = true/);
|
||||
assert.equal(await fs.readFile(path.join(root, "src/gen/web-studio-react-runtime.d.ts"), "utf8"), reactPlatformTypes);
|
||||
assert.equal(
|
||||
await fs.readFile(path.join(root, "src/gen/web-studio-react-runtime.gen.d.ts"), "utf8"),
|
||||
reactPlatformTypes,
|
||||
);
|
||||
assert.match(await fs.readFile(path.join(root, "src/browser-assets.d.ts"), "utf8"), /declare module "\*\.css"/);
|
||||
assert.equal(
|
||||
JSON.parse(await fs.readFile(path.join(root, "quixos.check.json"), "utf8")).options.messages[
|
||||
@@ -62,7 +65,7 @@ test("imperative scaffolds preserve authored wiring; migration sealing is explic
|
||||
await apply("function", { ...base, name: "play", id: "export:play" });
|
||||
const filename = path.join(root, base.directory, "src/impl/play.ts");
|
||||
const edited =
|
||||
'import type {Implementation} from "../gen/qx.js";\nexport const handler: Implementation["play"] = async () => null;\n';
|
||||
'import type {Implementation} from "../gen/qx.gen.js";\nexport const handler: Implementation["play"] = async () => null;\n';
|
||||
await fs.writeFile(filename, edited);
|
||||
const old = { version: 1 },
|
||||
next = { version: 2 },
|
||||
|
||||
Reference in New Issue
Block a user