-
-
Notifications
You must be signed in to change notification settings - Fork 29
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: resolve symlinks in d.ts imports #71
Conversation
@privatenumber anything holding back? |
tests/specs/builds/symlink.ts
Outdated
}); | ||
|
||
export { index as default }; | ||
`); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If this is a change on the declaration file, you should be checking index.d.ts
instead of index.mjs
tests/specs/builds/symlink.ts
Outdated
}, | ||
}, | ||
}, | ||
}); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This test case seems unnecessarily convoluted just for checking symlinks
tests/specs/builds/symlink.ts
Outdated
setup, | ||
}: ComponentProps): ComponentProps; | ||
`, | ||
vue: { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixtures can be a lot simpler if we keep them pure and simple. Instead of trying to mock something thats a lot more than this, we should just call it dep-a
and isolate the test to just testing symlinks.
preserveSymlinks
in tsconfig.json
Thanks for your contribution @jrson83 Hope we collaborate again in the future! |
🎉 This issue has been resolved in version 2.4.1 🎉 The release is available on: Your semantic-release bot 📦🚀 |
I have tried to implement
realPath
conditionally where it is used.However, I realized that it is ultimately up to
rollup-plugin-dts
, which usests.sys
but does not implementrealpathSync
, to fix the problem.So we should set
preserveSymlinks: false
as default.I have written a test which mimics pnpm symlinks and fails without
preserveSymlinks: false
.Closes #69