Skip to content

Commit

Permalink
revert previous changes
Browse files Browse the repository at this point in the history
  • Loading branch information
LekoArts committed Aug 4, 2021
1 parent c6e8e14 commit 983b701
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 21 deletions.
13 changes: 0 additions & 13 deletions packages/gatsby-plugin-sitemap/src/__tests__/gatsby-node.js
Original file line number Diff line number Diff line change
Expand Up @@ -193,17 +193,4 @@ describe(`gatsby-plugin-sitemap Node API`, () => {
path.join(`public`, subdir)
)
})

it(`should throw with a useful error if you have the old config`, async () => {
const graphql = jest.fn()
const exclude = [`*/2/*`, `*/glossary`, `*/vo/*`]
const reporter = {
panic: () => {
throw new Error(`Thrown`)
},
}
expect(() => {
onPostBuild({ graphql, pathPrefix, reporter }, { exclude })
}).toThrow()
})
})
8 changes: 0 additions & 8 deletions packages/gatsby-plugin-sitemap/src/gatsby-node.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,21 +12,13 @@ exports.onPostBuild = async (
entryLimit,
query,
excludes,
// The old config API, do not use inside this function
exclude,
resolveSiteUrl,
resolvePagePath,
resolvePages,
filterPages,
serialize,
}
) => {
if (exclude) {
reporter.panic(
`gatsby-plugin-sitemap uses 'excludes' not 'exclude' as of v4`
)
}

const { data: queryRecords, errors } = await graphql(query)

// resolvePages and resolveSiteUrl are allowed to be sync or async. The Promise.resolve handles each possibility
Expand Down

0 comments on commit 983b701

Please sign in to comment.