Skip to content

Conversation

@BYK
Copy link
Member

@BYK BYK commented Dec 30, 2025

When introducing a new package to the registry, craft now automatically creates the required folder/file structure instead of failing with ENOENT: no such file or directory.

Changes

  • Extended RegistryConfig interface with optional initial manifest fields (name, packageUrl, mainDocsUrl, apiDocsUrl)
  • Modified getPackageManifest to create directories and generate initial manifest when latest.json doesn't exist
  • Added InitialManifestData interface for type-safe initial manifest creation
  • repo_url is auto-derived from the GitHub repo configuration
  • Added comprehensive tests for the new package initialization flow

Example Usage

targets:
  - name: registry
    sdks:
      'npm:@sentry/wasm':
        name: 'Sentry WASM'
        packageUrl: 'https://www.npmjs.com/package/@sentry/wasm'
        mainDocsUrl: 'https://docs.sentry.io/platforms/javascript/'

Fixes #167

When introducing a new package to the registry, craft now automatically creates
the required folder/file structure instead of failing with ENOENT.

Changes:
- Extended RegistryConfig with optional initial manifest fields (name,
  packageUrl, mainDocsUrl, apiDocsUrl)
- Modified getPackageManifest to create directories and generate initial
  manifest when latest.json doesn't exist
- Added InitialManifestData interface for type-safe initial manifest creation
- repo_url is auto-derived from the GitHub repo configuration
- Added comprehensive tests for the new package initialization flow

Fixes #167
@github-actions
Copy link
Contributor

github-actions bot commented Dec 30, 2025

Semver Impact of This PR

🟡 Minor (new features)

📋 Changelog Preview

This is how your changes will appear in the changelog.
Entries from this PR are highlighted with a left border (blockquote style).


New Features ✨

  • (registry) Auto-create package structure for new packages by BYK in #689

Bug Fixes 🐛

  • (changelog) Disable author mentions in PR preview comments by BYK in #684
  • (github) Clean up orphaned draft releases on publish failure by BYK in #681
  • (publish) Fail early on dirty git repository by BYK in #683

🤖 This preview updates automatically when you update the PR.

@BYK BYK changed the title fix(registry): Auto-create package structure for new packages feat(registry): Auto-create package structure for new packages Dec 30, 2025
@github-actions
Copy link
Contributor

github-actions bot commented Dec 30, 2025

PR Preview Action v1.8.0
Preview removed because the pull request was closed.
2025-12-30 19:59 UTC

Config fields (name, packageUrl, mainDocsUrl, apiDocsUrl) now always
override existing manifest values when specified. This allows repo
maintainers to update package metadata by changing their .craft.yml
configuration, rather than only applying these fields for new packages.
@BYK BYK marked this pull request as ready for review December 30, 2025 18:45
@BYK BYK enabled auto-merge (squash) December 30, 2025 18:45
@BYK BYK requested a review from Lms24 December 30, 2025 18:45
@BYK BYK merged commit 5dfc31b into master Dec 30, 2025
15 checks passed
@BYK BYK deleted the fix/registry-auto-create-package-structure branch December 30, 2025 19:59
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.

Registry target, create files if not exist yet

3 participants