The uuid package dropped its CommonJS entry point in v14, making it
incompatible with Backstage's CJS build output and Jest test runner.
Rather than working around the ESM-only issue, replace all usage with
the built-in crypto.randomUUID() which has been available in Node.js
since v16.7 and in all major browsers since March 2022.
Signed-off-by: Fredrik Adelöw <freben@spotify.com>
Made-with: Cursor
* docs: frontend plugin golden path guide
Signed-off-by: aramissennyeydd <aramis.sennyey@doordash.com>
* add changeset
Signed-off-by: aramissennyeydd <aramis.sennyey@doordash.com>
* Apply suggestion from @aramissennyeydd
Signed-off-by: Aramis Sennyey <159921952+aramissennyeydd@users.noreply.github.com>
Signed-off-by: aramissennyeydd <aramis.sennyey@doordash.com>
* fix template
Signed-off-by: aramissennyeydd <aramis.sennyey@doordash.com>
* fix template test
Signed-off-by: aramissennyeydd <aramis.sennyey@doordash.com>
* print stderr on failure
Signed-off-by: aramissennyeydd <aramis.sennyey@doordash.com>
* try writing directly
Signed-off-by: aramissennyeydd <aramis.sennyey@doordash.com>
* maybe this?
Signed-off-by: aramissennyeydd <aramis.sennyey@doordash.com>
* address feedback
Signed-off-by: aramissennyeydd <aramis.sennyey@doordash.com>
* fix: avoid destructuring FetchApi and fix template issues
- Use fetchApi.fetch() instead of destructuring to preserve this binding
- Add discoveryApi and fetchApi to useAsync dependency array
- Use react-use/esm/useAsync to match repo conventions
- Replace waitFor + getAllByText with findByText in error test
- Update HTTP client doc to match template changes
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Signed-off-by: aramissennyeydd <aramis.sennyey@doordash.com>
* fix: address docs review feedback
- Use stronger guidance tone in scaffolding guide intro
- Slim down file tree to show folder structure only
- Mention that plugin path depends on chosen plugin ID
- Link to installation docs for non-discovery case
- Quote page:todo YAML key to avoid parse errors
- Remove "new" from "new frontend system" in template README
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Signed-off-by: aramissennyeydd <aramis.sennyey@doordash.com>
* fix: improve error handling in e2e plugin creation
- Narrow error to non-null object before using in operator
- Also write error.stdout since tools like Jest report to stdout
- Avoid variable shadowing with outer scope stdout/stderr
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Signed-off-by: aramissennyeydd <aramis.sennyey@doordash.com>
* revert: keep destructured fetch from FetchApi
Destructuring fetch from FetchApi is fine — revert to original
pattern while keeping the dependency array and other fixes.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Signed-off-by: aramissennyeydd <aramis.sennyey@doordash.com>
* feat: use @backstage/ui components in frontend plugin template
Replace core-components layout and table with @backstage/ui equivalents:
- Use HeaderPage and Container instead of Page, Header, Content, ContentHeader
- Use BUI Table with useTable and CellText instead of core-components Table
- Add @backstage/ui to template package.json dependencies
- Update poking-around docs to reflect BUI component usage
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Signed-off-by: aramissennyeydd <aramis.sennyey@doordash.com>
* fix: add example data when backend request fails
Signed-off-by: aramissennyeydd <aramis.sennyey@doordash.com>
* better logging setup
Signed-off-by: aramissennyeydd <aramis.sennyey@doordash.com>
* address feedback
Signed-off-by: aramissennyeydd <aramis.sennyey@doordash.com>
* better config driven example
Signed-off-by: aramissennyeydd <aramis.sennyey@doordash.com>
* debug logs
Signed-off-by: aramissennyeydd <aramis.sennyey@doordash.com>
* fix build failure related to unknown version
Signed-off-by: aramissennyeydd <aramis.sennyey@doordash.com>
* revert e2e run changes
Signed-off-by: aramissennyeydd <aramis.sennyey@doordash.com>
* Apply suggestions from code review
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Signed-off-by: Aramis Sennyey <159921952+aramissennyeydd@users.noreply.github.com>
* skip the discovery api for now
Signed-off-by: aramissennyeydd <aramis.sennyey@doordash.com>
* remove another ref
Signed-off-by: aramissennyeydd <aramis.sennyey@doordash.com>
* Apply suggestions from code review
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Signed-off-by: Aramis Sennyey <159921952+aramissennyeydd@users.noreply.github.com>
---------
Signed-off-by: aramissennyeydd <aramis.sennyey@doordash.com>
Signed-off-by: Aramis Sennyey <159921952+aramissennyeydd@users.noreply.github.com>
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
The legacy frontend plugin template had the same name (`frontend-plugin`) as
the new frontend plugin template, causing a conflict error when both were shown
(e.g. when the frontend system could not be auto-detected). Rename the legacy
template to `frontend-plugin-legacy` so both can coexist.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Signed-off-by: Vincenzo Scamporlino <vincenzos@spotify.com>
Add the missing frontend dev utils package so newly scaffolded frontend plugins compile in the create-app E2E flow.
Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
Made-with: Cursor
Renamed the CLI templates for frontend plugins:
- new-frontend-plugin → frontend-plugin
- new-frontend-plugin-module → frontend-plugin-module
- frontend-plugin (legacy) → legacy-frontend-plugin
Added auto-detection logic that checks packages/app/package.json to
determine which frontend system the app uses. When using default
templates, only the appropriate frontend plugin template is shown:
- Apps with @backstage/frontend-defaults see the new system templates
- Apps with @backstage/app-defaults see the legacy template
Both templates display as "frontend-plugin" to users, so existing
workflows are preserved while automatically using the correct template.
Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
The built-in templates used by `yarn new` are moved from `packages/cli/templates/`
to `packages/cli-module-new/templates/`, colocating them with the code that
consumes them.
A backwards compatibility rewrite in the template resolution ensures that
existing `@backstage/cli/templates/*` references in root `package.json`
configurations continue to work by transparently resolving them to
`@backstage/cli-module-new/templates/*`.
Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
Made-with: Cursor