Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

release: october 2024 #6336

Merged
merged 20 commits into from
Oct 14, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
20 commits
Select commit Hold shift + click to select a range
c630b09
fix(core): added undefined type `successNotification` and `errorNotif…
Anonymous961 Sep 16, 2024
5c0f3d8
feat(nestjsx-crud): add between operator (#6320) (resolves #6334)
mehrabmp Sep 16, 2024
6e5d97c
Merge branch 'master' into releases/october
alicanerdurmaz Sep 18, 2024
5a81b35
feat(core): create a `<Link />` component to navigate to a given reso…
alicanerdurmaz Sep 19, 2024
ac31926
feat(examples): use `<Link />` component from `@refinedev/core` on ex…
alicanerdurmaz Sep 19, 2024
da9da4e
fix(devtools-server): bump `express` to `^4.21.0` (#6354) (resolves #…
arndom Sep 23, 2024
a0f2d7b
fix(core): `label` and `route` fields of `useMenu.menuItems` shouldn…
alicanerdurmaz Sep 23, 2024
d0341e6
Merge branch 'master' into releases/october
aliemir Sep 24, 2024
273bc2e
Merge branch 'master' into releases/october
alicanerdurmaz Sep 26, 2024
e5aaa98
Merge branch 'master' into releases/october
alicanerdurmaz Oct 1, 2024
a3fca84
fix(hasura): pass gqlVariables to getOne operation (#6379)
BatuhanW Oct 2, 2024
6c2931a
feat(examples): add refine-hr-community (#6358)
alicanerdurmaz Oct 7, 2024
548cd03
Merge branch 'master' into releases/october
aliemir Oct 7, 2024
5805100
Merge branch 'master' into releases/october
BatuhanW Oct 7, 2024
10b6d77
fix(strapi-v4): has missing files after swizzling (#6398)
alicanerdurmaz Oct 10, 2024
b1185d8
Merge branch 'master' into releases/october
aliemir Oct 11, 2024
b9c23b9
chore(core): fix incorrect url in tsdoc
BatuhanW Oct 11, 2024
451016a
fix(cli): handle errors while fetching dependencies in get-project-ty…
aliemir Oct 11, 2024
58e90f2
feat(graphql): rewrite GraphQL data provider (#6357) Resolves #5942 #…
BatuhanW Oct 14, 2024
bfe28f0
fix(core): wrap `setFiltersFn` with `useCallback` (#6386) (resolves #…
hugorezende Oct 14, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading