Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 0 additions & 12 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -289,18 +289,6 @@ import { hasProtocol } from 'ufo'
| Constants | SCREAMING_SNAKE_CASE | `NPM_REGISTRY`, `ALLOWED_TAGS` |
| Types/Interfaces | PascalCase | `NpmSearchResponse` |

> [!TIP]
> Exports in `app/composables/`, `app/utils/`, and `server/utils/` are auto-imported by Nuxt. To prevent [knip](https://knip.dev/) from flagging them as unused, add a `@public` JSDoc annotation:
>
> ```typescript
> /**
> * @public
> */
> export function myAutoImportedFunction() {
> // ...
> }
> ```

### Vue components

- Use Composition API with `<script setup lang="ts">`
Expand Down
1 change: 0 additions & 1 deletion app/composables/useActiveTocItem.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ import type { Ref } from 'vue'
*
* @param toc - Reactive array of TOC items
* @returns Object containing activeId
* @public
*/
export function useActiveTocItem(toc: Ref<TocItem[]>) {
const activeId = shallowRef<string | null>(null)
Expand Down
1 change: 0 additions & 1 deletion app/composables/useMarkdown.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ interface UseMarkdownOptions {
packageName?: string
}

/** @public */
export function useMarkdown(options: MaybeRefOrGetter<UseMarkdownOptions>) {
return computed(() => parseMarkdown(toValue(options)))
}
Expand Down
1 change: 0 additions & 1 deletion server/utils/provenance.ts
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,6 @@ function repoUrlToBlobUrl(repository: string, path: string, ref = 'main'): strin
/**
* Parse npm attestations API response into ProvenanceDetails.
* Prefers SLSA provenance v1; falls back to v0.2 for provider label and ledger only (no source commit/build file from v0.2).
* @public
*/
export function parseAttestationToProvenanceDetails(response: unknown): ProvenanceDetails | null {
const body = response as NpmAttestationsResponse
Expand Down
3 changes: 0 additions & 3 deletions server/utils/skills.ts
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,6 @@ export interface SkillDirInfo {
/**
* Find skill directories in a package file tree.
* Returns skill names and their children for file counting.
* @public
*/
export function findSkillDirs(tree: PackageFileTree[]): SkillDirInfo[] {
const skillsDir = tree.find(node => node.type === 'directory' && node.name === 'skills')
Expand Down Expand Up @@ -176,7 +175,6 @@ export function validateSkill(frontmatter: SkillFrontmatter): SkillWarning[] {

/**
* Fetch skill list with frontmatter for discovery endpoint.
* @public
*/
export async function fetchSkillsList(
packageName: string,
Expand Down Expand Up @@ -215,7 +213,6 @@ export interface WellKnownSkillItem {

/**
* Fetch skill list for well-known index.json format (CLI compatibility).
* @public
*/
export async function fetchSkillsListForWellKnown(
packageName: string,
Expand Down
1 change: 0 additions & 1 deletion shared/schemas/blog.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,5 +34,4 @@ export interface ResolvedAuthor extends Author {
/**
* Inferred type for blog post frontmatter
*/
/** @public */
export type BlogPostFrontmatter = InferOutput<typeof BlogPostSchema>
2 changes: 0 additions & 2 deletions shared/schemas/user.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,5 @@ export const GravatarQuerySchema = v.object({
username: NpmUsernameSchema,
})

/** @public */
export type NpmUsername = v.InferOutput<typeof NpmUsernameSchema>
/** @public */
export type GravatarQuery = v.InferOutput<typeof GravatarQuerySchema>
1 change: 0 additions & 1 deletion shared/types/npm-registry.ts
Original file line number Diff line number Diff line change
Expand Up @@ -233,7 +233,6 @@ export interface NpmVersionDist {
/**
* Parsed provenance details for display (from attestation bundle SLSA predicate).
* Used by the provenance API and PackageProvenanceSection.
* @public
*/
export interface ProvenanceDetails {
/** Provider ID (e.g. "github", "gitlab") */
Expand Down
2 changes: 0 additions & 2 deletions shared/utils/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,7 @@ export const ERROR_SUGGESTIONS_FETCH_FAILED = 'Failed to fetch suggestions.'
export const ERROR_SKILLS_FETCH_FAILED = 'Failed to fetch skills.'
export const ERROR_SKILL_NOT_FOUND = 'Skill not found.'
export const ERROR_SKILL_FILE_NOT_FOUND = 'Skill file not found.'
/** @public */
export const ERROR_GRAVATAR_FETCH_FAILED = 'Failed to fetch Gravatar profile.'
/** @public */
export const ERROR_GRAVATAR_EMAIL_UNAVAILABLE = "User's email not accessible."
export const ERROR_NEED_REAUTH = 'User needs to reauthenticate'

Expand Down
1 change: 0 additions & 1 deletion shared/utils/npm.ts
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,6 @@ export function assertValidPackageName(name: string): void {
/**
* Validate an npm username and throw an HTTP error if invalid.
* Uses a regular expression to check against npm naming rules.
* @public
*/
export function assertValidUsername(username: string): void {
if (!username || username.length > NPM_USERNAME_MAX_LENGTH || !NPM_USERNAME_RE.test(username)) {
Expand Down
Loading