added the frontend-extension-bundle role
Co-authored-by: Patrik Oldsberg <poldsberg@gmail.com> Co-authored-by: Camila Belo <camilaibs@gmail.com> Co-authored-by: blam <ben@blam.sh> Signed-off-by: Fredrik Adelöw <freben@gmail.com>
This commit is contained in:
@@ -25,7 +25,11 @@ async function main() {
|
||||
|
||||
for (const pkg of packages) {
|
||||
pkgRole = pkg.packageJson.backstage?.role;
|
||||
if (pkgRole === 'frontend-plugin' || pkgRole === 'web-library') {
|
||||
if (
|
||||
pkgRole === 'frontend-plugin' ||
|
||||
pkgRole === 'web-library' ||
|
||||
pkgRole === 'frontend-extension-bundle'
|
||||
) {
|
||||
const depKeys = Object.keys(pkg.packageJson.dependencies);
|
||||
if (depKeys.findIndex(d => d.includes('@material-ui')) !== -1) {
|
||||
const eslintrcPath = join(pkg.dir, '.eslintrc.js');
|
||||
|
||||
@@ -41,7 +41,12 @@ const roleRules = [
|
||||
},
|
||||
{
|
||||
sourceRole: ['backend-plugin', 'node-library', 'backend-plugin-module'],
|
||||
targetRole: ['frontend-plugin', 'web-library'],
|
||||
targetRole: [
|
||||
'frontend-plugin',
|
||||
'web-library',
|
||||
'frontend-plugin-module',
|
||||
'frontend-extension-bundle',
|
||||
],
|
||||
message: `Package SOURCE_NAME with backend role SOURCE_ROLE has a dependency on package TARGET_NAME with frontend role TARGET_ROLE, which is not permitted`,
|
||||
},
|
||||
{
|
||||
@@ -49,6 +54,8 @@ const roleRules = [
|
||||
targetRole: [
|
||||
'frontend-plugin',
|
||||
'web-library',
|
||||
'frontend-plugin-module',
|
||||
'frontend-extension-bundle',
|
||||
'backend-plugin',
|
||||
'node-library',
|
||||
'backend-plugin-module',
|
||||
@@ -57,7 +64,11 @@ const roleRules = [
|
||||
},
|
||||
{
|
||||
sourceRole: ['frontend-plugin', 'web-library'],
|
||||
targetRole: 'frontend-plugin',
|
||||
targetRole: [
|
||||
'frontend-plugin',
|
||||
'frontend-plugin-module',
|
||||
'frontend-extension-bundle',
|
||||
],
|
||||
except: [
|
||||
// TODO(freben): Address these
|
||||
'@backstage/plugin-api-docs',
|
||||
|
||||
Reference in New Issue
Block a user