Skip to content

fix(transformers): opt-in to correct extensions spelling #1213

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

Closed

Conversation

harlan-zw
Copy link
Contributor

@harlan-zw harlan-zw commented Jun 5, 2022

πŸ”— Linked issue

Related #1204 (comment)

❓ Type of change

  • πŸ“– Documentation (updates to the documentation or readme)
  • 🐞 Bug fix (a non-breaking change that fixes an issue)
  • πŸ‘Œ Enhancement (improving an existing functionality like performance)
  • ✨ New feature (a non-breaking change that adds functionality)
  • ⚠️ Breaking change (fix or feature that would cause existing functionality to change)

πŸ“š Description

This is an alternative solution to the fix for mispelled extensions, this PR reverts the breaking change commit of #1204 (comment). We prefer to use a soft breaking change to avoid having to bump majors.

I've also included a test for a custom transformer here using the deprecated key.

πŸ“ Checklist

  • I have linked an issue or discussion.
  • I have updated the documentation accordingly.

@netlify
Copy link

netlify bot commented Jun 5, 2022

‼️ Deploy request for nuxt-content rejected.

Name Link
πŸ”¨ Latest commit 2733907

@harlan-zw
Copy link
Contributor Author

Hm I wanted to revert the other commit but have done something wrong 😬

@harlan-zw
Copy link
Contributor Author

Okay should be good

@Tahul
Copy link
Contributor

Tahul commented Jun 7, 2022

That you a lot @harlan-zw πŸ™‚

Should've renamed the original PR, this is my bad!

The new test is a great addition as well!

@Tahul
Copy link
Contributor

Tahul commented Jun 7, 2022

I would just like to double-check with @atinux and @farnabaz about keeping that extentions naming in the codebase with @deprecated.

I think no one (or very few people) yet used these features, avoiding preserving that kind of dead code could be great... even if I understand the concerns about semantic versioning.

WDYT @farnabaz @atinux ?

@farnabaz
Copy link
Member

farnabaz commented Jun 7, 2022

I agree that no one yet used this feature, also we do not have good documentation about parsers and transformers.

Transformers are mainly used internally, We did not expose types and a helper to create custom transformers yet. So I see no harm in dropping misspelled key.

It will be good if we create/expose util to define transformers. like defineContentTransformer. This way we ensure users have full ts support and better DX

Copy link
Contributor

@Tahul Tahul left a comment

Choose a reason for hiding this comment

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

Could you please remove the @deprecated keys and support for previous implementation?

I would like to preserve the test-case there, but not the support for older implementations (point about this in discussion with @farnabaz above).

@harlan-zw
Copy link
Contributor Author

harlan-zw commented Jun 8, 2022

I'll make a seperate pr for the test case if not needed πŸ‘

@harlan-zw
Copy link
Contributor Author

I agree that no one yet used this feature, also we do not have good documentation about parsers and transformers.

Transformers are mainly used internally, We did not expose types and a helper to create custom transformers yet. So I see no harm in dropping misspelled key.

It will be good if we create/expose util to define transformers. like defineContentTransformer. This way we ensure users have full ts support and better DX

Great idea

@harlan-zw harlan-zw closed this Jun 8, 2022
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.

3 participants