Conversation
…R placeholder (#362, partial) Two of the five fixes from #362: 1. Sanitize repo keys for Gradle/SBT property names. Pre-fix a hyphenated repo key (`my-jvm-repo`) would emit `my-jvm-repoUsername=...` in gradle.properties — technically legal but looks broken to readers who assume identifier rules apply. Added `repoKeyToGradleId` that camelCases kebab/dot/underscore separators and strips remaining non-alphanumerics. URLs and `<id>` slots keep the raw key. 2. SSR fallback placeholder. Pre-fix `REGISTRY_URL` fell back to `https://artifacts.example.com` when window was undefined (SSR prerender). That string would briefly appear in prerendered HTML before client hydration — risk of users copying it. Replace with `__REPLACE_WITH_REGISTRY_URL__` (and same for the host) so the placeholder is obviously non-functional. Tests: + repoKeyToGradleId unit tests: kebab → camel, dot → camel, underscore → camel, symbol stripping, empty-string fallback. + Integration tests: Gradle snippet uses sanitized property names (myJvmRepoUsername) but URL paths still contain the raw key (/maven/my-jvm-repo/). Deferred to follow-ups: - repo_type filter (proxy/virtual repos hide publish steps) - is_public (anonymous-access snippet, no credentials) - empty repo key guard (forbidden by backend; defensive only) CHANGELOG entry under [Unreleased] / Fixed. Closes #362 (partial — items 3 and 5 from the issue body).
Dependency Review✅ No vulnerabilities or license issues or OpenSSF Scorecard issues found.Scanned FilesNone |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Closes #362 partially. Tackles two of the five fixes from the issue:
my-jvm-repoemittedmy-jvm-repoUsername=...— legal ingradle.propertiesbut looks broken. NewrepoKeyToGradleIdcamelCases kebab/dot/underscore separators. URLs and<id>slots keep the raw key.https://artifacts.example.comwith__REPLACE_WITH_REGISTRY_URL__so the prerendered HTML doesn't ship a real-looking domain users could copy.Deferred
repo_typefilter (proxy/virtual hide publish steps) — needs per-step "scope" tagsis_publicanonymous mode — substantial credential-block refactorThese will be filed as follow-ups.
Test plan
npm test— 2094/2094 (6 new insetup/page.test.tsx)npm run lint— 0 errorsnpm run build— succeeds🤖 Generated with Claude Code