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: create-package script #5123

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

cryptodev-2s
Copy link
Contributor

@cryptodev-2s cryptodev-2s commented Jan 9, 2025

Explanation

This PR addresses a bug in the yarn create-package script introduced in this change, where fstatSync was replaced with await fs.stat(packagePath)).isDirectory().

The issue arises because fs.stat now throws an ENOENT error if the packagePath is empty. To resolve this, the script has been updated to handle empty paths gracefully, ensuring the process works as expected when creating new packages.

References

Changelog

Checklist

  • I've updated the test suite for new or updated code as appropriate
  • I've updated documentation (JSDoc, Markdown, etc.) for new or updated code as appropriate
  • I've highlighted breaking changes using the "BREAKING" category above as appropriate
  • I've prepared draft pull requests for clients and consumer packages to resolve any breaking changes

@cryptodev-2s cryptodev-2s requested a review from mcmire January 9, 2025 23:34
@cryptodev-2s cryptodev-2s self-assigned this Jan 9, 2025
@cryptodev-2s cryptodev-2s force-pushed the cryptodev2s/fix-yarn-create-package-script branch from 7cba979 to dcd4406 Compare January 9, 2025 23:39
@cryptodev-2s cryptodev-2s force-pushed the cryptodev2s/fix-yarn-create-package-script branch from ccd34be to 4eff1cb Compare January 10, 2025 00:34
@cryptodev-2s cryptodev-2s enabled auto-merge (squash) January 10, 2025 00:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant