Skip to content

Commit

Permalink
fix the semicolon issue in transpile
Browse files Browse the repository at this point in the history
  • Loading branch information
omermecitoglu committed Jul 4, 2024
1 parent b9a6faf commit ff975b8
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@omer-x/next-openapi-json-generator",
"version": "0.2.4",
"version": "0.2.5",
"description": "a Next.js plugin to generate OpenAPI documentation from route handlers",
"keywords": [
"next.js",
Expand Down
2 changes: 1 addition & 1 deletion src/core/transpile.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { transpile as tsTranspile } from "typescript";

function removeImports(code: string) {
return code.replace(/^import\s.+\sfrom\s.+;$/gm, "").trim();
return code.replace(/^import\s.+\sfrom\s.+;?$/gm, "").trim();
}

function fixExports(code: string) {
Expand Down

0 comments on commit ff975b8

Please sign in to comment.