diff --git a/packages/cli/templates/default-app/package.json.hbs b/packages/cli/templates/default-app/package.json.hbs index 1712584a87..589e20e298 100644 --- a/packages/cli/templates/default-app/package.json.hbs +++ b/packages/cli/templates/default-app/package.json.hbs @@ -17,7 +17,8 @@ "lint": "lerna run lint --since origin/master --", "lint:all": "lerna run lint --", "create-plugin": "backstage-cli create-plugin", - "remove-plugin": "backstage-cli remove-plugin" + "remove-plugin": "backstage-cli remove-plugin", + "postinstall": "patch-package" }, "workspaces": { "packages": [ @@ -28,6 +29,7 @@ "devDependencies": { "@backstage/cli": "^{{version}}", "lerna": "^3.20.2", + "patch-package": "^6.2.2", "prettier": "^1.19.1" } } diff --git a/packages/cli/templates/default-app/patches/README.md b/packages/cli/templates/default-app/patches/README.md new file mode 100644 index 0000000000..980729c4cd --- /dev/null +++ b/packages/cli/templates/default-app/patches/README.md @@ -0,0 +1,11 @@ +# patches + +This folder contains patches for dependency type declarations. Typescript doesn't provide a way to override of fix types that are installed as a part of the dependent package itself. + +Do not add any more patches here, these patches were added as a part of getting the entire repo type-checked, and we depended on some packages with bad types. + +As soon as the below issues are fixed, we should remove the patching functionality completely. + +## material-table + +Fixed in master but not released yet, tracked here: https://github.com/mbrn/material-table/pull/1624 diff --git a/packages/cli/templates/default-app/patches/material-table+1.57.2.patch b/packages/cli/templates/default-app/patches/material-table+1.57.2.patch new file mode 100644 index 0000000000..5751243775 --- /dev/null +++ b/packages/cli/templates/default-app/patches/material-table+1.57.2.patch @@ -0,0 +1,12 @@ +diff --git a/node_modules/material-table/types/index.d.ts b/node_modules/material-table/types/index.d.ts +index 06b700b..5b3c765 100644 +--- a/node_modules/material-table/types/index.d.ts ++++ b/node_modules/material-table/types/index.d.ts +@@ -228,7 +228,6 @@ export interface Options { + showTitle?: boolean; + showTextRowsSelected?: boolean; + search?: boolean; +- searchText?: string; + searchFieldAlignment?: 'left' | 'right'; + searchFieldStyle?: React.CSSProperties; + searchText?: string;