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

feat!: change to ESM #29

Merged
merged 4 commits into from
Dec 17, 2024
Merged

feat!: change to ESM #29

merged 4 commits into from
Dec 17, 2024

Conversation

angeloashmore
Copy link
Member

@angeloashmore angeloashmore commented Dec 16, 2024

Resolves: #28

Description

This PR marks @prismicio/mock as an ES Module via "type": "module".

See the motivation behind the change in #28.

change-case removal

This PR replaces the change-case dependency with a simplified internal version. @prismicio/mock now has no dependencies (however, it retains the @prismicio/client peer dependency).

This change was motivated by #28, in which @prismicio/mock needed "type": "module" for Playwright compatibility. To avoid weird ESM juggling between dependencies, we can remove the only dependency: change-case.

All mock output should be practically identical from before. There may be slight differences in edge cases, but the output should be 100% compatible.

Checklist

  • A comprehensive Linear ticket, providing sufficient context and details to facilitate the review of the PR, is linked to the PR.
  • If my changes require tests, I added them.
  • If my changes affect backward compatibility, it has been discussed.
  • If my changes require an update to the CONTRIBUTING.md guide, I updated it.

Preview

How to QA 1

Footnotes

  1. Please use these labels when submitting a review:
    ❓ #ask: Ask a question.
    💡 #idea: Suggest an idea.
    ⚠️ #issue: Strongly suggest a change.
    🎉 #nice: Share a compliment.

@angeloashmore angeloashmore changed the base branch from xru/fix-usage-obelix to main December 16, 2024 20:55
Copy link

github-actions bot commented Dec 16, 2024

size-limit report 📦

Path Size
dist/index.js 10.65 KB (-4.49% 🔽)
dist/index.cjs 13.99 KB (-2.9% 🔽)

@angeloashmore angeloashmore changed the title refactor: remove change-case dependency feat!: change to ESM Dec 16, 2024
Copy link
Collaborator

@xrutayisire xrutayisire left a comment

Choose a reason for hiding this comment

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

Tested the alpha and it fixes the problem! 🚀

@xrutayisire xrutayisire merged commit 77800c3 into main Dec 17, 2024
2 checks passed
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