Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: remove code needed prior react 18 to fix release of webcomponent #1019

Merged
merged 1 commit into from
Jun 25, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading