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

chore(repo): fix incorrect import path in virtual plugin #1702

Merged
merged 1 commit into from
Jun 5, 2024

Conversation

tk-1io
Copy link
Contributor

@tk-1io tk-1io commented Apr 12, 2024

Rollup Plugin Name: virtual

This PR contains:

  • bugfix
  • feature
  • refactor
  • documentation
  • other

Are tests included?

  • yes (covered by existing tests)
  • no

Breaking Changes?

  • yes (breaking changes will not be merged unless absolutely necessary)
  • no

List any relevant issue numbers:

Might fix builds for PR #1578, so it probably could be accepted too then

Description

The "virtual" plugin package currently imports its own types from ../, even though its types are actually placed inside ../types. Every other plugin appears to correctly import from ../types too (see e.g. alias, auto-install, ...).
I stumbled across this while attempting to build the code of PR #1578 (which i need a fix for too) on my local machine, which errored due to the incorrect import. I noticed the current state is building solely because the virtual plugin lists its type definitions file in its package.json via the types property, which miraculously lets tsc accept the faulty import (even though it shouldn't, in my opinion). My guess is it just works somehow because ../ points to the folder where the package.json lives in, which then references the types file 🤷‍♂️. Now, because in the PR #1578 the types property is gone, we get an error there.
I previously opened a PR to fix the branch of the original PR, but @Geylnu did not respond yet. So why did i open this PR then? Because i think this import path is incorrect and should be fixed anyway, no matter if the other PR will at some point be accepted (or maybe never might be).

@tk-1io
Copy link
Contributor Author

tk-1io commented May 14, 2024

@shellscape Is there anything I can do to get this pull request merged?

@shellscape shellscape changed the title fix(virtual): incorrect import path chore(repo): fix incorrect import path in virtual plugin Jun 5, 2024
@shellscape
Copy link
Collaborator

thanks!

Going to change this to a repo chore, since it doesn't affect the package output itself and is more about local dev.

@shellscape shellscape merged commit 3b0a717 into rollup:master Jun 5, 2024
15 checks passed
younggglcy pushed a commit to younggglcy/plugins that referenced this pull request Jun 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants