Skip to content

Commit

Permalink
Merge pull request #6637 from refinedev/next
Browse files Browse the repository at this point in the history
release: January 2025
  • Loading branch information
alicanerdurmaz authored Jan 9, 2025
2 parents 8857ae9 + 98b9892 commit 16dddf5
Show file tree
Hide file tree
Showing 244 changed files with 1,141 additions and 741 deletions.
8 changes: 8 additions & 0 deletions _changeset/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# Changesets

Hello and welcome! This folder has been automatically generated by `@changesets/cli`, a build tool that works
with multi-package repos, or single-package repos to help you version and publish your code. You can
find the full documentation for it [in our repository](https://github.com/changesets/changesets)

We have a quick list of common questions to get you started engaging with this project in
[our documentation](https://github.com/changesets/changesets/blob/main/docs/common-questions.md)
14 changes: 14 additions & 0 deletions _changeset/config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
"$schema": "https://unpkg.com/@changesets/[email protected]/schema.json",
"changelog": ["./format.js", { "repo": "refinedev/refine" }],
"commit": false,
"fixed": [],
"linked": [],
"access": "public",
"baseBranch": "main",
"updateInternalDependencies": "patch",
"ignore": ["!@refinedev/*", "!create-refine-app"],
"___experimentalUnsafeOptions_WILL_CHANGE_IN_PATCH": {
"onlyUpdatePeerDependentsWhenOutOfRange": true
}
}
40 changes: 40 additions & 0 deletions _changeset/format.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
const clgh = require("@changesets/changelog-github");

const changelogFunctions = {
getDependencyReleaseLine: clgh.default.getDependencyReleaseLine,
getReleaseLine: async (changeset, tag, options) => {
const defaultChangeset = await clgh.default.getReleaseLine(
changeset,
tag,
options,
);

const isValid = ["community", "enterprise"].includes(
process.env.REFINE_RELEASE_TYPE,
);

if (!isValid) {
console.error(
"❌ REFINE_RELEASE_TYPE must be either community or enterprise",
);

process.exit(1);
}

let title = "";

if (process.env.REFINE_RELEASE_TYPE === "community") {
title = "\n\n📢 **Refine Community Release** 📢";
}

if (process.env.REFINE_RELEASE_TYPE === "enterprise") {
title = "\n\n⚡ **Refine Enterprise Release** ⚡";
}

const result = title + defaultChangeset;

return result;
},
};

exports.default = changelogFunctions;
10 changes: 10 additions & 0 deletions _changeset/fresh-ducks-speak.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
---
"@refinedev/inferencer": patch
"@refinedev/mui": patch
---

fix: `@refinedev/mui` package gives following error: `Cannot find module '@mui/x-internals/forwardRef' from '/node_modules/@mui/x-data-grid/components/GridPagination.js'` #6615

To fix that, `@mui/x-data-grid` version is updated to `7.23.5`.

[Resolves #6615](https://github.com/refinedev/refine/issues/6615)
9 changes: 9 additions & 0 deletions _changeset/giant-carrots-deny.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
---
"@refinedev/core": patch
---

feat(core): add `enabled` prop to `useLoadingOvertime` and `overtimeOptions`

Added missing `enabled` prop to `useLoadingOvertime` and added ability to globally configure through `options.overtime.enabled`.

Due to the nature of calculating elapsed time, an interval is set by the `interval` prop. This was causing unwanted updates in the return value and there was no way to disable it properly.
18 changes: 18 additions & 0 deletions _changeset/great-hotels-admire.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
---
"@refinedev/core": patch
---

fixed: `to` query parameter is not working after login. #6582
From now on, the `to` query parameter will work after login. If the URL includes a `to` query parameter, the user will be redirected to the specified path after logging in.

Example:

After logout, Refine will automatically appends `to` query param to URL.

```
http://localhost:3000/login?to=/any-path
```

After login, it will redirect to `http://localhost:3000/any-path`

Resolves [#6582](https://github.com/refinedev/refine/issues/6582)
11 changes: 11 additions & 0 deletions _changeset/perfect-donkeys-cheat.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
---
"@refinedev/core": patch
---

refactor(core): remove duplicated overtime intervals caused by internally used hooks

Updated Refine's data hooks and extensions to prevent duplicated overtime intervals from being created. This uses the `enabled` prop to prevent internal hooks from registering the intervals.

Prior to this change, `useTable` was initializing its own `useLoadingOvertime` hook but also propagated the `elapsedTime` from `useList` hook which is used internally by `useTable`. This caused duplicated intervals and unwanted updates.

This now ensures a single interval is created and used for the extension hooks.
11 changes: 11 additions & 0 deletions _changeset/unlucky-rules-complain.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
---
"@refinedev/core": patch
---

fix(core): add missing checks and warnings for `ids` and `resource` props in `useMany` hook

Added checks for `ids` and `resource` props to check in runtime if they are valid or not.

`useMany` will warn if `ids` or `resource` props are missing unless the query is manually enabled through `queryOptions.enabled` prop.

[Resolves #6617](https://github.com/refinedev/refine/issues/6617)
6 changes: 3 additions & 3 deletions cypress/e2e/auth-antd/all.cy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ describe("auth-antd", () => {
};

describe("login", () => {
it.skip("should login", () => {
it("should login", () => {
login();

cy.location("pathname").should("eq", "/");
Expand All @@ -42,7 +42,7 @@ describe("auth-antd", () => {
cy.location("pathname").should("eq", "/login");
});

it.skip("should has 'to' param on URL after redirected to /login", () => {
it("should has 'to' param on URL after redirected to /login", () => {
login();
cy.location("pathname").should("eq", "/");

Expand All @@ -68,7 +68,7 @@ describe("auth-antd", () => {
});

describe("register", () => {
it.skip("should register", () => {
it("should register", () => {
cy.get("a")
.contains(/sign up/i)
.click();
Expand Down
2 changes: 1 addition & 1 deletion cypress/e2e/auth-chakra-ui/all.cy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ describe("auth-chakra-ui", () => {
cy.location("pathname").should("eq", "/login");
});

it.skip("should has 'to' param on URL after redirected to /login", () => {
it("should has 'to' param on URL after redirected to /login", () => {
login();
cy.location("pathname").should("eq", "/posts");

Expand Down
2 changes: 1 addition & 1 deletion cypress/e2e/auth-mantine/all.cy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ describe("auth-mantine", () => {
cy.location("pathname").should("eq", "/login");
});

it.skip("should has 'to' param on URL after redirected to /login", () => {
it("should has 'to' param on URL after redirected to /login", () => {
login();
cy.location("pathname").should("eq", "/posts");

Expand Down
2 changes: 1 addition & 1 deletion cypress/e2e/auth-material-ui/all.cy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ describe("auth-material-ui", () => {
cy.location("pathname").should("eq", "/login");
});

it.skip("should has 'to' param on URL after redirected to /login", () => {
it("should has 'to' param on URL after redirected to /login", () => {
login();
cy.location("pathname").should("eq", "/posts");

Expand Down
10 changes: 8 additions & 2 deletions cypress/e2e/table-material-ui-advanced/data-grid.cy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,16 +7,22 @@ describe("table-material-ui-advanced", () => {
});

it("should work with filter", () => {
// wait for loading
// wait for requests
cy.wait("@getPosts");
cy.wait("@getCategories");
// wait for loadings
cy.getMaterialUILoadingCircular().should("not.exist");
cy.get("[data-field='category.id']").should("have.length", 16);
cy.get("[data-field='category.id']").should("not.contain", "Loading...");

// open the column menu of title
cy.getMaterialUIColumnHeader(2).within(() =>
cy.get(".MuiDataGrid-menuIcon > button").click({ force: true }),
);
// click the filter menu item
cy.get(".MuiDataGrid-menu > div > .MuiList-root").children().eq(3).click();
cy.get(".MuiDataGrid-menu > div > .MuiList-root").children().eq(3).click({
force: true,
});
// type the filter value
cy.get("[placeholder='Filter value']").type("lorem");
// url should contain the filter
Expand Down
3 changes: 1 addition & 2 deletions cypress/e2e/with-nextjs/all.cy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -77,8 +77,7 @@ describe("with-nextjs", () => {
cy.location("pathname").should("eq", "/login");
});

// Not working on React Server Components
it.skip("should has 'to' param on URL after redirected to /login", () => {
it("should has 'to' param on URL after redirected to /login", () => {
login();
cy.location("pathname").should("eq", "/");

Expand Down
8 changes: 4 additions & 4 deletions cypress/e2e/with-remix-antd/all.cy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,7 @@ describe.skip("with-remix-antd", () => {
});
});

it.skip("should edit record", () => {
it("should edit record", () => {
cy.getEditButton().first().click();

// wait loading state and render to be finished
Expand All @@ -214,7 +214,7 @@ describe.skip("with-remix-antd", () => {
});
});

it.skip("should delete record", () => {
it("should delete record", () => {
cy.getEditButton().first().click();

// wait loading state and render to be finished
Expand Down Expand Up @@ -255,7 +255,7 @@ describe.skip("with-remix-antd", () => {
cy.getAntdFormItemError({ id: "status" }).should("not.exist");
});

it.skip("should edit form render errors", () => {
it("should edit form render errors", () => {
cy.getEditButton().first().click();

// wait loading state and render to be finished
Expand Down Expand Up @@ -283,7 +283,7 @@ describe.skip("with-remix-antd", () => {
});
});

it.skip("should edit form warn when unsaved changes", () => {
it("should edit form warn when unsaved changes", () => {
cy.wait("@getPosts");
cy.getEditButton().first().click();

Expand Down
8 changes: 4 additions & 4 deletions cypress/e2e/with-remix-headless/all.cy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,15 +28,15 @@ describe("with-remix-headless", () => {
});

describe("login", () => {
it.skip("should login", () => {
it("should login", () => {
login();
cy.location("pathname").should("eq", "/posts");
cy.getAllCookies().then((cookies) => {
expect(cookies[0]).to.have.property("name", "user");
});
});

it.skip("should has 'to' param on URL after redirected to /login", () => {
it("should has 'to' param on URL after redirected to /login", () => {
login();
cy.location("pathname").should("eq", "/posts");

Expand All @@ -60,7 +60,7 @@ describe("with-remix-headless", () => {
});

describe("register", () => {
it.skip("should register", () => {
it("should register", () => {
cy.get("a")
.contains(/sign up/i)
.click();
Expand All @@ -74,7 +74,7 @@ describe("with-remix-headless", () => {
});

describe("logout", () => {
it.skip("should logout", () => {
it("should logout", () => {
login();
cy.get("button")
.contains(/logout/i)
Expand Down
8 changes: 4 additions & 4 deletions cypress/e2e/with-remix-vite-headless/all.cy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,15 +28,15 @@ describe("with-remix-vite-headless", () => {
});

describe("login", () => {
it.skip("should login", () => {
it("should login", () => {
login();
cy.location("pathname").should("eq", "/posts");
cy.getAllCookies().then((cookies) => {
expect(cookies[0]).to.have.property("name", "user");
});
});

it.skip("should has 'to' param on URL after redirected to /login", () => {
it("should has 'to' param on URL after redirected to /login", () => {
login();
cy.location("pathname").should("eq", "/posts");

Expand All @@ -60,7 +60,7 @@ describe("with-remix-vite-headless", () => {
});

describe("register", () => {
it.skip("should register", () => {
it("should register", () => {
cy.get("a")
.contains(/sign up/i)
.click();
Expand All @@ -74,7 +74,7 @@ describe("with-remix-vite-headless", () => {
});

describe("logout", () => {
it.skip("should logout", () => {
it("should logout", () => {
login();
cy.get("button")
.contains(/logout/i)
Expand Down
5 changes: 5 additions & 0 deletions documentation/docs/core/refine-component/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -604,6 +604,7 @@ const App = () => (
// highlight-start
options={{
overtime: {
enabled: true,
interval: 1000, // default value is 1000
onInterval: (elapsedInterval, context) => {
console.log(elapsedInterval, context);
Expand All @@ -615,6 +616,10 @@ const App = () => (
);
```

#### enabled

If true, the elapsed time will be calculated. If set to false, the elapsed time will always be `undefined`.

#### interval

The interval value in milliseconds. The default value is `1000`.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,14 @@ export function MaterialUIAuth() {
"@refinedev/core": "latest",
"@refinedev/simple-rest": "latest",
"@refinedev/react-router": "latest",
"@refinedev/mui": "5.0.0",
"@refinedev/mui": "latest",
"react-router": "^7.0.2",
"@emotion/react": "^11.8.2",
"@emotion/styled": "^11.8.1",
"@mui/lab": "^6.0.0-beta.14",
"@mui/material": "^6.1.7",
"@mui/system": "latest",
"@mui/x-data-grid": "^7.22.2",
"@mui/x-data-grid": "^7.23.5",
}}
startRoute="/login"
files={{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ export default function ServerSideValidationMui() {
"@mui/lab": "^6.0.0-beta.14",
"@mui/material": "^6.1.7",
"@mui/system": "latest",
"@mui/x-data-grid": "^7.22.2",
"@mui/x-data-grid": "^7.23.5",
"react-router": "^7.0.2",
"react-hook-form": "^7.43.5",
}}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ export default function UseSelectMaterialUI() {
"@refinedev/core": "latest",
"@refinedev/simple-rest": "latest",
"@refinedev/react-hook-form": "latest",
"@refinedev/mui": "5.0.0",
"@refinedev/mui": "latest",
"@mui/material": "latest",
}}
startRoute="/"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,14 @@ export function MaterialUIAuth() {
"@refinedev/core": "latest",
"@refinedev/simple-rest": "latest",
"@refinedev/react-router": "latest",
"@refinedev/mui": "5.0.0",
"@refinedev/mui": "latest",
"react-router": "^7.0.2",
"@emotion/react": "^11.8.2",
"@emotion/styled": "^11.8.1",
"@mui/lab": "^6.0.0-beta.14",
"@mui/material": "^6.1.7",
"@mui/system": "latest",
"@mui/x-data-grid": "^7.22.2",
"@mui/x-data-grid": "^7.23.5",
}}
startRoute="/login"
files={{
Expand Down
Loading

0 comments on commit 16dddf5

Please sign in to comment.