samchon / typia

Super-fast/easy runtime validators and serializers via transformation
https://typia.io/
MIT License
4.59k stars 157 forks source link

Typia generate incorrectly changes relative import path #573

Closed Lechros closed 1 year ago

Lechros commented 1 year ago

Bug Report

Typia generate incorrectly changes relative import path

Summary

Relative import path is converted to "interface" when it should be "./interface".

Code occuring the bug

import typia from "typia";
import { SomeInterface } from "../interface";

and

pnpm typia generate   --input home/src/typia   --output home/src

becomes

import typia from "typia";
import { SomeInterface } from "interface";
samchon commented 1 year ago

It was a bug only occured in Macbook.

Tried to fix it, but no way.

Therefore, I will change setup way like below:

npm install --save typia # must install first
npx typia setup ~
npx typia generate ~
samchon commented 1 year ago

Upgrade to v3.7.4, then would be fixed.