From 098031294f4e25619d0ae5a6ffc871c7401d98ae Mon Sep 17 00:00:00 2001 From: Oleksii Tymoshenko Date: Fri, 10 Jun 2022 21:16:08 +0300 Subject: [PATCH] unused dependency 'sitemap', 'filter' option should return boolean (#3563) * refactor: @astrojs/sitemap does't use 'sitemap' pkg * refactor: 'filter' option should return boolean instead of string * fix: forgotten `pnpm install` * chore: add changeset Co-authored-by: Nate Moore --- .changeset/nice-zebras-unite.md | 5 +++++ packages/integrations/sitemap/package.json | 1 - packages/integrations/sitemap/src/index.ts | 2 +- pnpm-lock.yaml | 20 -------------------- 4 files changed, 6 insertions(+), 22 deletions(-) create mode 100644 .changeset/nice-zebras-unite.md diff --git a/.changeset/nice-zebras-unite.md b/.changeset/nice-zebras-unite.md new file mode 100644 index 000000000000..3e2c3348ca00 --- /dev/null +++ b/.changeset/nice-zebras-unite.md @@ -0,0 +1,5 @@ +--- +'@astrojs/sitemap': patch +--- + +Remove unused dependency diff --git a/packages/integrations/sitemap/package.json b/packages/integrations/sitemap/package.json index 92c86160f3e1..7ba590018fe9 100644 --- a/packages/integrations/sitemap/package.json +++ b/packages/integrations/sitemap/package.json @@ -27,7 +27,6 @@ "dev": "astro-scripts dev \"src/**/*.ts\"" }, "dependencies": { - "sitemap": "^7.1.1" }, "devDependencies": { "astro": "workspace:*", diff --git a/packages/integrations/sitemap/src/index.ts b/packages/integrations/sitemap/src/index.ts index a94f6fba48b0..169eeb788701 100644 --- a/packages/integrations/sitemap/src/index.ts +++ b/packages/integrations/sitemap/src/index.ts @@ -15,7 +15,7 @@ type SitemapOptions = * filter: (page) => page !== 'http://example.com/secret-page' * ``` */ - filter?(page: string): string; + filter?(page: string): boolean; /** * If you have any URL, not rendered by Astro, that you want to include in your sitemap, diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index f51f66a14a7e..3b08018be685 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -1800,9 +1800,6 @@ importers: specifiers: astro: workspace:* astro-scripts: workspace:* - sitemap: ^7.1.1 - dependencies: - sitemap: 7.1.1 devDependencies: astro: link:../../astro astro-scripts: link:../../../scripts @@ -6825,12 +6822,6 @@ packages: '@types/node': 17.0.41 dev: false - /@types/sax/1.2.4: - resolution: {integrity: sha512-pSAff4IAxJjfAXUG6tFkO7dsSbTmf8CtUpfhhZ5VhkRpC4628tJhh3+V6H1E+/Gs9piSzYKT5yzHO5M4GG9jkw==} - dependencies: - '@types/node': 17.0.41 - dev: false - /@types/scheduler/0.16.2: resolution: {integrity: sha512-hppQEBDmlwhFAXKJX2KnWLYu5yMfi91yazPb2l+lbJiwW+wdo1gNeRA+3RgNSO39WYX2euey41KEwnqesU2Jew==} @@ -12445,17 +12436,6 @@ packages: resolution: {integrity: sha512-bLGGlR1QxBcynn2d5YmDX4MGjlZvy2MRBDRNHLJ8VI6l6+9FUiyTFNJ0IveOSP0bcXgVDPRcfGqA0pjaqUpfVg==} dev: false - /sitemap/7.1.1: - resolution: {integrity: sha512-mK3aFtjz4VdJN0igpIJrinf3EO8U8mxOPsTBzSsy06UtjZQJ3YY3o3Xa7zSc5nMqcMrRwlChHZ18Kxg0caiPBg==} - engines: {node: '>=12.0.0', npm: '>=5.6.0'} - hasBin: true - dependencies: - '@types/node': 17.0.41 - '@types/sax': 1.2.4 - arg: 5.0.2 - sax: 1.2.4 - dev: false - /slash/2.0.0: resolution: {integrity: sha512-ZYKh3Wh2z1PpEXWr0MpSBZ0V6mZHAQfYevttO11c51CaWjGTaadiKZ+wVt1PbMlDV5qhMFslpZCemhwOK7C89A==} engines: {node: '>=6'}