diff --git a/.github/workflows/auto-pr.yml b/.github/workflows/auto-pr.yml new file mode 100644 index 000000000..4fb6dd376 --- /dev/null +++ b/.github/workflows/auto-pr.yml @@ -0,0 +1,21 @@ +name: Create Pull Request +on: + push: + branches: + # Create pull requests only for non-master branches + - "!master" +jobs: + build: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v2 + with: + ref: ${{ github.ref }} + - name: Create Pull Request + uses: peter-evans/create-pull-request@v3 + with: + commit-message: "Automated Pull Request" + title: "Automated Pull Request" + branch: ${{ github.ref }} + token: ${{ secrets.GITHUB_TOKEN }} diff --git a/package.json b/package.json index 3d5c389a7..43d519e2a 100644 --- a/package.json +++ b/package.json @@ -16,18 +16,18 @@ "@babel/preset-react": "^7.18.6", "@babel/preset-typescript": "^7.18.6", "@relative-ci/agent": "^4.1.3", - "@sentry/react": "^7.37.2", - "@sentry/tracing": "^7.37.2", + "@sentry/react": "^7.38.0", + "@sentry/tracing": "^7.38.0", "@types/bluebird": "^3.5.38", - "@types/node": "^18.13.0", + "@types/node": "^18.14.0", "@types/react": "^18.0.28", - "@types/react-dom": "^18.0.10", + "@types/react-dom": "^18.0.11", "@typescript-eslint/eslint-plugin": "^5.52.0", "@typescript-eslint/parser": "^5.52.0", "@vitest/coverage-c8": "^0.28.5", "autoprefixer": "^10.4.13", - "cssnano": "^5.1.14", - "esbuild": "^0.17.8", + "cssnano": "^5.1.15", + "esbuild": "^0.17.9", "eslint": "^8.34.0", "eslint-config-prettier": "^8.6.0", "eslint-plugin-import": "2.27.5", @@ -52,16 +52,16 @@ "react": "^18.2.0", "react-dom": "^18.2.0", "remove-files-webpack-plugin": "^1.5.0", - "sass": "^1.58.1", - "snyk": "^1.1103.0", - "stylelint": "15.1.0", + "sass": "^1.58.3", + "snyk": "^1.1105.0", + "stylelint": "15.2.0", "stylelint-config-prettier": "^9.0.5", "stylelint-config-sass-guidelines": "^9.0.1", "stylelint-order": "^6.0.2", "stylelint-scss": "^4.4.0", "thread-loader": "^3.0.4", "ts-toolbelt": "^9.6.0", - "turbo": "^1.7.4", + "turbo": "^1.8.1", "typescript": "^4.9.5", "webpack": "^5.75.0", "webpack-stats-plugin": "^1.1.1" diff --git a/packages/documentation/package.json b/packages/documentation/package.json index 176ed3a29..336488f6a 100644 --- a/packages/documentation/package.json +++ b/packages/documentation/package.json @@ -42,7 +42,7 @@ "react-transition-group": "^4.4.5", "resize-observer-polyfill": "^1.5.1", "use-debounce": "^9.0.3", - "vite": "4.1.1" + "vite": "4.1.3" }, "devDependencies": { "@axe-core/react": "^4.6.0", @@ -54,14 +54,14 @@ "@csstools/postcss-sass": "^5.0.1", "@playwright/test": "^1.30.0", "@types/react": "^18.0.28", - "@types/react-dom": "^18.0.10", + "@types/react-dom": "^18.0.11", "@types/react-instantsearch-dom": "^6.12.3", "@types/react-syntax-highlighter": "^15.5.6", "@types/react-transition-group": "^4.4.5", "@vitejs/plugin-react": "3.1.0", "autoprefixer": "^10.4.13", - "cssnano": "^5.1.14", - "esbuild": "^0.17.8", + "cssnano": "^5.1.15", + "esbuild": "^0.17.9", "postcss": "^8.4.21", "postcss-bem-linter": "^3.3.0", "postcss-prefixer": "^2.1.3", @@ -69,14 +69,14 @@ "prettier": "^2.8.4", "recoil": "^0.7.6", "rimraf": "^4.1.2", - "sass": "^1.58.1", - "snyk": "^1.1103.0", - "stylelint": "15.1.0", + "sass": "^1.58.3", + "snyk": "^1.1105.0", + "stylelint": "15.2.0", "stylelint-config-prettier": "^9.0.5", "stylelint-config-sass-guidelines": "^9.0.1", "stylelint-scss": "^4.4.0", "typescript": "^4.9.5", - "typescript-plugin-css-modules": "^4.1.1", + "typescript-plugin-css-modules": "^4.2.2", "use-timer": "^2.0.1", "vite-plugin-react-svg": "^0.2.0", "vite-plugin-svgr": "^2.4.0" diff --git a/packages/lib/components/accordion/__tests__/__snapshots__/accordion.test.tsx.snap b/packages/lib/components/accordion/__tests__/__snapshots__/accordion.test.tsx.snap index be4745274..76222c5c0 100644 --- a/packages/lib/components/accordion/__tests__/__snapshots__/accordion.test.tsx.snap +++ b/packages/lib/components/accordion/__tests__/__snapshots__/accordion.test.tsx.snap @@ -5,10 +5,10 @@ exports[`Accordion > should render snapshot 1`] = ` class="_accordion_f93c7f _no-border_f93c7f" >
{ - it.concurrent('should render accordion', () => { + it('should render accordion', () => { const { container } = render(

this is a test

@@ -26,7 +26,7 @@ describe('Accordion', () => { expect(container.firstChild).toMatchSnapshot(); }); - it.concurrent('should toggle content', async () => { + it('should toggle content', async () => { const { getByRole, container } = render(

this is a test

@@ -40,7 +40,7 @@ describe('Accordion', () => { }); }); - it.concurrent('should call onExpanded', async () => { + it('should call onExpanded', async () => { const onExpanded = vi.fn(); const { getByRole } = render( @@ -57,7 +57,7 @@ describe('Accordion', () => { expect(onExpanded).toHaveBeenCalled(); }); - it.concurrent('should render custom sizes', async () => { + it('should render custom sizes', async () => { const { getByRole } = render(

this is a test

diff --git a/packages/lib/components/alert/__tests__/alert.test.tsx b/packages/lib/components/alert/__tests__/alert.test.tsx index 4b88e78d1..ed7115e3d 100644 --- a/packages/lib/components/alert/__tests__/alert.test.tsx +++ b/packages/lib/components/alert/__tests__/alert.test.tsx @@ -7,36 +7,36 @@ import styles from '../alert.module.scss'; expect.extend(toHaveNoViolations); describe('Alert', () => { - it.concurrent('should render the alert', async () => { + it('should render the alert', async () => { const { getByText } = render(); expect(getByText('test')).toBeInTheDocument(); }); - it.concurrent('should render success state correctly', async () => { + it('should render success state correctly', async () => { const { getByRole } = render(); expect(getByRole('alert')).toBeInTheDocument(); expect(getByRole('alert')).toHaveClass(styles.alert_success); }); - it.concurrent('should render warning state correctly', async () => { + it('should render warning state correctly', async () => { const { getByRole } = render(); expect(getByRole('alert')).toBeInTheDocument(); expect(getByRole('alert')).toHaveClass(styles.alert_warning); }); - it.concurrent('should render error state correctly', async () => { + it('should render error state correctly', async () => { const { getByRole } = render(); expect(getByRole('alert')).toBeInTheDocument(); expect(getByRole('alert')).toHaveClass(styles.alert_error); }); - it.concurrent('should render info state correctly', async () => { + it('should render info state correctly', async () => { const { getByRole } = render(); expect(getByRole('alert')).toBeInTheDocument(); expect(getByRole('alert')).toHaveClass(styles.alert_info); }); - it.concurrent('should call onDismiss', async () => { + it('should call onDismiss', async () => { const onDismiss = vi.fn(); const { getByRole } = render( @@ -45,7 +45,7 @@ describe('Alert', () => { expect(onDismiss).toHaveBeenCalled(); }); - it.concurrent('should render custom content', async () => { + it('should render custom content', async () => { const { getByText } = render( custom content diff --git a/packages/lib/components/auto-suggest/__tests__/auto-suggest.test.tsx b/packages/lib/components/auto-suggest/__tests__/auto-suggest.test.tsx index 046e27f71..ac7276174 100644 --- a/packages/lib/components/auto-suggest/__tests__/auto-suggest.test.tsx +++ b/packages/lib/components/auto-suggest/__tests__/auto-suggest.test.tsx @@ -17,12 +17,12 @@ const suggestions = [ })); describe('AutoSuggest', () => { - it.concurrent('should render Auto Suggest', async () => { + it('should render Auto Suggest', async () => { const { getByTestId } = render(); expect(getByTestId('rc-auto-suggest')).toBeInTheDocument(); }); - it.concurrent('should render Auto Suggest with placeholder', async () => { + it('should render Auto Suggest with placeholder', async () => { const { getByTestId, getByPlaceholderText } = render( ); @@ -30,7 +30,7 @@ describe('AutoSuggest', () => { expect(getByPlaceholderText('placeholder')).toBeInTheDocument(); }); - it.concurrent('should render suggestions', async () => { + it('should render suggestions', async () => { const { getByPlaceholderText, getByTestId } = render( , { @@ -55,7 +55,7 @@ describe('AutoSuggest', () => { ); }); - it.concurrent('should show the selected item', async () => { + it('should show the selected item', async () => { const { getByPlaceholderText, getByTestId } = render( , { diff --git a/packages/lib/components/breadcrumb/__tests__/breadcrumb.test.tsx b/packages/lib/components/breadcrumb/__tests__/breadcrumb.test.tsx index 5b447462a..18eb97e5c 100644 --- a/packages/lib/components/breadcrumb/__tests__/breadcrumb.test.tsx +++ b/packages/lib/components/breadcrumb/__tests__/breadcrumb.test.tsx @@ -3,7 +3,7 @@ import { it, vi } from 'vitest'; import { BreadCrumb } from '../breadcrumb'; describe('Breadcrumb', () => { - it.concurrent('should render', async () => { + it('should render', async () => { const { getByRole, getByText } = render( ); @@ -15,7 +15,7 @@ describe('Breadcrumb', () => { }); }); - it.concurrent('should handler is called', async () => { + it('should handler is called', async () => { const handler = vi.fn(); const { getByText } = render( { - it.concurrent('should render default', async () => { + it('should render default', async () => { const { container } = render(
} />); expect(getAllByRole('radio')).toHaveLength(5); expect(getAllByRole('img')).toHaveLength(5); }); - it.concurrent('should call onChange', () => { + it('should call onChange', () => { const onChange = vi.fn(); const { getAllByRole } = render(); @@ -58,7 +58,7 @@ describe('Rate', () => { }); }); - it.concurrent('check disabled state', () => { + it('check disabled state', () => { const { getAllByRole } = render(); getAllByRole('radio').forEach(radio => { diff --git a/packages/lib/components/section/__tests__/__snapshots__/section.test.tsx.snap b/packages/lib/components/section/__tests__/__snapshots__/section.test.tsx.snap new file mode 100644 index 000000000..c4071e6e6 --- /dev/null +++ b/packages/lib/components/section/__tests__/__snapshots__/section.test.tsx.snap @@ -0,0 +1,23 @@ +// Vitest Snapshot v1 + +exports[`Section > should render Section correctly 1`] = ` +
+
+ test +
+
+ +
+
+`; diff --git a/packages/lib/components/section/__tests__/section.test.tsx b/packages/lib/components/section/__tests__/section.test.tsx index bf26f0ab4..e8dfe589b 100644 --- a/packages/lib/components/section/__tests__/section.test.tsx +++ b/packages/lib/components/section/__tests__/section.test.tsx @@ -2,7 +2,7 @@ import { render } from '@testing-library/react'; import { Section } from '../section'; describe('Section', () => { - it.concurrent('should render Section correctly', () => { + it('should render Section correctly', () => { const { container, getByText } = render(
@@ -12,12 +12,12 @@ describe('Section', () => { expect(getByText('test')).toBeInTheDocument(); }); - it.concurrent('should render section content', () => { + it('should render section content', () => { const { getByText } = render(
Section content
); expect(getByText('Section content')).toBeInTheDocument(); }); - it.concurrent('should render title with hash', () => { + it('should render title with hash', () => { const { getByText } = render(
content diff --git a/packages/lib/components/sidebar/__tests__/sidebar.test.tsx b/packages/lib/components/sidebar/__tests__/sidebar.test.tsx index 6feb63587..b4bf530b7 100644 --- a/packages/lib/components/sidebar/__tests__/sidebar.test.tsx +++ b/packages/lib/components/sidebar/__tests__/sidebar.test.tsx @@ -3,7 +3,7 @@ import { describe, expect, it, vi } from 'vitest'; import { Sidebar } from '../sidebar'; describe('Sidebar', () => { - it.concurrent('should render', () => { + it('should render', () => { const { getAllByRole, getByText } = render( { expect(getByText('one')).toBeInTheDocument(); }); - it.concurrent('should call handler', async () => { + it('should call handler', async () => { const handler = vi.fn(); const { getByText } = render( { - it.concurrent('should render skeleton', () => { + it('should render skeleton', () => { const { getByTestId } = render(); expect(getByTestId('rc-skeleton')).toBeInTheDocument(); @@ -14,7 +14,7 @@ describe('Skeleton', () => { expect(children).toHaveLength(5); }); - it.concurrent('should render skeleton blocks', () => { + it('should render skeleton blocks', () => { const { getByTestId } = render(); expect(getByTestId('rc-skeleton')).toBeInTheDocument(); @@ -25,7 +25,7 @@ describe('Skeleton', () => { expect(children).toHaveLength(10); }); - it.concurrent('should blink', () => { + it('should blink', () => { const { getByTestId } = render( ); diff --git a/packages/lib/components/spinner/__tests__/spinner.test.tsx b/packages/lib/components/spinner/__tests__/spinner.test.tsx index cc55dbb3f..f601c3b1e 100644 --- a/packages/lib/components/spinner/__tests__/spinner.test.tsx +++ b/packages/lib/components/spinner/__tests__/spinner.test.tsx @@ -4,17 +4,17 @@ import { Spinner } from '../../spinner/spinner'; import styles from '../spinner.module.scss'; describe('Spinner', () => { - it.concurrent('should render spinner', () => { + it('should render spinner', () => { const { getByRole } = render(); expect(getByRole('img')).toBeInTheDocument(); }); - it.concurrent('should render custom size', () => { + it('should render custom size', () => { const { getByRole } = render(); expect(getByRole('img')).toHaveClass(styles.spinner_sm); }); - it.concurrent('should be able to customize the speed', () => { + it('should be able to customize the speed', () => { const { getByRole } = render(); expect(getByRole('img')).toHaveStyle('--rc-spinner-speed: fast'); }); diff --git a/packages/lib/components/switch/__tests__/switch.test.tsx b/packages/lib/components/switch/__tests__/switch.test.tsx index 61f5b6f2b..89cb05780 100644 --- a/packages/lib/components/switch/__tests__/switch.test.tsx +++ b/packages/lib/components/switch/__tests__/switch.test.tsx @@ -7,18 +7,18 @@ import styles from '../switch.module.scss'; const handler = vi.fn(); describe('Switch', () => { - it.concurrent('should render default', () => { + it('should render default', () => { const { container } = render(); expect(container.firstChild).toBeInTheDocument(); }); - it.concurrent('should be checked', () => { + it('should be checked', () => { const { getByRole } = render(); expect(getByRole('switch')).toHaveAttribute('aria-checked', 'true'); }); - it.concurrent('should display toggle states', async () => { + it('should display toggle states', async () => { const { getByRole } = render(); const switchItem = getByRole('switch'); diff --git a/packages/lib/components/tabs/__tests__/__snapshots__/tabs.test.tsx.snap b/packages/lib/components/tabs/__tests__/__snapshots__/tabs.test.tsx.snap index 94c8ac69e..9b7d61078 100644 --- a/packages/lib/components/tabs/__tests__/__snapshots__/tabs.test.tsx.snap +++ b/packages/lib/components/tabs/__tests__/__snapshots__/tabs.test.tsx.snap @@ -6,10 +6,10 @@ exports[`Tabs > should render snapshot 1`] = ` role="tablist" >