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 feature used for plugin starter. #6723

Merged
merged 1 commit into from Dec 27, 2022
Merged

Fix feature used for plugin starter. #6723

merged 1 commit into from Dec 27, 2022

Conversation

DanielSidhion
Copy link
Contributor

Description:

New plugins created with swc plugin new can't be compiled because the feature plugin_transform used by the plugin was recently removed (in fa8f7b0). This leads to errors like the following:

error: failed to select a version for `swc_core`.
    ... required by package `swc_plugin v0.1.0 (<redacted path>)`
versions that meet the requirements `0.50.*` are: 0.50.3, 0.50.2, 0.50.1, 0.50.0

the package `swc_plugin` depends on `swc_core`, with features: `plugin_transform` but `swc_core` does not have these features.


failed to select a version for `swc_core` which could resolve this conflict

This PR updates the template used for new plugins to depend on a proper feature name. I'm assuming it's supposed to be ecma_plugin_transform by default, but that is likely not applicable for all types of plugins and might need more work in the future. For now, this change fixes a currently-broken workflow for people new to the project.

@CLAassistant
Copy link

CLAassistant commented Dec 27, 2022

CLA assistant check
All committers have signed the CLA.

Copy link
Member

@kdy1 kdy1 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!


swc-bump:

  • dbg-swc

@kdy1 kdy1 enabled auto-merge (squash) December 27, 2022 07:41
@kdy1 kdy1 added this to the Planned milestone Dec 27, 2022
@kdy1 kdy1 merged commit 082dc21 into swc-project:main Dec 27, 2022
@lishoulong
Copy link

Hi, I just find the default version swc_cli v0.91.11 still use plugin_transform as dependency.
We should change plugin_transform to ecma_plugin_transform.

@kdy1 kdy1 modified the milestones: Planned, v1.3.25 Jan 5, 2023
@swc-project swc-project locked as resolved and limited conversation to collaborators Feb 4, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants