Merge pull request #27804 from backstage/no-express-5-types
Fix issues with type incompatibility between major versions of @types/express
This commit is contained in:
@@ -0,0 +1,6 @@
|
||||
---
|
||||
'@backstage/cli': patch
|
||||
---
|
||||
|
||||
Remove special-casing for `@types` packages when generating dependency entries
|
||||
during templating
|
||||
@@ -0,0 +1,8 @@
|
||||
---
|
||||
'@backstage/plugin-auth-node': patch
|
||||
'@backstage/plugin-permission-backend': patch
|
||||
'@backstage/plugin-devtools-backend': patch
|
||||
'@backstage/plugin-signals-backend': patch
|
||||
---
|
||||
|
||||
Restrict `@types/express` version range from `*` to `^4.17.6`.
|
||||
@@ -66,6 +66,10 @@ describe('createPackageVersionProvider', () => {
|
||||
expect(provider('c', '0.3.0-rc1')).toBe('0.3.0-rc1');
|
||||
expect(provider('c', '0.3.0')).toBe('^0.3.0');
|
||||
expect(provider('c', '0.3.6')).toBe('^0.3.4');
|
||||
|
||||
// No special handling for @types packages.
|
||||
expect(provider('@types/t', '1.4.2')).toBe('^1.2.3');
|
||||
|
||||
const cliVersion = packageVersions['@backstage/cli'];
|
||||
expect(provider('@backstage/cli')).toBe(
|
||||
// If we're currently in pre-release we expect that to be picked instead
|
||||
@@ -74,6 +78,5 @@ describe('createPackageVersionProvider', () => {
|
||||
expect(provider('@backstage/core-plugin-api')).toBe(
|
||||
`^${corePluginApiPkg.version}`,
|
||||
);
|
||||
expect(provider('@types/t', '1.4.2')).toBe('*');
|
||||
});
|
||||
});
|
||||
|
||||
@@ -90,12 +90,6 @@ export function createPackageVersionProvider(lockfile?: Lockfile) {
|
||||
}
|
||||
|
||||
const lockfileEntries = lockfile?.get(name);
|
||||
if (
|
||||
name.startsWith('@types/') &&
|
||||
lockfileEntries?.some(entry => entry.range === '*')
|
||||
) {
|
||||
return '*';
|
||||
}
|
||||
|
||||
for (const specifier of ['^', '~', '*']) {
|
||||
const range = `workspace:${specifier}`;
|
||||
|
||||
@@ -44,7 +44,7 @@
|
||||
"@backstage/config": "workspace:^",
|
||||
"@backstage/errors": "workspace:^",
|
||||
"@backstage/types": "workspace:^",
|
||||
"@types/express": "*",
|
||||
"@types/express": "^4.17.6",
|
||||
"@types/passport": "^1.0.3",
|
||||
"express": "^4.17.1",
|
||||
"jose": "^5.0.0",
|
||||
|
||||
@@ -49,7 +49,7 @@
|
||||
"@backstage/plugin-permission-node": "workspace:^",
|
||||
"@backstage/types": "workspace:^",
|
||||
"@manypkg/get-packages": "^1.1.3",
|
||||
"@types/express": "*",
|
||||
"@types/express": "^4.17.6",
|
||||
"@yarnpkg/lockfile": "^1.1.0",
|
||||
"@yarnpkg/parsers": "^3.0.0",
|
||||
"express": "^4.18.1",
|
||||
|
||||
@@ -58,7 +58,7 @@
|
||||
"@backstage/plugin-auth-node": "workspace:^",
|
||||
"@backstage/plugin-permission-common": "workspace:^",
|
||||
"@backstage/plugin-permission-node": "workspace:^",
|
||||
"@types/express": "*",
|
||||
"@types/express": "^4.17.6",
|
||||
"dataloader": "^2.0.0",
|
||||
"express": "^4.17.1",
|
||||
"express-promise-router": "^4.1.0",
|
||||
|
||||
@@ -44,7 +44,7 @@
|
||||
"@backstage/plugin-events-node": "workspace:^",
|
||||
"@backstage/plugin-signals-node": "workspace:^",
|
||||
"@backstage/types": "workspace:^",
|
||||
"@types/express": "*",
|
||||
"@types/express": "^4.17.6",
|
||||
"express": "^4.17.1",
|
||||
"express-promise-router": "^4.1.0",
|
||||
"http-proxy-middleware": "^2.0.0",
|
||||
|
||||
@@ -5323,7 +5323,7 @@ __metadata:
|
||||
"@backstage/config": "workspace:^"
|
||||
"@backstage/errors": "workspace:^"
|
||||
"@backstage/types": "workspace:^"
|
||||
"@types/express": "*"
|
||||
"@types/express": ^4.17.6
|
||||
"@types/passport": ^1.0.3
|
||||
cookie-parser: ^1.4.6
|
||||
express: ^4.17.1
|
||||
@@ -6164,7 +6164,7 @@ __metadata:
|
||||
"@backstage/plugin-permission-node": "workspace:^"
|
||||
"@backstage/types": "workspace:^"
|
||||
"@manypkg/get-packages": ^1.1.3
|
||||
"@types/express": "*"
|
||||
"@types/express": ^4.17.6
|
||||
"@types/ping": ^0.4.1
|
||||
"@types/supertest": ^2.0.8
|
||||
"@types/yarnpkg__lockfile": ^1.1.4
|
||||
@@ -6902,7 +6902,7 @@ __metadata:
|
||||
"@backstage/plugin-auth-node": "workspace:^"
|
||||
"@backstage/plugin-permission-common": "workspace:^"
|
||||
"@backstage/plugin-permission-node": "workspace:^"
|
||||
"@types/express": "*"
|
||||
"@types/express": ^4.17.6
|
||||
"@types/lodash": ^4.14.151
|
||||
"@types/supertest": ^2.0.8
|
||||
dataloader: ^2.0.0
|
||||
@@ -7868,7 +7868,7 @@ __metadata:
|
||||
"@backstage/plugin-events-node": "workspace:^"
|
||||
"@backstage/plugin-signals-node": "workspace:^"
|
||||
"@backstage/types": "workspace:^"
|
||||
"@types/express": "*"
|
||||
"@types/express": ^4.17.6
|
||||
"@types/supertest": ^2.0.8
|
||||
"@types/ws": ^8.5.10
|
||||
express: ^4.17.1
|
||||
|
||||
Reference in New Issue
Block a user