Merge pull request #14806 from casje896/deprecations_catalog_backend
Deprecations catalog backend
This commit is contained in:
@@ -0,0 +1,5 @@
|
||||
---
|
||||
'@backstage/plugin-catalog-backend': patch
|
||||
---
|
||||
|
||||
Fixed deprecated use of `substr` into `substring`.
|
||||
@@ -107,7 +107,7 @@ export class PlaceholderProcessor implements CatalogProcessor {
|
||||
return [data, false];
|
||||
}
|
||||
|
||||
const resolverKey = keys[0].substr(1);
|
||||
const resolverKey = keys[0].substring(1);
|
||||
const resolverValue = data[keys[0]];
|
||||
|
||||
const resolver = this.options.resolvers[resolverKey];
|
||||
|
||||
@@ -63,9 +63,13 @@ export function parseEntityFilterString(
|
||||
const equalsIndex = statement.indexOf('=');
|
||||
|
||||
const key =
|
||||
equalsIndex === -1 ? statement : statement.substr(0, equalsIndex).trim();
|
||||
equalsIndex === -1
|
||||
? statement
|
||||
: statement.substring(0, equalsIndex).trim();
|
||||
const value =
|
||||
equalsIndex === -1 ? undefined : statement.substr(equalsIndex + 1).trim();
|
||||
equalsIndex === -1
|
||||
? undefined
|
||||
: statement.substring(equalsIndex + 1).trim();
|
||||
if (!key) {
|
||||
throw new InputError(
|
||||
`Invalid filter, '${statement}' is not a valid statement (expected a string on the form a=b or a= or a)`,
|
||||
|
||||
Reference in New Issue
Block a user