Skip to content

Commit

Permalink
Merge branch 'master' into fix-wrong-enum
Browse files Browse the repository at this point in the history
  • Loading branch information
JeelRajodiya authored Oct 29, 2024
2 parents ef7af4b + 85c9a35 commit 592f713
Show file tree
Hide file tree
Showing 232 changed files with 1,604 additions and 983 deletions.
9 changes: 9 additions & 0 deletions .all-contributorsrc
Original file line number Diff line number Diff line change
Expand Up @@ -555,6 +555,15 @@
"contributions": [
"doc"
]
},
{
"login": "raj17ce",
"name": "Raj Patel",
"avatar_url": "https://avatars.githubusercontent.com/u/116947399?v=4",
"profile": "https://github.com/raj17ce",
"contributions": [
"code"
]
}
],
"contributorsPerLine": 7,
Expand Down
55 changes: 53 additions & 2 deletions .github/workflows/if-nodejs-pr-testing.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,10 @@
name: PR testing - if Node project

on:
pull_request:
pull_request_target:
types: [opened, reopened, synchronize, ready_for_review]
push:
branches: [master]

jobs:
test-nodejs-pr:
Expand Down Expand Up @@ -40,6 +42,11 @@ jobs:
- if: steps.should_run.outputs.shouldrun == 'true'
name: Checkout repository
uses: actions/checkout@v4
with:
# Checkout the merge commit instead of the pull request head commit for a pull request
# Fallback to the head commit if its not a pull request
ref: ${{ github.event.pull_request.number != '' && format('refs/pull/{0}/merge', github.event.pull_request.number) || github.ref }}

- if: steps.should_run.outputs.shouldrun == 'true'
name: Check if Node.js project and has package.json
id: packagejson
Expand All @@ -59,7 +66,7 @@ jobs:
name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: "${{ steps.nodeversion.outputs.version }}"
node-version: '${{ steps.nodeversion.outputs.version }}'
- name: Install dependencies
run: npm ci
- if: steps.packagejson.outputs.exists == 'true'
Expand All @@ -72,3 +79,47 @@ jobs:
name: Run release assets generation to make sure PR does not break it
shell: bash
run: npm run generate:assets --if-present

# Run the test:md script and capture output
- if: ${{ steps.packagejson.outputs.exists == 'true' && matrix.os == 'ubuntu-latest' }}
name: Run markdown checks
id: markdown_check
run: |
ERRORS=$(npm run test:md | sed -n '/Errors in file/,$p')
echo "markdown_output<<EOF" >> $GITHUB_OUTPUT
echo "$ERRORS" >> $GITHUB_OUTPUT
echo "EOF" >> $GITHUB_OUTPUT
# Post a comment using sticky-pull-request-comment
- name: Comment on PR with markdown issues
if: ${{ steps.markdown_check.outputs.markdown_output != '' && matrix.os == 'ubuntu-latest' }}
uses: marocchino/sticky-pull-request-comment@3d60a5b2dae89d44e0c6ddc69dd7536aec2071cd
with:
header: markdown-check-error
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}
message: |
### Markdown Check Results
We found issues in the following markdown files:
```
${{ steps.markdown_check.outputs.markdown_output }}
```
# Delete the comment if there are no issues
- if: ${{ steps.markdown_check.outputs.markdown_output == '' && matrix.os == 'ubuntu-latest' }}
name: Delete markdown check comment
uses: marocchino/sticky-pull-request-comment@3d60a5b2dae89d44e0c6ddc69dd7536aec2071cd
with:
header: markdown-check-error
delete: true
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}

- if: steps.packagejson.outputs.exists == 'true'
name: Upload Coverage to Codecov
uses: codecov/codecov-action@e28ff129e5465c2c0dcc6f003fc735cb6ae0c673
with:
fail_ci_if_error: true
files: ./coverage/lcov.info
token: ${{ secrets.CODECOV_TOKEN }}
verbose: true
8 changes: 4 additions & 4 deletions .github/workflows/regenerate-meetings-and-videos.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: List everyday latest list of AsyncAPI Meetings, Newsroom Videos and Dashboard data.

