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!: improve ESM/CJS compatibility, drop support for node 12 #5

Merged
merged 1 commit into from
Feb 17, 2023

Conversation

rexxars
Copy link
Member

@rexxars rexxars commented Feb 16, 2023

BREAKING CHANGE: Only node 14.13.1 and higher is now supported.

BREAKING CHANGE: ESM/CommonJS compatibility is now improved, but may cause new behavior in certain contexts. It should however be more forward-compatible, and allow usage in a wider range of tools and environments.

ADDED: Semantic release automation

ADDED: Use @sanity/pkg-utils instead of vite directly, for better control of bundling

BREAKING CHANGE: Only node 14.13.1 and higher is now supported.

BREAKING CHANGE: ESM/CommonJS compatibility is now improved, but may cause new behavior
in certain contexts. It should however be more forward-compatible, and allow usage in
a wider range of tools and environments.

ADDED: Semantic release automation

ADDED: Use @sanity/pkg-utils instead of vite directly, for better control of bundling
- 16
- 14
- 12
platform: [ubuntu-latest, macos-latest]
Copy link
Member

Choose a reason for hiding this comment

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

I've seen us use this pattern in other repos and in practice we have far fewer macos-latest runners available and it frequently results in long wait times when you have multiple PRs on multiple repos that need merging. I recommend following the pattern we use on repos like sanity client instead, where you have exactly one run of macos-latest and windows-latestand have the rest be strictlyubuntu-latest` 🤔

Copy link
Member Author

@rexxars rexxars Feb 16, 2023

Choose a reason for hiding this comment

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

To be honest, I think it's (almost) pointless to run tests on windows/mac for modules that do not even use node APIs. There's bound to be differences and pitfalls when doing things like command spawning, file system operations and such - but for pure JS modules it's hard to see where it could fail cross-platform.

Running tests on linux is faster (more availability) and also uncovers any incorrectly cased files, which can sometimes happen when authoring on mac but testing on linux.

@rexxars rexxars merged commit aabcfb5 into main Feb 17, 2023
@rexxars rexxars deleted the feat/esm-cjs-compat-improve branch February 17, 2023 22:33
@github-actions
Copy link
Contributor

🎉 This PR is included in version 2.0.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

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.

2 participants