Skip to content

Commit

Permalink
fix(types.ts): rename the types file where we missed it and fix release
Browse files Browse the repository at this point in the history
release in ci was broken because we missed two places to update the types file
  • Loading branch information
ryanbas21 committed Apr 5, 2023
1 parent c6a77ac commit 6071603
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions .scripts/processTypes.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,13 @@ const declareModuleSection = `declare module '*.svelte' {
`;
const importMetaPath = fileURLToPath(import.meta.url);
const importMetaDirectoryPath = dirname(importMetaPath);
const index = join(importMetaDirectoryPath, '../', 'package', 'index.d.ts');
const index = join(importMetaDirectoryPath, '../', 'package', 'types.d.ts');

const indexContents = String(readFileSync(index));

const declareModuleIdx = indexContents.indexOf(declareModuleSection);
if (declareModuleIdx === -1) {
console.error(`Failed to remove the Svelte declare module section from ${inline}`);
console.error(`Failed to remove the Svelte declare module section from types`);
process.exit(1);
}

Expand Down
2 changes: 1 addition & 1 deletion package/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
"require": "./widget.css"
}
},
"types": "./index.d.ts",
"types": "./types.d.ts",
"dependencies": {},
"version": "1.0.0-beta.16"
}

0 comments on commit 6071603

Please sign in to comment.