Skip to content

Commit

Permalink
release: october 2024 (#6336)
Browse files Browse the repository at this point in the history
Co-authored-by: Anil Kumar Behera <ark845612@gmail.com>
Co-authored-by: Mehrab <mehrabmpdev@gmail.com>
Co-authored-by: Alican Erdurmaz <alicanerdurmaz@gmail.com>
Co-authored-by: Nabil Alamin <aminonimisi2@gmail.com>
Co-authored-by: Batuhan Wilhelm <batuhanwilhelm@gmail.com>
Co-authored-by: Necati Özmen <necatiozmn@gmail.com>
Co-authored-by: hugorezende <hugorezendedev@gmail.com>
  • Loading branch information
8 people authored Oct 14, 2024
1 parent 03a1810 commit 4ccf7fa
Show file tree
Hide file tree
Showing 184 changed files with 13,389 additions and 4,320 deletions.
7 changes: 7 additions & 0 deletions .changeset/blue-dingos-heal.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
"@refinedev/core": patch
---

fix(core): added ability to return `undefined` to fallback to the default notification config when using the function form in `successNotification` and `errorNotification` props.

[Resolves #6270](https://github.com/refinedev/refine/issues/6270)
7 changes: 7 additions & 0 deletions .changeset/bright-toys-guess.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
"@refinedev/hasura": patch
---

fix(hasura): pass meta.gqlVariables to getOne gql request.

[Fixes #6374](https://github.com/refinedev/refine/issues/6374)
43 changes: 43 additions & 0 deletions .changeset/chilly-bottles-grab.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
---
"@refinedev/core": minor
---

feat: add [`<Link />`](https://refine.dev/docs/routing/components/link/) component to navigate to a resource with a specific action. Under the hood, It uses [`useGo`](https://refine.dev/docs/routing/hooks/use-go/) to generate the URL.

## Usage

```tsx
import { Link } from "@refinedev/core";

const MyComponent = () => {
return (
<>
{/* simple usage, navigates to `/posts` */}
<Link to="/posts">Posts</Link>
{/* complex usage with more control, navigates to `/posts` with query filters */}
<Link
go={{
query: {
// `useTable` or `useDataGrid` automatically use this filters to fetch data if `syncWithLocation` is true.
filters: [
{
operator: "eq",
value: "published",
field: "status",
},
],
},
to: {
resource: "posts",
action: "list",
},
}}
>
Posts
</Link>
</>
);
};
```

[Fixes #6329](https://github.com/refinedev/refine/issues/6329)
25 changes: 25 additions & 0 deletions .changeset/fifty-moons-flash.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
---
"@refinedev/core": patch
---

fix: The `label` and `route` fields in `useMenu().menuItems` were marked as deprecated, but they are not actually deprecated. This issue was caused by `menuItems` extending from `IResourceItem`, however, `menuItems` populates these fields and handles deprecation of these fields internally. This change removes the deprecation warning for these fields.

```tsx
export const Sider = () => {
const { menuItems } = useMenu();
menuItems.map((item) => {
// these are safe to use
console.log(item.label);
console.log(item.route);
item.children.map((child) => {
// these are safe to use
console.log(child.label);
console.log(child.route);
});
});

return <div>{/* ... */}</div>;
};
```

[Fixes #6352](https://github.com/refinedev/refine/issues/6352)
9 changes: 9 additions & 0 deletions .changeset/gorgeous-needles-guess.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
---
"@refinedev/strapi-v4": patch
---

fix: `transformHttpError.ts` and `transformErrorMessages` files are not [swizzling](https://refine.dev/docs/packages/cli/#commands).

From now on, these files will be copied to the project.

[Resolves #6397](https://github.com/refinedev/refine/issues/6397)
17 changes: 17 additions & 0 deletions .changeset/hot-hats-repair.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
---
"@refinedev/graphql": major
---

feat: rewrite GraphQL data provider.

We've modernized GraphQL dataprovider to make it more flexible and strictly coupled into a specific API schema.
You can utilize `option` parameter to change the behaviour of the data provider. You can also do it individually for a single action.
We've removed `gql-query-builder` and `graphql-request` dependencies and now using `@urql/core` as a GraphQL client.
This means now it's required to pass either `gqlQuery` or `gqlMutation` to the hooks, `meta.fields` usage is removed.
`graphql-tag` package is also removed since `@urql/core` already has `gql` export to write queries & mutations.
We are no more re-exporting other packages, just our data provider, live provider and defaultOptions.

See the updated documentation for more details: https://refine.dev/docs/data/packages/graphql/

[Resolves #5942](https://github.com/refinedev/refine/issues/5942)
[Resolves #5943](https://github.com/refinedev/refine/issues/5943)
9 changes: 9 additions & 0 deletions .changeset/itchy-moose-reflect.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
---
"@refinedev/core": minor
---

chore: From now on, [`useLink`](https://refine.dev/docs/routing/hooks/use-link/) returns [`<Link />`](https://refine.dev/docs/routing/components/link/) component instead of returning [`routerProvider.Link`](https://refine.dev/docs/routing/router-provider/#link).

Since the `<Link />` component uses `routerProvider.Link` under the hood with leveraging `useGo` hook to generate the URL there is no breaking change. It's recommended to use the `<Link />` component from the `@refinedev/core` package instead of `useLink` hook. This hook is used mostly for internal purposes and is only exposed for customization needs.

[Fixes #6329](https://github.com/refinedev/refine/issues/6329)
9 changes: 9 additions & 0 deletions .changeset/large-pots-smell.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
---
"@refinedev/devtools-server": patch
---

chore: bump express version to latest

Bump `express` dependecy to `^4.21.0` to fix vulnerability in `serve-static`.

[Resolves #6321](https://github.com/refinedev/refine/issues/6321)
25 changes: 25 additions & 0 deletions .changeset/large-turtles-smile.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
---
"@refinedev/nestjsx-crud": patch
---

feat: add `between` filter operator

Add between operator support to `CrudFilters`

```ts
import { useTable } from "@refinedev/core";

useTable({
filters: {
initial: [
{
field: "createdAt",
operator: "between",
value: [new Date().toISOString(), new Date().toISOString()],
},
],
},
});
```

[Resolves #6334](https://github.com/refinedev/refine/issues/6334)
9 changes: 9 additions & 0 deletions .changeset/lazy-rocks-pump.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
---
"@refinedev/cli": patch
---

fix(cli): handle errors while fetching dependencies in get-project-type

When working with `deno` or missing `package.json` file, an error was thrown while determining the project type. This was causing the CLI to crash even though the fallbacks were provided. This PR handles such errors in `getProjectType` and lets it use the fallback type.

[Resolves #6335](https://github.com/refinedev/refine/issues/6335)
9 changes: 9 additions & 0 deletions .changeset/mean-comics-live.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
---
"@refinedev/cli": patch
---

chore(cli): remove unused express dependency

Removed `express` dependency which triggers a vulnerability warning from `serve-static`.

[Resolves #6321](https://github.com/refinedev/refine/issues/6321)
9 changes: 9 additions & 0 deletions .changeset/spotty-jokes-swim.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
---
"@refinedev/core": patch
---

fix(core): wrap `setFilters` and `setSorters` methods with `useCallback` to prevent looping re-renders

With this we can use the setFilters as dependencies inside useEffects without infinite loop since state changes in the hook won't cause the functions to be re-assigned

[Fixes #6385](https://github.com/refinedev/refine/issues/6385)
2 changes: 1 addition & 1 deletion .syncpackrc
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
{
"dependencies": ["nock"],
"dependencyTypes": ["dev"],
"packages": ["@refinedev/appwrite"],
"packages": ["@refinedev/appwrite", "@refinedev/graphql"],
"isIgnored": true
}
]
Expand Down
2 changes: 1 addition & 1 deletion documentation/blog/2024-03-22-useeffect-cleanup.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ This is where the `useEffect` cleaning function comes in. In the cleanup functio

## When to use the `useEffect` cleanup function

There are various scenarios which will prompt the use of the `useEffect` cleanup function. They are as follows:
There are various scenarios which will prompt the use of the `useEffect` cleanup function. They are as follows:

### Fetch requests

Expand Down
Loading

0 comments on commit 4ccf7fa

Please sign in to comment.