You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Astro v5.0.0-beta.6
Node v20.17.0
System Linux (x64)
Package Manager pnpm
Output static
Adapter none
Integrations none
Not something from the beta, also happens on main
Describe the Bug
Calling astro add package@release-tag installs the package correctly but generates an invalid import to add on the config file:
❯ pnpm astro add @inox-tools/astro-when@beta
> [email protected] astro /tmp/tmp.qhvZ2MYeVE
> astro "add" "@inox-tools/astro-when@beta"
✔ Resolving packages...
Astro will run the following command:
If you skip this step, you can always run it yourself later
╭────────────────────────────────────────────────╮
│ pnpm add @inox-tools/astro-when@^1.0.0-beta.0 │
╰────────────────────────────────────────────────╯
✔ Continue? … yes
✔ Installing dependencies...
Astro will make the following changes to your config file:
╭ astro.config.mjs ─────────────────────────────────────────╮
│ // @ts-check │
│ import { defineConfig } from 'astro/config'; │
│ │
│ import inoxToolswhen@beta from '@inox-tools/astro-when'; │
│ │
│ // https://astro.build/config │
│ export default defineConfig({ │
│ integrations: [inoxToolswhen@beta()] │
│ }); │
╰───────────────────────────────────────────────────────────╯
? Continue? › (Y/n)
What's the expected result?
The generated change should have an import with either just the name of the package, removing any version info, or replace the invalid characters from the version part to make a valid identifier.
For the example above, either inoxToolswhen or inoxToolswhenbeta would work.
Link to Minimal Reproducible Example
Any project
Participation
I am willing to submit a pull request for this issue.
The text was updated successfully, but these errors were encountered:
Astro Info
Not something from the beta, also happens on
main
Describe the Bug
Calling
astro add package@release-tag
installs the package correctly but generates an invalid import to add on the config file:What's the expected result?
The generated change should have an import with either just the name of the package, removing any version info, or replace the invalid characters from the version part to make a valid identifier.
For the example above, either
inoxToolswhen
orinoxToolswhenbeta
would work.Link to Minimal Reproducible Example
Any project
Participation
The text was updated successfully, but these errors were encountered: