Skip to content

CI inline scripts use url field instead of loc for sitemap index entries #46

Description

@fomadev-admin

Description:
In tests.yml L86-L88 and L139-L142, the inline CI test scripts use url instead of loc for SitemapIndexEntry objects:

const validIndexPayload = [
  { url: 'https://fomadev.com/sitemap-products.xml', lastmod: new Date() },
  //  ^-- Should be `loc` per the SitemapIndexEntry interface
];

This works only because index-builder.ts L30 has an undocumented fallback: const targetLoc = entry.loc || (entry as any).url || ''. While this resilience is nice at runtime, using url in official CI tests is misleading and masks the real API contract.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions