Skip to content

Commit eacb69f

Browse files
committed
chore: updated version to 1.3.3
1 parent a045d10 commit eacb69f

5 files changed

Lines changed: 44 additions & 12 deletions

File tree

interactions.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
* Author URI: http://gambit.ph
88
* License: GPLv2 or later
99
* Text Domain: interactions
10-
* Version: 1.3.2
10+
* Version: 1.3.3
1111
*
1212
* @fs_premium_only /freemius.php, /freemius/
1313
*/
@@ -18,7 +18,7 @@
1818
}
1919

2020
defined( 'INTERACT_BUILD' ) || define( 'INTERACT_BUILD', 'free' );
21-
defined( 'INTERACT_VERSION' ) || define( 'INTERACT_VERSION', '1.3.2' );
21+
defined( 'INTERACT_VERSION' ) || define( 'INTERACT_VERSION', '1.3.3' );
2222
defined( 'INTERACT_FILE' ) || define( 'INTERACT_FILE', __FILE__ );
2323

2424
/**

package-lock.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "interactions",
3-
"version": "1.3.2",
3+
"version": "1.3.3",
44
"description": "Make your blocks interactive! Effortlessly set triggers that do actions",
55
"author": "Benjamin Intal of Gambit",
66
"private": true,

readme.txt

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
=== Interactions - Create Interactive Experiences in the Block Editor ===
22
Contributors: bfintal, gambitph
33
Tags: animation, interaction, interactivity, blocks, gutenberg
4-
Requires at least: 6.7.4
5-
Tested up to: 6.9
4+
Requires at least: 6.7.5
5+
Tested up to: 7.0
66
Requires PHP: 8.0
7-
Stable tag: 1.3.2
7+
Stable tag: 1.3.3
88
License: GPLv2 or later
99
License URI: https://www.gnu.org/licenses/gpl-2.0.html
1010

@@ -149,6 +149,11 @@ The free version includes basic animations and interactions. Premium adds advanc
149149

150150
== Changelog ==
151151

152+
= 1.3.3 =
153+
154+
* New: WordPress 7.0 compatibility
155+
* New: Confetti action - added location option
156+
152157
= 1.3.2 =
153158

154159
* Fixed: Interaction preview now works when Show Templates is enabled #5

scripts/sync-version.js

Lines changed: 31 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,26 @@ async function getAvailableWordPressVersions() {
4343
} )
4444
}
4545

46+
/**
47+
* Compare two dotted version strings (e.g. WordPress "5.0" vs "4.5").
48+
* @param {string} a
49+
* @param {string} b
50+
* @return {number} negative if a < b, 0 if equal, positive if a > b
51+
*/
52+
function compareVersionStrings( a, b ) {
53+
const aParts = String( a ).trim().split( '.' ).map( n => parseInt( n, 10 ) || 0 )
54+
const bParts = String( b ).trim().split( '.' ).map( n => parseInt( n, 10 ) || 0 )
55+
const len = Math.max( aParts.length, bParts.length )
56+
for ( let i = 0; i < len; i++ ) {
57+
const av = aParts[ i ] || 0
58+
const bv = bParts[ i ] || 0
59+
if ( av !== bv ) {
60+
return av - bv
61+
}
62+
}
63+
return 0
64+
}
65+
4666
function calculateMinVersion( latestVersion, availableVersions ) {
4767
const parts = latestVersion.split( '.' )
4868
if ( parts.length >= 2 ) {
@@ -126,10 +146,17 @@ async function syncVersions() {
126146
console.log( '✅ readme.txt stable tag updated successfully' )
127147
}
128148
const testedUpToMatch = readmeTxt.match( /^Tested up to:\s*([^\r\n]+)/m )
129-
if ( testedUpToMatch && testedUpToMatch[ 1 ].trim() !== latestWordPressVersion ) {
130-
const updated = ( fs.readFileSync( 'readme.txt', 'utf8' ) ).replace( /^Tested up to:\s*[^\r\n]+/m, `Tested up to: ${ latestWordPressVersion }` )
131-
fs.writeFileSync( 'readme.txt', updated )
132-
console.log( '✅ readme.txt tested up to updated successfully' )
149+
if ( testedUpToMatch ) {
150+
const currentTestedUpTo = testedUpToMatch[ 1 ].trim()
151+
// Only bump "Tested up to" when the API version is newer; keep a higher manual value.
152+
if (
153+
currentTestedUpTo !== latestWordPressVersion &&
154+
compareVersionStrings( currentTestedUpTo, latestWordPressVersion ) < 0
155+
) {
156+
const updated = ( fs.readFileSync( 'readme.txt', 'utf8' ) ).replace( /^Tested up to:\s*[^\r\n]+/m, `Tested up to: ${ latestWordPressVersion }` )
157+
fs.writeFileSync( 'readme.txt', updated )
158+
console.log( '✅ readme.txt tested up to updated successfully' )
159+
}
133160
}
134161
const requiresAtLeastMatch = readmeTxt.match( /^Requires at least:\s*([^\r\n]+)/m )
135162
if ( requiresAtLeastMatch && requiresAtLeastMatch[ 1 ].trim() !== minWordPressVersion ) {

0 commit comments

Comments
 (0)