@wordpress/build 0.8.1-next.v.202602200903.0 → 0.8.1-next.v.202602241322.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/lib/build.mjs CHANGED
@@ -837,6 +837,9 @@ async function inferStyleDependencies( scriptDependencies, packageName ) {
837
837
  * @param {Record<string, string>} replacements PHP template replacements.
838
838
  */
839
839
  async function generateModuleRegistrationPhp( modules, replacements ) {
840
+ // Sort modules by ID for deterministic output.
841
+ modules.sort( ( a, b ) => a.id.localeCompare( b.id ) );
842
+
840
843
  // Generate modules array for registry
841
844
  const modulesArray = modules
842
845
  .map(
@@ -870,6 +873,9 @@ async function generateModuleRegistrationPhp( modules, replacements ) {
870
873
  * @param {Record<string, string>} replacements PHP template replacements.
871
874
  */
872
875
  async function generateScriptRegistrationPhp( scripts, replacements ) {
876
+ // Sort scripts by handle for deterministic output.
877
+ scripts.sort( ( a, b ) => a.handle.localeCompare( b.handle ) );
878
+
873
879
  // Generate scripts array for registry
874
880
  const scriptsArray = scripts
875
881
  .map(
@@ -916,6 +922,9 @@ async function generateConstantsPhp( replacements ) {
916
922
  * @param {Record<string, string>} replacements PHP template replacements.
917
923
  */
918
924
  async function generateStyleRegistrationPhp( styles, replacements ) {
925
+ // Sort styles by handle for deterministic output.
926
+ styles.sort( ( a, b ) => a.handle.localeCompare( b.handle ) );
927
+
919
928
  // Generate styles array for registry
920
929
  const stylesArray = styles
921
930
  .map(
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wordpress/build",
3
- "version": "0.8.1-next.v.202602200903.0+06edfb869",
3
+ "version": "0.8.1-next.v.202602241322.0+bce7cff88",
4
4
  "description": "Build tool for WordPress plugins.",
5
5
  "author": "The WordPress Contributors",
6
6
  "license": "GPL-2.0-or-later",
@@ -77,5 +77,5 @@
77
77
  "publishConfig": {
78
78
  "access": "public"
79
79
  },
80
- "gitHead": "6e225a6505fdc8e407305851c7a68b781dee8118"
80
+ "gitHead": "943dde7f0b600ce238726c36284bc9f70ce0ffa4"
81
81
  }
@@ -42,5 +42,4 @@ if ( ! function_exists( '{{PREFIX}}_register_script_modules' ) ) {
42
42
  }
43
43
 
44
44
  add_action( 'wp_default_scripts', '{{PREFIX}}_register_script_modules' );
45
- remove_action( 'wp_default_scripts', 'wp_default_script_modules' );
46
45
  }