Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added OUTPUT dir to sitemap build command #8824

Merged
merged 5 commits into from Oct 17, 2023
Merged

Conversation

silent1mezzo
Copy link
Contributor

Changes

This changes the CLI output from

@astrojs/sitemap: 'sitemap-index.xml' is created to
@astrojs/sitemap: 'sitemap-index.xml' created at '{OUTPUT DIRECTORY}'

Testing

The CLI output isn't tested anywhere (as far as I could tell).

Docs

The CLI output isn't mentioned in the docs (as far as I could tell) so there's nothing that needs updating.

@changeset-bot
Copy link

changeset-bot bot commented Oct 13, 2023

🦋 Changeset detected

Latest commit: 6d39c91

The changes in this PR will be included in the next version bump.

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@github-actions github-actions bot added the pkg: integration Related to any renderer integration (scope) label Oct 13, 2023
@@ -177,7 +177,7 @@ const createPlugin = (options?: SitemapOptions): AstroIntegration => {
limit: entryLimit,
gzip: false,
});
logger.success(`\`${OUTFILE}\` is created.`);
logger.success(`\`${OUTFILE}\` created at \`${fileURLToPath(dir)}`);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we can extract fileURLToPath(dir) as its own variable, and maybe we can also do path.relative(process.cwd(), destDir) so that the logged path is shorter?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Will do!

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@bluwy updated.

@silent1mezzo
Copy link
Contributor Author

As far as I can tell the failed test feels like a flake? Will check back when I update the PR

@ematipico
Copy link
Member

ematipico commented Oct 13, 2023

@silent1mezzo No, we don't have many tests for the CLI, so a local test with possible snapshots is a very welcome alternative :)

Copy link
Member

@bluwy bluwy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think no tests for this is fine. It's usually hard to test it reliably.

@evadecker
Copy link
Contributor

Thanks for picking up this suggestion @silent1mezzo!

@bluwy bluwy merged commit 10b1038 into withastro:main Oct 17, 2023
13 checks passed
@astrobot-houston astrobot-houston mentioned this pull request Oct 17, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pkg: integration Related to any renderer integration (scope)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants