Skip to content

Commit

Permalink
Merge branch 'main' into next
Browse files Browse the repository at this point in the history
  • Loading branch information
BatuhanW committed Dec 18, 2024
2 parents 02f280c + 074f198 commit 1a6bbdb
Show file tree
Hide file tree
Showing 6 changed files with 22 additions and 160 deletions.
1 change: 1 addition & 0 deletions .github/workflows/scripts/build-example-chunks.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ const ignoredRegexes = [
/^with-nx/,
/with-nextjs-headless/,
/^blog-/,
/store/,
];
const CHUNK_COUNT = Number(process.env.CHUNKS ? process.env.CHUNKS : 1);
const BASE_REF = process.env.BASE_REF ? process.env.BASE_REF : "main";
Expand Down
1 change: 1 addition & 0 deletions .nxignore
Original file line number Diff line number Diff line change
Expand Up @@ -42,3 +42,4 @@ examples/with-vite
examples/mern-dashboard-client
examples/with-nextjs-headless
examples/blog-*
examples/store
3 changes: 2 additions & 1 deletion .prettierrc
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,6 @@
"trailingComma": "all",
"singleQuote": false,
"printWidth": 80,
"tabWidth": 2
"tabWidth": 2,
"organizeImportsSkipDestructiveCodeActions": true
}
2 changes: 1 addition & 1 deletion lerna.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"$schema": "node_modules/lerna/schemas/lerna-schema.json",
"packages": ["packages/*", "examples/*"],
"ignore": "{monorepo-*,with-nx,blog-*,mern-dashboard-client,with-nextjs-headless}",
"ignore": "{monorepo-*,with-nx,blog-*,mern-dashboard-client,with-nextjs-headless,store}",
"version": "4.0.0",
"stream": true,
"npmClient": "pnpm"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,121 +41,23 @@ const App = () => {
export default App;
---------------------------------------------------- 1`] = `
"import { GitHubBanner, Refine, WelcomePage } from "@refinedev/core";
import {
useNotificationProvider,
RefineThemes,
ThemedLayoutV2,
"import {
ErrorComponent,
} from "@refinedev/antd";
import dataProvider from "@refinedev/simple-rest";
import routerProvider, {
UnsavedChangesNotifier,
DocumentTitleHandler,
} from "@refinedev/react-router";
import { BrowserRouter, Route, Routes, Outlet } from "react-router";
import { ConfigProvider, App as AntdApp } from "antd";
import "@refinedev/antd/dist/reset.css";
const App = () => {
return (
<BrowserRouter>
<GitHubBanner />
<ConfigProvider theme={RefineThemes.Blue}>
<AntdApp>
<Refine
dataProvider={dataProvider("https://api.fake-rest.refine.dev")}
routerProvider={routerProvider}
options={{
syncWithLocation: true,
warnWhenUnsavedChanges: true,
}}
notificationProvider={useNotificationProvider}
>
<Routes>
<Route
element={
<ThemedLayoutV2>
<Outlet />
</ThemedLayoutV2>
}
>
<Route index element={<WelcomePage />} />
<Route path="*" element={<ErrorComponent />} />
</Route>
</Routes>
<UnsavedChangesNotifier />
<DocumentTitleHandler />
</Refine>
</AntdApp>
</ConfigProvider>
</BrowserRouter>
);
};
export default App;"
`;

exports[`ant-design transformer should transform the file
----------------------------------------------------
import {
GitHubBanner,
Refine,
ErrorComponent,
WelcomePage,
} from "@refinedev/core";
import dataProvider from "@refinedev/simple-rest";
import routerProvider, {
UnsavedChangesNotifier,
DocumentTitleHandler,
} from "@refinedev/react-router";
import { BrowserRouter, Route, Routes } from "react-router";
const App = () => {
return (
<BrowserRouter>
<GitHubBanner />
<Refine
dataProvider={dataProvider("https://api.fake-rest.refine.dev")}
routerProvider={routerProvider}
options={{
syncWithLocation: true,
warnWhenUnsavedChanges: true,
}}
>
<Routes>
<Route index element={<WelcomePage />} />
<Route path="*" element={<ErrorComponent />} />
</Routes>
<UnsavedChangesNotifier />
<DocumentTitleHandler />
</Refine>
</BrowserRouter>
);
};
export default App;
---------------------------------------------------- 1`] = `
"import { GitHubBanner, Refine, WelcomePage } from "@refinedev/core";
import {
useNotificationProvider,
RefineThemes,
ThemedLayoutV2,
ErrorComponent,
useNotificationProvider,
} from "@refinedev/antd";
import dataProvider from "@refinedev/simple-rest";
import { GitHubBanner, Refine, WelcomePage } from "@refinedev/core";
import routerProvider, {
UnsavedChangesNotifier,
DocumentTitleHandler,
UnsavedChangesNotifier,
} from "@refinedev/react-router";
import dataProvider from "@refinedev/simple-rest";
import { BrowserRouter, Route, Routes, Outlet } from "react-router";
import { BrowserRouter, Outlet, Route, Routes } from "react-router";
import { ConfigProvider, App as AntdApp } from "antd";
import "@refinedev/antd/dist/reset.css";
import { App as AntdApp, ConfigProvider } from "antd";
const App = () => {
return (
Expand Down Expand Up @@ -212,9 +114,9 @@ export default App;
---------------------------------------------------- 1`] = `
"import { Refine, WelcomePage } from "@refinedev/core";
import { useNotificationProvider, RefineThemes } from "@refinedev/antd";
import { ConfigProvider, App as AntdApp } from "antd";
import { RefineThemes, useNotificationProvider } from "@refinedev/antd";
import "@refinedev/antd/dist/reset.css";
import { App as AntdApp, ConfigProvider } from "antd";
function App() {
return (
Expand Down Expand Up @@ -255,9 +157,9 @@ export default App;
---------------------------------------------------- 1`] = `
"import { Refine, WelcomePage } from "@refinedev/core";
import { useNotificationProvider, RefineThemes } from "@refinedev/antd";
import { ConfigProvider, App as AntdApp } from "antd";
import { RefineThemes, useNotificationProvider } from "@refinedev/antd";
import "@refinedev/antd/dist/reset.css";
import { App as AntdApp, ConfigProvider } from "antd";
function App() {
return (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,10 @@ function App() {
export default App;
---------------------------------------------------- 1`] = `
"import { Refine, WelcomePage, ErrorComponent } from "@refinedev/core";
"import { ErrorComponent, Refine, WelcomePage } from "@refinedev/core";
import routerProvider from "@refinedev/react-router";
import { BrowserRouter, Routes, Route } from "react-router";
import { BrowserRouter, Route, Routes } from "react-router";
function App() {
return (
Expand Down Expand Up @@ -54,10 +54,10 @@ function App() {
export default App;
---------------------------------------------------- 1`] = `
"import { Refine, WelcomePage, ErrorComponent } from "@refinedev/core";
"import { ErrorComponent, Refine, WelcomePage } from "@refinedev/core";
import routerProvider from "@refinedev/react-router";
import { BrowserRouter, Routes, Route } from "react-router";
import { BrowserRouter, Route, Routes } from "react-router";
import { UseListExample, UseOneExample, UseUpdateExample } from "examples";
Expand Down Expand Up @@ -102,53 +102,10 @@ function App() {
export default App;
---------------------------------------------------- 1`] = `
"import { Refine, WelcomePage, ErrorComponent } from "@refinedev/core";
"import { ErrorComponent, Refine, WelcomePage } from "@refinedev/core";
import routerProvider from "@refinedev/react-router";
import { BrowserRouter, Routes, Route } from "react-router";
function App() {
return (
<BrowserRouter>
<Refine routerProvider={routerProvider}>
<Routes>
<Route index element={<WelcomePage />} />
<Route path="*" element={<ErrorComponent />} />
</Routes>
</Refine>
</BrowserRouter>
);
}
export default App;"
`;

exports[`react-router transformer should transform the file
----------------------------------------------------
import { Refine, WelcomePage, ErrorComponent } from "@refinedev/core";
import routerProvider from "@refinedev/react-router";
import { BrowserRouter, Routes, Route } from "react-router";
function App() {
return (
<BrowserRouter>
<Refine routerProvider={routerProvider}>
<Routes>
<Route index element={<WelcomePage />} />
<Route path="*" element={<ErrorComponent />} />
</Routes>
</Refine>
</BrowserRouter>
);
}
export default App;
---------------------------------------------------- 1`] = `
"import { Refine, WelcomePage, ErrorComponent } from "@refinedev/core";
import routerProvider from "@refinedev/react-router";
import { BrowserRouter, Routes, Route } from "react-router";
import { BrowserRouter, Route, Routes } from "react-router";
function App() {
return (
Expand Down

0 comments on commit 1a6bbdb

Please sign in to comment.