From ef7afefc5988eaab30da0025aa48bfbddb09a79f Mon Sep 17 00:00:00 2001 From: Jorge Costa Date: Tue, 7 Jan 2025 18:17:32 +0000 Subject: [PATCH] Update: Bundle upload media. (#68522) Co-authored-by: jorgefilipecosta Co-authored-by: jsnajdr --- docs/manifest.json | 6 ++++++ package-lock.json | 6 +++++- packages/block-editor/package.json | 1 + packages/block-editor/src/components/provider/index.js | 1 - packages/block-editor/tsconfig.json | 1 + packages/dependency-extraction-webpack-plugin/lib/util.js | 1 + packages/upload-media/package.json | 4 ++-- tools/webpack/packages.js | 1 + 8 files changed, 17 insertions(+), 4 deletions(-) diff --git a/docs/manifest.json b/docs/manifest.json index 8f267e79ef4feb..94610061e430b5 100644 --- a/docs/manifest.json +++ b/docs/manifest.json @@ -1967,6 +1967,12 @@ "markdown_source": "../packages/undo-manager/README.md", "parent": "packages" }, + { + "title": "@wordpress/upload-media", + "slug": "packages-upload-media", + "markdown_source": "../packages/upload-media/README.md", + "parent": "packages" + }, { "title": "@wordpress/url", "slug": "packages-url", diff --git a/package-lock.json b/package-lock.json index 66e468a5bbf2ab..7c7a12a1e7bc7b 100644 --- a/package-lock.json +++ b/package-lock.json @@ -8724,6 +8724,7 @@ "resolved": "https://registry.npmjs.org/@playwright/test/-/test-1.49.1.tgz", "integrity": "sha512-Ky+BVzPz8pL6PQxHqNRW1k3mIyv933LML7HktS8uik0bUXNCdPhoS/kLihiO1tMf/egaJb4IutXd7UywvXEW+g==", "dev": true, + "license": "Apache-2.0", "dependencies": { "playwright": "1.49.1" }, @@ -37906,6 +37907,7 @@ "resolved": "https://registry.npmjs.org/playwright/-/playwright-1.49.1.tgz", "integrity": "sha512-VYL8zLoNTBxVOrJBbDuRgDWa3i+mfQgDTrL8Ah9QXZ7ax4Dsj0MSq5bYgytRnDVVe+njoKnfsYkH3HzqVj5UZA==", "dev": true, + "license": "Apache-2.0", "dependencies": { "playwright-core": "1.49.1" }, @@ -37924,6 +37926,7 @@ "resolved": "https://registry.npmjs.org/playwright-core/-/playwright-core-1.49.1.tgz", "integrity": "sha512-BzmpVcs4kE2CH15rWfzpjzVGhWERJfmnXmniSyKeRZUs9Ws65m+RGIi7mjJK/euCegfn3i7jvqWeWyHe9y3Vgg==", "dev": true, + "license": "Apache-2.0", "bin": { "playwright-core": "cli.js" }, @@ -50028,6 +50031,7 @@ "@wordpress/rich-text": "file:../rich-text", "@wordpress/style-engine": "file:../style-engine", "@wordpress/token-list": "file:../token-list", + "@wordpress/upload-media": "file:../upload-media", "@wordpress/url": "file:../url", "@wordpress/warning": "file:../warning", "@wordpress/wordcount": "file:../wordcount", @@ -52656,7 +52660,7 @@ }, "packages/upload-media": { "name": "@wordpress/upload-media", - "version": "1.0.0-prerelease", + "version": "0.0.1", "license": "GPL-2.0-or-later", "dependencies": { "@shopify/web-worker": "^6.4.0", diff --git a/packages/block-editor/package.json b/packages/block-editor/package.json index da1687b28d25b2..5794245dbbf12f 100644 --- a/packages/block-editor/package.json +++ b/packages/block-editor/package.json @@ -65,6 +65,7 @@ "@wordpress/rich-text": "file:../rich-text", "@wordpress/style-engine": "file:../style-engine", "@wordpress/token-list": "file:../token-list", + "@wordpress/upload-media": "file:../upload-media", "@wordpress/url": "file:../url", "@wordpress/warning": "file:../warning", "@wordpress/wordcount": "file:../wordcount", diff --git a/packages/block-editor/src/components/provider/index.js b/packages/block-editor/src/components/provider/index.js index 97aa0b95216870..4f3cb8867f1d43 100644 --- a/packages/block-editor/src/components/provider/index.js +++ b/packages/block-editor/src/components/provider/index.js @@ -4,7 +4,6 @@ import { useDispatch } from '@wordpress/data'; import { useEffect, useMemo } from '@wordpress/element'; import { SlotFillProvider } from '@wordpress/components'; -//eslint-disable-next-line import/no-extraneous-dependencies -- Experimental package, not published. import { MediaUploadProvider, store as uploadStore, diff --git a/packages/block-editor/tsconfig.json b/packages/block-editor/tsconfig.json index a3a6bd18f451d5..30fe326d35b83e 100644 --- a/packages/block-editor/tsconfig.json +++ b/packages/block-editor/tsconfig.json @@ -27,6 +27,7 @@ { "path": "../style-engine" }, { "path": "../token-list" }, { "path": "../url" }, + { "path": "../upload-media" }, { "path": "../warning" }, { "path": "../wordcount" } ], diff --git a/packages/dependency-extraction-webpack-plugin/lib/util.js b/packages/dependency-extraction-webpack-plugin/lib/util.js index 49b16986cda814..b5c9f9057c2052 100644 --- a/packages/dependency-extraction-webpack-plugin/lib/util.js +++ b/packages/dependency-extraction-webpack-plugin/lib/util.js @@ -10,6 +10,7 @@ const BUNDLED_PACKAGES = [ '@wordpress/interface', '@wordpress/sync', '@wordpress/undo-manager', + '@wordpress/upload-media', '@wordpress/fields', ]; diff --git a/packages/upload-media/package.json b/packages/upload-media/package.json index 14ae4f77dc5cb9..a54115c8a0085a 100644 --- a/packages/upload-media/package.json +++ b/packages/upload-media/package.json @@ -1,7 +1,6 @@ { "name": "@wordpress/upload-media", - "version": "1.0.0-prerelease", - "private": true, + "version": "0.0.1", "description": "Core media upload logic.", "author": "The WordPress Contributors", "license": "GPL-2.0-or-later", @@ -26,6 +25,7 @@ "module": "build-module/index.js", "wpScript": true, "types": "build-types", + "sideEffects": false, "dependencies": { "@shopify/web-worker": "^6.4.0", "@wordpress/api-fetch": "file:../api-fetch", diff --git a/tools/webpack/packages.js b/tools/webpack/packages.js index 4459cc063d0016..c99c25ee0127ce 100644 --- a/tools/webpack/packages.js +++ b/tools/webpack/packages.js @@ -41,6 +41,7 @@ const BUNDLED_PACKAGES = [ '@wordpress/interface', '@wordpress/sync', '@wordpress/undo-manager', + '@wordpress/upload-media', '@wordpress/fields', ];