Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
40 commits
Select commit Hold shift + click to select a range
a89aab7
create wp-build-polyfills package
dhasilva Feb 26, 2026
cc7a0de
add wp-build-polyfills package as dependency of forms package
dhasilva Feb 26, 2026
7150aa0
Add changelog entries.
dhasilva Feb 26, 2026
4d56c4f
fix changelog
dhasilva Feb 26, 2026
c58c48a
add .gitattributes
dhasilva Feb 26, 2026
4d377a9
Add Phan static analysis config for wp-build-polyfills package
dhasilva Feb 27, 2026
b313068
fix base_file
dhasilva Feb 27, 2026
139cc0c
Remove executable bit from build-polyfills.mjs
dhasilva Feb 27, 2026
d0b45e5
Exclude bin/ from wp-build-polyfills production mirror
dhasilva Feb 27, 2026
d38be0c
Add @wordpress/notices polyfill and fix autoloader resolution
dhasilva Mar 2, 2026
7c0cf35
Build only one variant per mode in wp-build-polyfills
dhasilva Mar 3, 2026
461fc92
Replace esbuild with webpack for wp-build-polyfills
dhasilva Mar 3, 2026
a771285
Add PHP tests for wp-build-polyfills
dhasilva Mar 3, 2026
b8686dd
Add phpunit.8.xml.dist for CI and update jetpack composer.lock
dhasilva Mar 3, 2026
7bdc391
Skip setAccessible() on PHP >= 8.1 to avoid 8.5 deprecation
dhasilva Mar 3, 2026
3353583
Preserve native dynamic imports in boot polyfill
dhasilva Mar 3, 2026
1eb5bbb
Make WP version threshold configurable and fix version comparison
dhasilva Mar 4, 2026
0a48793
Fix test to pass wp_version_threshold to register_scripts
dhasilva Mar 4, 2026
2047454
Add README for wp-build-polyfills package
dhasilva Mar 4, 2026
4d9e74e
Add per-handle dependency registration to wp-build-polyfills
dhasilva Mar 5, 2026
e9ca4f4
Fix phan issue: omit null arg for static ReflectionProperty::getValue
dhasilva Mar 5, 2026
8c2906b
Add tests for polyfill registration in Dashboard::load_wp_build
dhasilva Mar 6, 2026
a93581d
Fix reflection setAccessible for PHP < 8.1 and store version threshol…
dhasilva Mar 6, 2026
03509a5
Fix dynamic import regex to handle leading comments and add additiona…
dhasilva Mar 7, 2026
c1ba42b
Fix ReDoS vulnerability in dynamic import regex
dhasilva Mar 7, 2026
da1b444
Address review feedback: docs, production-exclude, and test cleanup
dhasilva Mar 7, 2026
74171db
Fix PolyfillModulePlugin to match wp-build asset output
dhasilva Mar 10, 2026
2af1c6a
Add automatic boot module asset proxy for wp-build page consumers
dhasilva Mar 10, 2026
1d35705
Clear dependency tracking sets between compilations in watch mode
dhasilva Mar 10, 2026
4933b7b
Document boot module asset proxy in wp-build-polyfills README
dhasilva Mar 10, 2026
6da6394
Add tests for boot module asset proxy
dhasilva Mar 10, 2026
3f71bf8
Make boot asset proxy tests run without build artifacts and warn on m…
dhasilva Mar 10, 2026
1c60ad6
update wp-build
dhasilva Mar 10, 2026
019f1bc
remove unnecessary class_exists check
dhasilva Mar 10, 2026
0a302cc
Improve wp-build-polyfills test setup and phpcs configuration
dhasilva Mar 13, 2026
efc2852
Replace duplicate phpunit configs with symlinks
dhasilva Mar 13, 2026
fd38c8b
Fix misleading i18n comment in wp-build-polyfills webpack config
dhasilva Mar 13, 2026
7e302d9
Move boot asset file copy from CLI to forms build script
dhasilva Mar 13, 2026
10a0ba1
fix build test
dhasilva Mar 13, 2026
2d5f4c6
fix test
dhasilva Mar 16, 2026
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
160 changes: 155 additions & 5 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Significance: minor
Type: fixed

Add polyfills for wp-build unbundled dependencies
1 change: 1 addition & 0 deletions projects/packages/forms/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
"php": ">=7.2",
"automattic/jetpack-blocks": "@dev",
"automattic/jetpack-assets": "@dev",
"automattic/jetpack-wp-build-polyfills": "@dev",
"automattic/jetpack-connection": "@dev",
"automattic/jetpack-device-detection": "@dev",
"automattic/jetpack-external-connections": "@dev",
Expand Down
6 changes: 4 additions & 2 deletions projects/packages/forms/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,9 @@
"author": "Automattic",
"type": "module",
"scripts": {
"build": "pnpm run clean && pnpm run build:blocks && pnpm run build:contact-form && pnpm run build:dashboard && pnpm run build:wp-build && pnpm run build:form-editor && pnpm run module:build",
"build": "pnpm run clean && pnpm run build:blocks && pnpm run build:contact-form && pnpm run build:dashboard && pnpm run build:wp-build && pnpm run build:boot-asset && pnpm run build:form-editor && pnpm run module:build",
"build:blocks": "webpack --config ./tools/webpack.config.blocks.js",
"build:boot-asset": "provide-boot-asset-file",
"build:contact-form": "webpack --config ./tools/webpack.config.contact-form.js",
"build:dashboard": "webpack --config ./tools/webpack.config.dashboard.js",
"build:form-editor": "webpack --config ./tools/webpack.config.form-editor.js",
Expand Down Expand Up @@ -99,6 +100,7 @@
"@automattic/color-studio": "4.1.0",
"@automattic/jetpack-base-styles": "workspace:*",
"@automattic/jetpack-webpack-config": "workspace:*",
"@automattic/jetpack-wp-build-polyfills": "workspace:*",
"@automattic/remove-asset-webpack-plugin": "workspace:*",
"@babel/core": "7.29.0",
"@babel/runtime": "7.28.6",
Expand All @@ -112,7 +114,7 @@
"@typescript/native-preview": "7.0.0-dev.20260225.1",
"@wordpress/api-fetch": "7.41.0",
"@wordpress/browserslist-config": "6.41.0",
"@wordpress/build": "0.8.0",
"@wordpress/build": "0.10.1-next.v.202603102151.0",
"@wordpress/date": "5.41.0",
"autoprefixer": "10.4.20",
"browserslist": "^4.24.0",
Expand Down
11 changes: 11 additions & 0 deletions projects/packages/forms/src/dashboard/class-dashboard.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
use Automattic\Jetpack\Connection\Initial_State as Connection_Initial_State;
use Automattic\Jetpack\Forms\ContactForm\Contact_Form_Plugin;
use Automattic\Jetpack\Tracking;
use Automattic\Jetpack\WP_Build_Polyfills\WP_Build_Polyfills;

if ( ! defined( 'ABSPATH' ) ) {
exit( 0 );
Expand All @@ -36,9 +37,19 @@ public static function load_wp_build() {
: 'inbox';

wp_safe_redirect( self::get_forms_admin_url( $default_tab ) );

exit;
}

// Register polyfills for WP < 7.0 (must run before build.php).
WP_Build_Polyfills::register(
'jetpack-forms',
array_merge(
WP_Build_Polyfills::SCRIPT_HANDLES,
WP_Build_Polyfills::MODULE_IDS
)
);

$wp_build_index = dirname( __DIR__, 2 ) . '/build/build.php';

if ( file_exists( $wp_build_index ) ) {
Expand Down
Loading
Loading