Skip to content

Commit ab75ec9

Browse files
authored
Merge pull request #2168 from WordPress/dependabot/github_actions/actions/setup-node-5
Bump actions/setup-node from 4 to 5
2 parents c42ed68 + 6dcb907 commit ab75ec9

File tree

5 files changed

+20
-4
lines changed

5 files changed

+20
-4
lines changed

.github/workflows/deploy-plugins.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ jobs:
6161
uses: actions/checkout@v5
6262

6363
- name: Setup Node.js (.nvmrc)
64-
uses: actions/setup-node@v4
64+
uses: actions/setup-node@v5
6565
with:
6666
node-version-file: '.nvmrc'
6767
cache: npm

.github/workflows/e2e-test.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ jobs:
3636
uses: actions/checkout@v5
3737

3838
- name: Setup Node.js (.nvmrc)
39-
uses: actions/setup-node@v4
39+
uses: actions/setup-node@v5
4040
with:
4141
node-version-file: '.nvmrc'
4242
cache: npm

.github/workflows/js-lint.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ jobs:
4040
- uses: styfle/[email protected]
4141
- uses: actions/checkout@v5
4242
- name: Setup Node.js (via .nvmrc)
43-
uses: actions/setup-node@v4
43+
uses: actions/setup-node@v5
4444
with:
4545
node-version-file: '.nvmrc'
4646
cache: npm

.github/workflows/php-test-plugins.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ jobs:
6060
- uses: styfle/[email protected]
6161
- uses: actions/checkout@v5
6262
- name: Setup Node.js (.nvmrc)
63-
uses: actions/setup-node@v4
63+
uses: actions/setup-node@v5
6464
with:
6565
node-version-file: '.nvmrc'
6666
cache: npm

plugins/web-worker-offloading/tests/test-web-worker-offloading.php

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,10 @@ public function test_plwwo_register_default_scripts(): void {
7171
$before_data = wp_scripts()->get_inline_script_data( 'web-worker-offloading', 'before' );
7272
$after_data = wp_scripts()->get_inline_script_data( 'web-worker-offloading', 'after' );
7373

74+
// See <https://core.trac.wordpress.org/ticket/63887>.
75+
$before_data = preg_replace( ':\n//# sourceURL=.+$:', '', $before_data );
76+
$after_data = preg_replace( ':\n//# sourceURL=.+$:', '', $after_data );
77+
7478
$this->assertTrue( wp_script_is( 'web-worker-offloading', 'registered' ) );
7579
$this->assertNotEmpty( $before_data );
7680
$this->assertNotEmpty( $after_data );
@@ -203,6 +207,18 @@ public function test_update_script_types( Closure $set_up, string $expected ): v
203207
$set_up();
204208

205209
$normalize = static function ( $html ) {
210+
// See <https://core.trac.wordpress.org/ticket/63887>.
211+
if ( method_exists( 'WP_HTML_Tag_Processor', 'set_modifiable_text' ) ) { // @phpstan-ignore function.alreadyNarrowedType
212+
// This normalization logic is only relevant to WP>=6.9-alpha anyway.
213+
$p = new WP_HTML_Tag_Processor( $html );
214+
while ( $p->next_tag( array( 'tag_name' => 'SCRIPT' ) ) ) {
215+
$text = $p->get_modifiable_text();
216+
$text = preg_replace( ':\n//# sourceURL=.+$:', '', $text );
217+
$p->set_modifiable_text( $text );
218+
}
219+
$html = $p->get_updated_html();
220+
}
221+
206222
$html = preg_replace( '/\r|\n/', '', $html );
207223
return trim( preg_replace( '#(?=<[^/])#', "\n", $html ) );
208224
};

0 commit comments

Comments
 (0)