Merge branch 'master' of https://github.com/backstage/backstage into feat/allow-inspect-override

Signed-off-by: jrwpatterson <jrwpatterson@gmail.com>
This commit is contained in:
jrwpatterson
2023-09-13 11:09:25 +10:00
632 changed files with 11955 additions and 1558 deletions
+5
View File
@@ -0,0 +1,5 @@
---
'@backstage/plugin-scaffolder-backend-module-yeoman': patch
---
Enables dry-run functionality for the run:yeoman scaffolder action
+7
View File
@@ -0,0 +1,7 @@
---
'@backstage/plugin-proxy-backend': patch
---
Add the route name to an error message that appears when the backend
proxy wasn't well configured. This will help users to understand the
issue and fix the right configuration.
+5
View File
@@ -0,0 +1,5 @@
---
'@backstage/plugin-auth-backend-module-oauth2-provider': minor
---
New module for `@backstage/plugin-auth-backend` that adds a `oauth2` auth provider.
+5
View File
@@ -0,0 +1,5 @@
---
'@backstage/plugin-kubernetes-backend': patch
---
Fixed a bug where requests to the proxy endpoint would fail for clusters with `caFile` configured
+5
View File
@@ -0,0 +1,5 @@
---
'@backstage/plugin-scaffolder': patch
---
Restored functionality to `OwnedEntityPicker` by converting deprecated `ui:options` input to `catalogFilter`.
+5
View File
@@ -0,0 +1,5 @@
---
'@backstage/core-app-api': patch
---
Internal refactor
+5
View File
@@ -0,0 +1,5 @@
---
'@backstage/plugin-newrelic': patch
---
Fixed bug in NewRelicComponent component where table would not sort correctly for numerical values.
+5
View File
@@ -0,0 +1,5 @@
---
'@backstage/plugin-adr': patch
---
support for i18n feature
+46 -1
View File
@@ -241,46 +241,67 @@
"@backstage/frontend-plugin-api": "0.0.0",
"@backstage/plugin-auth-backend-module-gitlab-provider": "0.0.0",
"@backstage/backend-plugin-manager": "0.0.0",
"@backstage/plugin-permission-backend-module-allow-all-policy": "0.0.0"
"@backstage/plugin-permission-backend-module-allow-all-policy": "0.0.0",
"app-next-example-plugin": "0.0.0",
"@backstage/plugin-auth-backend-module-oauth2-provider": "0.0.0",
"@backstage/plugin-catalog-backend-module-scaffolder-entity-model": "0.0.0"
},
"changesets": [
"big-bananas-sleep",
"big-masks-divide",
"big-spies-agree",
"blue-rats-drop",
"brave-books-pretend",
"brave-carrots-occur",
"calm-cups-smile",
"catalog-everybody-to-the-limit",
"chatty-goats-mate",
"chatty-spiders-serve",
"chilly-balloons-enjoy",
"chilly-parrots-yell",
"clean-houses-invent",
"cold-apricots-poke",
"create-app-1692704146",
"create-app-1693311380",
"cuddly-avocados-warn",
"curvy-roses-march",
"cyan-roses-relate",
"dirty-boxes-give",
"dirty-carrots-notice",
"dirty-cars-poke",
"dirty-cars-smoke",
"dirty-garlics-kiss",
"dirty-years-travel",
"dry-wasps-occur",
"dull-eyes-pay",
"dull-tables-joke",
"early-rules-taste",
"early-trains.draw",
"eight-radios-listen",
"eight-timers-sin",
"eighty-emus-float",
"eighty-fans-provide",
"empty-rings-type",
"fair-paws-flash",
"few-nails-smile",
"fifty-adults-shake",
"forty-rocks-jog",
"four-masks-fry",
"fresh-candles-warn",
"friendly-pugs-lick",
"funny-ligers-matter",
"funny-timers-retire",
"giant-coats-brush",
"gorgeous-coins-attack",
"great-chairs-swim",
"grumpy-bikes-beg",
"grumpy-papayas-tie",
"grumpy-ties-know",
"healthy-spiders-arrive",
"healthy-tools-count",
"hip-seahorses-exist",
"honest-ads-rush",
"hungry-cherries-speak",
"hungry-dots-design",
"khaki-pigs-accept",
"khaki-spiders-sniff",
@@ -288,7 +309,10 @@
"late-hounds-yell",
"late-roses-dream",
"lazy-pumas-hope",
"lazy-pumas-shop",
"lazy-rice-rule",
"lemon-donuts-clap",
"light-drinks-rush",
"long-flowers-sort",
"loud-apricots-destroy",
"lovely-years-sniff",
@@ -296,28 +320,35 @@
"lucky-chicken-lie",
"many-tips-attend",
"mean-carpets-provide",
"mean-planes-smoke",
"mean-queens-act",
"mighty-crabs-cheat",
"modern-trees-add",
"nasty-cherries-exercise",
"nasty-forks-beg",
"nasty-snails-complain",
"nasty-worms-share",
"new-sheep-cover",
"nice-forks-remain",
"ninety-horses-remember",
"ninety-news-visit",
"old-geese-drive",
"orange-houses-fly",
"pink-cups-rescue",
"pink-months-hammer",
"plenty-lamps-pump",
"polite-forks-grin",
"polite-plums-share",
"poor-olives-own",
"poor-years-appear",
"popular-clocks-whisper",
"popular-coins-tap",
"popular-readers-allow",
"pretty-otters-whisper",
"proud-lamps-cross",
"red-pens-knock",
"renovate-2ebf420",
"renovate-36e7f58",
"renovate-76185f9",
"renovate-b129f45",
"renovate-bbda8e8",
@@ -325,27 +356,41 @@
"repo-tools-boo-descriptions-two-electric-boogaloo",
"repo-tools-boo-descriptions",
"repo-tools-ci-toldya-so",
"rotten-bees-wave",
"rude-dolphins-reply",
"short-planets-argue",
"silent-icons-deny",
"silent-numbers-retire",
"silly-emus-remain",
"six-radios-smile",
"six-wolves-admire",
"slow-ducks-hunt",
"slow-queens-visit",
"smart-islands-jog",
"stale-points-breathe",
"strange-frogs-count",
"stupid-ants-change",
"sweet-hairs-complain",
"sweet-pens-hunt",
"swift-frogs-drop",
"tall-countries-float",
"tall-items-clap",
"tall-peas-visit",
"tame-jokes-do",
"tender-garlics-report",
"thick-pets-drive",
"thin-dryers-repeat",
"three-hounds-wonder",
"tricky-melons-fold",
"twelve-elephants-pay",
"twenty-worms-enjoy",
"warm-llamas-bake",
"warm-panthers-lick",
"weak-tomatoes-dance",
"wet-donuts-fry",
"wise-tables-add",
"witty-ants-cover",
"witty-pans-flash",
"yellow-trains-protect",
"yellow-yaks-behave",
"young-ants-nail",
+11
View File
@@ -0,0 +1,11 @@
---
'@backstage/plugin-home-react': patch
'@backstage/plugin-home': patch
'@backstage/plugin-scaffolder-react': patch
'@backstage/plugin-scaffolder': patch
---
Updated dependency `@rjsf/utils` to `5.13.0`.
Updated dependency `@rjsf/core-v5` to `npm:@rjsf/core@5.13.0`.
Updated dependency `@rjsf/material-ui-v5` to `npm:@rjsf/material-ui@5.13.0`.
Updated dependency `@rjsf/validator-ajv8` to `5.13.0`.
+5
View File
@@ -0,0 +1,5 @@
---
'@backstage/cli': patch
---
When running `version:bump` it will now log duplicates instead of throwing an error
+6
View File
@@ -0,0 +1,6 @@
---
'@backstage/plugin-vault-backend': patch
'@backstage/plugin-vault': patch
---
Added ability to override vault secret engine value on catalog entity level using annotation `vault.io/secrets-engine`
+5
View File
@@ -0,0 +1,5 @@
---
'@backstage/plugin-tech-radar': patch
---
Fixed `RadarTimeline` text formatting.
+6
View File
@@ -0,0 +1,6 @@
---
'@backstage/plugin-scaffolder-backend': minor
---
Improved the `parseEntityRef` Scaffolder filter by introducing the ability for users to provide default kind and/or namespace values. The filter now takes
2 arguments, similarly to the original [parseEntityRef](https://github.com/backstage/backstage/blob/v1.17.2/packages/catalog-model/src/entity/ref.ts#L77).
+5
View File
@@ -0,0 +1,5 @@
---
'@backstage/cli': patch
---
Removed the experimental `package fix` command that was used to automatically add dependencies to `package.json`, but has since been replaced by the `no-undeclared-imports` rule from `@backstage/eslint-plugin`.
+17
View File
@@ -0,0 +1,17 @@
---
'@backstage/plugin-catalog-backend-module-gitlab': minor
---
Fix Gitlab.com user ingestion by scoping GitlabOrgDiscoveryEntityProvider to a group.
**BREAKING** The `group` parameter is now required Gitlab.com Org Data integrations and the backend will fail to start without this option configured.
```diff
catalog:
providers:
gitlab:
yourProviderId:
host: gitlab.com
orgEnabled: true
+ group: org/teams
```
+5
View File
@@ -0,0 +1,5 @@
---
'@backstage/plugin-scaffolder': minor
---
adding a .zip download to dry run results page, including zip.js as dependency
+7
View File
@@ -0,0 +1,7 @@
---
'@backstage/plugin-scaffolder-backend': minor
---
**DEPRECATION**: Deprecated `ScaffolderEntitiesProcessor`, which should now instead be imported from `@backstage/plugin-catalog-backend-module-scaffolder-entity-model`.
`catalogModuleTemplateKind` was also moved to that package and renamed to `catalogModuleScaffolderEntityModel`, without any deprecation since it was an alpha export.
+5
View File
@@ -0,0 +1,5 @@
---
'@backstage/plugin-catalog-backend-module-scaffolder-entity-model': minor
---
Added a dedicated module to collect the `ScaffolderEntitiesProcessor` and `catalogModuleTemplateKind`.
+1 -1
View File
@@ -53,7 +53,7 @@ jobs:
# Upload the results as artifacts (optional). Commenting out will disable uploads of run results in SARIF
# format to the repository Actions tab.
- name: 'Upload artifact'
uses: actions/upload-artifact@0b7f8abb1508181956e8e162db84b466c27e18ce # v3.1.2
uses: actions/upload-artifact@a8a3f3ad30e3422c9c7b888a15615d19a852ae32 # v3.1.3
with:
name: SARIF file
path: results.sarif
+7 -7
View File
@@ -10,6 +10,13 @@ configure Backstage to have any number of authentication providers, but only
one of these will typically be used for sign-in, with the rest being used to provide
access to external resources.
> NOTE: Identity management and the Sign-In page in Backstage is NOT a method for blocking
> access for unauthorized users. The identity system only serves to provide a personalized
> experience and access to a Backstage Identity Token, which can be passed to backend plugins.
> This also means that your Backstage backend APIs are by default unauthenticated.
> Thus, if your Backstage instance is exposed to the Internet, anyone can access
> information in the Backstage. You can learn more [here](../overview/threat-model.md#integrator-responsibilities).
## Built-in Authentication Providers
Backstage comes with many common authentication providers in the core library:
@@ -60,13 +67,6 @@ the local `auth.environment` setting will be selected.
## Sign-In Configuration
> NOTE: Identity management and the `SignInPage` in Backstage is NOT a method
> for blocking access for unauthorized users, that either requires additional
> backend implementation or a separate service like Google's Identity-Aware
> Proxy. The identity system only serves to provide a personalized experience
> and access to a Backstage Identity Token, which can be passed to backend
> plugins.
Using an authentication provider for sign-in is something you need to configure
both in the frontend app, as well as the `auth` backend plugin. For information
on how to configure the backend app, see [Sign-in Identities and Resolvers](./identity-resolver.md).
@@ -467,7 +467,7 @@ The next step is to create a custom processor for your new entity kind. This
will be used within the catalog to make sure that it's able to ingest and
validate entities of our new kind. Just like with the definition package, you
can find inspiration in for example the existing
[ScaffolderEntitiesProcessor](https://github.com/backstage/backstage/tree/master/plugins/scaffolder-backend/src/processor/ScaffolderEntitiesProcessor.ts).
[ScaffolderEntitiesProcessor](https://github.com/backstage/backstage/tree/master/plugins/catalog-backend-module-scaffolder-entity-model/src/processor/ScaffolderEntitiesProcessor.ts).
We also provide a high-level example of what a catalog process for a custom
entity might look like:
@@ -627,3 +627,98 @@ output things. You can grab that output using `steps.$stepId.output.$property`.
You can read more about all the `inputs` and `outputs` defined in the actions in
code part of the `JSONSchema`, or you can read more about our
[built in actions](./builtin-actions.md).
## Built in Filters
Template filters are functions that help you transform data, extract specific information,
and perform various operations in Scaffolder Templates.
This section introduces the built-in filters provided by Backstage and offers examples of
how to use them in the Scaffolder templates. It's important to mention that Backstage also leverages the
native filters from the Nunjucks library. For a complete list of these native filters and their usage,
refer to the [Nunjucks documentation](https://mozilla.github.io/nunjucks/templating.html#builtin-filters).
### parseRepoUrl
The `parseRepoUrl` filter parse a repository URL into
its components, such as `owner`, repository `name`, and more.
**Usage Example:**
```yaml
- id: log
name: Parse Repo URL
action: debug:log
input:
extra: ${{ parameters.repoUrl | parseRepoUrl }}
```
- **Input**: `github.com?repo=backstage&org=backstage`
- **Output**: [RepoSpec](https://github.com/backstage/backstage/blob/v1.17.2/plugins/scaffolder-backend/src/scaffolder/actions/builtin/publish/util.ts#L39)
### parseEntityRef
The `parseEntityRef` filter allows you to extract different parts of
an entity reference, such as the `kind`, `namespace`, and `name`.
**Usage example**
1. Without context
```yaml
- id: log
name: Parse Entity Reference
action: debug:log
input:
extra: ${{ parameters.owner | parseEntityRef }}
```
- **Input**: `group:techdocs`
- **Output**: [CompoundEntityRef](https://github.com/backstage/backstage/blob/v1.17.2/packages/catalog-model/src/types.ts#L23)
2. With context
```yaml
- id: log
name: Parse Entity Reference
action: debug:log
input:
extra: ${{ parameters.owner | parseEntityRef({ defaultKind:"group", defaultNamespace:"another-namespace" }) }}
```
- **Input**: `techdocs`
- **Output**: [CompoundEntityRef](https://github.com/backstage/backstage/blob/v1.17.2/packages/catalog-model/src/types.ts#L23)
### pick
This `pick` filter allows you to select specific properties from an object.
**Usage Example**
```yaml
- id: log
name: Pick
action: debug:log
input:
extra: ${{ parameters.owner | parseEntityRef | pick('name') }}
```
- **Input**: `{ kind: 'Group', namespace: 'default', name: 'techdocs' }`
- **Output**: `techdocs`
### projectSlug
The `projectSlug` filter generates a project slug from a repository URL
**Usage Example**
```yaml
- id: log
name: Project Slug
action: debug:log
input:
extra: ${{ parameters.repoUrl | projectSlug }}
```
- **Input**: `github.com?repo=backstage&org=backstage`
- **Output**: `backstage/backstage`
+42 -1
View File
@@ -65,11 +65,52 @@ catalog:
yourProviderId:
host: gitlab.com
orgEnabled: true
group: org/teams # Optional. Must not end with slash. Accepts only groups under the provided path (which will be stripped)
group: org/teams # Required for gitlab.com when `orgEnabled: true`. Optional for self managed. Must not end with slash. Accepts only groups under the provided path (which will be stripped)
groupPattern: '[\s\S]*' # Optional. Filters found groups based on provided pattern. Defaults to `[\s\S]*`, which means to not filter anything
```
### Groups
When the `group` parameter is provided, the corresponding path prefix will be
stripped out from each matching group when computing the unique entity name.
e.g. If `group` is `org/teams`, the name for `org/teams/avengers/gotg` will be
`avengers-gotg`.
For gitlab.com, when `orgEnabled: true`, the `group` parameter is required in
order to limit the ingestion to a group within your organisation. `Group`
entities will only be ingested for the configured group, or its descendant groups,
but not any ancestor groups higher than the configured group path. Only groups
which contain members will be ingested.
### Users
For self hosted, all `User` entities are ingested from the entire instance.
For gitlab.com `User` entities for users who have [direct or inherited membership](https://docs.gitlab.com/ee/user/project/members/index.html#membership-types)
of the top-level group for the configured group path will be ingested.
### Limiting `User` and `Group` entity ingestion in the provider
Optionally, you can limit the entity types ingested by the provider when using
`orgEnabled: true` with the following `rules` configuration to limit it to only
`User` and `Group` entities.
```yaml
catalog:
providers:
gitlab:
yourOrgDataProviderId:
host: gitlab.com
orgEnabled: true
group: org/teams
rules:
- allow: [Group, User]
```
## Troubleshooting
**NOTE**: If any groups that are being ingested are empty groups (i.e. do not
contain any projects) and the user which provisioned the token is shared with a
higher level group via [group sharing](https://docs.gitlab.com/ee/user/group/manage.html#share-a-group-with-another-group)
and you don't see the expected number of `Group` entities in the catalog you may
be hitting this [Gitlab issue](https://gitlab.com/gitlab-org/gitlab/-/issues/267996).
File diff suppressed because it is too large Load Diff
+43 -43
View File
@@ -2604,90 +2604,90 @@ __metadata:
languageName: node
linkType: hard
"@swc/core-darwin-arm64@npm:1.3.82":
version: 1.3.82
resolution: "@swc/core-darwin-arm64@npm:1.3.82"
"@swc/core-darwin-arm64@npm:1.3.84":
version: 1.3.84
resolution: "@swc/core-darwin-arm64@npm:1.3.84"
conditions: os=darwin & cpu=arm64
languageName: node
linkType: hard
"@swc/core-darwin-x64@npm:1.3.82":
version: 1.3.82
resolution: "@swc/core-darwin-x64@npm:1.3.82"
"@swc/core-darwin-x64@npm:1.3.84":
version: 1.3.84
resolution: "@swc/core-darwin-x64@npm:1.3.84"
conditions: os=darwin & cpu=x64
languageName: node
linkType: hard
"@swc/core-linux-arm-gnueabihf@npm:1.3.82":
version: 1.3.82
resolution: "@swc/core-linux-arm-gnueabihf@npm:1.3.82"
"@swc/core-linux-arm-gnueabihf@npm:1.3.84":
version: 1.3.84
resolution: "@swc/core-linux-arm-gnueabihf@npm:1.3.84"
conditions: os=linux & cpu=arm
languageName: node
linkType: hard
"@swc/core-linux-arm64-gnu@npm:1.3.82":
version: 1.3.82
resolution: "@swc/core-linux-arm64-gnu@npm:1.3.82"
"@swc/core-linux-arm64-gnu@npm:1.3.84":
version: 1.3.84
resolution: "@swc/core-linux-arm64-gnu@npm:1.3.84"
conditions: os=linux & cpu=arm64 & libc=glibc
languageName: node
linkType: hard
"@swc/core-linux-arm64-musl@npm:1.3.82":
version: 1.3.82
resolution: "@swc/core-linux-arm64-musl@npm:1.3.82"
"@swc/core-linux-arm64-musl@npm:1.3.84":
version: 1.3.84
resolution: "@swc/core-linux-arm64-musl@npm:1.3.84"
conditions: os=linux & cpu=arm64 & libc=musl
languageName: node
linkType: hard
"@swc/core-linux-x64-gnu@npm:1.3.82":
version: 1.3.82
resolution: "@swc/core-linux-x64-gnu@npm:1.3.82"
"@swc/core-linux-x64-gnu@npm:1.3.84":
version: 1.3.84
resolution: "@swc/core-linux-x64-gnu@npm:1.3.84"
conditions: os=linux & cpu=x64 & libc=glibc
languageName: node
linkType: hard
"@swc/core-linux-x64-musl@npm:1.3.82":
version: 1.3.82
resolution: "@swc/core-linux-x64-musl@npm:1.3.82"
"@swc/core-linux-x64-musl@npm:1.3.84":
version: 1.3.84
resolution: "@swc/core-linux-x64-musl@npm:1.3.84"
conditions: os=linux & cpu=x64 & libc=musl
languageName: node
linkType: hard
"@swc/core-win32-arm64-msvc@npm:1.3.82":
version: 1.3.82
resolution: "@swc/core-win32-arm64-msvc@npm:1.3.82"
"@swc/core-win32-arm64-msvc@npm:1.3.84":
version: 1.3.84
resolution: "@swc/core-win32-arm64-msvc@npm:1.3.84"
conditions: os=win32 & cpu=arm64
languageName: node
linkType: hard
"@swc/core-win32-ia32-msvc@npm:1.3.82":
version: 1.3.82
resolution: "@swc/core-win32-ia32-msvc@npm:1.3.82"
"@swc/core-win32-ia32-msvc@npm:1.3.84":
version: 1.3.84
resolution: "@swc/core-win32-ia32-msvc@npm:1.3.84"
conditions: os=win32 & cpu=ia32
languageName: node
linkType: hard
"@swc/core-win32-x64-msvc@npm:1.3.82":
version: 1.3.82
resolution: "@swc/core-win32-x64-msvc@npm:1.3.82"
"@swc/core-win32-x64-msvc@npm:1.3.84":
version: 1.3.84
resolution: "@swc/core-win32-x64-msvc@npm:1.3.84"
conditions: os=win32 & cpu=x64
languageName: node
linkType: hard
"@swc/core@npm:^1.3.46":
version: 1.3.82
resolution: "@swc/core@npm:1.3.82"
version: 1.3.84
resolution: "@swc/core@npm:1.3.84"
dependencies:
"@swc/core-darwin-arm64": 1.3.82
"@swc/core-darwin-x64": 1.3.82
"@swc/core-linux-arm-gnueabihf": 1.3.82
"@swc/core-linux-arm64-gnu": 1.3.82
"@swc/core-linux-arm64-musl": 1.3.82
"@swc/core-linux-x64-gnu": 1.3.82
"@swc/core-linux-x64-musl": 1.3.82
"@swc/core-win32-arm64-msvc": 1.3.82
"@swc/core-win32-ia32-msvc": 1.3.82
"@swc/core-win32-x64-msvc": 1.3.82
"@swc/core-darwin-arm64": 1.3.84
"@swc/core-darwin-x64": 1.3.84
"@swc/core-linux-arm-gnueabihf": 1.3.84
"@swc/core-linux-arm64-gnu": 1.3.84
"@swc/core-linux-arm64-musl": 1.3.84
"@swc/core-linux-x64-gnu": 1.3.84
"@swc/core-linux-x64-musl": 1.3.84
"@swc/core-win32-arm64-msvc": 1.3.84
"@swc/core-win32-ia32-msvc": 1.3.84
"@swc/core-win32-x64-msvc": 1.3.84
"@swc/types": ^0.1.4
peerDependencies:
"@swc/helpers": ^0.5.0
@@ -2715,7 +2715,7 @@ __metadata:
peerDependenciesMeta:
"@swc/helpers":
optional: true
checksum: 4c4adbed22071c0af935129a6fe7cc35d1688a5c1a069efdd8c97740930fa7eaf324e75dc88634a4ea0520330f6c88101d5aa5cf7ed6e02d336cc46ee7131ea3
checksum: dee45823923c29dde579ed1121c4392c937826d575c87f62399ba7a0b27cacfeb05da97b65cf49a721a50127bb1e22ca5c07defa784ec2a47fed33e3498ef1b9
languageName: node
linkType: hard
+1 -1
View File
@@ -48,7 +48,7 @@
"@types/react": "^17",
"@types/react-dom": "^17"
},
"version": "1.18.0-next.2",
"version": "1.18.0-next.3",
"dependencies": {
"@backstage/errors": "workspace:^",
"@manypkg/get-packages": "^1.1.3"
+12
View File
@@ -1,5 +1,17 @@
# @backstage/app-defaults
## 1.4.3-next.3
### Patch Changes
- 406b786a2a2c: Mark package as being free of side effects, allowing more optimized Webpack builds.
- Updated dependencies
- @backstage/core-app-api@1.10.0-next.3
- @backstage/core-components@0.13.5-next.3
- @backstage/core-plugin-api@1.6.0-next.3
- @backstage/plugin-permission-react@0.4.15-next.3
- @backstage/theme@0.4.2-next.0
## 1.4.3-next.2
### Patch Changes
+1 -1
View File
@@ -1,7 +1,7 @@
{
"name": "@backstage/app-defaults",
"description": "Provides the default wiring of a Backstage App",
"version": "1.4.3-next.2",
"version": "1.4.3-next.3",
"publishConfig": {
"access": "public",
"main": "dist/index.esm.js",
@@ -0,0 +1,9 @@
# app-next-example-plugin
## 0.0.1-next.0
### Patch Changes
- Updated dependencies
- @backstage/frontend-plugin-api@0.1.0-next.0
- @backstage/core-components@0.13.5-next.3
@@ -1,7 +1,7 @@
{
"name": "app-next-example-plugin",
"description": "Backstage internal example plugin",
"version": "0.0.0",
"version": "0.0.1-next.0",
"publishConfig": {
"access": "public",
"main": "dist/index.esm.js",
+77
View File
@@ -1,5 +1,82 @@
# example-app-next
## 0.0.1-next.2
### Patch Changes
- Updated dependencies
- @backstage/plugin-home@0.5.8-next.3
- @backstage/frontend-plugin-api@0.1.0-next.0
- @backstage/frontend-app-api@0.1.0-next.0
- @backstage/plugin-graphiql@0.2.54-next.3
- @backstage/cli@0.22.13-next.3
- @backstage/plugin-kubernetes@0.10.3-next.3
- @backstage/app-defaults@1.4.3-next.3
- @backstage/catalog-model@1.4.2-next.2
- @backstage/config@1.1.0-next.2
- @backstage/core-app-api@1.10.0-next.3
- @backstage/core-components@0.13.5-next.3
- @backstage/core-plugin-api@1.6.0-next.3
- @backstage/integration-react@1.1.19-next.3
- @backstage/plugin-adr@0.6.7-next.3
- @backstage/plugin-airbrake@0.3.24-next.3
- @backstage/plugin-apache-airflow@0.2.15-next.3
- @backstage/plugin-api-docs@0.9.11-next.3
- @backstage/plugin-azure-devops@0.3.6-next.3
- @backstage/plugin-azure-sites@0.1.13-next.3
- @backstage/plugin-badges@0.2.48-next.3
- @backstage/plugin-catalog-common@1.0.16-next.2
- @backstage/plugin-catalog-graph@0.2.36-next.3
- @backstage/plugin-catalog-import@0.9.14-next.3
- @backstage/plugin-catalog-react@1.8.4-next.3
- @backstage/plugin-catalog-unprocessed-entities@0.1.3-next.3
- @backstage/plugin-circleci@0.3.24-next.3
- @backstage/plugin-cloudbuild@0.3.24-next.3
- @backstage/plugin-code-coverage@0.2.17-next.3
- @backstage/plugin-cost-insights@0.12.13-next.3
- @backstage/plugin-devtools@0.1.4-next.3
- @backstage/plugin-dynatrace@7.0.4-next.3
- @backstage/plugin-entity-feedback@0.2.7-next.3
- @backstage/plugin-explore@0.4.10-next.3
- @backstage/plugin-gcalendar@0.3.18-next.3
- @backstage/plugin-gcp-projects@0.3.41-next.3
- @backstage/plugin-github-actions@0.6.5-next.3
- @backstage/plugin-gocd@0.1.30-next.3
- @backstage/plugin-jenkins@0.8.6-next.3
- @backstage/plugin-kafka@0.3.24-next.3
- @backstage/plugin-lighthouse@0.4.9-next.3
- @backstage/plugin-linguist@0.1.9-next.3
- @backstage/plugin-linguist-common@0.1.2-next.0
- @backstage/plugin-microsoft-calendar@0.1.7-next.3
- @backstage/plugin-newrelic@0.3.40-next.3
- @backstage/plugin-newrelic-dashboard@0.2.17-next.3
- @backstage/plugin-octopus-deploy@0.2.6-next.3
- @backstage/plugin-org@0.6.14-next.3
- @backstage/plugin-pagerduty@0.6.5-next.3
- @backstage/plugin-permission-react@0.4.15-next.3
- @backstage/plugin-playlist@0.1.16-next.3
- @backstage/plugin-puppetdb@0.1.7-next.3
- @backstage/plugin-rollbar@0.4.24-next.3
- @backstage/plugin-scaffolder@1.15.0-next.3
- @backstage/plugin-scaffolder-react@1.5.5-next.3
- @backstage/plugin-search@1.4.0-next.3
- @backstage/plugin-search-common@1.2.6-next.2
- @backstage/plugin-search-react@1.7.0-next.3
- @backstage/plugin-sentry@0.5.9-next.3
- @backstage/plugin-shortcuts@0.3.14-next.3
- @backstage/plugin-stack-overflow@0.1.20-next.3
- @backstage/plugin-stackstorm@0.1.6-next.3
- @backstage/plugin-tech-insights@0.3.16-next.3
- @backstage/plugin-tech-radar@0.6.8-next.3
- @backstage/plugin-techdocs@1.7.0-next.3
- @backstage/plugin-techdocs-module-addons-contrib@1.1.0-next.3
- @backstage/plugin-techdocs-react@1.1.10-next.3
- @backstage/plugin-todo@0.2.26-next.3
- @backstage/plugin-user-settings@0.7.9-next.3
- @backstage/theme@0.4.2-next.0
- app-next-example-plugin@0.0.1-next.0
- @internal/plugin-catalog-customized@0.0.14-next.3
## 0.0.1-next.1
### Patch Changes
+2
View File
@@ -2,6 +2,8 @@ app:
experimental:
packages: 'all' # ✨
extensions:
- apis.plugin.graphiql.browse.gitlab: true
# scmAuthExtension: >-
# createScmAuthExtension({
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "example-app-next",
"version": "0.0.1-next.1",
"version": "0.0.1-next.2",
"private": true,
"backstage": {
"role": "frontend"
+7 -3
View File
@@ -14,9 +14,13 @@
* limitations under the License.
*/
import React from 'react';
import { renderWithEffects } from '@backstage/test-utils';
jest.mock('@backstage/plugin-graphiql', () => ({
...jest.requireActual('@backstage/plugin-graphiql'),
GraphiQLIcon: () => null,
}));
describe('App', () => {
it('should render', async () => {
process.env = {
@@ -41,8 +45,8 @@ describe('App', () => {
] as any,
};
const { default: App } = await import('./App');
const rendered = await renderWithEffects(<App />);
const { default: app } = await import('./App');
const rendered = await renderWithEffects(app);
expect(rendered.baseElement).toBeInTheDocument();
});
});
+2 -4
View File
@@ -14,8 +14,6 @@
* limitations under the License.
*/
import { graphiqlPlugin as legacyGraphiqlPlugin } from '@backstage/plugin-graphiql';
import { createApp as createLegacyApp } from '@backstage/app-defaults';
import { createApp } from '@backstage/frontend-app-api';
import { pagesPlugin } from './examples/pagesPlugin';
import graphiqlPlugin from '@backstage/plugin-graphiql/alpha';
@@ -61,9 +59,9 @@ const app = createApp({
// },
});
const legacyApp = createLegacyApp({ plugins: [legacyGraphiqlPlugin] });
// const legacyApp = createLegacyApp({ plugins: [legacyGraphiqlPlugin] });
export default legacyApp.createRoot(app.createRoot());
export default app.createRoot();
// const routes = (
// <FlatRoutes>
+2 -3
View File
@@ -15,8 +15,7 @@
*/
import '@backstage/cli/asset-types';
import React from 'react';
import ReactDOM from 'react-dom';
import App from './App';
import app from './App';
ReactDOM.render(<App />, document.getElementById('root'));
ReactDOM.render(app, document.getElementById('root'));
+75
View File
@@ -1,5 +1,80 @@
# example-app
## 0.2.87-next.3
### Patch Changes
- Updated dependencies
- @backstage/plugin-home@0.5.8-next.3
- @backstage/plugin-graphiql@0.2.54-next.3
- @backstage/cli@0.22.13-next.3
- @backstage/plugin-kubernetes@0.10.3-next.3
- @backstage/app-defaults@1.4.3-next.3
- @backstage/catalog-model@1.4.2-next.2
- @backstage/config@1.1.0-next.2
- @backstage/core-app-api@1.10.0-next.3
- @backstage/core-components@0.13.5-next.3
- @backstage/core-plugin-api@1.6.0-next.3
- @backstage/integration-react@1.1.19-next.3
- @backstage/plugin-adr@0.6.7-next.3
- @backstage/plugin-airbrake@0.3.24-next.3
- @backstage/plugin-apache-airflow@0.2.15-next.3
- @backstage/plugin-api-docs@0.9.11-next.3
- @backstage/plugin-azure-devops@0.3.6-next.3
- @backstage/plugin-azure-sites@0.1.13-next.3
- @backstage/plugin-badges@0.2.48-next.3
- @backstage/plugin-catalog-common@1.0.16-next.2
- @backstage/plugin-catalog-graph@0.2.36-next.3
- @backstage/plugin-catalog-import@0.9.14-next.3
- @backstage/plugin-catalog-react@1.8.4-next.3
- @backstage/plugin-catalog-unprocessed-entities@0.1.3-next.3
- @backstage/plugin-circleci@0.3.24-next.3
- @backstage/plugin-cloudbuild@0.3.24-next.3
- @backstage/plugin-code-coverage@0.2.17-next.3
- @backstage/plugin-cost-insights@0.12.13-next.3
- @backstage/plugin-devtools@0.1.4-next.3
- @backstage/plugin-dynatrace@7.0.4-next.3
- @backstage/plugin-entity-feedback@0.2.7-next.3
- @backstage/plugin-explore@0.4.10-next.3
- @backstage/plugin-gcalendar@0.3.18-next.3
- @backstage/plugin-gcp-projects@0.3.41-next.3
- @backstage/plugin-github-actions@0.6.5-next.3
- @backstage/plugin-gocd@0.1.30-next.3
- @backstage/plugin-jenkins@0.8.6-next.3
- @backstage/plugin-kafka@0.3.24-next.3
- @backstage/plugin-lighthouse@0.4.9-next.3
- @backstage/plugin-linguist@0.1.9-next.3
- @backstage/plugin-linguist-common@0.1.2-next.0
- @backstage/plugin-microsoft-calendar@0.1.7-next.3
- @backstage/plugin-newrelic@0.3.40-next.3
- @backstage/plugin-newrelic-dashboard@0.2.17-next.3
- @backstage/plugin-nomad@0.1.5-next.3
- @backstage/plugin-octopus-deploy@0.2.6-next.3
- @backstage/plugin-org@0.6.14-next.3
- @backstage/plugin-pagerduty@0.6.5-next.3
- @backstage/plugin-permission-react@0.4.15-next.3
- @backstage/plugin-playlist@0.1.16-next.3
- @backstage/plugin-puppetdb@0.1.7-next.3
- @backstage/plugin-rollbar@0.4.24-next.3
- @backstage/plugin-scaffolder@1.15.0-next.3
- @backstage/plugin-scaffolder-react@1.5.5-next.3
- @backstage/plugin-search@1.4.0-next.3
- @backstage/plugin-search-common@1.2.6-next.2
- @backstage/plugin-search-react@1.7.0-next.3
- @backstage/plugin-sentry@0.5.9-next.3
- @backstage/plugin-shortcuts@0.3.14-next.3
- @backstage/plugin-stack-overflow@0.1.20-next.3
- @backstage/plugin-stackstorm@0.1.6-next.3
- @backstage/plugin-tech-insights@0.3.16-next.3
- @backstage/plugin-tech-radar@0.6.8-next.3
- @backstage/plugin-techdocs@1.7.0-next.3
- @backstage/plugin-techdocs-module-addons-contrib@1.1.0-next.3
- @backstage/plugin-techdocs-react@1.1.10-next.3
- @backstage/plugin-todo@0.2.26-next.3
- @backstage/plugin-user-settings@0.7.9-next.3
- @backstage/theme@0.4.2-next.0
- @internal/plugin-catalog-customized@0.0.14-next.3
## 0.2.87-next.2
### Patch Changes
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "example-app",
"version": "0.2.87-next.2",
"version": "0.2.87-next.3",
"private": true,
"backstage": {
"role": "frontend"
+20
View File
@@ -1,5 +1,25 @@
# @backstage/backend-app-api
## 0.5.3-next.3
### Patch Changes
- 154632d8753b: Add support for discovering additional service factories during startup.
- cb7fc410ed99: The experimental backend feature discovery now only considers default exports from packages. It no longer filters packages to include based on the package role, except that `'cli'` packages are ignored. However, the `"backstage"` field is still required in `package.json`.
- 3b30b179cb38: Add support for installing features as package imports, for example `backend.add(import('my-plugin'))`.
- Updated dependencies
- @backstage/config@1.1.0-next.2
- @backstage/errors@1.2.2-next.0
- @backstage/types@1.1.1-next.0
- @backstage/plugin-permission-node@0.7.14-next.3
- @backstage/backend-plugin-api@0.6.3-next.3
- @backstage/backend-common@0.19.5-next.3
- @backstage/backend-tasks@0.5.8-next.3
- @backstage/cli-common@0.1.12
- @backstage/cli-node@0.1.4-next.0
- @backstage/config-loader@1.5.0-next.3
- @backstage/plugin-auth-node@0.3.0-next.3
## 0.5.3-next.2
### Patch Changes
+1 -1
View File
@@ -1,7 +1,7 @@
{
"name": "@backstage/backend-app-api",
"description": "Core API used by Backstage backend apps",
"version": "0.5.3-next.2",
"version": "0.5.3-next.3",
"main": "src/index.ts",
"types": "src/index.ts",
"publishConfig": {
+16
View File
@@ -1,5 +1,21 @@
# @backstage/backend-common
## 0.19.5-next.3
### Patch Changes
- Updated dependencies
- @backstage/backend-app-api@0.5.3-next.3
- @backstage/config@1.1.0-next.2
- @backstage/errors@1.2.2-next.0
- @backstage/integration@1.7.0-next.3
- @backstage/types@1.1.1-next.0
- @backstage/backend-plugin-api@0.6.3-next.3
- @backstage/backend-dev-utils@0.1.1
- @backstage/cli-common@0.1.12
- @backstage/config-loader@1.5.0-next.3
- @backstage/integration-aws-node@0.1.6-next.2
## 0.19.5-next.2
### Patch Changes
+1 -1
View File
@@ -1,7 +1,7 @@
{
"name": "@backstage/backend-common",
"description": "Common functionality library for Backstage backends",
"version": "0.19.5-next.2",
"version": "0.19.5-next.3",
"main": "src/index.ts",
"types": "src/index.ts",
"publishConfig": {
+9
View File
@@ -1,5 +1,14 @@
# @backstage/backend-defaults
## 0.2.3-next.3
### Patch Changes
- Updated dependencies
- @backstage/backend-app-api@0.5.3-next.3
- @backstage/backend-plugin-api@0.6.3-next.3
- @backstage/backend-common@0.19.5-next.3
## 0.2.3-next.2
### Patch Changes
+1 -1
View File
@@ -1,7 +1,7 @@
{
"name": "@backstage/backend-defaults",
"description": "Backend defaults used by Backstage backend apps",
"version": "0.2.3-next.2",
"version": "0.2.3-next.3",
"main": "src/index.ts",
"types": "src/index.ts",
"publishConfig": {
+35
View File
@@ -1,5 +1,40 @@
# example-backend-next
## 0.0.15-next.3
### Patch Changes
- Updated dependencies
- @backstage/plugin-techdocs-backend@1.7.0-next.3
- @backstage/plugin-proxy-backend@0.4.0-next.3
- @backstage/plugin-adr-backend@0.4.0-next.3
- @backstage/plugin-azure-devops-backend@0.4.0-next.3
- @backstage/plugin-badges-backend@0.3.0-next.3
- @backstage/plugin-catalog-backend-module-unprocessed@0.3.0-next.3
- @backstage/plugin-devtools-backend@0.2.0-next.3
- @backstage/plugin-entity-feedback-backend@0.2.0-next.3
- @backstage/plugin-lighthouse-backend@0.3.0-next.3
- @backstage/plugin-linguist-backend@0.5.0-next.3
- @backstage/plugin-todo-backend@0.3.0-next.3
- @backstage/plugin-app-backend@0.3.51-next.3
- @backstage/plugin-catalog-backend@1.13.0-next.3
- @backstage/plugin-kubernetes-backend@0.11.6-next.3
- @backstage/plugin-permission-backend@0.5.26-next.3
- @backstage/plugin-permission-backend-module-allow-all-policy@0.1.0-next.1
- @backstage/plugin-scaffolder-backend@1.17.0-next.3
- @backstage/plugin-search-backend@1.4.3-next.3
- @backstage/plugin-search-backend-module-catalog@0.1.7-next.3
- @backstage/plugin-search-backend-module-explore@0.1.7-next.3
- @backstage/plugin-search-backend-module-techdocs@0.1.7-next.3
- @backstage/plugin-permission-common@0.7.8-next.2
- @backstage/plugin-permission-node@0.7.14-next.3
- @backstage/backend-plugin-api@0.6.3-next.3
- @backstage/plugin-catalog-backend-module-scaffolder-entity-model@0.1.0-next.0
- @backstage/backend-defaults@0.2.3-next.3
- @backstage/backend-tasks@0.5.8-next.3
- @backstage/plugin-auth-node@0.3.0-next.3
- @backstage/plugin-search-backend-node@1.2.7-next.3
## 0.0.15-next.2
### Patch Changes
+2 -1
View File
@@ -1,6 +1,6 @@
{
"name": "example-backend-next",
"version": "0.0.15-next.2",
"version": "0.0.15-next.3",
"main": "dist/index.cjs.js",
"types": "src/index.ts",
"license": "Apache-2.0",
@@ -34,6 +34,7 @@
"@backstage/plugin-azure-devops-backend": "workspace:^",
"@backstage/plugin-badges-backend": "workspace:^",
"@backstage/plugin-catalog-backend": "workspace:^",
"@backstage/plugin-catalog-backend-module-scaffolder-entity-model": "workspace:^",
"@backstage/plugin-catalog-backend-module-unprocessed": "workspace:^",
"@backstage/plugin-devtools-backend": "workspace:^",
"@backstage/plugin-entity-feedback-backend": "workspace:^",
+3
View File
@@ -23,6 +23,9 @@ backend.add(import('@backstage/plugin-app-backend/alpha'));
backend.add(import('@backstage/plugin-azure-devops-backend'));
backend.add(import('@backstage/plugin-badges-backend'));
backend.add(import('@backstage/plugin-catalog-backend-module-unprocessed'));
backend.add(
import('@backstage/plugin-catalog-backend-module-scaffolder-entity-model'),
);
backend.add(import('@backstage/plugin-catalog-backend/alpha'));
backend.add(import('@backstage/plugin-devtools-backend'));
backend.add(import('@backstage/plugin-entity-feedback-backend'));
@@ -1,5 +1,12 @@
# @backstage/backend-openapi-utils
## 0.0.4-next.0
### Patch Changes
- Updated dependencies
- @backstage/errors@1.2.2-next.0
## 0.0.3
### Patch Changes
+1 -1
View File
@@ -1,7 +1,7 @@
{
"name": "@backstage/backend-openapi-utils",
"description": "OpenAPI typescript support.",
"version": "0.0.3",
"version": "0.0.4-next.0",
"main": "src/index.ts",
"types": "src/index.ts",
"license": "Apache-2.0",
+13
View File
@@ -1,5 +1,18 @@
# @backstage/backend-plugin-api
## 0.6.3-next.3
### Patch Changes
- ba4506076e2d: Ensure that root scoped services cannot accept (at a type level) plugin scoped deps
- 474b792d6a43: Service factory functions are now marked as feature factories that can be installed in the backend.
- Updated dependencies
- @backstage/config@1.1.0-next.2
- @backstage/plugin-permission-common@0.7.8-next.2
- @backstage/types@1.1.1-next.0
- @backstage/backend-tasks@0.5.8-next.3
- @backstage/plugin-auth-node@0.3.0-next.3
## 0.6.3-next.2
### Patch Changes
+1 -1
View File
@@ -1,7 +1,7 @@
{
"name": "@backstage/backend-plugin-api",
"description": "Core API used by Backstage backend plugins",
"version": "0.6.3-next.2",
"version": "0.6.3-next.3",
"main": "src/index.ts",
"types": "src/index.ts",
"publishConfig": {
@@ -1,5 +1,28 @@
# @backstage/backend-plugin-manager
## 0.0.1-next.1
### Patch Changes
- Updated dependencies
- @backstage/plugin-catalog-backend@1.13.0-next.3
- @backstage/plugin-events-backend@0.2.12-next.3
- @backstage/config@1.1.0-next.2
- @backstage/errors@1.2.2-next.0
- @backstage/plugin-permission-common@0.7.8-next.2
- @backstage/plugin-search-common@1.2.6-next.2
- @backstage/types@1.1.1-next.0
- @backstage/plugin-permission-node@0.7.14-next.3
- @backstage/backend-plugin-api@0.6.3-next.3
- @backstage/backend-common@0.19.5-next.3
- @backstage/backend-tasks@0.5.8-next.3
- @backstage/cli-common@0.1.12
- @backstage/cli-node@0.1.4-next.0
- @backstage/plugin-auth-node@0.3.0-next.3
- @backstage/plugin-events-node@0.2.12-next.3
- @backstage/plugin-scaffolder-node@0.2.3-next.3
- @backstage/plugin-search-backend-node@1.2.7-next.3
## 0.0.1-next.0
### Patch Changes
+1 -1
View File
@@ -1,7 +1,7 @@
{
"name": "@backstage/backend-plugin-manager",
"description": "Backstage plugin management backend",
"version": "0.0.1-next.0",
"version": "0.0.1-next.1",
"private": true,
"main": "src/index.ts",
"types": "src/index.ts",
+10
View File
@@ -1,5 +1,15 @@
# @backstage/backend-tasks
## 0.5.8-next.3
### Patch Changes
- Updated dependencies
- @backstage/config@1.1.0-next.2
- @backstage/errors@1.2.2-next.0
- @backstage/types@1.1.1-next.0
- @backstage/backend-common@0.19.5-next.3
## 0.5.8-next.2
### Patch Changes
+1 -1
View File
@@ -1,7 +1,7 @@
{
"name": "@backstage/backend-tasks",
"description": "Common distributed task management library for Backstage backends",
"version": "0.5.8-next.2",
"version": "0.5.8-next.3",
"main": "src/index.ts",
"types": "src/index.ts",
"publishConfig": {
+13
View File
@@ -1,5 +1,18 @@
# @backstage/backend-test-utils
## 0.2.3-next.3
### Patch Changes
- 202e52c5e361: Add support for installing backend features via module imports, for example `startTestBackend({ features: [import('my-plugin')] })`.
- Updated dependencies
- @backstage/backend-app-api@0.5.3-next.3
- @backstage/config@1.1.0-next.2
- @backstage/types@1.1.1-next.0
- @backstage/backend-plugin-api@0.6.3-next.3
- @backstage/backend-common@0.19.5-next.3
- @backstage/plugin-auth-node@0.3.0-next.3
## 0.2.3-next.2
### Patch Changes
+1 -1
View File
@@ -1,7 +1,7 @@
{
"name": "@backstage/backend-test-utils",
"description": "Test helpers library for Backstage backends",
"version": "0.2.3-next.2",
"version": "0.2.3-next.3",
"main": "src/index.ts",
"types": "src/index.ts",
"publishConfig": {
+59
View File
@@ -1,5 +1,64 @@
# example-backend
## 0.2.87-next.3
### Patch Changes
- Updated dependencies
- @backstage/plugin-techdocs-backend@1.7.0-next.3
- @backstage/plugin-proxy-backend@0.4.0-next.3
- @backstage/plugin-adr-backend@0.4.0-next.3
- @backstage/plugin-auth-backend@0.19.0-next.3
- @backstage/plugin-azure-devops-backend@0.4.0-next.3
- @backstage/plugin-badges-backend@0.3.0-next.3
- @backstage/plugin-catalog-backend-module-unprocessed@0.3.0-next.3
- @backstage/plugin-devtools-backend@0.2.0-next.3
- @backstage/plugin-entity-feedback-backend@0.2.0-next.3
- @backstage/plugin-kafka-backend@0.3.0-next.3
- @backstage/plugin-lighthouse-backend@0.3.0-next.3
- @backstage/plugin-linguist-backend@0.5.0-next.3
- @backstage/plugin-todo-backend@0.3.0-next.3
- @backstage/plugin-app-backend@0.3.51-next.3
- @backstage/plugin-catalog-backend@1.13.0-next.3
- @backstage/plugin-events-backend@0.2.12-next.3
- @backstage/plugin-kubernetes-backend@0.11.6-next.3
- @backstage/plugin-permission-backend@0.5.26-next.3
- @backstage/plugin-scaffolder-backend@1.17.0-next.3
- @backstage/plugin-search-backend@1.4.3-next.3
- @backstage/plugin-search-backend-module-catalog@0.1.7-next.3
- @backstage/plugin-search-backend-module-elasticsearch@1.3.6-next.3
- @backstage/plugin-search-backend-module-explore@0.1.7-next.3
- @backstage/plugin-search-backend-module-pg@0.5.12-next.3
- @backstage/plugin-search-backend-module-techdocs@0.1.7-next.3
- @backstage/catalog-client@1.4.4-next.2
- @backstage/catalog-model@1.4.2-next.2
- @backstage/config@1.1.0-next.2
- @backstage/integration@1.7.0-next.3
- @backstage/plugin-permission-common@0.7.8-next.2
- @backstage/plugin-search-common@1.2.6-next.2
- @backstage/plugin-permission-node@0.7.14-next.3
- @backstage/plugin-catalog-backend-module-scaffolder-entity-model@0.1.0-next.0
- example-app@0.2.87-next.3
- @backstage/backend-common@0.19.5-next.3
- @backstage/plugin-explore-backend@0.0.13-next.3
- @backstage/backend-tasks@0.5.8-next.3
- @backstage/plugin-auth-node@0.3.0-next.3
- @backstage/plugin-azure-sites-backend@0.1.13-next.3
- @backstage/plugin-catalog-node@1.4.4-next.3
- @backstage/plugin-code-coverage-backend@0.2.17-next.3
- @backstage/plugin-events-node@0.2.12-next.3
- @backstage/plugin-graphql-backend@0.1.41-next.3
- @backstage/plugin-jenkins-backend@0.2.6-next.3
- @backstage/plugin-nomad-backend@0.1.5-next.3
- @backstage/plugin-playlist-backend@0.3.7-next.3
- @backstage/plugin-rollbar-backend@0.1.48-next.3
- @backstage/plugin-scaffolder-backend-module-confluence-to-markdown@0.2.4-next.3
- @backstage/plugin-scaffolder-backend-module-rails@0.4.20-next.3
- @backstage/plugin-search-backend-node@1.2.7-next.3
- @backstage/plugin-tech-insights-backend@0.5.17-next.3
- @backstage/plugin-tech-insights-backend-module-jsonfc@0.1.35-next.3
- @backstage/plugin-tech-insights-node@0.4.9-next.3
## 0.2.87-next.2
### Patch Changes
+2 -1
View File
@@ -1,6 +1,6 @@
{
"name": "example-backend",
"version": "0.2.87-next.2",
"version": "0.2.87-next.3",
"main": "dist/index.cjs.js",
"types": "src/index.ts",
"license": "Apache-2.0",
@@ -40,6 +40,7 @@
"@backstage/plugin-azure-sites-backend": "workspace:^",
"@backstage/plugin-badges-backend": "workspace:^",
"@backstage/plugin-catalog-backend": "workspace:^",
"@backstage/plugin-catalog-backend-module-scaffolder-entity-model": "workspace:^",
"@backstage/plugin-catalog-backend-module-unprocessed": "workspace:^",
"@backstage/plugin-catalog-node": "workspace:^",
"@backstage/plugin-code-coverage-backend": "workspace:^",
+2 -2
View File
@@ -15,11 +15,11 @@
*/
import { CatalogBuilder } from '@backstage/plugin-catalog-backend';
import { ScaffolderEntitiesProcessor } from '@backstage/plugin-scaffolder-backend';
import { ScaffolderEntitiesProcessor } from '@backstage/plugin-catalog-backend-module-scaffolder-entity-model';
import { UnprocessedEntitiesModule } from '@backstage/plugin-catalog-backend-module-unprocessed';
import { Router } from 'express';
import { PluginEnvironment } from '../types';
import { DemoEventBasedEntityProvider } from './DemoEventBasedEntityProvider';
import { UnprocessedEntitiesModule } from '@backstage/plugin-catalog-backend-module-unprocessed';
export default async function createPlugin(
env: PluginEnvironment,
+9
View File
@@ -1,5 +1,14 @@
# @backstage/catalog-client
## 1.4.4-next.2
### Patch Changes
- 406b786a2a2c: Mark package as being free of side effects, allowing more optimized Webpack builds.
- Updated dependencies
- @backstage/catalog-model@1.4.2-next.2
- @backstage/errors@1.2.2-next.0
## 1.4.4-next.1
### Patch Changes
+1 -1
View File
@@ -1,7 +1,7 @@
{
"name": "@backstage/catalog-client",
"description": "An isomorphic client for the catalog backend",
"version": "1.4.4-next.1",
"version": "1.4.4-next.2",
"main": "src/index.ts",
"types": "src/index.ts",
"license": "Apache-2.0",
+10
View File
@@ -1,5 +1,15 @@
# @backstage/catalog-model
## 1.4.2-next.2
### Patch Changes
- 406b786a2a2c: Mark package as being free of side effects, allowing more optimized Webpack builds.
- Updated dependencies
- @backstage/config@1.1.0-next.2
- @backstage/errors@1.2.2-next.0
- @backstage/types@1.1.1-next.0
## 1.4.2-next.1
### Patch Changes
+1 -1
View File
@@ -1,7 +1,7 @@
{
"name": "@backstage/catalog-model",
"description": "Types and validators that help describe the model of a Backstage Catalog",
"version": "1.4.2-next.1",
"version": "1.4.2-next.2",
"main": "src/index.ts",
"types": "src/index.ts",
"license": "Apache-2.0",
+9
View File
@@ -1,5 +1,14 @@
# @backstage/cli-node
## 0.1.4-next.0
### Patch Changes
- Updated dependencies
- @backstage/errors@1.2.2-next.0
- @backstage/types@1.1.1-next.0
- @backstage/cli-common@0.1.12
## 0.1.3
### Patch Changes
+1 -1
View File
@@ -1,7 +1,7 @@
{
"name": "@backstage/cli-node",
"description": "Node.js library for Backstage CLIs",
"version": "0.1.3",
"version": "0.1.4-next.0",
"main": "src/index.ts",
"types": "src/index.ts",
"license": "Apache-2.0",
+23
View File
@@ -1,5 +1,28 @@
# @backstage/cli
## 0.22.13-next.3
### Patch Changes
- 4d5eeec52d80: Add ESM loader for the experimental backend start command.
- 3494c502aba7: Added a new `repo fix` command that fixes auto-fixable problems in all packages. Initially the command fixes package export declarations, as well as marks all non-bundled frontend packages as side-effect free. Marking packages as free of side-effects can drastically reduce the Webpack bundle size.
- f36113ca2305: Add experimental support for frontend package discovery.
- a23fce763c6a: Fixed a bug where package exports entry points could not be `.tsx` files.
- 4af4defcc114: When running `version:bump` it will now log duplicates instead of throwing an error
- 956d226eeeee: Add `"sideEffects": false` to `package.json` in frontend package templates. This can be added to existing packages using the new `yarn fix` command.
- cd7331587eb3: Removed the experimental `package fix` command that was used to automatically add dependencies to `package.json`, but has since been replaced by the `no-undeclared-imports` rule from `@backstage/eslint-plugin`.
- Updated dependencies
- @backstage/catalog-model@1.4.2-next.2
- @backstage/config@1.1.0-next.2
- @backstage/errors@1.2.2-next.0
- @backstage/integration@1.7.0-next.3
- @backstage/release-manifests@0.0.10-next.1
- @backstage/types@1.1.1-next.0
- @backstage/cli-common@0.1.12
- @backstage/cli-node@0.1.4-next.0
- @backstage/config-loader@1.5.0-next.3
- @backstage/eslint-plugin@0.1.3
## 0.22.13-next.2
### Patch Changes
+1 -1
View File
@@ -1,7 +1,7 @@
{
"name": "@backstage/cli",
"description": "CLI for developing Backstage plugins and apps",
"version": "0.22.13-next.2",
"version": "0.22.13-next.3",
"publishConfig": {
"access": "public"
},
-142
View File
@@ -1,142 +0,0 @@
/*
* Copyright 2020 The Backstage Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { paths } from '../lib/paths';
import { ESLint } from 'eslint';
import { join as joinPath, basename } from 'path';
import fs from 'fs-extra';
import { isChildPath } from '@backstage/cli-common';
import { PackageGraph } from '@backstage/cli-node';
function isTestPath(filePath: string) {
if (!isChildPath(joinPath(paths.targetDir, 'src'), filePath)) {
return true;
}
const name = basename(filePath);
return (
name.startsWith('setupTests.') ||
name.includes('.test.') ||
name.includes('.stories.')
);
}
export async function command() {
const pkgJsonPath = paths.resolveTarget('package.json');
const pkg = await fs.readJson(pkgJsonPath);
if (pkg.workspaces) {
throw new Error(
'Adding dependencies to the workspace root is not supported',
);
}
const packages = await PackageGraph.listTargetPackages();
const localPackageVersions = new Map(
packages.map(p => [p.packageJson.name, p.packageJson.version]),
);
const eslint = new ESLint({
cwd: paths.targetDir,
overrideConfig: {
plugins: ['monorepo'],
rules: {
'import/no-extraneous-dependencies': [
'error',
{
devDependencies: [
`!${joinPath(paths.targetDir, 'src/**')}`,
joinPath(paths.targetDir, 'src/**/*.test.*'),
joinPath(paths.targetDir, 'src/**/*.stories.*'),
joinPath(paths.targetDir, 'src/setupTests.*'),
],
optionalDependencies: true,
peerDependencies: true,
bundledDependencies: true,
},
],
},
},
extensions: ['jsx', 'ts', 'tsx', 'mjs', 'cjs'],
});
const results = await eslint.lintFiles(['.']);
const addedDeps = new Set<string>();
const addedDevDeps = new Set<string>();
const removedDevDeps = new Set<string>();
for (const result of results) {
for (const message of result.messages) {
// Just in case
if (message.ruleId !== 'import/no-extraneous-dependencies') {
continue;
}
const match = message.message.match(/^'([^']*)' should be listed/);
if (!match) {
continue;
}
const packageName = match[1];
if (!localPackageVersions.has(packageName)) {
continue;
}
if (message.message.endsWith('not devDependencies.')) {
addedDeps.add(packageName);
removedDevDeps.add(packageName);
} else if (isTestPath(result.filePath)) {
addedDevDeps.add(packageName);
} else {
addedDeps.add(packageName);
}
}
}
if (addedDeps.size || addedDevDeps.size || removedDevDeps.size) {
for (const name of addedDeps) {
if (!pkg.dependencies) {
pkg.dependencies = {};
}
pkg.dependencies[name] = `^${localPackageVersions.get(name)}`;
}
for (const name of addedDevDeps) {
if (!pkg.devDependencies) {
pkg.devDependencies = {};
}
pkg.devDependencies[name] = `^${localPackageVersions.get(name)}`;
}
for (const name of removedDevDeps) {
delete pkg.devDependencies[name];
}
if (Object.keys(pkg.devDependencies).length === 0) {
delete pkg.devDependencies;
}
if (pkg.dependencies) {
pkg.dependencies = Object.fromEntries(
Object.entries(pkg.dependencies).sort(([a], [b]) => a.localeCompare(b)),
);
}
if (pkg.devDependencies) {
pkg.devDependencies = Object.fromEntries(
Object.entries(pkg.devDependencies).sort(([a], [b]) =>
a.localeCompare(b),
),
);
}
await fs.writeJson(pkgJsonPath, pkg, { spaces: 2 });
}
}
-6
View File
@@ -168,12 +168,6 @@ export function registerScriptCommand(program: Command) {
.description('Run tests, forwarding args to Jest, defaulting to watch mode')
.action(lazy(() => import('./test').then(m => m.default)));
command
.command('fix', { hidden: true })
.description('Applies automated fixes to the package. [EXPERIMENTAL]')
.option('--deps', 'Only fix monorepo dependencies in package.json')
.action(lazy(() => import('./fix').then(m => m.command)));
command
.command('clean')
.description('Delete cache directories')
+100 -40
View File
@@ -29,6 +29,7 @@ import { YarnInfoInspectData } from '../../lib/versioning/packages';
import { setupServer } from 'msw/node';
import { rest } from 'msw';
import { NotFoundError } from '@backstage/errors';
import { Lockfile } from '../../lib/versioning/Lockfile';
// Remove log coloring to simplify log matching
jest.mock('chalk', () => ({
@@ -224,7 +225,7 @@ describe('bump', () => {
});
});
it('should bump backstage dependencies but not them installed', async () => {
it('should bump backstage dependencies but not install them', async () => {
mockFs({
'/yarn.lock': lockfileMock,
'/package.json': JSON.stringify({
@@ -453,68 +454,36 @@ describe('bump', () => {
jest.spyOn(runObj, 'run').mockResolvedValue(undefined);
worker.use(
rest.get(
'https://versions.backstage.io/v1/releases/1.0.0/manifest.json',
(_, res, ctx) =>
res(
ctx.status(200),
ctx.json({
releaseVersion: '2.0.0',
packages: [
{ name: '@backstage/core', version: '5.0.0' },
{ name: '@backstage/core-api', version: '5.0.0' },
],
}),
),
'https://versions.backstage.io/v1/releases/999.0.1/manifest.json',
(_, res, ctx) => res(ctx.status(404), ctx.json({})),
),
);
const { log: logs } = await withLogCollector(['log'], async () => {
await expect(
bump({ pattern: null, release: '1.0.0' } as unknown as Command),
).rejects.toThrow('Duplicate versions present after package bump');
bump({ pattern: null, release: '999.0.1' } as unknown as Command),
).rejects.toThrow('No release found for 999.0.1 version');
});
expect(logs.filter(Boolean)).toEqual([
'Using default pattern glob @backstage/*',
'Checking for updates of @backstage/core',
'Checking for updates of @backstage/theme',
'Package info not found, ignoring package @backstage/theme',
'Checking for updates of @backstage/core',
'Checking for updates of @backstage/theme',
'Checking for updates of @backstage/core-api',
'Package info not found, ignoring package @backstage/theme',
'Some packages are outdated, updating',
'bumping @backstage/core in a to ^5.0.0',
'bumping @backstage/core in b to ^5.0.0',
'Your project is now at version 2.0.0, which has been written to backstage.json',
'Running yarn install to install new versions',
'⚠️ The following packages may have breaking changes:',
' @backstage/core : 1.0.3 ~> 5.0.0',
' https://github.com/backstage/backstage/blob/master/packages/core/CHANGELOG.md',
'Version bump complete!',
]);
expect(runObj.run).toHaveBeenCalledTimes(1);
expect(runObj.run).toHaveBeenCalledWith(
'yarn',
['install'],
expect.any(Object),
);
expect(runObj.run).toHaveBeenCalledTimes(0);
const packageA = await fs.readJson('/packages/a/package.json');
expect(packageA).toEqual({
name: 'a',
dependencies: {
'@backstage/core': '^5.0.0',
'@backstage/core': '^1.0.5',
},
});
const packageB = await fs.readJson('/packages/b/package.json');
expect(packageB).toEqual({
name: 'b',
dependencies: {
'@backstage/core': '^5.0.0',
'@backstage/core': '^1.0.3',
'@backstage/theme': '^1.0.0',
},
});
expect(await fs.readJson('/backstage.json')).toEqual({ version: '2.0.0' });
});
it('should prefer versions from the highest manifest version when main is not specified', async () => {
@@ -825,6 +794,97 @@ describe('bump', () => {
},
});
});
it('should log duplicates', async () => {
jest.spyOn(Lockfile.prototype, 'analyze').mockReturnValue({
invalidRanges: [],
newVersions: [],
newRanges: [
{
name: 'first-duplicate',
oldRange: 'first-duplicate',
newRange: 'first-duplicate',
oldVersion: '1.0.0',
newVersion: '2.0.0',
},
{
name: 'second-duplicate',
oldRange: 'second-duplicate',
newRange: 'second-duplicate',
oldVersion: '1.0.0',
newVersion: '2.0.0',
},
{
name: 'third-duplicate',
oldRange: 'third-duplicate',
newRange: 'third-duplicate',
oldVersion: '1.0.0',
newVersion: '2.0.0',
},
],
});
mockFs({
'/yarn.lock': lockfileMock,
'/package.json': JSON.stringify({
workspaces: {
packages: ['packages/*'],
},
}),
'/packages/a/package.json': JSON.stringify({
name: 'a',
dependencies: {
'@backstage/core': '^1.0.5',
},
}),
'/packages/b/package.json': JSON.stringify({
name: 'b',
dependencies: {
'@backstage/core': '^1.0.3',
'@backstage/theme': '^1.0.0',
},
}),
});
jest
.spyOn(paths, 'resolveTargetRoot')
.mockImplementation((...path) => resolvePath('/', ...path));
jest.spyOn(runObj, 'run').mockResolvedValue(undefined);
worker.use(
rest.get(
'https://versions.backstage.io/v1/tags/main/manifest.json',
(_, res, ctx) =>
res(
ctx.status(200),
ctx.json({
packages: [],
}),
),
),
);
const { log: logs } = await withLogCollector(['log'], async () => {
await bump({ pattern: null, release: 'main' } as unknown as Command);
});
expect(logs.filter(Boolean)).toEqual([
'Using default pattern glob @backstage/*',
'Checking for updates of @backstage/core',
'Checking for updates of @backstage/theme',
'Checking for updates of @backstage/core-api',
'Some packages are outdated, updating',
'unlocking @backstage/core@^1.0.3 ~> 1.0.6',
'unlocking @backstage/core-api@^1.0.6 ~> 1.0.7',
'unlocking @backstage/core-api@^1.0.3 ~> 1.0.7',
'bumping @backstage/core in a to ^1.0.6',
'bumping @backstage/core in b to ^1.0.6',
'bumping @backstage/theme in b to ^2.0.0',
'Running yarn install to install new versions',
'⚠️ The following packages may have breaking changes:',
' @backstage/theme : 1.0.0 ~> 2.0.0',
' https://github.com/backstage/backstage/blob/master/packages/theme/CHANGELOG.md',
'Version bump complete!',
'The following packages have duplicates but have been allowed:',
'first-duplicate, second-duplicate, third-duplicate',
]);
});
});
describe('bumpBackstageJsonVersion', () => {
+13 -4
View File
@@ -314,10 +314,6 @@ export default async (opts: OptionValues) => {
),
});
if (result.newVersions.length > 0) {
throw new Error('Duplicate versions present after package bump');
}
const forbiddenNewRanges = result.newRanges.filter(({ name }) =>
forbiddenDuplicatesFilter(name),
);
@@ -328,6 +324,19 @@ export default async (opts: OptionValues) => {
.join(', ')}`,
);
}
const allowedDuplicates = result.newRanges.filter(
({ name }) => !forbiddenDuplicatesFilter(name),
);
if (allowedDuplicates.length > 0) {
console.log(
chalk.yellow(
'The following packages have duplicates but have been allowed:',
),
);
console.log(chalk.yellow(allowedDuplicates.map(i => i.name).join(', ')));
}
};
export function createStrictVersionFinder(options: {
+10
View File
@@ -1,5 +1,15 @@
# @backstage/config-loader
## 1.5.0-next.3
### Patch Changes
- Updated dependencies
- @backstage/config@1.1.0-next.2
- @backstage/errors@1.2.2-next.0
- @backstage/types@1.1.1-next.0
- @backstage/cli-common@0.1.12
## 1.5.0-next.2
### Patch Changes
+1 -1
View File
@@ -1,7 +1,7 @@
{
"name": "@backstage/config-loader",
"description": "Config loading functionality used by Backstage backend, and CLI",
"version": "1.5.0-next.2",
"version": "1.5.0-next.3",
"publishConfig": {
"access": "public",
"main": "dist/index.cjs.js",
+9
View File
@@ -1,5 +1,14 @@
# @backstage/config
## 1.1.0-next.2
### Patch Changes
- 406b786a2a2c: Mark package as being free of side effects, allowing more optimized Webpack builds.
- Updated dependencies
- @backstage/errors@1.2.2-next.0
- @backstage/types@1.1.1-next.0
## 1.1.0-next.1
### Patch Changes
+1 -1
View File
@@ -1,7 +1,7 @@
{
"name": "@backstage/config",
"description": "Config API used by Backstage core, backend, and CLI",
"version": "1.1.0-next.1",
"version": "1.1.0-next.2",
"publishConfig": {
"access": "public",
"main": "dist/index.cjs.js",
+12
View File
@@ -1,5 +1,17 @@
# @backstage/core-app-api
## 1.10.0-next.3
### Patch Changes
- 406b786a2a2c: Mark package as being free of side effects, allowing more optimized Webpack builds.
- 9fe827b380e1: Internal refactor
- Updated dependencies
- @backstage/config@1.1.0-next.2
- @backstage/core-plugin-api@1.6.0-next.3
- @backstage/types@1.1.1-next.0
- @backstage/version-bridge@1.0.5-next.0
## 1.10.0-next.2
### Minor Changes
+1 -1
View File
@@ -1,7 +1,7 @@
{
"name": "@backstage/core-app-api",
"description": "Core app API used by Backstage apps",
"version": "1.10.0-next.2",
"version": "1.10.0-next.3",
"publishConfig": {
"access": "public"
},
@@ -40,7 +40,7 @@ describe('v1 consumer', () => {
};
const renderedHook = renderHook(() => useMockAppV1(), {
wrapper: ({ children }) => (
wrapper: ({ children }: React.PropsWithChildren<{}>) => (
<AppContextProvider appContext={mockContext} children={children} />
),
});
+5 -58
View File
@@ -14,7 +14,7 @@
* limitations under the License.
*/
import { AppConfig, Config } from '@backstage/config';
import { Config } from '@backstage/config';
import React, {
ComponentType,
PropsWithChildren,
@@ -81,6 +81,7 @@ import { InternalAppContext } from './InternalAppContext';
import { AppRouter, getBasePath } from './AppRouter';
import { AppTranslationProvider } from './AppTranslationProvider';
import { AppTranslationApiImpl } from '../apis/implementations/AppTranslationApi';
import { overrideBaseUrlConfigs } from './overrideBaseUrlConfigs';
type CompatiblePlugin =
| BackstagePlugin
@@ -88,17 +89,6 @@ type CompatiblePlugin =
output(): Array<{ type: 'feature-flag'; name: string }>;
});
/**
* Creates a base URL that uses to the current document origin.
*/
function createLocalBaseUrl(fullUrl: string): string {
const url = new URL(fullUrl);
url.protocol = document.location.protocol;
url.hostname = document.location.hostname;
url.port = document.location.port;
return url.toString().replace(/\/$/, '');
}
function useConfigLoader(
configLoader: AppConfigLoader | undefined,
components: AppComponents,
@@ -131,52 +121,9 @@ function useConfigLoader(
};
}
let configReader;
/**
* config.value can be undefined or empty. If it's either, don't bother overriding anything.
*/
if (config.value?.length) {
const urlConfigReader = ConfigReader.fromConfigs(config.value);
/**
* Test configs may not define `app.baseUrl` or `backend.baseUrl` and we
* don't want to enforce here.
*/
const appBaseUrl = urlConfigReader.getOptionalString('app.baseUrl');
const backendBaseUrl = urlConfigReader.getOptionalString('backend.baseUrl');
let configs = config.value;
const relativeResolverConfig: AppConfig = {
data: {},
context: 'relative-resolver',
};
if (appBaseUrl && backendBaseUrl) {
const appOrigin = new URL(appBaseUrl).origin;
const backendOrigin = new URL(backendBaseUrl).origin;
if (appOrigin === backendOrigin) {
const newBackendBaseUrl = createLocalBaseUrl(backendBaseUrl);
if (backendBaseUrl !== newBackendBaseUrl) {
relativeResolverConfig.data.backend = { baseUrl: newBackendBaseUrl };
}
}
}
if (appBaseUrl) {
const newAppBaseUrl = createLocalBaseUrl(appBaseUrl);
if (appBaseUrl !== newAppBaseUrl) {
relativeResolverConfig.data.app = { baseUrl: newAppBaseUrl };
}
}
/**
* Only add the relative config if there is actually data to add.
*/
if (Object.keys(relativeResolverConfig.data).length) {
configs = configs.concat([relativeResolverConfig]);
}
configReader = ConfigReader.fromConfigs(configs);
} else {
configReader = ConfigReader.fromConfigs([]);
}
const configReader = ConfigReader.fromConfigs(
config.value?.length ? overrideBaseUrlConfigs(config.value) : [],
);
return { api: configReader };
}
@@ -14,40 +14,38 @@
* limitations under the License.
*/
import { defaultConfigLoader } from './defaultConfigLoader';
import { defaultConfigLoaderSync } from './defaultConfigLoader';
(process as any).env = { NODE_ENV: 'test' };
const anyEnv = process.env as any;
const anyWindow = window as any;
describe('defaultConfigLoader', () => {
describe('defaultConfigLoaderSync', () => {
afterEach(() => {
delete anyEnv.APP_CONFIG;
delete anyWindow.__APP_CONFIG__;
});
it('loads static config', async () => {
it('loads static config', () => {
anyEnv.APP_CONFIG = [
{ data: { my: 'config' }, context: 'a' },
{ data: { my: 'override-config' }, context: 'b' },
];
const configs = await defaultConfigLoader();
const configs = defaultConfigLoaderSync();
expect(configs).toEqual([
{ data: { my: 'config' }, context: 'a' },
{ data: { my: 'override-config' }, context: 'b' },
]);
});
it('loads runtime config', async () => {
it('loads runtime config', () => {
anyEnv.APP_CONFIG = [
{ data: { my: 'override-config' }, context: 'a' },
{ data: { my: 'config' }, context: 'b' },
];
const configs = await (defaultConfigLoader as any)(
'{"my":"runtime-config"}',
);
const configs = (defaultConfigLoaderSync as any)('{"my":"runtime-config"}');
expect(configs).toEqual([
{ data: { my: 'override-config' }, context: 'a' },
{ data: { my: 'config' }, context: 'b' },
@@ -55,28 +53,28 @@ describe('defaultConfigLoader', () => {
]);
});
it('fails to load invalid missing config', async () => {
await expect(defaultConfigLoader()).rejects.toThrow(
it('fails to load invalid missing config', () => {
expect(() => defaultConfigLoaderSync()).toThrow(
'No static configuration provided',
);
});
it('fails to load invalid static config', async () => {
it('fails to load invalid static config', () => {
anyEnv.APP_CONFIG = { my: 'invalid-config' };
await expect(defaultConfigLoader()).rejects.toThrow(
expect(() => defaultConfigLoaderSync()).toThrow(
'Static configuration has invalid format',
);
});
it('fails to load bad runtime config', async () => {
it('fails to load bad runtime config', () => {
anyEnv.APP_CONFIG = [{ data: { my: 'config' }, context: 'a' }];
await expect((defaultConfigLoader as any)('}')).rejects.toThrow(
expect(() => defaultConfigLoaderSync('}')).toThrow(
'Failed to load runtime configuration, SyntaxError: Unexpected token } in JSON at position 0',
);
});
it('loads config from window.__APP_CONFIG__', async () => {
it('loads config from window.__APP_CONFIG__', () => {
anyEnv.APP_CONFIG = [
{ data: { my: 'config' }, context: 'a' },
{ data: { my: 'override-config' }, context: 'b' },
@@ -84,7 +82,7 @@ describe('defaultConfigLoader', () => {
const windowConfig = { app: { configKey: 'config-value' } };
anyWindow.__APP_CONFIG__ = windowConfig;
const configs = await defaultConfigLoader();
const configs = defaultConfigLoaderSync();
expect(configs).toEqual([
...anyEnv.APP_CONFIG,
@@ -30,12 +30,16 @@ import { AppConfigLoader } from './types';
*
* @public
*/
export const defaultConfigLoader: AppConfigLoader = async (
export const defaultConfigLoader: AppConfigLoader = async () =>
defaultConfigLoaderSync();
/** @internal */
export function defaultConfigLoaderSync(
// This string may be replaced at runtime to provide additional config.
// It should be replaced by a JSON-serialized config object.
// It's a param so we can test it, but at runtime this will always fall back to default.
runtimeConfigJson: string = '__APP_INJECTED_RUNTIME_CONFIG__',
) => {
) {
const appConfig = process.env.APP_CONFIG;
if (!appConfig) {
throw new Error('No static configuration provided');
@@ -70,4 +74,4 @@ export const defaultConfigLoader: AppConfigLoader = async (
});
}
return configs;
};
}
@@ -0,0 +1,84 @@
/*
* Copyright 2023 The Backstage Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { AppConfig, ConfigReader } from '@backstage/config';
/**
* Creates a base URL that uses to the current document origin.
*/
function createLocalBaseUrl(fullUrl: string): string {
const url = new URL(fullUrl);
url.protocol = document.location.protocol;
url.hostname = document.location.hostname;
url.port = document.location.port;
return url.toString().replace(/\/$/, '');
}
/**
* If we are able to override the app and backend base URLs to values that
* match the origin of the current location, then this function returns a
* new array of app configs that contain the overrides.
*
* @internal
*/
export function overrideBaseUrlConfigs(inputConfigs: AppConfig[]): AppConfig[] {
const urlConfigReader = ConfigReader.fromConfigs(inputConfigs);
// In tests we may not have `app.baseUrl` or `backend.baseUrl`, to keep them optional
const appBaseUrl = urlConfigReader.getOptionalString('app.baseUrl');
const backendBaseUrl = urlConfigReader.getOptionalString('backend.baseUrl');
let configs = inputConfigs;
let newBackendBaseUrl: string | undefined = undefined;
let newAppBaseUrl: string | undefined = undefined;
if (appBaseUrl && backendBaseUrl) {
const appOrigin = new URL(appBaseUrl).origin;
const backendOrigin = new URL(backendBaseUrl).origin;
if (appOrigin === backendOrigin) {
const maybeNewBackendBaseUrl = createLocalBaseUrl(backendBaseUrl);
if (backendBaseUrl !== maybeNewBackendBaseUrl) {
newBackendBaseUrl = maybeNewBackendBaseUrl;
}
}
}
if (appBaseUrl) {
const maybeNewAppBaseUrl = createLocalBaseUrl(appBaseUrl);
if (appBaseUrl !== maybeNewAppBaseUrl) {
newAppBaseUrl = maybeNewAppBaseUrl;
}
}
// Only add the relative config if there is actually data to add.
if (newAppBaseUrl || newBackendBaseUrl) {
configs = configs.concat({
data: {
app: newAppBaseUrl && {
baseUrl: newAppBaseUrl,
},
backend: newBackendBaseUrl && {
baseUrl: newBackendBaseUrl,
},
},
context: 'relative-resolver',
});
}
return configs;
}
@@ -353,7 +353,7 @@ describe('v1 consumer', () => {
initialProps: {
routeRef: routeRef1 as AnyRouteRef,
},
wrapper: ({ children }) => (
wrapper: ({ children }: React.PropsWithChildren<{}>) => (
<RoutingProvider
routePaths={
new Map<RouteRef<any>, string>([
@@ -385,7 +385,7 @@ describe('v1 consumer', () => {
initialProps: {
routeRef: routeRef1 as AnyRouteRef,
},
wrapper: ({ children }) => (
wrapper: ({ children }: React.PropsWithChildren<{}>) => (
<RoutingProvider
routePaths={
new Map<RouteRef<any>, string>([
+12
View File
@@ -1,5 +1,17 @@
# @backstage/core-components
## 0.13.5-next.3
### Patch Changes
- 406b786a2a2c: Mark package as being free of side effects, allowing more optimized Webpack builds.
- Updated dependencies
- @backstage/config@1.1.0-next.2
- @backstage/core-plugin-api@1.6.0-next.3
- @backstage/errors@1.2.2-next.0
- @backstage/theme@0.4.2-next.0
- @backstage/version-bridge@1.0.5-next.0
## 0.13.5-next.2
### Patch Changes
+2 -2
View File
@@ -347,10 +347,10 @@ export type EmptyStateImageClassKey = 'generalImg';
export const ErrorBoundary: ComponentClass<ErrorBoundaryProps, State>;
// @public (undocumented)
export type ErrorBoundaryProps = {
export type ErrorBoundaryProps = React_2.PropsWithChildren<{
slackChannel?: string | SlackChannel;
onError?: (error: Error, errorInfo: string) => null;
};
}>;
// Warning: (ae-forgotten-export) The symbol "IErrorPageProps" needs to be exported by the entry point index.d.ts
//
+1 -1
View File
@@ -1,7 +1,7 @@
{
"name": "@backstage/core-components",
"description": "Core components used by Backstage plugins and apps",
"version": "0.13.5-next.2",
"version": "0.13.5-next.3",
"publishConfig": {
"access": "public",
"main": "dist/index.esm.js",
@@ -134,7 +134,9 @@ describe('<Link />', () => {
});
describe('useResolvedPath', () => {
const wrapper: WrapperComponent<{}> = ({ children }) => {
const wrapper: WrapperComponent<React.PropsWithChildren<{}>> = ({
children,
}) => {
const configApi = new ConfigReader({
app: { baseUrl: 'http://localhost:3000/example' },
});
@@ -40,7 +40,7 @@ const lines = [
describe('useLogViewerSelection', () => {
it('should manage a selection', () => {
const rendered = renderHook(() => useLogViewerSelection(lines), {
wrapper: ({ children }) => (
wrapper: ({ children }: React.PropsWithChildren<{}>) => (
<TestApiProvider apis={[[errorApiRef, new MockErrorApi()]]}>
{children}
</TestApiProvider>
@@ -25,10 +25,10 @@ type SlackChannel = {
};
/** @public */
export type ErrorBoundaryProps = {
export type ErrorBoundaryProps = React.PropsWithChildren<{
slackChannel?: string | SlackChannel;
onError?: (error: Error, errorInfo: string) => null;
};
}>;
type State = {
error?: Error;
@@ -18,7 +18,7 @@ import { BackstageTheme } from '@backstage/theme';
import Grid from '@material-ui/core/Grid';
import { alpha, makeStyles } from '@material-ui/core/styles';
import Typography from '@material-ui/core/Typography';
import React from 'react';
import React, { PropsWithChildren } from 'react';
import { Link } from '../../components/Link';
/** @public */
@@ -46,10 +46,10 @@ const useStyles = makeStyles<BackstageTheme>(
{ name: 'BackstageHeaderLabel' },
);
type HeaderLabelContentProps = {
type HeaderLabelContentProps = PropsWithChildren<{
value: React.ReactNode;
className: string;
};
}>;
const HeaderLabelContent = ({ value, className }: HeaderLabelContentProps) => {
return (
@@ -55,18 +55,20 @@ describe('<HeaderTabs />', () => {
},
}));
const TextualBadge = React.forwardRef<HTMLSpanElement>((props, ref) => (
<Badge
classes={useStyles()}
overlap="rectangular"
color="secondary"
badgeContent="three new alarms"
>
<span ref={ref} {...props}>
{props.children}
</span>
</Badge>
));
const TextualBadge = React.forwardRef<HTMLSpanElement>(
(props: React.PropsWithChildren<{}>, ref) => (
<Badge
classes={useStyles()}
overlap="rectangular"
color="secondary"
badgeContent="three new alarms"
>
<span ref={ref} {...props}>
{props.children}
</span>
</Badge>
),
);
const iconTab = [
{
id: 'icon-tab',
+10
View File
@@ -1,5 +1,15 @@
# @backstage/core-plugin-api
## 1.6.0-next.3
### Patch Changes
- 406b786a2a2c: Mark package as being free of side effects, allowing more optimized Webpack builds.
- Updated dependencies
- @backstage/config@1.1.0-next.2
- @backstage/types@1.1.1-next.0
- @backstage/version-bridge@1.0.5-next.0
## 1.6.0-next.2
### Minor Changes
+1 -1
View File
@@ -1,7 +1,7 @@
{
"name": "@backstage/core-plugin-api",
"description": "Core API used by Backstage plugins",
"version": "1.6.0-next.2",
"version": "1.6.0-next.3",
"publishConfig": {
"access": "public"
},
@@ -18,10 +18,10 @@ import React from 'react';
import { AppContext } from '../app/types';
import { BackstagePlugin } from '../plugin';
type Props = {
type Props = React.PropsWithChildren<{
app: AppContext;
plugin: BackstagePlugin;
};
}>;
type State = { error: Error | undefined };
@@ -38,7 +38,7 @@ describe('usePluginOptions', () => {
});
const rendered = renderHook(() => usePluginOptions(), {
wrapper: ({ children }) => (
wrapper: ({ children }: React.PropsWithChildren<{}>) => (
<PluginProvider plugin={plugin}>{children}</PluginProvider>
),
});
@@ -36,7 +36,7 @@ describe('v1 consumer', () => {
const routeRef = createRouteRef({ id: 'ref1' });
const renderedHook = renderHook(() => useRouteRef(routeRef), {
wrapper: ({ children }) => (
wrapper: ({ children }: React.PropsWithChildren<{}>) => (
<MemoryRouter initialEntries={['/my-page']} children={children} />
),
});
@@ -60,7 +60,7 @@ describe('v1 consumer', () => {
history.push('/my-page');
const { rerender } = renderHook(() => useRouteRef(routeRef), {
wrapper: ({ children }) => (
wrapper: ({ children }: React.PropsWithChildren<{}>) => (
<Router
location={history.location}
navigator={history}
@@ -86,7 +86,7 @@ describe('v1 consumer', () => {
history.push('/my-page');
const { rerender } = renderHook(() => useRouteRef(routeRef), {
wrapper: ({ children }) => (
wrapper: ({ children }: React.PropsWithChildren<{}>) => (
<Router
location={history.location}
navigator={history}
@@ -112,7 +112,7 @@ describe('v1 consumer', () => {
history.push('/my-page');
const { rerender } = renderHook(() => useRouteRef(routeRef), {
wrapper: ({ children }) => (
wrapper: ({ children }: React.PropsWithChildren<{}>) => (
<Router
location={history.location}
navigator={history}
@@ -138,7 +138,7 @@ describe('v1 consumer', () => {
history.push('/my-page');
const { rerender } = renderHook(() => useRouteRef(routeRef), {
wrapper: ({ children }) => (
wrapper: ({ children }: React.PropsWithChildren<{}>) => (
<Router
location={history.location}
navigator={history}
+19
View File
@@ -1,5 +1,24 @@
# @backstage/create-app
## 0.5.5-next.3
### Patch Changes
- 4606e005df5d: Added a `fix` scripts that calls the new `backstage-cli repo fix` command.
To apply this change to an existing app, make the following change to your root `package.json`:
```diff
"test": "backstage-cli repo test",
"test:all": "backstage-cli repo test --coverage",
+ "fix": "backstage-cli repo fix",
"lint": "backstage-cli repo lint --since origin/master",
```
- 612594022245: Add a notification when `yarn install` is taking a long time.
- Updated dependencies
- @backstage/cli-common@0.1.12
## 0.5.5-next.2
### Patch Changes

Some files were not shown because too many files have changed in this diff Show More