diff --git a/.changeset/gold-walls-pretend.md b/.changeset/gold-walls-pretend.md new file mode 100644 index 000000000000..effefbc0104c --- /dev/null +++ b/.changeset/gold-walls-pretend.md @@ -0,0 +1,5 @@ +--- +'@astrojs/sitemap': patch +--- + +Fixes the last build diff --git a/packages/integrations/sitemap/package.json b/packages/integrations/sitemap/package.json index 3fd3bd753032..da21fd9746d7 100644 --- a/packages/integrations/sitemap/package.json +++ b/packages/integrations/sitemap/package.json @@ -28,7 +28,8 @@ "scripts": { "build": "astro-scripts build \"src/**/*.ts\" && tsc", "build:ci": "astro-scripts build \"src/**/*.ts\"", - "dev": "astro-scripts dev \"src/**/*.ts\"" + "dev": "astro-scripts dev \"src/**/*.ts\"", + "test": "mocha --timeout 20000" }, "dependencies": { "sitemap": "^7.1.1", diff --git a/packages/integrations/sitemap/src/config-defaults.ts b/packages/integrations/sitemap/src/config-defaults.ts index 22288fc119eb..fbcd6263d28c 100644 --- a/packages/integrations/sitemap/src/config-defaults.ts +++ b/packages/integrations/sitemap/src/config-defaults.ts @@ -1,4 +1,4 @@ -import type { SitemapOptions } from './index'; +import type { SitemapOptions } from './index.js'; export const SITEMAP_CONFIG_DEFAULTS: SitemapOptions & any = { entryLimit: 45000, diff --git a/packages/integrations/sitemap/src/generate-sitemap.ts b/packages/integrations/sitemap/src/generate-sitemap.ts index 653d2d5a5c8d..c11504822497 100644 --- a/packages/integrations/sitemap/src/generate-sitemap.ts +++ b/packages/integrations/sitemap/src/generate-sitemap.ts @@ -1,5 +1,5 @@ -import type { SitemapItem, SitemapOptions } from './index'; -import { parseUrl } from './utils/parse-url'; +import type { SitemapItem, SitemapOptions } from './index.js'; +import { parseUrl } from './utils/parse-url.js'; const STATUS_CODE_PAGE_REGEXP = /\/[0-9]{3}\/?$/; diff --git a/packages/integrations/sitemap/src/index.ts b/packages/integrations/sitemap/src/index.ts index 0f1a8d7306ad..b9df1b0fc1a8 100644 --- a/packages/integrations/sitemap/src/index.ts +++ b/packages/integrations/sitemap/src/index.ts @@ -8,9 +8,9 @@ import { import { fileURLToPath } from 'url'; import { ZodError } from 'zod'; -import { generateSitemap } from './generate-sitemap'; -import { Logger } from './utils/logger'; -import { validateOptions } from './validate-options'; +import { generateSitemap } from './generate-sitemap.js'; +import { Logger } from './utils/logger.js'; +import { validateOptions } from './validate-options.js'; export type ChangeFreq = EnumChangefreq; export type SitemapItem = Pick< diff --git a/packages/integrations/sitemap/src/schema.ts b/packages/integrations/sitemap/src/schema.ts index 9f8ab7795426..a7682e881a05 100644 --- a/packages/integrations/sitemap/src/schema.ts +++ b/packages/integrations/sitemap/src/schema.ts @@ -1,6 +1,6 @@ import { EnumChangefreq as ChangeFreq } from 'sitemap'; import { z } from 'zod'; -import { SITEMAP_CONFIG_DEFAULTS } from './config-defaults'; +import { SITEMAP_CONFIG_DEFAULTS } from './config-defaults.js'; const localeKeySchema = z.string().min(1); diff --git a/packages/integrations/sitemap/src/validate-options.ts b/packages/integrations/sitemap/src/validate-options.ts index f89582d82747..e4b458003e19 100644 --- a/packages/integrations/sitemap/src/validate-options.ts +++ b/packages/integrations/sitemap/src/validate-options.ts @@ -1,6 +1,6 @@ import { z } from 'zod'; -import type { SitemapOptions } from './index'; -import { SitemapOptionsSchema } from './schema'; +import type { SitemapOptions } from './index.js'; +import { SitemapOptionsSchema } from './schema.js'; // @internal export const validateOptions = (site: string | undefined, opts: SitemapOptions) => { diff --git a/packages/integrations/sitemap/test/smoke.test.js b/packages/integrations/sitemap/test/smoke.test.js new file mode 100644 index 000000000000..d24c191ec1f8 --- /dev/null +++ b/packages/integrations/sitemap/test/smoke.test.js @@ -0,0 +1,3 @@ +import '../dist/index.js'; + +// Just a smoke test, this would fail if there's a problem.