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

[Upgrade Tool] V2 #18990

Closed
wants to merge 195 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
195 commits
Select commit Hold shift + click to select a range
16159b4
Bootstrap the upgrade tool skeleton
Convly Oct 25, 2023
f387d7d
Update yarn lock
Convly Oct 25, 2023
52dbe17
Fix path, don't use cwd for internal codemods path
Convly Oct 25, 2023
61f47a4
Merge branch 'main' into upgrade-tool/init-package
Bassel17 Nov 7, 2023
0925cb9
Use strapi/strapi version instead of the package's one, throw if the …
Convly Nov 13, 2023
adb5de8
Merge branch 'upgrade-tool/init-package' of github.com:strapi/strapi …
Convly Nov 13, 2023
6a482f6
Merge branch 'main' of github.com:strapi/strapi into upgrade-tool/ini…
Convly Nov 13, 2023
aaade5d
Merge branch 'main' into upgrade-tool/init-package
innerdvations Nov 13, 2023
9f2ea0b
fix: init a 5.0.0 codemods folder
innerdvations Nov 13, 2023
7edccf9
fix: change some debug logs to info
innerdvations Nov 13, 2023
400c357
Add time utils
Convly Nov 15, 2023
98bd715
Add the project loader util
Convly Nov 15, 2023
adffc96
Update commands
Convly Nov 15, 2023
39452f9
Update core utils
Convly Nov 15, 2023
5640776
Update cli commands
Convly Nov 15, 2023
bf9b35d
Update configuration
Convly Nov 15, 2023
c2cbb34
Update types
Convly Nov 15, 2023
359fe2d
Export all tasks from root
Convly Nov 15, 2023
f78d7a3
Update yarn.lock
Convly Nov 15, 2023
22c7f0a
Merge branch 'upgrade-tool/init-package' of github.com:strapi/strapi …
Convly Nov 15, 2023
ba42e79
Merge branch 'main' of github.com:strapi/strapi into upgrade-tool/ini…
Convly Nov 15, 2023
bbf6c4f
Fix typo in jest config
Convly Nov 15, 2023
7b70d12
Fix upgrade package exports
Convly Nov 15, 2023
bc212ed
Add the --project-path / -p option to the different upgrade CLI commands
Convly Nov 15, 2023
520fc55
Remove tests scripts from the upgrade tool for now
Convly Nov 15, 2023
e477318
Merge branch 'upgrade-tool/init-package' into upgrade-tool/path-option
Convly Nov 15, 2023
478e31c
Fix package.json typo
Convly Nov 15, 2023
d3290be
Merge branch 'upgrade-tool/init-package' into upgrade-tool/path-option
Convly Nov 15, 2023
6aaae9d
Update the package.json discovery strategy
Convly Nov 15, 2023
8a20431
Fix linting issues
Convly Nov 15, 2023
32ee73d
Update the package.json discovery strategy
Convly Nov 15, 2023
467525d
Merge branch 'upgrade-tool/init-package' into upgrade-tool/path-option
Convly Nov 15, 2023
b58a5aa
Update glob to the latest version
Convly Nov 16, 2023
6bfaec4
Allow json transforms
Convly Nov 16, 2023
fb7fcd9
Remove unused imports
Convly Nov 16, 2023
7e9593b
Add fs-extra to the dependencies
Convly Nov 16, 2023
18240ab
Update regexp to avoid useless escape character
Convly Nov 16, 2023
56a1632
Fix linting issues
Convly Nov 16, 2023
fa06abf
Add the resources directory the list of the package's files
Convly Nov 16, 2023
180f814
Merge pull request #18798 from strapi/upgrade-tool/path-option
Convly Nov 16, 2023
ff15e98
Allow targeting a specific version or release from the CLI
Convly Nov 17, 2023
f885327
Fix linting issues
Convly Nov 17, 2023
21992aa
Adding back the tests scripts
Convly Nov 17, 2023
1ae904d
Add unit tests for the "core.format" utils
Convly Nov 17, 2023
ad851e4
Add unit tests for the "core.logger" utils
Convly Nov 17, 2023
b7f6307
Add unit tests for the "core.time" utils
Convly Nov 17, 2023
7772710
Add unit tests for the "core.version" utils
Convly Nov 17, 2023
2f96c3e
Add unit tests for the "core.runner.json" utils
Convly Nov 17, 2023
a01bfaa
Update packages/utils/upgrade/src/cli/index.ts
Convly Nov 17, 2023
e008bb1
Merge pull request #18813 from strapi/upgrade-tool/json-transforms
Convly Nov 20, 2023
ea156c1
Update packages/utils/upgrade/src/cli/index.ts
Convly Nov 20, 2023
ebd8178
Add unit tests for the "core.runner" utils
Convly Nov 20, 2023
eb74e27
Implement a custom JSON transform API
Convly Nov 21, 2023
ec832d0
Update format tests
Convly Nov 21, 2023
dff6235
Fix imports order & TS errors
Convly Nov 21, 2023
d5ce52c
Merge pull request #18850 from strapi/upgrade-tool/unit-tests
Convly Nov 21, 2023
26afe8a
Update file API for source (now json)
Convly Nov 21, 2023
c892f4f
Merge branch 'features/upgrade-tool' of github.com:strapi/strapi into…
Convly Nov 21, 2023
8f77e07
Merge branch 'upgrade-tool/init-package' of github.com:strapi/strapi …
Convly Nov 21, 2023
3320678
Merge branch 'upgrade-tool/target-specific-version' of github.com:str…
Convly Nov 21, 2023
cf29ebd
Add Utils.JSON types utilities & use it everywhere JSONObject was used
Convly Nov 21, 2023
35d4e02
Merge pull request #18859 from strapi/upgrade-tool/json-transform-api
Convly Nov 21, 2023
ba173de
chore: add function to check if git exists and is clean
christiancp100 Nov 22, 2023
b332ce1
Makes "patch" the default target in the upgrade CLI
Convly Nov 22, 2023
04bf274
Add the -n alias for the --dry-run option in the upgrade CLI
Convly Nov 22, 2023
46bc5a1
Use esbuild-register instead of babel/register for the upgrade json r…
Convly Nov 22, 2023
176d364
feat: Initialize upgrade tool package (#18610)
innerdvations Nov 22, 2023
adb7900
Handle version ranges in project's dependencies
Convly Nov 22, 2023
f0aaeb6
Update packages/utils/upgrade/src/core/project-loader.ts
Convly Nov 22, 2023
15c4206
Merge branch 'features/upgrade-tool' of github.com:strapi/strapi into…
Convly Nov 22, 2023
7ca17e7
Fix lint
Convly Nov 22, 2023
a4bfb19
Merge branch 'upgrade-tool/minor-enhancements' of github.com:strapi/s…
Convly Nov 22, 2023
3c19364
Remove old commands files
Convly Nov 22, 2023
389f849
Merge branch 'upgrade-tool/target-specific-version' of github.com:str…
Convly Nov 22, 2023
56be45c
Fix JSON types
Convly Nov 22, 2023
64cb8f2
Merge branch 'upgrade-tool/target-specific-version' into upgrade-tool…
Convly Nov 22, 2023
bccb3c3
Fix import order
Convly Nov 22, 2023
e44620e
Merge branch 'upgrade-tool/target-specific-version' of github.com:str…
Convly Nov 22, 2023
f607b3f
Merge branch 'upgrade-tool/minor-enhancements' of github.com:strapi/s…
Convly Nov 22, 2023
e960f33
Merge pull request #18873 from strapi/upgrade-tool/minor-enhancements
Convly Nov 22, 2023
5f69613
Merge pull request #18833 from strapi/upgrade-tool/target-specific-ve…
Convly Nov 22, 2023
7dab516
Merge branch 'features/upgrade-tool' of github.com:strapi/strapi into…
christiancp100 Nov 22, 2023
a897f7d
test the is clean git repo function
christiancp100 Nov 23, 2023
23af549
Delete example content type
christiancp100 Nov 23, 2023
b4f8be7
Update packages/utils/upgrade/package.json
Nov 23, 2023
0b1a503
check git is installed
christiancp100 Nov 23, 2023
c5092fe
Merge branch 'upgrade-tool/git' of github.com:strapi/strapi into upgr…
christiancp100 Nov 23, 2023
37f9f60
Update packages/utils/upgrade/src/core/requirements/is-clean-git-repo.ts
Nov 23, 2023
19ed4d1
Handle new targeting options (lt,eq,current,next,...) and update curr…
Convly Nov 24, 2023
fd4f2ff
Fix import order for the version test
Convly Nov 24, 2023
a4d4c7f
Fix unexpected lexical declaration in case blocks
Convly Nov 24, 2023
e1cba03
Fix linting issue
Convly Nov 24, 2023
7cfb682
Update packages/utils/upgrade/src/__tests__/core/requirements/is-clea…
innerdvations Nov 24, 2023
1cd58b7
Update packages/utils/upgrade/src/__tests__/core/requirements/is-clea…
innerdvations Nov 24, 2023
9d83cd9
Merge pull request #18868 from strapi/upgrade-tool/git
Nov 24, 2023
0228c7a
Merge branch 'features/upgrade-tool' into upgrade-tool/versionning-v2
Convly Nov 27, 2023
2628ba1
Merge pull request #18906 from strapi/upgrade-tool/versionning-v2
Convly Nov 27, 2023
ea34d03
feat: [Upgrade tool] Add documentation (#18890)
innerdvations Nov 27, 2023
e883496
Refactoring the upgrade tool with the new specifications
Convly Dec 1, 2023
d58362a
fix deep query populate issue on dynamic zone
Bassel17 Dec 1, 2023
74d586b
Export base classes from the containing file but prevent them from ap…
Convly Dec 1, 2023
a8318be
Fix linting issues
Convly Dec 1, 2023
865fdcc
chore(workflows): update unit_front to use node 20 (#18962)
joshuaellis Dec 1, 2023
f1dd5cc
chore(content-manager): convert the editview to typescript (#18948)
joshuaellis Dec 4, 2023
5fc7637
Register logger middleware before errors middleware (#16921)
goodhoko Dec 5, 2023
4ba519b
Merge branch 'main' of github.com:strapi/strapi into upgrade-tool/ref…
Convly Dec 5, 2023
5b92db9
Revert breaking change on the media type
Convly Dec 5, 2023
97cdf7b
Update fs-extra to fix realpath.native error
Convly Dec 5, 2023
327b3dc
fix(content-manager): add memoization to params object to stop recurs…
joshuaellis Dec 5, 2023
2951783
chore(cm): convert recursive layouts to TS (#18983)
joshuaellis Dec 5, 2023
9ac9b51
Add unit tests for runners, project, scanner and timer
Convly Dec 5, 2023
8e2421b
Merge pull request #18966 from strapi/fix/deep-populate-dynamiczone
Bassel17 Dec 5, 2023
e85a23d
fix(permissions): circular dependency (#18986)
joshuaellis Dec 6, 2023
06f869b
Fix lint & small issues for requirements
Convly Dec 6, 2023
ec50d9b
Typo fix
Convly Dec 6, 2023
133b68e
Merge branch 'main' of github.com:strapi/strapi into features/upgrade…
Convly Dec 6, 2023
9c8d5c9
Merge branch 'features/upgrade-tool' of github.com:strapi/strapi into…
Convly Dec 6, 2023
cebf3a2
Merge branch 'upgrade-tool/refactor' of github.com:strapi/strapi into…
Convly Dec 6, 2023
611b5b3
Merge branch 'upgrade-tool/refactor' of github.com:strapi/strapi into…
Convly Dec 6, 2023
a6ae757
Update yarn lock & dependencies
Convly Dec 6, 2023
315c8b5
Remove unwanted artifact from old branch
Convly Dec 6, 2023
487af9a
Remove old file
Convly Dec 6, 2023
7a508b8
Revert nx modification
Convly Dec 6, 2023
bdf128c
Add prettier types
Convly Dec 6, 2023
a74269a
Bootstrap the upgrade tool skeleton
Convly Oct 25, 2023
4ac0ae9
Update yarn lock
Convly Oct 25, 2023
14ecf23
Fix path, don't use cwd for internal codemods path
Convly Oct 25, 2023
a4f569e
Use strapi/strapi version instead of the package's one, throw if the …
Convly Nov 13, 2023
42f6c55
Add time utils
Convly Nov 15, 2023
c1a5a56
Add the project loader util
Convly Nov 15, 2023
f9afa2c
Update commands
Convly Nov 15, 2023
daa68e7
Update core utils
Convly Nov 15, 2023
0e89340
Update cli commands
Convly Nov 15, 2023
8490c0b
Update configuration
Convly Nov 15, 2023
26d3601
Update types
Convly Nov 15, 2023
5fdecc4
Export all tasks from root
Convly Nov 15, 2023
5729b45
Update yarn.lock
Convly Nov 15, 2023
18ab6a6
fix: init a 5.0.0 codemods folder
innerdvations Nov 13, 2023
a143097
fix: change some debug logs to info
innerdvations Nov 13, 2023
271ff9f
Fix typo in jest config
Convly Nov 15, 2023
712eda2
Fix upgrade package exports
Convly Nov 15, 2023
4f1178c
Add the --project-path / -p option to the different upgrade CLI commands
Convly Nov 15, 2023
7a30bfb
Remove tests scripts from the upgrade tool for now
Convly Nov 15, 2023
d545a90
Fix package.json typo
Convly Nov 15, 2023
dec9760
Update the package.json discovery strategy
Convly Nov 15, 2023
be06cde
Fix linting issues
Convly Nov 15, 2023
bfe5a5b
Update glob to the latest version
Convly Nov 16, 2023
3a0c546
Allow json transforms
Convly Nov 16, 2023
495b591
Remove unused imports
Convly Nov 16, 2023
1a0a6ad
Add fs-extra to the dependencies
Convly Nov 16, 2023
887f912
Update regexp to avoid useless escape character
Convly Nov 16, 2023
ab76fce
Fix linting issues
Convly Nov 16, 2023
81db299
Add the resources directory the list of the package's files
Convly Nov 16, 2023
254273a
Allow targeting a specific version or release from the CLI
Convly Nov 17, 2023
6aa6076
Fix linting issues
Convly Nov 17, 2023
b397518
Update packages/utils/upgrade/src/cli/index.ts
Convly Nov 17, 2023
89284f9
Update packages/utils/upgrade/src/cli/index.ts
Convly Nov 20, 2023
c25e63b
Implement a custom JSON transform API
Convly Nov 21, 2023
513760c
Update file API for source (now json)
Convly Nov 21, 2023
dd9f8df
Adding back the tests scripts
Convly Nov 17, 2023
485ec6d
Add unit tests for the "core.format" utils
Convly Nov 17, 2023
2036ffb
Add unit tests for the "core.logger" utils
Convly Nov 17, 2023
4f2cb7c
Add unit tests for the "core.time" utils
Convly Nov 17, 2023
f6f936a
Add unit tests for the "core.version" utils
Convly Nov 17, 2023
40fb41c
Add unit tests for the "core.runner.json" utils
Convly Nov 17, 2023
d01c322
Add unit tests for the "core.runner" utils
Convly Nov 20, 2023
5f8c5a1
Update format tests
Convly Nov 21, 2023
10dc31e
Fix imports order & TS errors
Convly Nov 21, 2023
0be7d58
Add Utils.JSON types utilities & use it everywhere JSONObject was used
Convly Nov 21, 2023
4333fe9
Makes "patch" the default target in the upgrade CLI
Convly Nov 22, 2023
9ec77cf
Add the -n alias for the --dry-run option in the upgrade CLI
Convly Nov 22, 2023
1586f5c
Use esbuild-register instead of babel/register for the upgrade json r…
Convly Nov 22, 2023
fa67ae3
Handle version ranges in project's dependencies
Convly Nov 22, 2023
d17bbca
Fix lint
Convly Nov 22, 2023
d90c916
Update packages/utils/upgrade/src/core/project-loader.ts
Convly Nov 22, 2023
99406b2
feat: Initialize upgrade tool package (#18610)
innerdvations Nov 22, 2023
1fdd631
Remove old commands files
Convly Nov 22, 2023
35738ba
Fix import order
Convly Nov 22, 2023
095f1e0
Fix JSON types
Convly Nov 22, 2023
c61f973
Handle new targeting options (lt,eq,current,next,...) and update curr…
Convly Nov 24, 2023
d48a370
Fix import order for the version test
Convly Nov 24, 2023
37a6226
Fix unexpected lexical declaration in case blocks
Convly Nov 24, 2023
3385dca
Fix linting issue
Convly Nov 24, 2023
e1c8c6c
chore: add function to check if git exists and is clean
christiancp100 Nov 22, 2023
cd25bb2
test the is clean git repo function
christiancp100 Nov 23, 2023
7925450
Delete example content type
christiancp100 Nov 23, 2023
35cd3d9
check git is installed
christiancp100 Nov 23, 2023
6310f7b
Update packages/utils/upgrade/src/core/requirements/is-clean-git-repo.ts
Nov 23, 2023
c40e839
Update packages/utils/upgrade/src/__tests__/core/requirements/is-clea…
innerdvations Nov 24, 2023
554a301
Update packages/utils/upgrade/src/__tests__/core/requirements/is-clea…
innerdvations Nov 24, 2023
a8f3a16
feat: [Upgrade tool] Add documentation (#18890)
innerdvations Nov 27, 2023
160e30c
Merge branch 'features/upgrade-tool' into upgrade-tool/refactor
Convly Dec 6, 2023
a65e9ac
Remove files from old structure
Convly Dec 6, 2023
8b61eaf
Update yarn lock
Convly Dec 6, 2023
bcdf25a
Remove old upgrade core files
Convly Dec 6, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
4 changes: 2 additions & 2 deletions .github/actions/check-pr-status/dist/index.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion .github/workflows/tests.yml
Expand Up @@ -135,7 +135,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
node: [18]
node: [20]
steps:
- uses: actions/checkout@v4
with:
Expand Down
78 changes: 78 additions & 0 deletions e2e/tests/content-manager/editview.spec.js
@@ -0,0 +1,78 @@
import { test, expect } from '@playwright/test';
import { login } from '../../utils/login';
import { resetDatabaseAndImportDataFromPath } from '../../scripts/dts-import';

test.describe('Edit View', () => {
test.beforeEach(async ({ page }) => {
await resetDatabaseAndImportDataFromPath('./e2e/data/with-admin.tar');
await page.goto('/admin');
await login({ page });
});

/**
* @note There is only one field in this content-type.
*/
test('A user should be able to navigate to the EditView of the content manager to create, save, publish, unpublish & delete a new entry', async ({
page,
}) => {
await page.getByRole('link', { name: 'Content Manager' }).click();
await page
.getByRole('link', { name: /Create new entry/ })
.nth(1)
.click();

/**
* Now we're in the edit view.
*/
await page.waitForURL('**/content-manager/collectionType/api::testing.testing/create');

await page.getByRole('textbox', { name: 'title' }).fill('my content');

await page.getByRole('button', { name: 'Save' }).click();

await expect(page.getByText('Saved')).toBeVisible();

await expect(page.getByRole('button', { name: 'Save' })).toBeDisabled();

await page.getByRole('button', { name: 'Publish' }).click();

await expect(page.getByText('Published', { exact: true })).toBeVisible();

await expect(page.getByRole('button', { name: 'Unpublish' })).not.toBeDisabled();

await page.getByRole('textbox', { name: 'title' }).fill('my content revised');

await expect(page.getByRole('button', { name: 'Unpublish' })).toBeDisabled();

await page.getByRole('button', { name: 'Save' }).click();

await expect(page.getByRole('button', { name: 'Unpublish' })).not.toBeDisabled();

await page.getByRole('button', { name: 'Unpublish' }).click();

await expect(page.getByRole('dialog', { name: 'Confirmation' })).toBeVisible();

await page.getByRole('button', { name: 'Yes, confirm' }).click();

await expect(page.getByText('Unpublished')).toBeVisible();

await expect(page.getByRole('button', { name: 'Publish' })).not.toBeDisabled();

await page.getByRole('button', { name: 'Delete this entry' }).click();

await expect(page.getByRole('dialog', { name: 'Confirmation' })).toBeVisible();

await page.getByRole('button', { name: 'Confirm' }).click();

await expect(page.getByText('Deleted')).toBeVisible();

/**
* We're back on the list view
*/
await page.waitForURL(
'**/content-manager/collectionType/api::testing.testing?page=1&pageSize=10&sort=title:ASC'
);

await expect(page.getByRole('link', { name: /Create new entry/ }).nth(1)).toBeVisible();
});
});
2 changes: 1 addition & 1 deletion examples/getstarted/config/middlewares.js
Expand Up @@ -3,11 +3,11 @@
const responseHandlers = require('./src/response-handlers');

module.exports = [
'strapi::logger',
'strapi::errors',
'strapi::security',
'strapi::cors',
'strapi::poweredBy',
'strapi::logger',
'strapi::query',
'strapi::body',
'strapi::session',
Expand Down
2 changes: 1 addition & 1 deletion examples/kitchensink-ts/config/middlewares.ts
@@ -1,9 +1,9 @@
export default [
'strapi::logger',
'strapi::errors',
'strapi::security',
'strapi::cors',
'strapi::poweredBy',
'strapi::logger',
'strapi::query',
'strapi::body',
'strapi::session',
Expand Down
4 changes: 2 additions & 2 deletions package.json
Expand Up @@ -117,9 +117,9 @@
"eslint-plugin-testing-library": "6.0.2",
"execa": "5.1.1",
"find-up": "5.0.0",
"fs-extra": "10.0.0",
"fs-extra": "10.1.0",
"get-port": "5.1.1",
"glob": "7.2.3",
"glob": "10.3.10",
"husky": "8.0.2",
"inquirer": "8.2.5",
"jest": "29.6.0",
Expand Down
2 changes: 1 addition & 1 deletion packages/cli/create-strapi-starter/package.json
Expand Up @@ -49,7 +49,7 @@
"ci-info": "3.8.0",
"commander": "8.3.0",
"execa": "5.1.1",
"fs-extra": "10.0.0",
"fs-extra": "10.1.0",
"inquirer": "8.2.5",
"ora": "5.4.1"
},
Expand Down
8 changes: 2 additions & 6 deletions packages/core/admin/admin/src/StrapiApp.tsx
Expand Up @@ -521,12 +521,7 @@ class StrapiApp {
runHookSeries = (name: string, asynchronous = false) =>
asynchronous ? this.hooksDict[name].runSeriesAsync() : this.hooksDict[name].runSeries();

runHookWaterfall = (
name: string,
initialValue: unknown,
asynchronous = false,
store?: unknown
) => {
runHookWaterfall = <T,>(name: string, initialValue: T, asynchronous = false, store?: Store) => {
return asynchronous
? this.hooksDict[name].runWaterfallAsync(initialValue, store)
: this.hooksDict[name].runWaterfall(initialValue, store);
Expand Down Expand Up @@ -558,6 +553,7 @@ class StrapiApp {
runHookWaterfall={(name, initialValue, async = false) => {
return this.runHookWaterfall(name, initialValue, async, store);
}}
// @ts-expect-error – context issue. TODO: fix this.
runHookSeries={this.runHookSeries}
themes={this.configurations.themes}
settings={this.settings}
Expand Down
Expand Up @@ -18,8 +18,7 @@ import { type Element, Editor, Path, Range, Transforms } from 'slate';
import { type RenderElementProps, ReactEditor } from 'slate-react';
import styled from 'styled-components';

// @ts-expect-error TODO migrate this file
import { composeRefs } from '../../../utils';
import { composeRefs } from '../../../utils/refs';
import { type BlocksStore, useBlocksEditorContext } from '../BlocksEditor';
import { editLink, removeLink } from '../utils/links';
import { type Block } from '../utils/types';
Expand Down
Expand Up @@ -4,8 +4,7 @@ import { Box, Flex, Typography } from '@strapi/design-system';
import { type MessageDescriptor, useIntl } from 'react-intl';
import styled from 'styled-components';

// @ts-expect-error TODO convert to typescript
import { Hint } from '../Hint';
import { Hint, HintProps } from '../Hint';

import { BlocksEditor } from './BlocksEditor';

Expand All @@ -15,18 +14,19 @@ const LabelAction = styled(Box)`
}
`;

interface BlocksInputProps extends React.ComponentPropsWithoutRef<typeof BlocksEditor> {
interface BlocksInputProps
extends React.ComponentPropsWithoutRef<typeof BlocksEditor>,
Pick<HintProps, 'hint'> {
intlLabel: MessageDescriptor;
attribute: { type: string; [key: string]: unknown };
description?: MessageDescriptor;
labelAction?: React.ReactNode;
required?: boolean;
hint?: string | string[];
}

const BlocksInput = React.forwardRef<{ focus: () => void }, BlocksInputProps>(
(
{ intlLabel, labelAction, name, required = false, error = '', hint = null, ...editorProps },
{ intlLabel, labelAction, name, required = false, error = '', hint, ...editorProps },
forwardedRef
) => {
const { formatMessage } = useIntl();
Expand Down