on:
on:
workflow_dispatch:
schedule:
#every day at midnight
Expand All @@ -23,7 +23,7 @@ jobs:
- name: Check package-lock version
uses: asyncapi/.github/.github/actions/get-node-version-from-package-lock@master
id: lockversion

- name: Use Node.js
uses: actions/setup-node@v3
with:
Expand All @@ -45,7 +45,7 @@ jobs:
committer: asyncapi-bot <[email protected]>
author: asyncapi-bot <[email protected]>
title: 'chore: update meetings.json and newsrooom_videos.json'
branch: update-meetings/${{ github.job }}
branch: update-meetings/${{ github.sha }}
- 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@fbd6aa58ba854a740e11a35d0df80cb5d12101d8 #using https://github.com/8398a7/action-slack/releases/tag/v3.15.1
Expand All @@ -54,4 +54,4 @@ jobs:
fields: repo,action,workflow
text: 'AsyncAPI Meetings and Videos workflow failed'
env:
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_CI_FAIL_NOTIFY }}
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_CI_FAIL_NOTIFY }}
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -395,6 +395,9 @@ Thanks goes to these wonderful people ([emoji key](https://allcontributors.org/d
<td align="center" valign="top" width="14.28%"><a href="https://github.com/Shiva953"><img src="https://avatars.githubusercontent.com/u/120790871?v=4?s=100" width="100px;" alt="Neutron"/><br /><sub><b>Neutron</b></sub></a><br /><a href="https://github.com/asyncapi/website/commits?author=Shiva953" title="Code">💻</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://github.com/sagarkori143"><img src="https://avatars.githubusercontent.com/u/129517558?v=4?s=100" width="100px;" alt="Sagar Kori"/><br /><sub><b>Sagar Kori</b></sub></a><br /><a href="https://github.com/asyncapi/website/commits?author=sagarkori143" title="Documentation">📖</a></td>
</tr>
<tr>
<td align="center" valign="top" width="14.28%"><a href="https://github.com/raj17ce"><img src="https://avatars.githubusercontent.com/u/116947399?v=4?s=100" width="100px;" alt="Raj Patel"/><br /><sub><b>Raj Patel</b></sub></a><br /><a href="https://github.com/asyncapi/website/commits?author=raj17ce" title="Code">💻</a></td>
</tr>
</tbody>
</table>

Expand Down
11 changes: 9 additions & 2 deletions components/AlgoliaSearch.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import clsx from 'clsx';
import Head from 'next/head';
import Link from 'next/link';
import { useRouter } from 'next/router';
import { createContext, useCallback, useContext, useEffect, useRef, useState } from 'react';
import React, { createContext, useCallback, useContext, useEffect, useRef, useState } from 'react';
import { createPortal } from 'react-dom';

export const INDEX_NAME = 'asyncapi';
Expand Down Expand Up @@ -283,6 +283,7 @@ export default function AlgoliaSearch({ children }: { children: React.ReactNode
*/
export function SearchButton({ children, indexName = INDEX_NAME, ...props }: ISearchButtonProps) {
const { onOpen, onInput } = useContext(SearchContext);
const [Children, setChildren] = useState<string | React.ReactNode>('');
const searchButtonRef = useRef<HTMLButtonElement>(null);
const actionKey = getActionKey();

Expand All @@ -308,6 +309,12 @@ export function SearchButton({ children, indexName = INDEX_NAME, ...props }: ISe
};
}, [onInput, searchButtonRef]);

useEffect(() => {
if (typeof children === 'function') {
setChildren(children({ actionKey }));
}
}, []);

return (
<button
type='button'
Expand All @@ -318,7 +325,7 @@ export function SearchButton({ children, indexName = INDEX_NAME, ...props }: ISe
{...props}
data-testid='Search-Button'
>
{typeof children === 'function' ? children({ actionKey }) : children}
{Children}
</button>
);
}
12 changes: 10 additions & 2 deletions components/Avatar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,17 @@ export default function Avatar({ name, photo, link, className }: AvatarProps) {
);

return link ? (
<a href={link} data-testid='Avatars-link'>
<button
onClick={(e) => {
e.preventDefault();

window.open(link, '_blank');
}}
data-testid='Avatars-link'
className='cursor-pointer border-none bg-inherit p-0'
>
{avatar}
</a>
</button>
) : (
<React.Fragment>{avatar}</React.Fragment>
);
Expand Down
1 change: 1 addition & 0 deletions components/Calendar.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import moment from 'moment';
import React from 'react';
import { twMerge } from 'tailwind-merge';

import type { IEvent } from '@/types/event';
Expand Down
2 changes: 2 additions & 0 deletions components/CaseStudyCard.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import React from 'react';

import type { ICaseStudies } from '@/types/post';
import { ParagraphTypeStyle } from '@/types/typography/Paragraph';

Expand Down
2 changes: 1 addition & 1 deletion components/CaseTOC.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { useMemo, useState } from 'react';
import React, { useMemo, useState } from 'react';
import { twMerge } from 'tailwind-merge';

import { useHeadingsObserver } from './helpers/useHeadingsObserver';
Expand Down
1 change: 1 addition & 0 deletions components/ClickableLogo.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import Link from 'next/link';
import React from 'react';

import AsyncAPILogo from './logos/AsyncAPILogo';

Expand Down
2 changes: 1 addition & 1 deletion components/DemoAnimation.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { useEffect, useState } from 'react';
import React, { useEffect, useState } from 'react';
import Typing from 'react-typist-component';

import { HeadingLevel, HeadingTypeStyle } from '@/types/typography/Heading';
Expand Down
2 changes: 1 addition & 1 deletion components/Feedback.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { useRouter } from 'next/router';
import { useEffect, useState } from 'react';
import React, { useEffect, useState } from 'react';

import GitHubIssue from './buttons/GitHubIssue';

Expand Down
2 changes: 2 additions & 0 deletions components/Figure.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import React from 'react';

import { Float } from '@/types/components/FigurePropsType';

import Caption from './Caption';
Expand Down
2 changes: 2 additions & 0 deletions components/FinancialSummary/AsyncAPISummary.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import React from 'react';

import { HeadingLevel, HeadingTypeStyle } from '@/types/typography/Heading';
import { ParagraphTypeStyle } from '@/types/typography/Paragraph';

Expand Down
2 changes: 2 additions & 0 deletions components/FinancialSummary/Card.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import React from 'react';

import type { ExpenseItem, Expenses } from '@/types/FinancialSummary/BarChartComponent';

import ExpensesLinkData from '../../config/finance/json-data/ExpensesLink.json';
Expand Down
2 changes: 2 additions & 0 deletions components/FinancialSummary/ContactUs.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import React from 'react';

import { HeadingLevel, HeadingTypeStyle } from '@/types/typography/Heading';
import { ParagraphTypeStyle } from '@/types/typography/Paragraph';

Expand Down
2 changes: 2 additions & 0 deletions components/FinancialSummary/CustomTooltip.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import React from 'react';

import type { CustomTooltipProps } from '@/types/FinancialSummary/BarChartComponent';

/**
Expand Down
2 changes: 2 additions & 0 deletions components/FinancialSummary/ExpenseBreakdown.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import React from 'react';

import { ParagraphTypeStyle } from '@/types/typography/Paragraph';

import { expenseData } from '../data/ExpenseBreakdownData';
Expand Down
2 changes: 2 additions & 0 deletions components/FinancialSummary/ExpensesCard.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import React from 'react';

import type { Expenses } from '@/types/FinancialSummary/BarChartComponent';

import ExpensesData from '../../config/finance/json-data/Expenses.json';
Expand Down
2 changes: 2 additions & 0 deletions components/FinancialSummary/OtherFormsComponent.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import React from 'react';

import { ParagraphTypeStyle } from '@/types/typography/Paragraph';

import { otherFormsData } from '../data/otherFormsData';
Expand Down
2 changes: 2 additions & 0 deletions components/FinancialSummary/SponsorshipTiers.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import React from 'react';

import { HeadingLevel, HeadingTypeStyle } from '@/types/typography/Heading';
import { ParagraphTypeStyle } from '@/types/typography/Paragraph';

Expand Down
2 changes: 2 additions & 0 deletions components/FinancialSummary/SuccessStories.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import React from 'react';

import { successStories } from '../data/successStoriesData';

/**
Expand Down
2 changes: 1 addition & 1 deletion components/GeneratorInstallation.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { useState } from 'react';
import React, { useState } from 'react';

import { ParagraphTypeStyle } from '@/types/typography/Paragraph';

Expand Down
2 changes: 2 additions & 0 deletions components/Hero.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import React from 'react';

import { HeadingLevel, HeadingTypeStyle } from '@/types/typography/Heading';
import { ParagraphTypeStyle } from '@/types/typography/Paragraph';

Expand Down
2 changes: 1 addition & 1 deletion components/InlineHelp.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { useEffect, useState } from 'react';
import React, { useEffect, useState } from 'react';

import { registerClickAway } from './helpers/click-away';
import QuestionMark from './icons/QuestionMark';
Expand Down
1 change: 1 addition & 0 deletions components/InputBox.stories.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import { useArgs } from '@storybook/preview-api';
import type { Meta, StoryObj } from '@storybook/react';
import React from 'react';

import type { InputBoxProps } from '@/types/components/InputBoxPropsType';
import { InputTypes } from '@/types/components/InputBoxPropsType';
Expand Down
1 change: 1 addition & 0 deletions components/Loader.stories.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import type { Meta, StoryObj } from '@storybook/react';
import React from 'react';

import AsyncAPIColorIcon from '@/components/icons/AsyncAPIColorIcon';
import IconCircularLoader from '@/components/icons/CircularLoader';
Expand Down
4 changes: 3 additions & 1 deletion components/Loader.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
import React from 'react';
import { twMerge } from 'tailwind-merge';

import AsyncAPIColorIcon from './icons/AsyncAPIColorIcon';

interface LoaderProps {
// eslint-disable-next-line prettier/prettier

Expand All @@ -25,7 +27,7 @@ interface LoaderProps {
*/
export default function Loader({
loaderText = '',
loaderIcon = null,
loaderIcon = <AsyncAPIColorIcon alt='Loading...' />,
className = '',
dark = false,
pulsating = false
Expand Down
2 changes: 1 addition & 1 deletion components/MDX/MDX.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { MDXProvider as CoreMDXProvider } from '@mdx-js/react';
import mermaid from 'mermaid';
import Link from 'next/link';
import { useLayoutEffect, useState } from 'react';
import React, { useLayoutEffect, useState } from 'react';
import {
TwitterDMButton,
TwitterFollowButton,
Expand Down
2 changes: 2 additions & 0 deletions components/MacWindow.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import React from 'react';

interface IMacWindowProps {
className?: string;
contentClassName?: string;
Expand Down
1 change: 1 addition & 0 deletions components/Meeting.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { ArrowRightIcon } from '@heroicons/react/outline';
import React from 'react';

import { ParagraphTypeStyle } from '@/types/typography/Paragraph';

Expand Down
2 changes: 1 addition & 1 deletion components/Modal.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { useEffect, useRef } from 'react';
import React, { useEffect, useRef } from 'react';

interface IModalProps {
title: string;
Expand Down
2 changes: 1 addition & 1 deletion components/NewsletterSubscribe.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { useTranslation } from 'next-i18next';
import { useState } from 'react';
import React, { useState } from 'react';

import IconCircularLoader from '@/components/icons/CircularLoader';
import { ButtonType } from '@/types/components/buttons/ButtonPropsType';
Expand Down
2 changes: 2 additions & 0 deletions components/Profiles.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import React from 'react';

type Profile = {
name: string;
link: string;
Expand Down
2 changes: 2 additions & 0 deletions components/Remember.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import React from 'react';

import LightBulb from './icons/LightBulb';

interface RememberProps {
Expand Down
2 changes: 2 additions & 0 deletions components/SupportUs/SupportUs.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import React from 'react';

import { items } from './SupportItemsList';

interface SupportUsProps {
Expand Down
Loading

0 comments on commit 592f713

Please sign in to comment.