Skip to content
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

Merged
merged 7 commits into from
Jul 19, 2024
Merged

fix: resolve symlinks in d.ts imports #71

merged 7 commits into from
Jul 19, 2024

Conversation

jrson83
Copy link
Contributor

@jrson83 jrson83 commented Jun 27, 2024

I have tried to implement realPath conditionally where it is used.

However, I realized that it is ultimately up to rollup-plugin-dts, which uses ts.sys but does not implement realpathSync, 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

@jrson83
Copy link
Contributor Author

jrson83 commented Jun 30, 2024

@privatenumber anything holding back?

});

export { index as default };
`);
Copy link
Owner

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

},
},
},
});
Copy link
Owner

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

setup,
}: ComponentProps): ComponentProps;
`,
vue: {
Copy link
Owner

@privatenumber privatenumber Jul 19, 2024

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.

@privatenumber privatenumber changed the title fix: support preserveSymlinks in tsconfig.json fix: resolve symlinks in d.ts imports Jul 19, 2024
@privatenumber privatenumber merged commit ef6265c into privatenumber:master Jul 19, 2024
2 checks passed
@privatenumber
Copy link
Owner

Thanks for your contribution @jrson83 Hope we collaborate again in the future!

@privatenumber
Copy link
Owner

🎉 This issue has been resolved in version 2.4.1 🎉

The release is available on:

Your semantic-release bot 📦🚀

@jrson83 jrson83 deleted the fix/symlinks branch July 19, 2024 07:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Support preserveSymlinks from tsconfig.json
2 participants