Skip to content

Commit

Permalink
fix: update line when removing declare statements
Browse files Browse the repository at this point in the history
  • Loading branch information
runspired committed Mar 11, 2024
1 parent e891920 commit 866f18d
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion release/core/publish/steps/generate-tarballs.ts
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,9 @@ async function convertFileToModule(fileData: string, relativePath: string, pkgNa
const moduleName = maybeModuleName.endsWith('/index') ? maybeModuleName.slice(0, -6) : maybeModuleName;

for (let i = 0; i < lines.length; i++) {
const line = lines[i].replace(/^declare /, '').replaceAll(' declare ', '');
lines[i] = lines[i].replace(/^declare /, '').replaceAll(' declare ', ' ');
const line = lines[i];

if (line.startsWith('import ')) {
if (!line.includes(`'`)) {
throw new Error(`Unhandled import in ${relativePath}`);
Expand Down

0 comments on commit 866f18d

Please sign in to comment.