Skip to content

Commit ff975b8

Browse files
committed
fix the semicolon issue in transpile
1 parent b9a6faf commit ff975b8

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

package-lock.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@omer-x/next-openapi-json-generator",
3-
"version": "0.2.4",
3+
"version": "0.2.5",
44
"description": "a Next.js plugin to generate OpenAPI documentation from route handlers",
55
"keywords": [
66
"next.js",

src/core/transpile.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import { transpile as tsTranspile } from "typescript";
22

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

77
function fixExports(code: string) {

0 commit comments

Comments
 (0)