From 459a8c4e3438cb49bc83843c343c619360203ba3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dami=C3=A1n=20Su=C3=A1rez?= Date: Tue, 12 May 2026 15:24:45 -0300 Subject: [PATCH 1/4] add tsconfig umbrella for widgets/ extends tsconfig.base.json and registers the project in root references so widget sources are type-checked. --- tsconfig.json | 3 ++- widgets/tsconfig.json | 21 +++++++++++++++++++++ 2 files changed, 23 insertions(+), 1 deletion(-) create mode 100644 widgets/tsconfig.json diff --git a/tsconfig.json b/tsconfig.json index dba162ff1cee44..b8edb76a36f853 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -93,7 +93,8 @@ { "path": "storybook" }, { "path": "test/e2e" }, { "path": "test/storybook-playwright" }, - { "path": "test/performance" } + { "path": "test/performance" }, + { "path": "widgets" } ], "files": [] } diff --git a/widgets/tsconfig.json b/widgets/tsconfig.json new file mode 100644 index 00000000000000..e5d1ac26273659 --- /dev/null +++ b/widgets/tsconfig.json @@ -0,0 +1,21 @@ +{ + "$schema": "https://json.schemastore.org/tsconfig.json", + "extends": "../tsconfig.base.json", + "compilerOptions": { + "rootDir": ".", + "types": [ "style-imports", "react-css-custom-properties" ] + }, + "references": [ + { "path": "../packages/core-data" }, + { "path": "../packages/data" }, + { "path": "../packages/dataviews" }, + { "path": "../packages/date" }, + { "path": "../packages/element" }, + { "path": "../packages/html-entities" }, + { "path": "../packages/i18n" }, + { "path": "../packages/icons" }, + { "path": "../packages/ui" } + ], + "include": [ "**/*.ts", "**/*.tsx" ], + "exclude": [ "**/test/**", "**/build/**", "**/build-types/**" ] +} From f4805869ca67a4fd40ff8695ee42da78d2580638 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dami=C3=A1n=20Su=C3=A1rez?= Date: Tue, 12 May 2026 15:24:52 -0300 Subject: [PATCH 2/4] add widgets/package.json declares clsx and @wordpress/* deps so the widget sources satisfy import/no-extraneous-dependencies. --- widgets/package.json | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 widgets/package.json diff --git a/widgets/package.json b/widgets/package.json new file mode 100644 index 00000000000000..0073c1c72c90f0 --- /dev/null +++ b/widgets/package.json @@ -0,0 +1,20 @@ +{ + "name": "@wordpress/widgets-app", + "version": "0.0.0", + "description": "Application widgets surfaced by the Gutenberg editor.", + "private": true, + "author": "The WordPress Contributors", + "license": "GPL-2.0-or-later", + "dependencies": { + "@wordpress/core-data": "file:../packages/core-data", + "@wordpress/data": "file:../packages/data", + "@wordpress/dataviews": "file:../packages/dataviews", + "@wordpress/date": "file:../packages/date", + "@wordpress/element": "file:../packages/element", + "@wordpress/html-entities": "file:../packages/html-entities", + "@wordpress/i18n": "file:../packages/i18n", + "@wordpress/icons": "file:../packages/icons", + "@wordpress/ui": "file:../packages/ui", + "clsx": "^2.1.1" + } +} From 51355fd9e49a77abb5d46a8f5224eba4902fa02d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dami=C3=A1n=20Su=C3=A1rez?= Date: Tue, 12 May 2026 15:54:19 -0300 Subject: [PATCH 3/4] add required metadata to widgets/package.json bugs, homepage, keywords, publishConfig, repository fields required by package.json lint rules. --- widgets/package.json | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/widgets/package.json b/widgets/package.json index 0073c1c72c90f0..408477f32d355a 100644 --- a/widgets/package.json +++ b/widgets/package.json @@ -5,6 +5,20 @@ "private": true, "author": "The WordPress Contributors", "license": "GPL-2.0-or-later", + "keywords": [ + "wordpress", + "gutenberg", + "widgets" + ], + "homepage": "https://github.com/WordPress/gutenberg/tree/HEAD/widgets", + "repository": { + "type": "git", + "url": "git+https://github.com/WordPress/gutenberg.git", + "directory": "widgets" + }, + "bugs": { + "url": "https://github.com/WordPress/gutenberg/issues" + }, "dependencies": { "@wordpress/core-data": "file:../packages/core-data", "@wordpress/data": "file:../packages/data", @@ -16,5 +30,8 @@ "@wordpress/icons": "file:../packages/icons", "@wordpress/ui": "file:../packages/ui", "clsx": "^2.1.1" + }, + "publishConfig": { + "access": "public" } } From 2c03ad20c6a0182fd7de94d18b0bbfd7dfc51e98 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dami=C3=A1n=20Su=C3=A1rez?= Date: Tue, 12 May 2026 17:58:11 -0300 Subject: [PATCH 4/4] add react to widgets tsconfig types makes JSX.IntrinsicElements globally available so widgets with bare JSX (no @wordpress/* imports) type-check. --- widgets/tsconfig.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/widgets/tsconfig.json b/widgets/tsconfig.json index e5d1ac26273659..4d97b5cc06e6fb 100644 --- a/widgets/tsconfig.json +++ b/widgets/tsconfig.json @@ -3,7 +3,7 @@ "extends": "../tsconfig.base.json", "compilerOptions": { "rootDir": ".", - "types": [ "style-imports", "react-css-custom-properties" ] + "types": [ "react", "style-imports", "react-css-custom-properties" ] }, "references": [ { "path": "../packages/core-data" },