Skip to content

Comments

Slug the theme name from package.json#84

Merged
JohnONolan merged 2 commits intoTryGhost:mainfrom
andreascreten:slug-package-name
Feb 9, 2026
Merged

Slug the theme name from package.json#84
JohnONolan merged 2 commits intoTryGhost:mainfrom
andreascreten:slug-package-name

Conversation

@andreascreten
Copy link
Contributor

The zipping fails when you have a more complex name defined in your package.json. Slugging prevents the zipping from crashing.

For example, we had a package named madewithlove/theme.

Andreas Creten and others added 2 commits March 30, 2023 22:34
The zipping fails when you have a more complex name defined in your package.json. Slugging prevents the zipping from crashing.

For example, we had a package named `madewithlove/theme`.
@JohnONolan JohnONolan merged commit c3d3b45 into TryGhost:main Feb 9, 2026
3 checks passed
@coderabbitai
Copy link

coderabbitai bot commented Feb 9, 2026

Caution

Review failed

The pull request is closed.

Walkthrough

The changes introduce the slug package as a new dependency and integrate it into the theme name derivation logic. In index.js, when no zip path is provided, the code now processes the package name through the slug() function before assigning it as the theme name. The package.json dependency section is updated to include "slug": "^8.2.2". All other functionality in the zip creation and deployment workflow remains unaltered.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

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