Skip to content

Commit

Permalink
fix: remove code needed prior react 18 to fix release of webcomponent (
Browse files Browse the repository at this point in the history
  • Loading branch information
derberg authored Jun 25, 2024
1 parent 99bce32 commit 5871fa2
Show file tree
Hide file tree
Showing 6 changed files with 21 additions and 6 deletions.
18 changes: 18 additions & 0 deletions .github/workflows/release-wc-and-playground.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,15 @@ jobs:
package: ./web-component/package.json
access: public
tag: github.event.release.target_commitish
- if: failure() # Only, on failure, send a message on the 94_bot-failing-ci slack channel
name: Report workflow run status to Slack
uses: 8398a7/action-slack@v3
with:
status: ${{ job.status }}
fields: repo,action,workflow
text: 'Release of web component for AsyncAPI React failed'
env:
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_CI_FAIL_NOTIFY }}

playground:
name: Release Playground
Expand Down Expand Up @@ -89,3 +98,12 @@ jobs:
folder: playground/out
git-config-name: asyncapi-bot
git-config-email: [email protected]
- if: failure() # Only, on failure, send a message on the 94_bot-failing-ci slack channel
name: Report workflow run status to Slack
uses: 8398a7/action-slack@v3
with:
status: ${{ job.status }}
fields: repo,action,workflow
text: 'Release of playground for AsyncAPI React failed'
env:
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_CI_FAIL_NOTIFY }}
1 change: 0 additions & 1 deletion playground/app/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,6 @@ class Playground extends Component<unknown, State> {
</Tabs>
</CodeEditorsWrapper>
<AsyncApiWrapper>
{/* @ts-expect-error remove when library and web-component is upgraded to React v18 */}
<AsyncApi schema={schema} config={parsedConfig} />
</AsyncApiWrapper>
</SplitWrapper>
Expand Down
1 change: 0 additions & 1 deletion playground/components/CodeEditorComponent.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@ class CodeEditorComponent extends Component<Props, State> {

return (
<CodeEditorWrapper>
{/* @ts-expect-error remove when library and web-component is upgraded to React v18 */}
<CodeMirror
value={code}
basicSetup={{
Expand Down
1 change: 0 additions & 1 deletion playground/components/SplitWrapper.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ interface SplitWrapperProps {
// react-split should be replaced with a React 18 friendly library or CSS
const SplitWrapper = (props: SplitWrapperProps) => (
<>
{/* @ts-expect-error upgrade React to v18 */}
<Split
style={{
width: '100%',
Expand Down
4 changes: 2 additions & 2 deletions web-component/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,8 @@
},
"dependencies": {
"@asyncapi/react-component": "^1.4.10",
"react": "^18",
"react-dom": "^18",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"web-react-components": "^1.4.2"
},
"devDependencies": {
Expand Down
2 changes: 1 addition & 1 deletion web-component/webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ module.exports = {
// 2. You might be breaking the Rules of Hooks
// 3. You might have more than one copy of React in the same app
// See https://reactjs.org/link/invalid-hook-call for tips about how to debug and fix this problem."
react: path.resolve('./node_modules/react'),
react: path.resolve('../node_modules/react'),
},
fallback: {
fs: false,
Expand Down

0 comments on commit 5871fa2

Please sign in to comment.