diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 4e6c7eded..4b8e13ea7 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -70,7 +70,7 @@ jobs: else if [ "$released_packages" != "" ]; then echo -e "# Release notes for packages that will be published after merge\n\n" > release_notes.txt - echo "$release_notes" | sed 's/\x1B\[[0-9;]\{1,\}[A-Za-z]//g' | sed '/^##/,$!d' >> release_notes.txt + echo "$release_notes" | sed 's/\x1B\[[0-9;]\{1,\}[A-Za-z]//g' | sed -ne '/[0-9]*:[0-9]*:[0-9]* *[AP]M\] *\[semantic-release\] *› *ℹ *Release note for version/,$ p' >> release_notes.txt gh pr comment "${{ github.event.pull_request.number }}" --body-file ./release_notes.txt rm -f release_notes.txt else diff --git a/packages/casl-react/README.md b/packages/casl-react/README.md index e624c1393..c7aa603d6 100644 --- a/packages/casl-react/README.md +++ b/packages/casl-react/README.md @@ -205,14 +205,22 @@ export default () => { ### Usage note on React < 16.4 with TypeScript -If you use TypeScript and React < 16.4 make sure to add `@casl/react/contextAPIPatch.d.ts` file in your `tscofig.json`, otherwise your app won't compile: +If you use TypeScript and React < 16.4 make sure to create a file `contextAPIPatch.d.ts` file with the next content: + +```ts +declare module 'react' { + export type Consumer = any; +} +``` + +and include it in your `tscofig.json`, otherwise your app won't compile: ```json { // other configuration options "include": [ "src/**/*", - "@casl/react/contextAPIPatch.d.ts" // <-- add this line + "./contextAPIPatch.d.ts" // <-- add this line ] } ``` diff --git a/packages/casl-react/contextApiPatch.d.ts b/packages/casl-react/contextApiPatch.d.ts deleted file mode 100644 index 831fddc2b..000000000 --- a/packages/casl-react/contextApiPatch.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -declare module 'react' { - export type Consumer = any; -}