-
Notifications
You must be signed in to change notification settings - Fork 2
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
feat: Create Astro integration #216
Conversation
Codecov ReportAttention: Patch coverage is ✅ All tests successful. No failed tests found.
📢 Thoughts on this report? Let us know! |
Codecov ReportAttention: Patch coverage is
✅ All tests successful. No failed tests found. Additional details and impacted files
☔ View full report in Codecov by Sentry. |
Bundle ReportChanges will increase total bundle size by 1.99kB (0.07%) ⬆️. This is within the configured threshold ✅ Detailed changes
|
Bundle ReportChanges will increase total bundle size by 189.04kB (3.28%) ⬆️. This is within the configured threshold ✅ Detailed changes
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Approved this - thanks for all the work!
As an aside, do we have a good place we document the quirks of each of these technologies as a launching point for those unfamiliar. Like "astro is a layer on top of vite so we use our internal vite plugin for all except assigning the bundle name". Or "astro may support other tools like svelte (here) which means it uses the svelte compiler before being bundled by vite". (btw I probably fudged some of the above, based on my short reading).
Just any peculiarities uncovered during development.
.changeset/nine-boxes-help.md
Outdated
@@ -0,0 +1,15 @@ | |||
--- | |||
"@codecov/bundler-plugin-core": minor | |||
"@codecov/astro-integration": minor |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are we using new naming convention of <technology>-integration
instead of -plugin
in certain circumstances?
Edit - Oh I see that astro calls it "integration" instead of "plugin". My personal preference is to keep the terminology consistent in this repo, with "plugin" being a generic term for "custom behavior during the build." Could go either way on that though.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yea that makes sense, i'll make the change
...ion/src/astro-bundle-analysis/__tests__/__snapshots__/astroBundleAnalysisPlugin.test.ts.snap
Outdated
Show resolved
Hide resolved
integration-tests/fixtures/generate-bundle-stats/astro/astro-integration.test.ts
Outdated
Show resolved
Hide resolved
version: output.version, | ||
name: PLUGIN_NAME, | ||
pluginVersion: PLUGIN_VERSION, | ||
vite: { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We can cross this bridge if/when it comes, but will we end up with any tricky dependency issues where we expect a certain version of vite to be used with astro? I guess that is more just up to astro to maintain that compatibility
integration-tests/fixtures/generate-bundle-stats/astro/astro-integration.test.ts
Show resolved
Hide resolved
6d6a5e8
to
3e9c979
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice, looks amazing! 🚀
@@ -18,6 +18,5 @@ export default defineProject({ | |||
}), | |||
enforce: "pre", | |||
}, | |||
...plugins, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I see we remove these ...plugins
in the vitest.config.ts files now - what's the impact/purpose of that just for my understanding?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was only one plugin being used ts config path, which i removed because it was causing issues with the example apps while trying to run the test runners. The only impact is that we import things in the core tests slightly differently with relative imports rather than a @
for the test utils.
fac13e8
to
b4e0035
Compare
aed77bb
to
1260bda
Compare
Description
This PR introduces a new package, that adds in an Astro integration, bringing BA support to Astro applications. For this integration (plugin), we followed the same pattern as we did with the Nuxt module utilizing Astro's integration system so users have an easier time integrating BA into their projects.
Closes #93
Code Example
Installation:
Will generate something like the following, however the user will have to configure the options such as enabling BA, the bundle name, the upload token, and other options depending on their setup.
Notable Changes
@codecov/astro-integration
package