diff --git a/.changeset/chubby-tables-tie.md b/.changeset/chubby-tables-tie.md new file mode 100644 index 0000000000..7aa5bc915b --- /dev/null +++ b/.changeset/chubby-tables-tie.md @@ -0,0 +1,7 @@ +--- +'@backstage/plugin-devtools': patch +'@backstage/plugin-catalog': patch +'@backstage/plugin-search': patch +--- + +Updated `README.md` to use `yarn start` instead of `yarn dev`. diff --git a/.changeset/famous-tips-raise.md b/.changeset/famous-tips-raise.md new file mode 100644 index 0000000000..1a44e19608 --- /dev/null +++ b/.changeset/famous-tips-raise.md @@ -0,0 +1,5 @@ +--- +'@backstage/plugin-catalog-backend': patch +--- + +Fix for duplicate results in `queryEntities` when providing an `orderField` parameter diff --git a/.changeset/fluffy-dancers-sneeze.md b/.changeset/fluffy-dancers-sneeze.md new file mode 100644 index 0000000000..d9bbfcd680 --- /dev/null +++ b/.changeset/fluffy-dancers-sneeze.md @@ -0,0 +1,5 @@ +--- +'@backstage/cli': patch +--- + +Avoid trailing `/*` when automatically adding imports for package with multiple entry points. diff --git a/.changeset/four-drinks-begin.md b/.changeset/four-drinks-begin.md new file mode 100644 index 0000000000..aca60e2999 --- /dev/null +++ b/.changeset/four-drinks-begin.md @@ -0,0 +1,16 @@ +--- +'@backstage/create-app': patch +--- + +Updated the root `package.json` in the template to use the new `backstage-cli repo start` command. + +The `yarn dev` command is now redundant and has been removed from the template. We recommend existing projects to add these or similar scripts to help redirect users: + +```json +{ + "scripts": { + "dev": "echo \"Use 'yarn start' instead\"", + "start-backend": "echo \"Use 'yarn start backend' instead\"" + } +} +``` diff --git a/.changeset/friendly-donuts-pump-cli.md b/.changeset/friendly-donuts-pump-cli.md new file mode 100644 index 0000000000..87ef30ddd0 --- /dev/null +++ b/.changeset/friendly-donuts-pump-cli.md @@ -0,0 +1,7 @@ +--- +'@backstage/cli': minor +--- + +Removes default React imports from template files, aligning with the requirements for the upcoming React 19 migration. Introduces a new ESLint rule to disallow `import React from 'react'` and `import * as React from 'react'`. + + diff --git a/.changeset/friendly-donuts-pump.md b/.changeset/friendly-donuts-pump.md new file mode 100644 index 0000000000..df413cdd3c --- /dev/null +++ b/.changeset/friendly-donuts-pump.md @@ -0,0 +1,51 @@ +--- +'@backstage/plugin-api-docs-module-protoc-gen-doc': patch +'@backstage/plugin-techdocs-module-addons-contrib': patch +'@backstage/plugin-catalog-unprocessed-entities': patch +'@backstage/plugin-techdocs-addons-test-utils': patch +'@backstage/frontend-plugin-api': patch +'@backstage/frontend-test-utils': patch +'@backstage/frontend-defaults': patch +'@backstage/integration-react': patch +'@backstage/plugin-kubernetes-cluster': patch +'@backstage/frontend-app-api': patch +'@backstage/core-compat-api': patch +'@backstage/core-components': patch +'@backstage/core-plugin-api': patch +'@backstage/plugin-kubernetes-react': patch +'@backstage/plugin-permission-react': patch +'@backstage/plugin-scaffolder-react': patch +'@backstage/plugin-app-visualizer': patch +'@backstage/plugin-catalog-import': patch +'@backstage/plugin-techdocs-react': patch +'@backstage/app-defaults': patch +'@backstage/core-app-api': patch +'@backstage/plugin-catalog-graph': patch +'@backstage/plugin-catalog-react': patch +'@backstage/plugin-config-schema': patch +'@backstage/plugin-notifications': patch +'@backstage/plugin-user-settings': patch +'@backstage/plugin-search-react': patch +'@backstage/create-app': patch +'@backstage/test-utils': patch +'@backstage/dev-utils': patch +'@backstage/plugin-auth-react': patch +'@backstage/plugin-home-react': patch +'@backstage/plugin-kubernetes': patch +'@backstage/plugin-scaffolder': patch +'@backstage/plugin-org-react': patch +'@backstage/plugin-api-docs': patch +'@backstage/plugin-devtools': patch +'@backstage/plugin-techdocs': patch +'@backstage/plugin-catalog': patch +'@backstage/canon': patch +'@backstage/theme': patch +'@backstage/plugin-search': patch +'@backstage/plugin-home': patch +'@backstage/plugin-app': patch +'@backstage/plugin-org': patch +--- + +Removes instances of default React imports, a necessary update for the upcoming React 19 migration. + + diff --git a/.changeset/funny-clouds-send.md b/.changeset/funny-clouds-send.md new file mode 100644 index 0000000000..9da317674c --- /dev/null +++ b/.changeset/funny-clouds-send.md @@ -0,0 +1,5 @@ +--- +'@backstage/plugin-scaffolder': patch +--- + +Tweaked template editor tooltip to mention HTTPS requirement. diff --git a/.changeset/happy-spoons-sing.md b/.changeset/happy-spoons-sing.md new file mode 100644 index 0000000000..f6e5b720d7 --- /dev/null +++ b/.changeset/happy-spoons-sing.md @@ -0,0 +1,11 @@ +--- +'@backstage/plugin-catalog-react': minor +'@backstage/plugin-catalog': minor +--- + +**BREAKING ALPHA**: `CatalogFilterBlueprint`, used in the new frontend system, is now exported under plugin-catalog-react instead of plugin-catalog. + +```diff ++ import { CatalogFilterBlueprint } from '@backstage/plugin-catalog-react/alpha'; +- import { CatalogFilterBlueprint } from '@backstage/plugin-catalog/alpha'; +``` diff --git a/.changeset/long-hornets-share.md b/.changeset/long-hornets-share.md new file mode 100644 index 0000000000..039b9f28a6 --- /dev/null +++ b/.changeset/long-hornets-share.md @@ -0,0 +1,5 @@ +--- +'@backstage/canon': patch +--- + +Improved Container styles, changing our max-width to 120rem and improving padding on smaller screens. diff --git a/.changeset/pre.json b/.changeset/pre.json index b443ec4505..a840a36caa 100644 --- a/.changeset/pre.json +++ b/.changeset/pre.json @@ -201,6 +201,7 @@ "changesets": [ "chatty-days-wonder", "chilly-sheep-scream", + "chubby-tables-tie", "clear-pigs-share", "clever-tomatoes-jump", "common-parrots-wink", @@ -216,38 +217,60 @@ "every-ties-wink", "famous-dragons-bake", "famous-eggs-dance", + "famous-tips-raise", + "few-humans-listen", + "fluffy-dancers-sneeze", + "four-drinks-begin", + "friendly-donuts-pump-cli", + "friendly-donuts-pump", + "funny-clouds-send", "funny-hotels-cut", "funny-lizards-clean", "giant-donkeys-punch", + "happy-spoons-sing", "honest-ties-worry", "huge-toys-beam", "itchy-times-behave", "large-kings-protect", "lemon-shoes-enter", "light-cameras-fold", + "long-hornets-share", "metal-animals-notice", "moody-eagles-smile", "nine-falcons-repeat", "odd-bobcats-hang", "orange-queens-grin", + "proud-dots-fry", "quick-carrots-open", + "rare-colts-drum", + "rich-ends-throw", "rotten-bobcats-notice", + "rotten-windows-fly", "sad-pots-try", "serious-guests-tan", + "shiny-bears-know", + "silent-snails-lie", "silver-rocks-invite", + "slimy-houses-chew", "spotty-towns-show", + "stale-chairs-look", "stale-tables-stick", "strange-planes-kneel", "sweet-maps-invent", "swift-boats-add", "tame-sloths-brake", "tame-worms-do", + "tangy-dryers-lick", + "ten-dodos-lead", + "tender-gifts-fall", "thin-snails-judge", "tiny-swans-warn", + "twelve-hornets-smell", "twenty-forks-cheat", "twenty-walls-join", "unlucky-carrots-shave", "wet-penguins-beg", + "whole-papers-retire", "wide-planets-camp", "witty-planets-sing" ] diff --git a/.changeset/proud-dots-fry.md b/.changeset/proud-dots-fry.md new file mode 100644 index 0000000000..2895f3d720 --- /dev/null +++ b/.changeset/proud-dots-fry.md @@ -0,0 +1,37 @@ +--- +'@backstage/plugin-catalog-react': minor +'@backstage/plugin-catalog': minor +--- + +Adds `EntityContextMenuItemBlueprint` to enable extending the entity page's context menu with user defined items. + +For example: + +```ts +import { EntityContextMenuItemBlueprint } from '@backstage/plugin-catalog-react/alpha'; + +const myCustomHref = EntityContextMenuItemBlueprint.make({ + name: 'test-href', + params: { + icon: Example Icon, + useProps: () => ({ + title: 'Example Href', + href: '/example-path', + disabled: false, + component: 'a', + }), + }, +}); + +const myCustomOnClick = EntityContextMenuItemBlueprint.make({ + name: 'test-click', + params: { + icon: Test Icon, + useProps: () => ({ + title: 'Example onClick', + onClick: () => window.alert('Hello world!'), + disabled: false, + }), + }, +}); +``` diff --git a/.changeset/rare-colts-drum.md b/.changeset/rare-colts-drum.md new file mode 100644 index 0000000000..40bd90e0a7 --- /dev/null +++ b/.changeset/rare-colts-drum.md @@ -0,0 +1,5 @@ +--- +'@backstage/canon': patch +--- + +Move styles to the root of the TextField component. diff --git a/.changeset/rotten-windows-fly.md b/.changeset/rotten-windows-fly.md new file mode 100644 index 0000000000..c476d45226 --- /dev/null +++ b/.changeset/rotten-windows-fly.md @@ -0,0 +1,5 @@ +--- +'@backstage/backend-defaults': patch +--- + +Adds `backend.auditor.severityLogLevelMappings` to map severity levels to log levels. diff --git a/.changeset/shiny-bears-know.md b/.changeset/shiny-bears-know.md new file mode 100644 index 0000000000..07a7fd6250 --- /dev/null +++ b/.changeset/shiny-bears-know.md @@ -0,0 +1,5 @@ +--- +'@backstage/canon': minor +--- + +Updated TextField and Select component to work with React Hook Form. diff --git a/.changeset/silent-snails-lie.md b/.changeset/silent-snails-lie.md new file mode 100644 index 0000000000..87ae46afa6 --- /dev/null +++ b/.changeset/silent-snails-lie.md @@ -0,0 +1,5 @@ +--- +'@backstage/plugin-scaffolder-backend-module-github': patch +--- + +Add support to github:repo:create to allow branch updates diff --git a/.changeset/ten-dodos-lead.md b/.changeset/ten-dodos-lead.md new file mode 100644 index 0000000000..340c5170cf --- /dev/null +++ b/.changeset/ten-dodos-lead.md @@ -0,0 +1,5 @@ +--- +'@backstage/canon': patch +--- + +We added a render prop to the Link component to make sure it can work with React Router. diff --git a/.changeset/twelve-hornets-smell.md b/.changeset/twelve-hornets-smell.md new file mode 100644 index 0000000000..a9845e2547 --- /dev/null +++ b/.changeset/twelve-hornets-smell.md @@ -0,0 +1,30 @@ +--- +'@backstage/cli': patch +--- + +Added a new `repo start` command to replace the existing pattern of using `yarn dev` scripts. The `repo start` command runs the app and/or backend package in the repo by default, but will also fall back to running other individual frontend or backend packages or even plugin dev entry points if the can be uniquely selected. + +The goal of this change is to reduce the number of different necessary scripts and align on `yarn start` being the only command needed for local development, similar to how `repo test` handles testing in the repo. It also opens up for more powerful options, like the `--plugin ` flag that runs the dev entry point of the selected plugin. + +The new script is installed as follows, replacing the existing `yarn start` script: + +```json +{ + "scripts": { + "start": "backstage-cli repo start" + } +} +``` + +In order to help users migrate in existing projects, it is recommended to add the following scripts to the root `package.json`: + +```json +{ + "scripts": { + "dev": "echo \"Use 'yarn start' instead\"", + "start-backend": "echo \"Use 'yarn start backend' instead\"" + } +} +``` + +For more information, run `yarn start --help` once the new command is installed. diff --git a/.eslintrc.js b/.eslintrc.js index eb2a07b3b0..409b820783 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -20,6 +20,7 @@ module.exports = { root: true, plugins: ['@spotify', 'notice', 'react', 'testing-library'], rules: { + 'react/react-in-jsx-scope': 'off', 'notice/notice': [ 'error', { @@ -47,6 +48,17 @@ module.exports = { selector: "CallExpression[arguments.length=0] > MemberExpression[property.name='toUpperCase']", }, + { + message: "React default imports are deprecated. Follow the x migration guide for details.", + selector: + "ImportDeclaration[source.value='react'][specifiers.0.type='ImportDefaultSpecifier']", + }, + { + message: + "React default imports are deprecated. Follow the x migration guide for details. If you need a global type that collides with a React named export (such as `MouseEvent`), try using `globalThis.MouseHandler`.", + selector: + "ImportDeclaration[source.value='react'] :matches(ImportDefaultSpecifier, ImportNamespaceSpecifier)", + }, ], 'testing-library/await-async-queries': 'error', 'testing-library/await-async-utils': 'error', diff --git a/.github/workflows/scorecard.yml b/.github/workflows/scorecard.yml index 4a5707087e..26172cce6a 100644 --- a/.github/workflows/scorecard.yml +++ b/.github/workflows/scorecard.yml @@ -67,6 +67,6 @@ jobs: # Upload the results to GitHub's code scanning dashboard. - name: 'Upload to code-scanning' - uses: github/codeql-action/upload-sarif@6bb031afdd8eb862ea3fc1848194185e076637e5 # v3.28.11 + uses: github/codeql-action/upload-sarif@45775bd8235c68ba998cffa5171334d58593da47 # v3.28.15 with: sarif_file: results.sarif diff --git a/.github/workflows/sync_snyk-monitor.yml b/.github/workflows/sync_snyk-monitor.yml index aec03d09ee..42fac516a2 100644 --- a/.github/workflows/sync_snyk-monitor.yml +++ b/.github/workflows/sync_snyk-monitor.yml @@ -58,6 +58,6 @@ jobs: SNYK_TOKEN: ${{ secrets.SNYK_TOKEN }} NODE_OPTIONS: --max-old-space-size=7168 - name: Upload Snyk report - uses: github/codeql-action/upload-sarif@6bb031afdd8eb862ea3fc1848194185e076637e5 # v3.28.11 + uses: github/codeql-action/upload-sarif@45775bd8235c68ba998cffa5171334d58593da47 # v3.28.15 with: sarif_file: snyk.sarif diff --git a/.github/workflows/verify_codeql.yml b/.github/workflows/verify_codeql.yml index d028be98d8..b2555b64b0 100644 --- a/.github/workflows/verify_codeql.yml +++ b/.github/workflows/verify_codeql.yml @@ -55,7 +55,7 @@ jobs: # Initializes the CodeQL tools for scanning. - name: Initialize CodeQL - uses: github/codeql-action/init@6bb031afdd8eb862ea3fc1848194185e076637e5 # v3.28.11 + uses: github/codeql-action/init@45775bd8235c68ba998cffa5171334d58593da47 # v3.28.15 with: languages: ${{ matrix.language }} # If you wish to specify custom queries, you can do so here or in a config file. @@ -66,7 +66,7 @@ jobs: # Autobuild attempts to build any compiled languages (C/C++, C#, or Java). # If this step fails, then you should remove it and run the build manually (see below) - name: Autobuild - uses: github/codeql-action/autobuild@6bb031afdd8eb862ea3fc1848194185e076637e5 # v3.28.11 + uses: github/codeql-action/autobuild@45775bd8235c68ba998cffa5171334d58593da47 # v3.28.15 # â„šī¸ Command-line programs to run using the OS shell. # 📚 https://git.io/JvXDl @@ -80,4 +80,4 @@ jobs: # make release - name: Perform CodeQL Analysis - uses: github/codeql-action/analyze@6bb031afdd8eb862ea3fc1848194185e076637e5 # v3.28.11 + uses: github/codeql-action/analyze@45775bd8235c68ba998cffa5171334d58593da47 # v3.28.15 diff --git a/.github/workflows/verify_storybook.yml b/.github/workflows/verify_storybook.yml index 1181273bb0..075c328359 100644 --- a/.github/workflows/verify_storybook.yml +++ b/.github/workflows/verify_storybook.yml @@ -54,7 +54,7 @@ jobs: - run: yarn --cwd packages/canon build-storybook - - uses: chromaui/action@c93e0bc3a63aa176e14a75b61a31847cbfdd341c # v11 + - uses: chromaui/action@649b4fd73c3f7cd7a65bd0b9f131349335ec661b # v11 with: token: ${{ secrets.GITHUB_TOKEN }} # projectToken intentionally shared to allow collaborators to run Chromatic on forks diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 58f894447b..bc67fba8c6 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -68,7 +68,7 @@ yarn tsc # does a first run of type generation and checks Open a terminal window and start the web app by using the following command from the project root. Make sure you have run the above mentioned commands first. ```bash -yarn dev +yarn start ``` This is going to start two things, the frontend (:3000) and the backend (:7007). diff --git a/canon-docs/package.json b/canon-docs/package.json index acd20cb66a..5a4affc45b 100644 --- a/canon-docs/package.json +++ b/canon-docs/package.json @@ -18,7 +18,7 @@ "@uiw/codemirror-themes": "^4.23.7", "@uiw/react-codemirror": "^4.23.7", "motion": "^12.4.1", - "next": "14.2.25", + "next": "14.2.26", "react": "^18.0.2", "react-dom": "^18.0.2", "react-frame-component": "^5.2.7", diff --git a/canon-docs/src/app/(docs)/components/field/page.mdx b/canon-docs/src/app/(docs)/components/field/page.mdx deleted file mode 100644 index 1526ce8c9f..0000000000 --- a/canon-docs/src/app/(docs)/components/field/page.mdx +++ /dev/null @@ -1,99 +0,0 @@ -import { PropsTable } from '@/components/PropsTable'; -import { Snippet } from '@/components/Snippet'; -import { Tabs } from '@/components/Tabs'; -import { CodeBlock } from '@/components/CodeBlock'; -import { FieldSnippet } from '@/snippets/stories-snippets'; -import { BaseUI } from '@/components/HeadlessBanners/BaseUI'; -import { - fieldRootPropDefs, - fieldLabelPropDefs, - fieldDescriptionPropDefs, - fieldErrorPropDefs, -} from './props'; - -# Field - -A wrapper around `Input` or `Select` component to add label, description and error messages.. - -} - code={``} -/> - - - - Usage - Theming - - - - Name - - Visible on your profile - -`} - /> - - - We recommend starting with our [global tokens](/theme/theming) to customize the library and align it with - your brand. For additional flexibility, you can use the provided class names for each element listed below. - - - - -`} - /> - - - -## API reference - - - -### Field.Root - -Groups all parts of the field. Renders a `
` element. - - - -### Field.Label - -An accessible label that is automatically associated with the field control. Renders a `