diff --git a/projects/js-packages/ai-client/src/logo-generator/index.ts b/projects/js-packages/ai-client/src/logo-generator/index.ts
index e6a9b9dec67ce..fab7b12e9442f 100644
--- a/projects/js-packages/ai-client/src/logo-generator/index.ts
+++ b/projects/js-packages/ai-client/src/logo-generator/index.ts
@@ -1 +1,2 @@
export * from './components/generator-modal.js';
+export { AiModalPromptInput } from './components/prompt.js';
diff --git a/projects/plugins/social/changelog/renovate-lock-file-maintenance b/projects/js-packages/boost-score-api/changelog/renovate-eslint-packages
similarity index 100%
rename from projects/plugins/social/changelog/renovate-lock-file-maintenance
rename to projects/js-packages/boost-score-api/changelog/renovate-eslint-packages
diff --git a/projects/js-packages/boost-score-api/package.json b/projects/js-packages/boost-score-api/package.json
index 6aaa7889bafc4..7d1e968103ec8 100644
--- a/projects/js-packages/boost-score-api/package.json
+++ b/projects/js-packages/boost-score-api/package.json
@@ -26,7 +26,7 @@
"devDependencies": {
"@automattic/jetpack-webpack-config": "workspace:*",
"@typescript-eslint/parser": "6.21.0",
- "eslint": "8.57.0",
+ "eslint": "8.57.1",
"jest": "29.7.0",
"jest-environment-jsdom": "29.7.0",
"typescript": "5.0.4",
diff --git a/projects/plugins/social/changelog/renovate-wordpress-monorepo b/projects/js-packages/eslint-config-target-es/changelog/renovate-eslint-packages
similarity index 100%
rename from projects/plugins/social/changelog/renovate-wordpress-monorepo
rename to projects/js-packages/eslint-config-target-es/changelog/renovate-eslint-packages
diff --git a/projects/js-packages/eslint-config-target-es/package.json b/projects/js-packages/eslint-config-target-es/package.json
index 689e82c091855..d72c9716cf066 100644
--- a/projects/js-packages/eslint-config-target-es/package.json
+++ b/projects/js-packages/eslint-config-target-es/package.json
@@ -24,7 +24,7 @@
},
"devDependencies": {
"@wordpress/browserslist-config": "6.9.0",
- "eslint": "8.57.0",
+ "eslint": "8.57.1",
"eslint-plugin-es-x": "7.8.0",
"globals": "15.4.0",
"jest": "29.7.0"
diff --git a/projects/plugins/social/changelog/renovate-wordpress-monorepo#2 b/projects/js-packages/image-guide/changelog/renovate-eslint-packages
similarity index 100%
rename from projects/plugins/social/changelog/renovate-wordpress-monorepo#2
rename to projects/js-packages/image-guide/changelog/renovate-eslint-packages
diff --git a/projects/js-packages/image-guide/package.json b/projects/js-packages/image-guide/package.json
index d6144e403ce7c..f3c57482e6940 100644
--- a/projects/js-packages/image-guide/package.json
+++ b/projects/js-packages/image-guide/package.json
@@ -44,7 +44,7 @@
"@rollup/plugin-terser": "0.4.3",
"@rollup/plugin-typescript": "12.1.0",
"@typescript-eslint/parser": "6.21.0",
- "eslint": "8.57.0",
+ "eslint": "8.57.1",
"jest": "29.7.0",
"postcss": "8.4.31",
"rollup": "3.29.5",
diff --git a/projects/js-packages/publicize-components/CHANGELOG.md b/projects/js-packages/publicize-components/CHANGELOG.md
index a47006d9fe0db..43c07a78f6e22 100644
--- a/projects/js-packages/publicize-components/CHANGELOG.md
+++ b/projects/js-packages/publicize-components/CHANGELOG.md
@@ -5,6 +5,15 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
+## [0.71.4] - 2024-10-25
+### Changed
+- Initial state: Migrated isEnhancedPublishingEnabled to feature check [#39835]
+
+### Fixed
+- Fixed Bsky conneciton management profile name [#39889]
+- Fixed reconnection for broken Bluesky connections [#39844]
+- Social: Fixed Bluesky custom domain handle not being accepted [#39872]
+
## [0.71.3] - 2024-10-21
### Changed
- Initial state: Migrated URLs in the editor to the new script data. [#39799] [#39797]
@@ -978,6 +987,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Changed
- Updated package dependencies. [#24470]
+[0.71.4]: https://github.com/Automattic/jetpack-publicize-components/compare/v0.71.3...v0.71.4
[0.71.3]: https://github.com/Automattic/jetpack-publicize-components/compare/v0.71.2...v0.71.3
[0.71.2]: https://github.com/Automattic/jetpack-publicize-components/compare/v0.71.1...v0.71.2
[0.71.1]: https://github.com/Automattic/jetpack-publicize-components/compare/v0.71.0...v0.71.1
diff --git a/projects/js-packages/publicize-components/changelog/fix-social-bluesky-custom-domain-handles-not-working b/projects/js-packages/publicize-components/changelog/fix-social-bluesky-custom-domain-handles-not-working
deleted file mode 100644
index 5857f3006fd35..0000000000000
--- a/projects/js-packages/publicize-components/changelog/fix-social-bluesky-custom-domain-handles-not-working
+++ /dev/null
@@ -1,4 +0,0 @@
-Significance: patch
-Type: fixed
-
-Social: Fixed Bluesky custom domain handle not being accepted
diff --git a/projects/js-packages/publicize-components/changelog/fix-social-bluesky-reconnection-for-broken-connections b/projects/js-packages/publicize-components/changelog/fix-social-bluesky-reconnection-for-broken-connections
deleted file mode 100644
index eb4d17f671962..0000000000000
--- a/projects/js-packages/publicize-components/changelog/fix-social-bluesky-reconnection-for-broken-connections
+++ /dev/null
@@ -1,4 +0,0 @@
-Significance: patch
-Type: fixed
-
-Fixed reconnection for broken Bluesky connections
diff --git a/projects/js-packages/publicize-components/changelog/update-enhances-publishing-feature-check b/projects/js-packages/publicize-components/changelog/update-enhances-publishing-feature-check
deleted file mode 100644
index e1af3f96c5a7e..0000000000000
--- a/projects/js-packages/publicize-components/changelog/update-enhances-publishing-feature-check
+++ /dev/null
@@ -1,4 +0,0 @@
-Significance: patch
-Type: changed
-
-Initial state: Migrated isEnhancedPublishingEnabled to feature check
diff --git a/projects/js-packages/publicize-components/index.ts b/projects/js-packages/publicize-components/index.ts
index 36f1fab810ff0..f10e54078ec65 100644
--- a/projects/js-packages/publicize-components/index.ts
+++ b/projects/js-packages/publicize-components/index.ts
@@ -32,6 +32,7 @@ export * from './src/components/share-post';
export * from './src/hooks/use-sync-post-data-to-store';
export * from './src/hooks/use-saving-post';
export * from './src/hooks/use-post-meta';
+export * from './src/hooks/use-post-can-use-sig';
export * from './src/components/share-buttons';
export * from './src/components/manage-connections-modal';
export * from './src/utils/script-data';
diff --git a/projects/js-packages/publicize-components/package.json b/projects/js-packages/publicize-components/package.json
index 54856e9583755..b3eb34b40227b 100644
--- a/projects/js-packages/publicize-components/package.json
+++ b/projects/js-packages/publicize-components/package.json
@@ -1,7 +1,7 @@
{
"private": true,
"name": "@automattic/jetpack-publicize-components",
- "version": "0.71.3",
+ "version": "0.71.4",
"description": "A library of JS components required by the Publicize editor plugin",
"homepage": "https://github.com/Automattic/jetpack/tree/HEAD/projects/js-packages/publicize-components/#readme",
"bugs": {
diff --git a/projects/js-packages/publicize-components/src/components/connection-management/connection-name.tsx b/projects/js-packages/publicize-components/src/components/connection-management/connection-name.tsx
index 858d1c6bffebe..230366360cc2b 100644
--- a/projects/js-packages/publicize-components/src/components/connection-management/connection-name.tsx
+++ b/projects/js-packages/publicize-components/src/components/connection-management/connection-name.tsx
@@ -32,7 +32,7 @@ export function ConnectionName( { connection }: ConnectionNameProps ) {
) : (
- { connection.display_name || connection.external_display }
+ { connection.display_name || connection.external_display || connection.external_name }
) }
{ isUpdating ? (
diff --git a/projects/js-packages/publicize-components/src/components/form/enhanced-features-nudge.tsx b/projects/js-packages/publicize-components/src/components/form/enhanced-features-nudge.tsx
index ce90b960e33a2..b66bab3557fad 100644
--- a/projects/js-packages/publicize-components/src/components/form/enhanced-features-nudge.tsx
+++ b/projects/js-packages/publicize-components/src/components/form/enhanced-features-nudge.tsx
@@ -5,20 +5,17 @@ import {
isSimpleSite,
} from '@automattic/jetpack-shared-extension-utils';
import { Button, PanelRow } from '@wordpress/components';
-import { useSelect } from '@wordpress/data';
import { _x } from '@wordpress/i18n';
-import { store as socialStore } from '../../social-store';
+import { hasSocialPaidFeatures } from '../../utils';
import styles from './styles.module.scss';
import { useAutoSaveAndRedirect } from './use-auto-save-and-redirect';
export const EnhancedFeaturesNudge: React.FC = () => {
- const hasPaidFeatures = useSelect( select => select( socialStore ).hasPaidFeatures(), [] );
-
const autosaveAndRedirect = useAutoSaveAndRedirect();
const isWpcom = isSimpleSite() || isAtomicSite();
- if ( isWpcom || hasPaidFeatures ) {
+ if ( isWpcom || hasSocialPaidFeatures() ) {
return null;
}
diff --git a/projects/js-packages/publicize-components/src/hooks/use-post-can-use-sig/index.ts b/projects/js-packages/publicize-components/src/hooks/use-post-can-use-sig/index.ts
new file mode 100644
index 0000000000000..5602ca0709d00
--- /dev/null
+++ b/projects/js-packages/publicize-components/src/hooks/use-post-can-use-sig/index.ts
@@ -0,0 +1,21 @@
+import { siteHasFeature } from '@automattic/jetpack-script-data';
+import { useSelect } from '@wordpress/data';
+import { store as editorStore } from '@wordpress/editor';
+import { features } from '../../utils/constants';
+
+/**
+ * When a post can use the Social Image Generator (SIG).
+ *
+ * @return {boolean} Whether the post can use the Social Image Generator.
+ */
+export function usePostCanUseSig() {
+ const isJetpackSocialNote = useSelect( select => {
+ const currentPostType = select( editorStore )
+ // @ts-expect-error -- `@wordpress/editor` is a nightmare to work with TypeScript - getCurrentPostType exists on the editor store
+ .getCurrentPostType();
+
+ return 'jetpack-social-note' === currentPostType;
+ }, [] );
+
+ return ! isJetpackSocialNote && siteHasFeature( features.IMAGE_GENERATOR );
+}
diff --git a/projects/js-packages/publicize-components/src/hooks/use-publicize-config/index.js b/projects/js-packages/publicize-components/src/hooks/use-publicize-config/index.js
index bb991a44dd85e..d55353f871995 100644
--- a/projects/js-packages/publicize-components/src/hooks/use-publicize-config/index.js
+++ b/projects/js-packages/publicize-components/src/hooks/use-publicize-config/index.js
@@ -25,7 +25,6 @@ export default function usePublicizeConfig() {
const isRePublicizeFeatureAvailable =
isJetpackSite || getJetpackExtensionAvailability( republicizeFeatureName )?.available;
const isPostPublished = useSelect( select => select( editorStore ).isCurrentPostPublished(), [] );
- const currentPostType = useSelect( select => select( editorStore ).getCurrentPostType(), [] );
const { isUserConnected } = useConnection();
const { urls } = getSocialScriptData();
@@ -80,17 +79,6 @@ export default function usePublicizeConfig() {
*/
const hidePublicizeFeature = isPostPublished && ! isRePublicizeFeatureAvailable;
- /**
- * hasPaidPlan:
- * Whether the site has a paid plan. This could be either the Basic or the Advanced plan.
- */
- const hasPaidPlan = !! getJetpackData()?.social?.hasPaidPlan;
-
- /**\
- * Returns true if the post type is a Jetpack Social Note.
- */
- const isJetpackSocialNote = 'jetpack-social-note' === currentPostType;
-
const needsUserConnection = ! isUserConnected && ! isSimpleSite();
return {
@@ -102,12 +90,8 @@ export default function usePublicizeConfig() {
isRePublicizeUpgradableViaUpsell,
hidePublicizeFeature,
isPostAlreadyShared,
- hasPaidPlan,
- isSocialImageGeneratorAvailable:
- !! getJetpackData()?.social?.isSocialImageGeneratorAvailable && ! isJetpackSocialNote,
isSocialImageGeneratorEnabled: !! getJetpackData()?.social?.isSocialImageGeneratorEnabled,
connectionsPageUrl: urls.connectionsManagementPage,
- isJetpackSocialNote,
needsUserConnection,
};
}
diff --git a/projects/js-packages/publicize-components/src/social-store/reducer/index.js b/projects/js-packages/publicize-components/src/social-store/reducer/index.js
index 502e34d256f73..6bae3be245474 100644
--- a/projects/js-packages/publicize-components/src/social-store/reducer/index.js
+++ b/projects/js-packages/publicize-components/src/social-store/reducer/index.js
@@ -11,8 +11,6 @@ const reducer = combineReducers( {
jetpackSettings,
socialImageGeneratorSettings,
shareStatus,
- hasPaidPlan: ( state = false ) => state,
- hasPaidFeatures: ( state = false ) => state,
} );
export default reducer;
diff --git a/projects/js-packages/publicize-components/src/social-store/selectors/index.js b/projects/js-packages/publicize-components/src/social-store/selectors/index.js
index 9841e282af43e..6cf378df068eb 100644
--- a/projects/js-packages/publicize-components/src/social-store/selectors/index.js
+++ b/projects/js-packages/publicize-components/src/social-store/selectors/index.js
@@ -10,7 +10,6 @@ const selectors = {
...jetpackSettingSelectors,
...socialImageGeneratorSettingsSelectors,
...shareStatusSelectors,
- hasPaidFeatures: state => state.hasPaidFeatures,
};
export default selectors;
diff --git a/projects/js-packages/publicize-components/src/social-store/selectors/jetpack-settings.js b/projects/js-packages/publicize-components/src/social-store/selectors/jetpack-settings.js
index 1eb9be3e6e729..09d99b3937a34 100644
--- a/projects/js-packages/publicize-components/src/social-store/selectors/jetpack-settings.js
+++ b/projects/js-packages/publicize-components/src/social-store/selectors/jetpack-settings.js
@@ -3,7 +3,6 @@ const jetpackSettingSelectors = {
isModuleEnabled: state => state.jetpackSettings.publicize_active,
showPricingPage: state => state.jetpackSettings.show_pricing_page,
isUpdatingJetpackSettings: state => state.jetpackSettings.is_updating,
- hasPaidPlan: state => ! ( state.jetpackSettings?.showNudge ?? true ),
getDismissedNotices: state => state.jetpackSettings?.dismissedNotices,
isSocialNotesEnabled: state => state.jetpackSettings?.social_notes_enabled,
isSocialNotesSettingsUpdating: state => state.jetpackSettings?.social_notes_is_updating,
diff --git a/projects/js-packages/publicize-components/src/social-store/selectors/social-image-generator-settings.js b/projects/js-packages/publicize-components/src/social-store/selectors/social-image-generator-settings.js
index 25cf39b9dedd8..c7ea88783996c 100644
--- a/projects/js-packages/publicize-components/src/social-store/selectors/social-image-generator-settings.js
+++ b/projects/js-packages/publicize-components/src/social-store/selectors/social-image-generator-settings.js
@@ -1,6 +1,5 @@
const socialImageGeneratorSettingsSelectors = {
getSocialImageGeneratorSettings: state => state.socialImageGeneratorSettings,
- isSocialImageGeneratorAvailable: state => state.socialImageGeneratorSettings.available,
isSocialImageGeneratorEnabled: state => state.socialImageGeneratorSettings.enabled,
isUpdatingSocialImageGeneratorSettings: state => state.socialImageGeneratorSettings.isUpdating,
getSocialImageGeneratorDefaultTemplate: state => state.socialImageGeneratorSettings.template,
diff --git a/projects/js-packages/publicize-components/src/social-store/types.ts b/projects/js-packages/publicize-components/src/social-store/types.ts
index afe11754eb291..b0ed6db4cf0c7 100644
--- a/projects/js-packages/publicize-components/src/social-store/types.ts
+++ b/projects/js-packages/publicize-components/src/social-store/types.ts
@@ -67,8 +67,6 @@ export type ShareStatus = {
// TODO we should have a consistent structure across all the pages - editor, dashboard, admin page etc.
export type SocialStoreState = {
connectionData: ConnectionData;
- // on post editor
- hasPaidPlan?: boolean;
// on Jetack Social admin page
jetpackSettings?: JetpackSettings;
shareStatus?: ShareStatus;
diff --git a/projects/js-packages/publicize-components/src/types/types.ts b/projects/js-packages/publicize-components/src/types/types.ts
index 8264d46782842..667f33f90a64d 100644
--- a/projects/js-packages/publicize-components/src/types/types.ts
+++ b/projects/js-packages/publicize-components/src/types/types.ts
@@ -47,7 +47,6 @@ type JetpackSettingsSelectors = {
isModuleEnabled: () => boolean;
showPricingPage: () => boolean;
isUpdatingJetpackSettings: () => boolean;
- hasPaidPlan: () => boolean;
};
type ConnectionDataSelectors = {
@@ -68,7 +67,6 @@ type SocialImageGeneratorSettingsSelectors = {
template: string;
};
};
- isSocialImageGeneratorAvailable: () => boolean;
isSocialImageGeneratorEnabled: () => boolean;
isUpdatingSocialImageGeneratorSettings: () => boolean;
getSocialImageGeneratorDefaultTemplate: () => string;
diff --git a/projects/js-packages/publicize-components/src/utils/constants.ts b/projects/js-packages/publicize-components/src/utils/constants.ts
index 9ac40038d75b8..49cedf5633358 100644
--- a/projects/js-packages/publicize-components/src/utils/constants.ts
+++ b/projects/js-packages/publicize-components/src/utils/constants.ts
@@ -1,3 +1,4 @@
export const features = {
ENHANCED_PUBLISHING: 'social-enhanced-publishing',
+ IMAGE_GENERATOR: 'social-image-generator',
};
diff --git a/projects/js-packages/publicize-components/src/utils/index.js b/projects/js-packages/publicize-components/src/utils/index.js
index 6e0284f7b9870..bfc461305ff8a 100644
--- a/projects/js-packages/publicize-components/src/utils/index.js
+++ b/projects/js-packages/publicize-components/src/utils/index.js
@@ -3,3 +3,4 @@ export * from './get-supported-additional-connections';
export * from './request-external-access';
export * from './types';
export * from './script-data';
+export * from './constants';
diff --git a/projects/js-packages/publicize-components/src/utils/script-data.ts b/projects/js-packages/publicize-components/src/utils/script-data.ts
index 4db102747a639..25561a8b726f2 100644
--- a/projects/js-packages/publicize-components/src/utils/script-data.ts
+++ b/projects/js-packages/publicize-components/src/utils/script-data.ts
@@ -1,4 +1,4 @@
-import { getScriptData } from '@automattic/jetpack-script-data';
+import { getScriptData, siteHasFeature } from '@automattic/jetpack-script-data';
import { SocialScriptData } from '../types/types';
/**
@@ -9,3 +9,12 @@ import { SocialScriptData } from '../types/types';
export function getSocialScriptData(): SocialScriptData {
return getScriptData().social;
}
+
+/**
+ * Check if the site has social paid features.
+ *
+ * @return {boolean} Whether the site has social paid features.
+ */
+export function hasSocialPaidFeatures() {
+ return siteHasFeature( 'social-enhanced-publishing' );
+}
diff --git a/projects/js-packages/social-logos/CHANGELOG.md b/projects/js-packages/social-logos/CHANGELOG.md
index fadc43298865a..7b5bb36820788 100644
--- a/projects/js-packages/social-logos/CHANGELOG.md
+++ b/projects/js-packages/social-logos/CHANGELOG.md
@@ -1,3 +1,7 @@
+## [3.1.10] - 2024-10-25
+### Changed
+- Updated package dependencies. [#39893]
+
## [3.1.9] - 2024-10-14
### Fixed
- Add `key` in React example to make it more correct. [#39709]
@@ -157,6 +161,7 @@
- Build: Refactored (aligned build system with Gridicons).
+[3.1.10]: https://github.com/Automattic/social-logos/compare/v3.1.9...v3.1.10
[3.1.9]: https://github.com/Automattic/social-logos/compare/v3.1.8...v3.1.9
[3.1.8]: https://github.com/Automattic/social-logos/compare/v3.1.7...v3.1.8
[3.1.7]: https://github.com/Automattic/social-logos/compare/v3.1.6...v3.1.7
diff --git a/projects/js-packages/social-logos/package.json b/projects/js-packages/social-logos/package.json
index c8ed32af63311..7d4ed4cc6ef71 100644
--- a/projects/js-packages/social-logos/package.json
+++ b/projects/js-packages/social-logos/package.json
@@ -1,6 +1,6 @@
{
"name": "social-logos",
- "version": "3.1.9",
+ "version": "3.1.10",
"description": "A repository of all the social logos used on WordPress.com.",
"homepage": "https://github.com/Automattic/jetpack/tree/HEAD/projects/js-packages/social-logos/",
"bugs": {
@@ -38,7 +38,7 @@
"@types/react-dom": "18.3.0",
"glob": "10.4.1",
"svg2ttf": "^6.0.3",
- "svgicons2svgfont": "^12.0.0",
+ "svgicons2svgfont": "^14.0.0",
"svgo": "^3.3.2",
"svgstore": "^3.0.1",
"typescript": "5.0.4",
diff --git a/projects/js-packages/social-logos/tools/build b/projects/js-packages/social-logos/tools/build
index 33c3adcdac5ca..eee9aed604e9d 100755
--- a/projects/js-packages/social-logos/tools/build
+++ b/projects/js-packages/social-logos/tools/build
@@ -20,7 +20,7 @@ if ./tools/clean &&
# Disabling this for now until we figure out the proper place for it.
# ./tools/svg-to-php &&
./tools/svg-to-sprite.js &&
-./tools/svg-to-font.js &&
+./tools/svg-to-font.mjs &&
./tools/svg-to-react-data.js &&
./tools/build-react; then
echo 'Build complete.'
diff --git a/projects/js-packages/social-logos/tools/svg-to-font.js b/projects/js-packages/social-logos/tools/svg-to-font.mjs
similarity index 86%
rename from projects/js-packages/social-logos/tools/svg-to-font.js
rename to projects/js-packages/social-logos/tools/svg-to-font.mjs
index 8e6dee559bad0..ca95004e5f640 100755
--- a/projects/js-packages/social-logos/tools/svg-to-font.js
+++ b/projects/js-packages/social-logos/tools/svg-to-font.mjs
@@ -1,4 +1,15 @@
#!/usr/bin/env node
+
+import { spawnSync } from 'child_process';
+import fs from 'fs';
+import path from 'path';
+import process from 'process';
+import { fileURLToPath } from 'url';
+import { glob } from 'glob';
+import svg2ttf from 'svg2ttf';
+import { SVGIcons2SVGFontStream } from 'svgicons2svgfont';
+import wawoff2 from 'wawoff2';
+
/* eslint-disable no-console */
const svgDir = 'build/svg-clean';
const srcSvgDir = 'src/svg';
@@ -7,17 +18,8 @@ const destFontDir = 'build/font';
const cssFile = destFontDir + '/social-logos.css';
const woff2FontFile = destFontDir + '/social-logos.woff2';
-const { spawnSync } = require( 'child_process' );
-const fs = require( 'fs' );
-const path = require( 'path' );
-const process = require( 'process' );
-const { glob } = require( 'glob' );
-const svg2ttf = require( 'svg2ttf' );
-const SVGIcons2SVGFontStream = require( 'svgicons2svgfont' );
-const wawoff2 = require( 'wawoff2' );
-
// Start in the right folder.
-const rootDir = __dirname + '/..';
+const rootDir = fileURLToPath( new URL( '..', import.meta.url ) );
process.chdir( rootDir );
const getCodepoint = name => {
@@ -93,7 +95,7 @@ ${ cssCodepoints }*/`;
// Make destination dir as needed.
fs.mkdirSync( destFontDir, { recursive: true } );
-const codepoints = require( path.resolve( codepointsFile ) );
+const codepoints = JSON.parse( fs.readFileSync( path.resolve( codepointsFile ) ) );
let maxCodepoint = Math.max( ...Object.values( codepoints ) );
let fontBuffer = Buffer.alloc( 0 );
@@ -109,7 +111,7 @@ const fontStream = new SVGIcons2SVGFontStream( {
fontStream
.on( 'data', data => {
// This concats to the font buffer each time a glyph is written.
- fontBuffer = Buffer.concat( [ fontBuffer, data ] );
+ fontBuffer = Buffer.concat( [ fontBuffer, Buffer.from( data ) ] );
} )
.on( 'finish', async function () {
const woff2Buffer = await svg2woff2( fontBuffer );
diff --git a/projects/plugins/social/changelog/renovate-lock-file-maintenance#2 b/projects/js-packages/svelte-data-sync-client/changelog/renovate-eslint-packages#2
similarity index 51%
rename from projects/plugins/social/changelog/renovate-lock-file-maintenance#2
rename to projects/js-packages/svelte-data-sync-client/changelog/renovate-eslint-packages#2
index 9aa70e3ec1f75..c47cb18e82997 100644
--- a/projects/plugins/social/changelog/renovate-lock-file-maintenance#2
+++ b/projects/js-packages/svelte-data-sync-client/changelog/renovate-eslint-packages#2
@@ -1,5 +1,4 @@
Significance: patch
Type: changed
-Comment: Updated composer.lock.
-
+Updated package dependencies.
diff --git a/projects/js-packages/svelte-data-sync-client/package.json b/projects/js-packages/svelte-data-sync-client/package.json
index 4eb9fc7fd00df..2f9d27cf28c85 100644
--- a/projects/js-packages/svelte-data-sync-client/package.json
+++ b/projects/js-packages/svelte-data-sync-client/package.json
@@ -26,7 +26,7 @@
"devDependencies": {
"@automattic/jetpack-webpack-config": "workspace:*",
"@typescript-eslint/parser": "6.21.0",
- "eslint": "8.57.0",
+ "eslint": "8.57.1",
"jest": "29.7.0",
"svelte": "4.2.19",
"tslib": "2.5.0",
diff --git a/projects/packages/changelogger/CHANGELOG.md b/projects/packages/changelogger/CHANGELOG.md
index 8fada1afe9231..156ceae5c1cfd 100644
--- a/projects/packages/changelogger/CHANGELOG.md
+++ b/projects/packages/changelogger/CHANGELOG.md
@@ -3,6 +3,10 @@ All notable changes to this project will be documented in this file.
This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
+## [4.2.7] - 2024-10-25
+### Fixed
+- When amending, do not preserve a default link. We'll want the link to be updated to the new default. [#39868]
+
## [4.2.6] - 2024-08-22
### Changed
- Updated package dependencies. [#39004]
@@ -244,6 +248,7 @@ This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.htm
### Added
- Initial version.
+[4.2.7]: https://github.com/Automattic/jetpack-changelogger/compare/4.2.6...4.2.7
[4.2.6]: https://github.com/Automattic/jetpack-changelogger/compare/4.2.5...4.2.6
[4.2.5]: https://github.com/Automattic/jetpack-changelogger/compare/4.2.4...4.2.5
[4.2.4]: https://github.com/Automattic/jetpack-changelogger/compare/4.2.3...4.2.4
diff --git a/projects/packages/changelogger/src/Application.php b/projects/packages/changelogger/src/Application.php
index d70b65acc2f0b..69ea521e20354 100644
--- a/projects/packages/changelogger/src/Application.php
+++ b/projects/packages/changelogger/src/Application.php
@@ -19,7 +19,7 @@
*/
class Application extends SymfonyApplication {
- const VERSION = '4.2.6';
+ const VERSION = '4.2.7';
/**
* Constructor.
diff --git a/projects/packages/changelogger/src/WriteCommand.php b/projects/packages/changelogger/src/WriteCommand.php
index 900167f64d328..1a23cbdf38090 100644
--- a/projects/packages/changelogger/src/WriteCommand.php
+++ b/projects/packages/changelogger/src/WriteCommand.php
@@ -412,7 +412,11 @@ protected function doAmendChanges( InputInterface $input, OutputInterface $outpu
$input->setOption( 'epilogue', $latest->getEpilogue() );
}
if ( $input->getOption( 'link' ) === null ) {
- $input->setOption( 'link', $latest->getLink() );
+ $oldLink = $latest->getLink();
+ $defaultLink = $changelog->getLatestEntry() ? Config::link( $changelog->getLatestEntry()->getVersion(), $latest->getVersion() ) : null;
+ if ( $oldLink !== $defaultLink ) {
+ $input->setOption( 'link', $latest->getLink() );
+ }
}
} else {
$output->writeln( 'No version to amend, ignoring --amend.', OutputInterface::VERBOSITY_DEBUG );
diff --git a/projects/packages/changelogger/tests/php/tests/src/WriteCommandTest.php b/projects/packages/changelogger/tests/php/tests/src/WriteCommandTest.php
index ebb2e105351a6..1ea6e7d0c1f6d 100644
--- a/projects/packages/changelogger/tests/php/tests/src/WriteCommandTest.php
+++ b/projects/packages/changelogger/tests/php/tests/src/WriteCommandTest.php
@@ -749,6 +749,54 @@ public function provideExecute() {
true,
"# Changelog\n\n## 1.0.1 - $date\n\nPrologue for v1.0.1\n\n### Added\n- Stuff.\n- ZZZ.\n\n### Removed\n- Other stuff.\n- Broken stuff.\n\nEpilogue for v1.0.1\n\n## 1.0.0 - 2021-02-23\n\n- Initial release.\n",
),
+ 'Amend, beta to release' => array(
+ array( '--amend' => true ),
+ array(
+ 'composer.json' => array( 'link-template' => 'https://example.org/diff/${old}..${new}' ),
+ 'changes' => array(),
+ 'changelog' => "# Changelog\n\n## [1.0.1-beta] - $date\n\nPrologue for v1.0.1\n\n### Added\n- New stuff.\n- Stuff.\n- ZZZ.\n\n### Removed\n- Other stuff.\n\n### Fixed\n- Broken stuff.\n\nEpilogue for v1.0.1\n\n## 1.0.0 - 2021-02-23\n\n- Initial release.\n\n[1.0.1-beta]: https://example.org/new-link\n",
+ ),
+ array( 'Y' ),
+ 0,
+ array(
+ '{^No changes were found! Proceed\? \[y/N\] $}m',
+ ),
+ true,
+ "# Changelog\n\n## [1.0.1] - $date\n\nPrologue for v1.0.1\n\n### Added\n- New stuff.\n- Stuff.\n- ZZZ.\n\n### Removed\n- Other stuff.\n\n### Fixed\n- Broken stuff.\n\nEpilogue for v1.0.1\n\n## 1.0.0 - 2021-02-23\n\n- Initial release.\n\n[1.0.1]: https://example.org/new-link\n",
+ ),
+ 'Amend, ignore default link' => array(
+ array( '--amend' => true ),
+ array(
+ 'composer.json' => array( 'link-template' => 'https://example.org/diff/${old}..${new}' ),
+ 'changes' => array(),
+ 'changelog' => "# Changelog\n\n## [1.0.1-beta] - $date\n\nPrologue for v1.0.1\n\n### Added\n- New stuff.\n- Stuff.\n- ZZZ.\n\n### Removed\n- Other stuff.\n\n### Fixed\n- Broken stuff.\n\nEpilogue for v1.0.1\n\n## 1.0.0 - 2021-02-23\n\n- Initial release.\n\n[1.0.1-beta]: https://example.org/diff/1.0.0..1.0.1-beta\n",
+ ),
+ array( 'Y' ),
+ 0,
+ array(
+ '{^No changes were found! Proceed\? \[y/N\] $}m',
+ ),
+ true,
+ "# Changelog\n\n## [1.0.1] - $date\n\nPrologue for v1.0.1\n\n### Added\n- New stuff.\n- Stuff.\n- ZZZ.\n\n### Removed\n- Other stuff.\n\n### Fixed\n- Broken stuff.\n\nEpilogue for v1.0.1\n\n## 1.0.0 - 2021-02-23\n\n- Initial release.\n\n[1.0.1]: https://example.org/diff/1.0.0..1.0.1\n",
+ ),
+ 'Amend, manually override default link' => array(
+ array(
+ '--amend' => true,
+ '--link' => 'https://example.org/new-link',
+ ),
+ array(
+ 'composer.json' => array( 'link-template' => 'https://example.org/diff/${old}..${new}' ),
+ 'changes' => array(),
+ 'changelog' => "# Changelog\n\n## [1.0.1-beta] - $date\n\nPrologue for v1.0.1\n\n### Added\n- New stuff.\n- Stuff.\n- ZZZ.\n\n### Removed\n- Other stuff.\n\n### Fixed\n- Broken stuff.\n\nEpilogue for v1.0.1\n\n## 1.0.0 - 2021-02-23\n\n- Initial release.\n\n[1.0.1-beta]: https://example.org/diff/1.0.0..1.0.1-beta\n",
+ ),
+ array( 'Y' ),
+ 0,
+ array(
+ '{^No changes were found! Proceed\? \[y/N\] $}m',
+ ),
+ true,
+ "# Changelog\n\n## [1.0.1] - $date\n\nPrologue for v1.0.1\n\n### Added\n- New stuff.\n- Stuff.\n- ZZZ.\n\n### Removed\n- Other stuff.\n\n### Fixed\n- Broken stuff.\n\nEpilogue for v1.0.1\n\n## 1.0.0 - 2021-02-23\n\n- Initial release.\n\n[1.0.1]: https://example.org/new-link\n",
+ ),
'--use-version invalid' => array(
array( '--use-version' => '2.0' ),
diff --git a/projects/packages/connection/CHANGELOG.md b/projects/packages/connection/CHANGELOG.md
index 01ae992f43f27..afb4d5b98596d 100644
--- a/projects/packages/connection/CHANGELOG.md
+++ b/projects/packages/connection/CHANGELOG.md
@@ -5,6 +5,10 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
+## [5.1.5] - 2024-10-25
+### Changed
+- Internal updates.
+
## [5.1.4] - 2024-10-21
### Changed
- SSO: optimize 'admin_notices' action callback. [#39811]
@@ -1230,6 +1234,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Separate the connection library into its own package.
+[5.1.5]: https://github.com/Automattic/jetpack-connection/compare/v5.1.4...v5.1.5
[5.1.4]: https://github.com/Automattic/jetpack-connection/compare/v5.1.3...v5.1.4
[5.1.3]: https://github.com/Automattic/jetpack-connection/compare/v5.1.2...v5.1.3
[5.1.2]: https://github.com/Automattic/jetpack-connection/compare/v5.1.1...v5.1.2
diff --git a/projects/packages/connection/src/class-connection-assets.php b/projects/packages/connection/src/class-connection-assets.php
index f231aa40b7b9e..93daae1b536f7 100644
--- a/projects/packages/connection/src/class-connection-assets.php
+++ b/projects/packages/connection/src/class-connection-assets.php
@@ -25,6 +25,9 @@ public static function configure() {
/**
* Register assets.
+ *
+ * NOTICE: Please think twice before including Connection scripts in the frontend.
+ * Those scripts are intended to be used in WP admin area.
*/
public static function register_assets() {
diff --git a/projects/packages/connection/src/class-package-version.php b/projects/packages/connection/src/class-package-version.php
index 0ed481101c11e..9797fa57d5dfc 100644
--- a/projects/packages/connection/src/class-package-version.php
+++ b/projects/packages/connection/src/class-package-version.php
@@ -12,7 +12,7 @@
*/
class Package_Version {
- const PACKAGE_VERSION = '5.1.4';
+ const PACKAGE_VERSION = '5.1.5';
const PACKAGE_SLUG = 'connection';
diff --git a/projects/packages/jetpack-mu-wpcom/changelog/fix-smp-special-chars b/projects/packages/jetpack-mu-wpcom/changelog/fix-smp-special-chars
new file mode 100644
index 0000000000000..0bfb660b10d0f
--- /dev/null
+++ b/projects/packages/jetpack-mu-wpcom/changelog/fix-smp-special-chars
@@ -0,0 +1,4 @@
+Significance: patch
+Type: changed
+
+Site Management Panel: fix site name encoding display
diff --git a/projects/packages/jetpack-mu-wpcom/changelog/fix-verbum-comments-resize-logic b/projects/packages/jetpack-mu-wpcom/changelog/fix-verbum-comments-resize-logic
new file mode 100644
index 0000000000000..1ddd3df5cd6c6
--- /dev/null
+++ b/projects/packages/jetpack-mu-wpcom/changelog/fix-verbum-comments-resize-logic
@@ -0,0 +1,4 @@
+Significance: patch
+Type: changed
+
+Update Verbum Comments resize logic
diff --git a/projects/packages/jetpack-mu-wpcom/src/features/verbum-comments/class-verbum-comments.php b/projects/packages/jetpack-mu-wpcom/src/features/verbum-comments/class-verbum-comments.php
index b7f9a707def63..397838493877c 100644
--- a/projects/packages/jetpack-mu-wpcom/src/features/verbum-comments/class-verbum-comments.php
+++ b/projects/packages/jetpack-mu-wpcom/src/features/verbum-comments/class-verbum-comments.php
@@ -175,6 +175,7 @@ public function enqueue_assets() {
$jetpack_username = isset( $__get['hc_username'] ) && is_string( $__get['hc_username'] ) ? $__get['hc_username'] : '';
$jetpack_user_id = isset( $__get['hc_userid'] ) && is_numeric( $__get['hc_userid'] ) ? (int) $__get['hc_userid'] : 0;
$jetpack_signature = isset( $__get['sig'] ) && is_string( $__get['sig'] ) ? $__get['sig'] : '';
+ $iframe_unique_id = isset( $__get['iframe_unique_id'] ) && is_numeric( $__get['iframe_unique_id'] ) ? (int) $__get['iframe_unique_id'] : 0;
list( $jetpack_avatar ) = wpcom_get_avatar_url( "$email_hash@md5.gravatar.com" );
$comment_registration_enabled = boolval( get_blog_option( $this->blog_id, 'comment_registration' ) );
// phpcs:ignore WordPress.Security.NonceVerification.Recommended
@@ -255,6 +256,7 @@ public function enqueue_assets() {
'verbumBundleUrl' => plugins_url( 'dist/index.js', __FILE__ ),
'isRTL' => is_rtl( $locale ),
'vbeCacheBuster' => $vbe_cache_buster,
+ 'iframeUniqueId' => $iframe_unique_id,
)
),
'before'
diff --git a/projects/packages/jetpack-mu-wpcom/src/features/wpcom-dashboard-widgets/wpcom-dashboard-widgets.php b/projects/packages/jetpack-mu-wpcom/src/features/wpcom-dashboard-widgets/wpcom-dashboard-widgets.php
index c627f966f295a..5312a26f24cde 100644
--- a/projects/packages/jetpack-mu-wpcom/src/features/wpcom-dashboard-widgets/wpcom-dashboard-widgets.php
+++ b/projects/packages/jetpack-mu-wpcom/src/features/wpcom-dashboard-widgets/wpcom-dashboard-widgets.php
@@ -48,7 +48,7 @@ function enqueue_wpcom_dashboard_widgets() {
$data = wp_json_encode(
array(
- 'siteName' => get_bloginfo( 'name' ),
+ 'siteName' => wp_specialchars_decode( get_bloginfo( 'name' ), ENT_QUOTES ),
'siteDomain' => wp_parse_url( home_url(), PHP_URL_HOST ),
'siteIconUrl' => get_site_icon_url( 38 ),
)
diff --git a/projects/packages/publicize/CHANGELOG.md b/projects/packages/publicize/CHANGELOG.md
index 2e9b7805d534b..53a9ad0cba00b 100644
--- a/projects/packages/publicize/CHANGELOG.md
+++ b/projects/packages/publicize/CHANGELOG.md
@@ -5,6 +5,10 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
+## [0.55.0] - 2024-10-25
+### Fixed
+- Social: Fix Bsky profile URL [#39849]
+
## [0.54.4] - 2024-10-21
### Changed
- Initial State: Migrated URLs to script data. [#39797]
@@ -736,6 +740,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Updated package dependencies.
- Update package.json metadata.
+[0.55.0]: https://github.com/Automattic/jetpack-publicize/compare/v0.54.4...v0.55.0
[0.54.4]: https://github.com/Automattic/jetpack-publicize/compare/v0.54.3...v0.54.4
[0.54.3]: https://github.com/Automattic/jetpack-publicize/compare/v0.54.2...v0.54.3
[0.54.2]: https://github.com/Automattic/jetpack-publicize/compare/v0.54.1...v0.54.2
diff --git a/projects/packages/publicize/changelog/fix-social-bsky-profile-url b/projects/packages/publicize/changelog/fix-social-bsky-profile-url
deleted file mode 100644
index ebe3332ec44de..0000000000000
--- a/projects/packages/publicize/changelog/fix-social-bsky-profile-url
+++ /dev/null
@@ -1,4 +0,0 @@
-Significance: minor
-Type: fixed
-
-Social: Fix Bsky profile URL
diff --git a/projects/packages/publicize/composer.json b/projects/packages/publicize/composer.json
index 7eca829441cb7..b3f71236d8419 100644
--- a/projects/packages/publicize/composer.json
+++ b/projects/packages/publicize/composer.json
@@ -68,7 +68,7 @@
"link-template": "https://github.com/Automattic/jetpack-publicize/compare/v${old}...v${new}"
},
"branch-alias": {
- "dev-trunk": "0.54.x-dev"
+ "dev-trunk": "0.55.x-dev"
}
},
"config": {
diff --git a/projects/packages/publicize/package.json b/projects/packages/publicize/package.json
index 7df4d2ac41402..0ae20c479ae66 100644
--- a/projects/packages/publicize/package.json
+++ b/projects/packages/publicize/package.json
@@ -1,7 +1,7 @@
{
"private": true,
"name": "@automattic/jetpack-publicize",
- "version": "0.54.4",
+ "version": "0.55.0",
"description": "Publicize makes it easy to share your site’s posts on several social media networks automatically when you publish a new post.",
"homepage": "https://github.com/Automattic/jetpack/tree/HEAD/projects/packages/publicize/#readme",
"bugs": {
diff --git a/projects/packages/stats-admin/changelog/update-use-option-value-instead-of-transient b/projects/packages/stats-admin/changelog/update-use-option-value-instead-of-transient
new file mode 100644
index 0000000000000..6e6660e388644
--- /dev/null
+++ b/projects/packages/stats-admin/changelog/update-use-option-value-instead-of-transient
@@ -0,0 +1,4 @@
+Significance: patch
+Type: changed
+
+Odyssey Stats cache busting: use optioin instead of transient
diff --git a/projects/packages/stats-admin/src/class-odyssey-assets.php b/projects/packages/stats-admin/src/class-odyssey-assets.php
index 8117e650ae5fa..98d59fc3bb3ad 100644
--- a/projects/packages/stats-admin/src/class-odyssey-assets.php
+++ b/projects/packages/stats-admin/src/class-odyssey-assets.php
@@ -75,36 +75,58 @@ public function load_admin_scripts( $asset_handle, $asset_name, $options = array
/**
* Returns cache buster string for assets.
* Development mode doesn't need this, as it's handled by `Assets` class.
+ *
+ * @return string
*/
protected function get_cdn_asset_cache_buster() {
+ $now_in_ms = floor( microtime( true ) * 1000 );
// phpcs:ignore WordPress.Security.NonceVerification.Recommended
if ( isset( $_GET['force_refresh'] ) ) {
- set_transient( self::ODYSSEY_STATS_CACHE_BUSTER_CACHE_KEY, floor( microtime( true ) * 1000 ), 15 * MINUTE_IN_SECONDS );
+ update_option( self::ODYSSEY_STATS_CACHE_BUSTER_CACHE_KEY, $this->get_cache_buster_option_value( $now_in_ms ), false );
}
// Use cached cache buster in production.
- $remote_asset_version = get_transient( self::ODYSSEY_STATS_CACHE_BUSTER_CACHE_KEY );
+ $remote_asset_version = get_option( self::ODYSSEY_STATS_CACHE_BUSTER_CACHE_KEY );
if ( ! empty( $remote_asset_version ) ) {
- return $remote_asset_version;
+ $remote_asset_version = json_decode( $remote_asset_version, true );
+ // If cache buster is cached and not expired (valid in 15 min), return it.
+ if ( ! empty( $remote_asset_version['cache_buster'] ) && $remote_asset_version['cached_at'] > $now_in_ms - MINUTE_IN_SECONDS * 1000 * 15 ) {
+ return $remote_asset_version['cache_buster'];
+ }
}
// If no cached cache buster, we fetch it from CDN and set to transient.
- $response = wp_remote_get( sprintf( self::ODYSSEY_CDN_URL, self::ODYSSEY_STATS_VERSION, 'build_meta.json?t=' . time() ), array( 'timeout' => 5 ) );
+ $response = wp_remote_get( sprintf( self::ODYSSEY_CDN_URL, self::ODYSSEY_STATS_VERSION, 'build_meta.json?t=' . $now_in_ms ), array( 'timeout' => 5 ) );
if ( is_wp_error( $response ) ) {
- // fallback to the package version.
- return Main::VERSION;
+ // fallback to current timestamp.
+ return (string) $now_in_ms;
}
$build_meta = json_decode( wp_remote_retrieve_body( $response ), true );
if ( ! empty( $build_meta['cache_buster'] ) ) {
// Cache the cache buster for 15 mins.
- set_transient( self::ODYSSEY_STATS_CACHE_BUSTER_CACHE_KEY, $build_meta['cache_buster'], 15 * MINUTE_IN_SECONDS );
+ update_option( self::ODYSSEY_STATS_CACHE_BUSTER_CACHE_KEY, $this->get_cache_buster_option_value( $build_meta['cache_buster'] ), false );
return $build_meta['cache_buster'];
}
- // fallback to the package version.
- return Main::VERSION;
+ // fallback to current timestamp.
+ return (string) $now_in_ms;
+ }
+
+ /**
+ * Get the cache buster option value.
+ *
+ * @param string|int|float $cache_buster The cache buster.
+ * @return string|false
+ */
+ protected function get_cache_buster_option_value( $cache_buster ) {
+ return wp_json_encode(
+ array(
+ 'cache_buster' => (string) $cache_buster,
+ 'cached_at' => floor( microtime( true ) * 1000 ), // milliseconds.
+ )
+ );
}
}
diff --git a/projects/packages/stats-admin/tests/php/class-test-case.php b/projects/packages/stats-admin/tests/php/class-test-case.php
index e6b919b204a4f..0d21e264cf842 100644
--- a/projects/packages/stats-admin/tests/php/class-test-case.php
+++ b/projects/packages/stats-admin/tests/php/class-test-case.php
@@ -60,6 +60,7 @@ public function set_up() {
add_filter( 'jetpack_options', array( $this, 'mock_jetpack_site_connection_options' ), 10, 2 );
add_filter( 'pre_http_request', array( $this, 'plan_http_response_fixture' ), 10, 3 );
+ delete_option( Odyssey_Assets::ODYSSEY_STATS_CACHE_BUSTER_CACHE_KEY );
}
/**
@@ -76,6 +77,7 @@ public function tear_down() {
remove_filter( 'pre_http_request', array( $this, 'plan_http_response_fixture' ) );
remove_filter( 'jetpack_options', array( $this, 'mock_jetpack_site_connection_options' ) );
+ delete_option( Odyssey_Assets::ODYSSEY_STATS_CACHE_BUSTER_CACHE_KEY );
}
/**
diff --git a/projects/packages/stats-admin/tests/php/test-odyssey-assets.php b/projects/packages/stats-admin/tests/php/test-odyssey-assets.php
index f99eca36ad1fe..14e1fb5c3bec9 100644
--- a/projects/packages/stats-admin/tests/php/test-odyssey-assets.php
+++ b/projects/packages/stats-admin/tests/php/test-odyssey-assets.php
@@ -2,6 +2,7 @@
namespace Automattic\Jetpack\Stats_Admin;
use Automattic\Jetpack\Stats_Admin\Test_Case as Stats_Test_Case;
+use WP_Error;
/**
* Unit tests for the Odyssey_Assets class.
@@ -9,13 +10,106 @@
* @package automattic/jetpack-stats-admin
*/
class Test_Odyssey_Assets extends Stats_Test_Case {
+
/**
* Test remote cache buster.
*/
public function test_get_cdn_asset_cache_buster() {
+ $this->assertEquals( 'calypso-4917-8664-g72a154d63a', $this->get_cdn_asset_cache_buster_callable() );
+ }
+
+ /**
+ * Test remote cache buster remote error.
+ */
+ public function test_get_cdn_asset_cache_buster_remote_error() {
+ add_filter( 'pre_http_request', array( $this, 'break_cdn_cache_buster_request' ), 15, 3 );
+ $this->assertEquals( time(), floor( $this->get_cdn_asset_cache_buster_callable() / 1000 ) );
+ remove_filter( 'pre_http_request', array( $this, 'break_cdn_cache_buster_request' ), 15 );
+ }
+
+ /**
+ * Test already cached cache buster.
+ */
+ public function test_get_cdn_asset_cache_buster_already_cached() {
+ update_option(
+ Odyssey_Assets::ODYSSEY_STATS_CACHE_BUSTER_CACHE_KEY,
+ wp_json_encode(
+ array(
+ 'cache_buster' => 'calypso-4917-8664-123456',
+ 'cached_at' => floor( microtime( true ) * 1000 ), // milliseconds.
+ )
+ ),
+ false
+ );
+ $this->assertEquals( 'calypso-4917-8664-123456', $this->get_cdn_asset_cache_buster_callable() );
+ }
+
+ /**
+ * Test already cached cache buster expired.
+ */
+ public function test_get_cdn_asset_cache_buster_already_cached_expired() {
+ update_option(
+ Odyssey_Assets::ODYSSEY_STATS_CACHE_BUSTER_CACHE_KEY,
+ wp_json_encode(
+ array(
+ 'cache_buster' => 'calypso-4917-8664-123456',
+ 'cached_at' => floor( microtime( true ) * 1000 - MINUTE_IN_SECONDS * 1000 * 20 ), // milliseconds.
+ )
+ ),
+ false
+ );
+ $this->assertEquals( 'calypso-4917-8664-g72a154d63a', $this->get_cdn_asset_cache_buster_callable() );
+ }
+
+ /**
+ * Test already cached cache buster expired and failed to fetch new one.
+ */
+ public function test_get_cdn_asset_cache_buster_failed_to_fetch() {
+ add_filter( 'pre_http_request', array( $this, 'break_cdn_cache_buster_request' ), 15, 3 );
+ update_option(
+ Odyssey_Assets::ODYSSEY_STATS_CACHE_BUSTER_CACHE_KEY,
+ wp_json_encode(
+ array(
+ 'cache_buster' => 'calypso-4917-8664-123456',
+ 'cached_at' => floor( microtime( true ) * 1000 - MINUTE_IN_SECONDS * 1000 * 20 ), // milliseconds.
+ )
+ ),
+ false
+ );
+ $this->assertEquals( time(), floor( $this->get_cdn_asset_cache_buster_callable() / 1000 ) );
+ remove_filter( 'pre_http_request', array( $this, 'break_cdn_cache_buster_request' ), 15 );
+ }
+
+ /**
+ * Test force refresh cache buster.
+ */
+ public function test_get_cdn_asset_cache_buster_force_refresh_expired() {
+ $_GET['force_refresh'] = 1;
+ $this->assertEquals( time(), floor( $this->get_cdn_asset_cache_buster_callable() / 1000 ) );
+ }
+
+ /**
+ * Test remote cache buster.
+ *
+ * @param mixed $response The response array.
+ * @param mixed $parsed_args The parsed args.
+ * @param mixed $url The URL.
+ * @return WP_Error | void
+ */
+ public function break_cdn_cache_buster_request( $response, $parsed_args, $url ) {
+ if ( strpos( $url, '/build_meta.json' ) !== false ) {
+ return new WP_Error( 500, 'Internal Server Error' );
+ }
+ }
+
+ /**
+ * Get CDN asset cache buster.
+ */
+ protected function get_cdn_asset_cache_buster_callable() {
$odyssey_assets = new Odyssey_Assets();
$get_cdn_asset_cache_buster = new \ReflectionMethod( $odyssey_assets, 'get_cdn_asset_cache_buster' );
$get_cdn_asset_cache_buster->setAccessible( true );
- $this->assertEquals( 'calypso-4917-8664-g72a154d63a', $get_cdn_asset_cache_buster->invoke( $odyssey_assets ) );
+
+ return $get_cdn_asset_cache_buster->invoke( $odyssey_assets );
}
}
diff --git a/projects/packages/sync/CHANGELOG.md b/projects/packages/sync/CHANGELOG.md
index 963e67ed56760..3eb956e5ec6e5 100644
--- a/projects/packages/sync/CHANGELOG.md
+++ b/projects/packages/sync/CHANGELOG.md
@@ -5,6 +5,10 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
+## [3.14.3] - 2024-10-25
+### Fixed
+- Hooks: Hook init_sync_cron_jobs into init to ensure translation loading within the function is not triggered too early. [#39841]
+
## [3.14.2] - 2024-10-15
### Changed
- Jetpack Sync: Update default Post Type Blacklist [#39770]
@@ -1318,6 +1322,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Packages: Move sync to a classmapped package
+[3.14.3]: https://github.com/Automattic/jetpack-sync/compare/v3.14.2...v3.14.3
[3.14.2]: https://github.com/Automattic/jetpack-sync/compare/v3.14.1...v3.14.2
[3.14.1]: https://github.com/Automattic/jetpack-sync/compare/v3.14.0...v3.14.1
[3.14.0]: https://github.com/Automattic/jetpack-sync/compare/v3.13.2...v3.14.0
diff --git a/projects/packages/sync/changelog/revert-39658-update-jetpack-sync-whitelist b/projects/packages/sync/changelog/revert-39658-update-jetpack-sync-whitelist
deleted file mode 100644
index 59df2569689e4..0000000000000
--- a/projects/packages/sync/changelog/revert-39658-update-jetpack-sync-whitelist
+++ /dev/null
@@ -1,5 +0,0 @@
-Significance: patch
-Type: removed
-Comment: Revert "Jetpack Sync: Add 'woocommerce_analytics_first_activation' in options' whitelist"
-
-
diff --git a/projects/packages/sync/src/class-actions.php b/projects/packages/sync/src/class-actions.php
index 2769030b4e68e..fb09385827392 100644
--- a/projects/packages/sync/src/class-actions.php
+++ b/projects/packages/sync/src/class-actions.php
@@ -116,7 +116,7 @@ public static function init() {
}
if ( self::sync_via_cron_allowed() ) {
- self::init_sync_cron_jobs();
+ add_action( 'init', array( __CLASS__, 'init_sync_cron_jobs' ), 1 );
} elseif ( wp_next_scheduled( 'jetpack_sync_cron' ) ) {
self::clear_sync_cron_jobs();
}
diff --git a/projects/packages/sync/src/class-package-version.php b/projects/packages/sync/src/class-package-version.php
index d028b2ae59613..ac647f5064ad9 100644
--- a/projects/packages/sync/src/class-package-version.php
+++ b/projects/packages/sync/src/class-package-version.php
@@ -12,7 +12,7 @@
*/
class Package_Version {
- const PACKAGE_VERSION = '3.14.2';
+ const PACKAGE_VERSION = '3.14.3';
const PACKAGE_SLUG = 'sync';
diff --git a/projects/packages/videopress/changelog/update-hooks-prevent-doing-it-wrong-notice b/projects/packages/videopress/changelog/update-hooks-prevent-doing-it-wrong-notice
new file mode 100644
index 0000000000000..18dbc98c689ab
--- /dev/null
+++ b/projects/packages/videopress/changelog/update-hooks-prevent-doing-it-wrong-notice
@@ -0,0 +1,4 @@
+Significance: patch
+Type: changed
+
+Admin: Changed initialization load order for menu items to prevent translation error.
diff --git a/projects/packages/videopress/src/class-admin-ui.php b/projects/packages/videopress/src/class-admin-ui.php
index ef5182a691076..e934b7cd4a4ba 100644
--- a/projects/packages/videopress/src/class-admin-ui.php
+++ b/projects/packages/videopress/src/class-admin-ui.php
@@ -34,6 +34,23 @@ class Admin_UI {
* @return void
*/
public static function init() {
+
+ add_action( 'admin_menu', array( __CLASS__, 'enable_menu' ) );
+
+ add_action( 'admin_footer-upload.php', array( __CLASS__, 'attachment_details_two_column_template' ) );
+ add_action( 'admin_footer-post.php', array( __CLASS__, 'attachment_details_template' ), 20 );
+
+ add_filter( 'get_edit_post_link', array( __CLASS__, 'edit_video_link' ), 10, 3 );
+
+ add_action( 'admin_init', array( __CLASS__, 'remove_jetpack_hooks' ) );
+ }
+
+ /**
+ * Enable the menu, separately to init due to translations needing to run early for the page suffix.
+ *
+ * @return void
+ */
+ public static function enable_menu() {
$page_suffix = Admin_Menu::add_menu(
__( 'Jetpack VideoPress', 'jetpack-videopress-pkg' ),
_x( 'VideoPress', 'The Jetpack VideoPress product name, without the Jetpack prefix', 'jetpack-videopress-pkg' ),
@@ -43,13 +60,6 @@ public static function init() {
3
);
add_action( 'load-' . $page_suffix, array( __CLASS__, 'admin_init' ) );
-
- add_action( 'admin_footer-upload.php', array( __CLASS__, 'attachment_details_two_column_template' ) );
- add_action( 'admin_footer-post.php', array( __CLASS__, 'attachment_details_template' ), 20 );
-
- add_filter( 'get_edit_post_link', array( __CLASS__, 'edit_video_link' ), 10, 3 );
-
- add_action( 'admin_init', array( __CLASS__, 'remove_jetpack_hooks' ) );
}
/**
diff --git a/projects/plugins/automattic-for-agencies-client/changelog/update-tested-to-6-7 b/projects/plugins/automattic-for-agencies-client/changelog/update-tested-to-6-7
new file mode 100644
index 0000000000000..9c1d5b4fabb5f
--- /dev/null
+++ b/projects/plugins/automattic-for-agencies-client/changelog/update-tested-to-6-7
@@ -0,0 +1,4 @@
+Significance: patch
+Type: changed
+
+General: indicate compatibility with the upcoming version of WordPress - 6.7.
diff --git a/projects/plugins/automattic-for-agencies-client/readme.txt b/projects/plugins/automattic-for-agencies-client/readme.txt
index 4fa7bc1f2a1ba..5601a6fd6bd91 100644
--- a/projects/plugins/automattic-for-agencies-client/readme.txt
+++ b/projects/plugins/automattic-for-agencies-client/readme.txt
@@ -3,7 +3,7 @@ Contributors: automattic, jeherve, njweller, rcanepa
Tags: agency, dashboard, management, sites, monitoring
Requires at least: 6.5
Requires PHP: 7.0
-Tested up to: 6.6
+Tested up to: 6.7
Stable tag: 0.2.1
License: GPLv2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
diff --git a/projects/plugins/backup/changelog/update-tested-to-6-7 b/projects/plugins/backup/changelog/update-tested-to-6-7
new file mode 100644
index 0000000000000..9c1d5b4fabb5f
--- /dev/null
+++ b/projects/plugins/backup/changelog/update-tested-to-6-7
@@ -0,0 +1,4 @@
+Significance: patch
+Type: changed
+
+General: indicate compatibility with the upcoming version of WordPress - 6.7.
diff --git a/projects/plugins/backup/readme.txt b/projects/plugins/backup/readme.txt
index b620d28bd8d14..7fe594088a899 100644
--- a/projects/plugins/backup/readme.txt
+++ b/projects/plugins/backup/readme.txt
@@ -3,7 +3,7 @@ Contributors: automattic, bjorsch, fgiannar, initsogar, jeherve, jwebbdev, kraft
Tags: jetpack, backup, restore
Requires at least: 6.5
Requires PHP: 7.0
-Tested up to: 6.6
+Tested up to: 6.7
Stable tag: 2.2
License: GPLv2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
diff --git a/projects/plugins/boost/changelog/update-tested-to-6-7 b/projects/plugins/boost/changelog/update-tested-to-6-7
new file mode 100644
index 0000000000000..9c1d5b4fabb5f
--- /dev/null
+++ b/projects/plugins/boost/changelog/update-tested-to-6-7
@@ -0,0 +1,4 @@
+Significance: patch
+Type: changed
+
+General: indicate compatibility with the upcoming version of WordPress - 6.7.
diff --git a/projects/plugins/boost/readme.txt b/projects/plugins/boost/readme.txt
index ac48b05bda4e2..fde356fc07b00 100644
--- a/projects/plugins/boost/readme.txt
+++ b/projects/plugins/boost/readme.txt
@@ -3,7 +3,7 @@ Contributors: automattic, xwp, adnan007, bjorsch, danwalmsley, davidlonjon, dili
Donate link: https://automattic.com
Tags: performance, speed, web vitals, critical css, cache
Requires at least: 6.5
-Tested up to: 6.6
+Tested up to: 6.7
Requires PHP: 7.0
Stable tag: 3.5.2
License: GPLv2 or later
diff --git a/projects/plugins/classic-theme-helper-plugin/changelog/update-tested-to-6-7 b/projects/plugins/classic-theme-helper-plugin/changelog/update-tested-to-6-7
new file mode 100644
index 0000000000000..9c1d5b4fabb5f
--- /dev/null
+++ b/projects/plugins/classic-theme-helper-plugin/changelog/update-tested-to-6-7
@@ -0,0 +1,4 @@
+Significance: patch
+Type: changed
+
+General: indicate compatibility with the upcoming version of WordPress - 6.7.
diff --git a/projects/plugins/classic-theme-helper-plugin/readme.txt b/projects/plugins/classic-theme-helper-plugin/readme.txt
index d4c1568fc21a6..ae28b2f61398f 100644
--- a/projects/plugins/classic-theme-helper-plugin/readme.txt
+++ b/projects/plugins/classic-theme-helper-plugin/readme.txt
@@ -3,7 +3,7 @@ Contributors: automattic,
Tags: jetpack, stuff
Requires at least: 6.5
Requires PHP: 7.0
-Tested up to: 6.6
+Tested up to: 6.7
Stable tag: 0.1.0-alpha
License: GPLv2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
diff --git a/projects/plugins/crm/changelog/update-tested-to-6-7 b/projects/plugins/crm/changelog/update-tested-to-6-7
new file mode 100644
index 0000000000000..9c1d5b4fabb5f
--- /dev/null
+++ b/projects/plugins/crm/changelog/update-tested-to-6-7
@@ -0,0 +1,4 @@
+Significance: patch
+Type: changed
+
+General: indicate compatibility with the upcoming version of WordPress - 6.7.
diff --git a/projects/plugins/crm/readme.txt b/projects/plugins/crm/readme.txt
index fa19d69208f33..85fc40e13a5de 100644
--- a/projects/plugins/crm/readme.txt
+++ b/projects/plugins/crm/readme.txt
@@ -1,7 +1,7 @@
=== Jetpack CRM - Clients, Leads, Invoices, Billing, Email Marketing, & Automation ===
Contributors: automattic, kallehauge, cleacos, diegogarciarodrigues, bradshawtm, wpkaren, robertf4, woodyhayday, mikemayhem3030
Tags: CRM, Invoice, Woocommerce CRM, Clients, Lead Generation, contacts, customers, billing, email marketing, Marketing Automation, contact form, automations
-Tested up to: 6.6
+Tested up to: 6.7
Stable tag: 6.4.2
Requires at least: 6.0
Requires PHP: 7.4
diff --git a/projects/plugins/inspect/changelog/update-tested-to-6-7 b/projects/plugins/inspect/changelog/update-tested-to-6-7
new file mode 100644
index 0000000000000..9c1d5b4fabb5f
--- /dev/null
+++ b/projects/plugins/inspect/changelog/update-tested-to-6-7
@@ -0,0 +1,4 @@
+Significance: patch
+Type: changed
+
+General: indicate compatibility with the upcoming version of WordPress - 6.7.
diff --git a/projects/plugins/inspect/readme.txt b/projects/plugins/inspect/readme.txt
index 8047dad7d5d0f..d3a735ec12689 100644
--- a/projects/plugins/inspect/readme.txt
+++ b/projects/plugins/inspect/readme.txt
@@ -3,7 +3,7 @@ Contributors: automattic,
Tags: jetpack, stuff
Requires at least: 6.5
Requires PHP: 7.0
-Tested up to: 6.6
+Tested up to: 6.7
Stable tag: 1.0.0-alpha
License: GPLv2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
diff --git a/projects/plugins/jetpack/.phan/baseline.php b/projects/plugins/jetpack/.phan/baseline.php
index 73b08dec3ed91..b8589a544e1db 100644
--- a/projects/plugins/jetpack/.phan/baseline.php
+++ b/projects/plugins/jetpack/.phan/baseline.php
@@ -178,7 +178,6 @@
'extensions/blocks/blog-stats/blog-stats.php' => ['PhanTypeMismatchReturnProbablyReal'],
'extensions/blocks/blogroll/blogroll-item/blogroll-item.php' => ['PhanPluginDuplicateConditionalNullCoalescing'],
'extensions/blocks/calendly/calendly.php' => ['PhanTypeMismatchArgumentProbablyReal', 'PhanTypeMismatchReturnProbablyReal'],
- 'extensions/blocks/contact-info/class-jetpack-contact-info-block.php' => ['PhanTypeMismatchReturn'],
'extensions/blocks/cookie-consent/cookie-consent.php' => ['PhanParamTooMany'],
'extensions/blocks/donations/donations.php' => ['PhanTypeMismatchArgument'],
'extensions/blocks/gif/gif.php' => ['PhanPluginDuplicateConditionalNullCoalescing', 'PhanTypeMismatchReturnProbablyReal'],
diff --git a/projects/plugins/jetpack/_inc/client/components/module-settings/with-module-settings-form-helpers.jsx b/projects/plugins/jetpack/_inc/client/components/module-settings/with-module-settings-form-helpers.jsx
index 50a5b9353a461..90571b74a25ed 100644
--- a/projects/plugins/jetpack/_inc/client/components/module-settings/with-module-settings-form-helpers.jsx
+++ b/projects/plugins/jetpack/_inc/client/components/module-settings/with-module-settings-form-helpers.jsx
@@ -124,7 +124,7 @@ export function withModuleSettingsFormHelpers( InnerComponent ) {
const saneOptions = {};
each( this.state.options, ( value, key ) => {
- key = key.replace( /\-/, '_' );
+ key = key.replace( /-/, '_' );
saneOptions[ key ] = value;
} );
diff --git a/projects/plugins/jetpack/_inc/client/components/popover/util.js b/projects/plugins/jetpack/_inc/client/components/popover/util.js
index dc1d70473ffcd..9ee46675a4b36 100644
--- a/projects/plugins/jetpack/_inc/client/components/popover/util.js
+++ b/projects/plugins/jetpack/_inc/client/components/popover/util.js
@@ -117,7 +117,8 @@ function choosePrimary( prefered, room ) {
// less chopped of than other sides
if ( space > best ) {
- ( best = space ), ( bestPos = prefered );
+ best = space;
+ bestPos = prefered;
}
}
@@ -161,7 +162,8 @@ function chooseSecondary( primary, prefered, el, target, w, h ) {
// shows more of the tip than the other positions
if ( area > best ) {
- ( best = area ), ( bestPos = pos );
+ best = area;
+ bestPos = pos;
}
}
diff --git a/projects/plugins/jetpack/_inc/client/components/section-nav/tabs.jsx b/projects/plugins/jetpack/_inc/client/components/section-nav/tabs.jsx
index 7561cc6c1500e..e3c7b196ee45a 100644
--- a/projects/plugins/jetpack/_inc/client/components/section-nav/tabs.jsx
+++ b/projects/plugins/jetpack/_inc/client/components/section-nav/tabs.jsx
@@ -155,7 +155,7 @@ class NavTabs extends React.Component {
case 32: // space
case 13: // enter
event.preventDefault();
- document.activeElement.click();
+ event.target.ownerDocument.activeElement.click();
break;
}
};
diff --git a/projects/plugins/jetpack/_inc/client/components/select-dropdown/index.jsx b/projects/plugins/jetpack/_inc/client/components/select-dropdown/index.jsx
index 0823472917e90..cc5f27ea3f3bc 100644
--- a/projects/plugins/jetpack/_inc/client/components/select-dropdown/index.jsx
+++ b/projects/plugins/jetpack/_inc/client/components/select-dropdown/index.jsx
@@ -312,7 +312,7 @@ class SelectDropdown extends Component {
if ( ! this.state.isOpen ) {
return this.openDropdown();
}
- document.activeElement.click();
+ this.dropdownContainerRef.current.ownerDocument.activeElement.click();
}
focusSibling( direction ) {
diff --git a/projects/plugins/jetpack/_inc/client/pro-status/index.jsx b/projects/plugins/jetpack/_inc/client/pro-status/index.jsx
index 8afa74cd5381e..8966c2d5fb9af 100644
--- a/projects/plugins/jetpack/_inc/client/pro-status/index.jsx
+++ b/projects/plugins/jetpack/_inc/client/pro-status/index.jsx
@@ -109,9 +109,10 @@ class ProStatus extends React.Component {
break;
case 'invalid_key':
return;
- case 'rewind_connected':
+ case 'rewind_connected': {
const rewindMessage = this.getRewindMessage();
return
;
+ }
case 'active':
return
;
}
diff --git a/projects/plugins/jetpack/_inc/client/sharing/index.jsx b/projects/plugins/jetpack/_inc/client/sharing/index.jsx
index 196f8cd178b05..ba0f0e9b64409 100644
--- a/projects/plugins/jetpack/_inc/client/sharing/index.jsx
+++ b/projects/plugins/jetpack/_inc/client/sharing/index.jsx
@@ -1,4 +1,7 @@
-import { getSocialScriptData } from '@automattic/jetpack-publicize-components';
+import {
+ getSocialScriptData,
+ hasSocialPaidFeatures,
+} from '@automattic/jetpack-publicize-components';
import { __ } from '@wordpress/i18n';
import QuerySite from 'components/data/query-site';
import React, { Component } from 'react';
@@ -97,7 +100,7 @@ export default connect( state => {
blogID: getSiteId( state ),
siteAdminUrl: getSiteAdminUrl( state ),
activeFeatures: getActiveFeatures( state ),
- hasPaidFeatures: siteHasFeature( state, 'social-enhanced-publishing' ),
+ hasPaidFeatures: hasSocialPaidFeatures(),
hasSocialImageGenerator: siteHasFeature( state, 'social-image-generator' ),
userCanManageModules: userCanManageModules( state ),
isAtomicSite: isAtomicSite( state ),
diff --git a/projects/plugins/jetpack/_inc/client/state/connection/reducer.js b/projects/plugins/jetpack/_inc/client/state/connection/reducer.js
index 3062aaff5c056..4550f2180f236 100644
--- a/projects/plugins/jetpack/_inc/client/state/connection/reducer.js
+++ b/projects/plugins/jetpack/_inc/client/state/connection/reducer.js
@@ -73,9 +73,10 @@ export const user = ( state = window.Initial_State.userData || {}, action ) => {
case USER_CONNECTION_DATA_FETCH_SUCCESS:
return assign( {}, state, action.userConnectionData );
- case UNLINK_USER_SUCCESS:
+ case UNLINK_USER_SUCCESS: {
const currentUser = assign( {}, state.currentUser, { isConnected: false } );
return assign( {}, state, { currentUser } );
+ }
case MOCK_SWITCH_USER_PERMISSIONS:
return merge( {}, state, action.initialState );
diff --git a/projects/plugins/jetpack/_inc/client/state/modules/reducer.js b/projects/plugins/jetpack/_inc/client/state/modules/reducer.js
index 5599dc44292ba..70de9bc934250 100644
--- a/projects/plugins/jetpack/_inc/client/state/modules/reducer.js
+++ b/projects/plugins/jetpack/_inc/client/state/modules/reducer.js
@@ -31,7 +31,7 @@ export const items = ( state = {}, action ) => {
return assign( {}, state, {
[ action.module ]: assign( {}, state[ action.module ], { activated: false } ),
} );
- case JETPACK_MODULE_UPDATE_OPTIONS_SUCCESS:
+ case JETPACK_MODULE_UPDATE_OPTIONS_SUCCESS: {
const updatedModule = assign( {}, state[ action.module ] );
Object.keys( action.newOptionValues ).forEach( key => {
updatedModule.options[ key ].current_value = action.newOptionValues[ key ];
@@ -39,6 +39,7 @@ export const items = ( state = {}, action ) => {
return assign( {}, state, {
[ action.module ]: updatedModule,
} );
+ }
default:
return state;
}
@@ -84,7 +85,7 @@ export const requests = ( state = initialRequestsState, action ) => {
[ action.module ]: false,
} ),
} );
- case JETPACK_MODULE_UPDATE_OPTIONS:
+ case JETPACK_MODULE_UPDATE_OPTIONS: {
const updatingOption = assign( {}, state.updatingOption );
updatingOption[ action.module ] = assign( {}, updatingOption[ action.module ] );
Object.keys( action.newOptionValues ).forEach( key => {
@@ -93,8 +94,9 @@ export const requests = ( state = initialRequestsState, action ) => {
return assign( {}, state, {
updatingOption: assign( {}, state.updatingOption, updatingOption ),
} );
+ }
case JETPACK_MODULE_UPDATE_OPTIONS_FAIL:
- case JETPACK_MODULE_UPDATE_OPTIONS_SUCCESS:
+ case JETPACK_MODULE_UPDATE_OPTIONS_SUCCESS: {
const _updatingOption = assign( {}, state.updatingOption );
_updatingOption[ action.module ] = assign( {}, _updatingOption[ action.module ] );
Object.keys( action.newOptionValues ).forEach( key => {
@@ -103,6 +105,7 @@ export const requests = ( state = initialRequestsState, action ) => {
return assign( {}, state, {
updatingOption: assign( {}, state.updatingOption, _updatingOption ),
} );
+ }
default:
return state;
}
diff --git a/projects/plugins/jetpack/_inc/client/state/settings/reducer.js b/projects/plugins/jetpack/_inc/client/state/settings/reducer.js
index bb6f2d05225f6..ed91a0c41fcf0 100644
--- a/projects/plugins/jetpack/_inc/client/state/settings/reducer.js
+++ b/projects/plugins/jetpack/_inc/client/state/settings/reducer.js
@@ -21,11 +21,12 @@ export const items = ( state = {}, action ) => {
return assign( {}, state, action.initialState.settings );
case JETPACK_SETTINGS_FETCH_RECEIVE:
return assign( {}, action.settings );
- case JETPACK_SETTING_UPDATE_SUCCESS:
+ case JETPACK_SETTING_UPDATE_SUCCESS: {
const key = Object.keys( action.updatedOption )[ 0 ];
return assign( {}, state, {
[ key ]: action.updatedOption[ key ],
} );
+ }
case JETPACK_SETTINGS_UPDATE_SUCCESS:
return assign( {}, state, action.updatedOptions );
default:
diff --git a/projects/plugins/jetpack/_inc/client/writing/composing.jsx b/projects/plugins/jetpack/_inc/client/writing/composing.jsx
index 90b5b46d5e535..955bc07d37f7d 100644
--- a/projects/plugins/jetpack/_inc/client/writing/composing.jsx
+++ b/projects/plugins/jetpack/_inc/client/writing/composing.jsx
@@ -21,7 +21,7 @@ export class Composing extends React.Component {
* @return {*} the updated value
*/
updateFormStateByMarkdown = module => {
- if ( !! this.props.getSettingCurrentValue( 'wpcom_publish_comments_with_markdown', module ) ) {
+ if ( this.props.getSettingCurrentValue( 'wpcom_publish_comments_with_markdown', module ) ) {
return this.props.updateFormStateModuleOption( module, 'wpcom_publish_posts_with_markdown' );
}
return this.props.updateFormStateModuleOption(
diff --git a/projects/plugins/jetpack/_inc/jetpack-deactivate-dialog.js b/projects/plugins/jetpack/_inc/jetpack-deactivate-dialog.js
index 294ffae1e3338..9c89b0bdba2cd 100644
--- a/projects/plugins/jetpack/_inc/jetpack-deactivate-dialog.js
+++ b/projects/plugins/jetpack/_inc/jetpack-deactivate-dialog.js
@@ -30,11 +30,12 @@
$( '#TB_window' ).addClass( 'jetpack-disconnect-modal' );
deactivationModalCentralize();
- $( '#TB_closeWindowButton, #TB_overlay' ).on( 'click', function ( e ) {
+ $( '#TB_closeWindowButton, #TB_overlay' ).on( 'click', function () {
deactivationModalTrackCloseEvent();
} );
document.onkeyup = function ( e ) {
+ var keycode;
if ( e === null ) {
// ie
keycode = event.keyCode;
@@ -42,7 +43,7 @@
// mozilla
keycode = e.which;
}
- if ( keycode == 27 ) {
+ if ( keycode === 27 ) {
// close
deactivationModalTrackCloseEvent();
}
@@ -77,12 +78,12 @@
deactivateLinkElem.attr( 'title', deactivate_dialog.title );
deactivateLinkElem.addClass( 'thickbox' );
deactivateLinkElem.html( deactivate_dialog.deactivate_label );
- deactivateLinkElem.on( 'click', function ( e ) {
+ deactivateLinkElem.on( 'click', function () {
observer.observe( body, { childList: true } );
analytics.tracks.recordEvent( 'jetpack_termination_dialog_open', tracksProps );
} );
- $( '#jetpack_deactivation_dialog_content__button-cancel' ).on( 'click', function ( e ) {
+ $( '#jetpack_deactivation_dialog_content__button-cancel' ).on( 'click', function () {
tb_remove();
deactivationModalTrackCloseEvent();
} );
diff --git a/projects/plugins/jetpack/_inc/jetpack-modules.js b/projects/plugins/jetpack/_inc/jetpack-modules.js
index 18c90b9e3ab81..dbb654d44ec66 100644
--- a/projects/plugins/jetpack/_inc/jetpack-modules.js
+++ b/projects/plugins/jetpack/_inc/jetpack-modules.js
@@ -1,19 +1,10 @@
( function ( window, $, items, models, views, i18n, modalinfo, nonces ) {
'use strict';
- var modules,
- list_table,
- handle_module_tag_click,
- $the_table,
- $the_filters,
- $the_search,
- $jp_frame,
- $bulk_button;
-
- $the_table = $( '.wp-list-table.jetpack-modules' );
+ var modules, list_table, handle_module_tag_click, $the_filters, $the_search, $bulk_button;
+
$the_filters = $( '.navbar-form' );
$the_search = $( '#srch-term-search-input' );
- $jp_frame = $( '.jp-frame' );
$bulk_button = $( '#doaction' );
modules = new models.Modules( {
diff --git a/projects/plugins/jetpack/changelog/change-jetpack-ai-modal-prompt-input-reuse b/projects/plugins/jetpack/changelog/change-jetpack-ai-modal-prompt-input-reuse
new file mode 100644
index 0000000000000..958a637ead149
--- /dev/null
+++ b/projects/plugins/jetpack/changelog/change-jetpack-ai-modal-prompt-input-reuse
@@ -0,0 +1,4 @@
+Significance: patch
+Type: other
+
+Jetpack AI: use new exported component for AI generation modal on GP image generation
diff --git a/projects/plugins/jetpack/changelog/fix-jetpack-story-block-connection-assets b/projects/plugins/jetpack/changelog/fix-jetpack-story-block-connection-assets
new file mode 100644
index 0000000000000..bbca92108485e
--- /dev/null
+++ b/projects/plugins/jetpack/changelog/fix-jetpack-story-block-connection-assets
@@ -0,0 +1,4 @@
+Significance: patch
+Type: other
+
+Blocks: initialize connection assets in Story block.
diff --git a/projects/plugins/jetpack/changelog/fix-various-eslint-lints b/projects/plugins/jetpack/changelog/fix-various-eslint-lints
new file mode 100644
index 0000000000000..85fe0d31b9f57
--- /dev/null
+++ b/projects/plugins/jetpack/changelog/fix-various-eslint-lints
@@ -0,0 +1,5 @@
+Significance: patch
+Type: other
+Comment: Fix various eslint lints. Should be no change to functionality, although it's possible some obscure React bugs got fixed.
+
+
diff --git a/projects/plugins/jetpack/changelog/fix-verbum-comments-resize-logic b/projects/plugins/jetpack/changelog/fix-verbum-comments-resize-logic
new file mode 100644
index 0000000000000..a6a79b1897ec6
--- /dev/null
+++ b/projects/plugins/jetpack/changelog/fix-verbum-comments-resize-logic
@@ -0,0 +1,4 @@
+Significance: patch
+Type: other
+
+Update Verbum Comments resize logic
diff --git a/projects/plugins/jetpack/changelog/fix-write-brief-spellcheck-numbers b/projects/plugins/jetpack/changelog/fix-write-brief-spellcheck-numbers
new file mode 100644
index 0000000000000..28a48a83cba5d
--- /dev/null
+++ b/projects/plugins/jetpack/changelog/fix-write-brief-spellcheck-numbers
@@ -0,0 +1,4 @@
+Significance: patch
+Type: other
+
+AI Assistant: Write Brief should not flag words like '2nd' and '100th' as spelling errors.
diff --git a/projects/plugins/social/changelog/prerelease b/projects/plugins/jetpack/changelog/prerelease
similarity index 79%
rename from projects/plugins/social/changelog/prerelease
rename to projects/plugins/jetpack/changelog/prerelease
index 9aa70e3ec1f75..a1c1831fa1ef7 100644
--- a/projects/plugins/social/changelog/prerelease
+++ b/projects/plugins/jetpack/changelog/prerelease
@@ -1,5 +1,5 @@
Significance: patch
-Type: changed
+Type: other
Comment: Updated composer.lock.
diff --git a/projects/plugins/jetpack/changelog/update-contact-info-block-loading b/projects/plugins/jetpack/changelog/update-contact-info-block-loading
new file mode 100644
index 0000000000000..6c6e7cb31a30d
--- /dev/null
+++ b/projects/plugins/jetpack/changelog/update-contact-info-block-loading
@@ -0,0 +1,4 @@
+Significance: patch
+Type: other
+
+Contact Info: Change block registration code - move back to two files.
diff --git a/projects/plugins/jetpack/changelog/update-hooks-prevent-doing-it-wrong-notice b/projects/plugins/jetpack/changelog/update-hooks-prevent-doing-it-wrong-notice
new file mode 100644
index 0000000000000..850d659cbcc69
--- /dev/null
+++ b/projects/plugins/jetpack/changelog/update-hooks-prevent-doing-it-wrong-notice
@@ -0,0 +1,4 @@
+Significance: patch
+Type: other
+
+Hooks: Change several action priorities to ensure translation loading is not triggered too early.
diff --git a/projects/plugins/jetpack/changelog/update-social-replace-has-paid-features-check b/projects/plugins/jetpack/changelog/update-social-replace-has-paid-features-check
new file mode 100644
index 0000000000000..a2339eaccb346
--- /dev/null
+++ b/projects/plugins/jetpack/changelog/update-social-replace-has-paid-features-check
@@ -0,0 +1,5 @@
+Significance: patch
+Type: other
+Comment: Initial State: Migrated hasPaidFeatures flag with feature check on front-end
+
+
diff --git a/projects/plugins/jetpack/changelog/update-social-sig-feature-check b/projects/plugins/jetpack/changelog/update-social-sig-feature-check
new file mode 100644
index 0000000000000..82aa474998f99
--- /dev/null
+++ b/projects/plugins/jetpack/changelog/update-social-sig-feature-check
@@ -0,0 +1,5 @@
+Significance: patch
+Type: other
+Comment: Initial state: Migrated isSocialImageGeneratorAvailable to feature check
+
+
diff --git a/projects/plugins/jetpack/changelog/update-tested-to-6-7 b/projects/plugins/jetpack/changelog/update-tested-to-6-7
new file mode 100644
index 0000000000000..30b22a8d242ae
--- /dev/null
+++ b/projects/plugins/jetpack/changelog/update-tested-to-6-7
@@ -0,0 +1,4 @@
+Significance: patch
+Type: other
+
+General: indicate compatibility with the upcoming version of WordPress - 6.7.
diff --git a/projects/plugins/jetpack/class.jetpack.php b/projects/plugins/jetpack/class.jetpack.php
index 4f9a306cd26b9..dda2deb3cf61a 100644
--- a/projects/plugins/jetpack/class.jetpack.php
+++ b/projects/plugins/jetpack/class.jetpack.php
@@ -867,8 +867,7 @@ function ( $methods ) {
* @action plugins_loaded
*/
public function late_initialization() {
- add_action( 'plugins_loaded', array( 'Jetpack', 'load_modules' ), 100 );
-
+ add_action( 'after_setup_theme', array( 'Jetpack', 'load_modules' ), 1 );
My_Jetpack_Initializer::init();
// Initialize Boost Speed Score
diff --git a/projects/plugins/jetpack/composer.lock b/projects/plugins/jetpack/composer.lock
index 5df2b3221306d..6d59b8cc740a6 100644
--- a/projects/plugins/jetpack/composer.lock
+++ b/projects/plugins/jetpack/composer.lock
@@ -2225,7 +2225,7 @@
"dist": {
"type": "path",
"url": "../../packages/publicize",
- "reference": "b8abac09471222cd803a35a623b5e9b7d4049c0d"
+ "reference": "1fc54eab768a14c867ab64b3a5b169c662bb6b77"
},
"require": {
"automattic/jetpack-assets": "@dev",
@@ -2253,7 +2253,7 @@
"link-template": "https://github.com/Automattic/jetpack-publicize/compare/v${old}...v${new}"
},
"branch-alias": {
- "dev-trunk": "0.54.x-dev"
+ "dev-trunk": "0.55.x-dev"
}
},
"autoload": {
diff --git a/projects/plugins/jetpack/extensions/blocks/contact-info/class-jetpack-contact-info-block.php b/projects/plugins/jetpack/extensions/blocks/contact-info/class-jetpack-contact-info-block.php
index 9c961dc8e2f2d..9ec393ac0b548 100644
--- a/projects/plugins/jetpack/extensions/blocks/contact-info/class-jetpack-contact-info-block.php
+++ b/projects/plugins/jetpack/extensions/blocks/contact-info/class-jetpack-contact-info-block.php
@@ -5,6 +5,8 @@
* @package automattic/jetpack
*/
+use Automattic\Jetpack\Blocks;
+
/**
* Helper class that lets us add schema attributes dynamically because they are not something that is store with the content.
* Due to the limitations of wp_kses.
@@ -13,6 +15,45 @@
*/
class Jetpack_Contact_Info_Block {
+ /**
+ * Registers the block for use in Gutenberg
+ * This is done via an action so that we can disable
+ * registration if we need to.
+ */
+ public static function register_block() {
+
+ Blocks::jetpack_register_block(
+ __DIR__,
+ array(
+ 'render_callback' => __NAMESPACE__ . '\render',
+ )
+ );
+
+ Blocks::jetpack_register_block(
+ 'jetpack/address',
+ array(
+ 'parent' => array( 'jetpack/contact-info' ),
+ 'render_callback' => __NAMESPACE__ . '\render_adress',
+ )
+ );
+
+ Blocks::jetpack_register_block(
+ 'jetpack/email',
+ array(
+ 'parent' => array( 'jetpack/contact-info' ),
+ 'render_callback' => __NAMESPACE__ . '\render_email',
+ )
+ );
+
+ Blocks::jetpack_register_block(
+ 'jetpack/phone',
+ array(
+ 'parent' => array( 'jetpack/contact-info' ),
+ 'render_callback' => __NAMESPACE__ . '\render_phone',
+ )
+ );
+ }
+
/**
* Adds contact info schema attributes.
*
@@ -70,7 +111,7 @@ public static function render_address( $attr, $content ) {
* @param array $attr Array containing the block attributes.
* @param array $omit Array containing the block attributes that we ignore.
*
- * @return string
+ * @return bool
*/
public static function has_attributes( $attr, $omit = array() ) {
foreach ( $attr as $attribute => $value ) {
diff --git a/projects/plugins/jetpack/extensions/blocks/contact-info/contact-info.php b/projects/plugins/jetpack/extensions/blocks/contact-info/contact-info.php
index 06167a7578302..5228e694aa165 100644
--- a/projects/plugins/jetpack/extensions/blocks/contact-info/contact-info.php
+++ b/projects/plugins/jetpack/extensions/blocks/contact-info/contact-info.php
@@ -7,36 +7,10 @@
* @package automattic/jetpack
*/
-use Automattic\Jetpack\Blocks;
+namespace Automattic\Jetpack\Extensions\Contact_Info;
-Blocks::jetpack_register_block(
- __DIR__,
- array(
- 'render_callback' => array( 'Jetpack_Contact_Info_Block', 'render' ),
- )
-);
+use Jetpack_Contact_Info_Block;
-Blocks::jetpack_register_block(
- 'jetpack/address',
- array(
- 'parent' => array( 'jetpack/contact-info' ),
- 'render_callback' => array( 'Jetpack_Contact_Info_Block', 'render_address' ),
- )
-);
-
-Blocks::jetpack_register_block(
- 'jetpack/email',
- array(
- 'parent' => array( 'jetpack/contact-info' ),
- 'render_callback' => array( 'Jetpack_Contact_Info_Block', 'render_email' ),
- )
-);
-
-Blocks::jetpack_register_block(
- 'jetpack/phone',
- array(
- 'parent' => array( 'jetpack/contact-info' ),
- 'render_callback' => array( 'Jetpack_Contact_Info_Block', 'render_phone' ),
- )
-);
require_once __DIR__ . '/class-jetpack-contact-info-block.php';
+
+add_action( 'init', array( Jetpack_Contact_Info_Block::class, 'register_block' ) );
diff --git a/projects/plugins/jetpack/extensions/blocks/eventbrite/utils.js b/projects/plugins/jetpack/extensions/blocks/eventbrite/utils.js
index 41c497f8cb9b8..71ddc4b55ad4e 100644
--- a/projects/plugins/jetpack/extensions/blocks/eventbrite/utils.js
+++ b/projects/plugins/jetpack/extensions/blocks/eventbrite/utils.js
@@ -24,7 +24,7 @@ export function eventIdFromUrl( url ) {
return null;
}
- const match = url.match( /(\d+)\/?(?:\?[^\/]*)?\s*$/ );
+ const match = url.match( /(\d+)\/?(?:\?[^/]*)?\s*$/ );
return match && match[ 1 ] ? parseInt( match[ 1 ], 10 ) : null;
}
diff --git a/projects/plugins/jetpack/extensions/blocks/image-compare/edit.js b/projects/plugins/jetpack/extensions/blocks/image-compare/edit.js
index 8f564c170dd4c..82b90463813a2 100644
--- a/projects/plugins/jetpack/extensions/blocks/image-compare/edit.js
+++ b/projects/plugins/jetpack/extensions/blocks/image-compare/edit.js
@@ -14,34 +14,30 @@ import './view.js';
const Edit = ( { attributes, clientId, isSelected, setAttributes } ) => {
const { align, imageBefore, imageAfter, caption, orientation } = attributes;
- // Check for useResizeObserver, not available in older Gutenberg.
- let resizeListener = null;
- let sizes = null;
const blockProps = useBlockProps();
const juxtaposeRef = useRef( undefined );
- if ( useResizeObserver ) {
- // Let's look for resize so we can trigger the thing.
- [ resizeListener, sizes ] = useResizeObserver();
- useDebounce(
- sz => {
- if ( sz > 0 ) {
- if ( typeof juxtapose !== 'undefined' && juxtapose.sliders ) {
- // only update for *this* slide
- juxtapose.sliders.forEach( elem => {
- const parentElem = elem.wrapper.parentElement;
- if ( parentElem.id === clientId ) {
- elem.optimizeWrapper( sz );
- }
- } );
- }
+ // Let's look for resize so we can trigger the thing.
+ const [ resizeListener, sizes ] = useResizeObserver();
+
+ useDebounce(
+ sz => {
+ if ( sz > 0 ) {
+ if ( typeof juxtapose !== 'undefined' && juxtapose.sliders ) {
+ // only update for *this* slide
+ juxtapose.sliders.forEach( elem => {
+ const parentElem = elem.wrapper.parentElement;
+ if ( parentElem.id === clientId ) {
+ elem.optimizeWrapper( sz );
+ }
+ } );
}
- },
- 200,
- sizes.width
- );
- }
+ }
+ },
+ 200,
+ sizes.width
+ );
// Initial state if attributes already set or not.
// If both images are set, add juxtapose class, which is picked up by the library.
diff --git a/projects/plugins/jetpack/extensions/blocks/opentable/edit.js b/projects/plugins/jetpack/extensions/blocks/opentable/edit.js
index 1ca50c37925c0..4ac453c675c73 100644
--- a/projects/plugins/jetpack/extensions/blocks/opentable/edit.js
+++ b/projects/plugins/jetpack/extensions/blocks/opentable/edit.js
@@ -119,7 +119,7 @@ function OpenTableEdit( {
// Need to force attribute to be updated after switch to using block styles
// so it still meets frontend rendering expectations.
setAttributes( { style } );
- }, [ style ] );
+ }, [ align, style, prevStyle, setAttributes ] );
const parseEmbedCode = embedCode => {
const newAttributes = getAttributesFromEmbedCode( embedCode );
diff --git a/projects/plugins/jetpack/extensions/blocks/opentable/restaurant-picker.js b/projects/plugins/jetpack/extensions/blocks/opentable/restaurant-picker.js
index dd57dcce1c536..4d157ff17fcda 100644
--- a/projects/plugins/jetpack/extensions/blocks/opentable/restaurant-picker.js
+++ b/projects/plugins/jetpack/extensions/blocks/opentable/restaurant-picker.js
@@ -11,7 +11,7 @@ export default function RestaurantPicker( props ) {
const { restaurants, hasRequestFailed } = useRestaurantSearch( input, MAX_SUGGESTIONS );
const [ selectedRestaurants, setSelectedRestaurants ] = useState( props.rids || [] );
- const idRegex = /^(\d+)$|\(\#(\d+)\)$/;
+ const idRegex = /^(\d+)$|\(#(\d+)\)$/;
const onChange = selected => {
const selectedIds = selected.map( restaurant => {
diff --git a/projects/plugins/jetpack/extensions/blocks/opentable/use-restaurant-search.js b/projects/plugins/jetpack/extensions/blocks/opentable/use-restaurant-search.js
index 38896d0765e44..9b1ff32638d1d 100644
--- a/projects/plugins/jetpack/extensions/blocks/opentable/use-restaurant-search.js
+++ b/projects/plugins/jetpack/extensions/blocks/opentable/use-restaurant-search.js
@@ -1,38 +1,42 @@
-import { useState, useEffect, useCallback } from '@wordpress/element';
+import { useState, useEffect, useCallback, useMemo } from '@wordpress/element';
import { unionBy, throttle, isEmpty } from 'lodash';
-export const possibleEmbed = /^\s*(http[s]?:\/\/|\
diff --git a/projects/plugins/jetpack/modules/infinite-scroll/infinity.js b/projects/plugins/jetpack/modules/infinite-scroll/infinity.js
index e880c15bfc9c4..10ee02978bed9 100644
--- a/projects/plugins/jetpack/modules/infinite-scroll/infinity.js
+++ b/projects/plugins/jetpack/modules/infinite-scroll/infinity.js
@@ -2,17 +2,17 @@
( function () {
// Open closure.
// Local vars.
- var Scroller, ajaxurl, stats, type, text, totop, loading_text;
+ var Scroller, stats, type, text, totop, loading_text;
// IE requires special handling
- var isIE = -1 != navigator.userAgent.search( 'MSIE' );
+ var isIE = -1 !== navigator.userAgent.search( 'MSIE' );
if ( isIE ) {
var IEVersion = navigator.userAgent.match( /MSIE\s?(\d+)\.?\d*;/ );
IEVersion = parseInt( IEVersion[ 1 ] );
}
// HTTP ajaxurl when site is HTTPS causes Access-Control-Allow-Origin failure in Desktop and iOS Safari
- if ( 'https:' == document.location.protocol ) {
+ if ( 'https:' === document.location.protocol ) {
infiniteScroll.settings.ajaxurl = infiniteScroll.settings.ajaxurl.replace(
'http://',
'https://'
@@ -63,7 +63,7 @@
// We have two type of infinite scroll
// cases 'scroll' and 'click'
- if ( type == 'scroll' ) {
+ if ( type === 'scroll' ) {
// Bind refresh to the scroll event
// Throttle to check for such case every 300ms
@@ -90,7 +90,7 @@
// Ensure that enough posts are loaded to fill the initial viewport, to compensate for short posts and large displays.
self.ensureFilledViewport();
this.body.addEventListener( 'is.post-load', self.checkViewportOnLoadBound );
- } else if ( type == 'click' ) {
+ } else if ( type === 'click' ) {
if ( this.click_handle ) {
this.element.appendChild( this.handle );
}
@@ -488,7 +488,7 @@
self.render.call( self, response );
// If 'click' type and there are still posts to fetch, add back the handle
- if ( type == 'click' ) {
+ if ( type === 'click' ) {
// add focus to new posts, only in button mode as we know where page focus currently is and only if we have a wrapper
if ( infiniteScroll.settings.wrapper ) {
document
@@ -805,7 +805,7 @@
self.history.parameters;
}
- if ( window.location.href != pageSlug ) {
+ if ( window.location.href !== pageSlug ) {
history.pushState( null, null, pageSlug );
}
};
@@ -875,9 +875,6 @@
}
} );
- // Set ajaxurl (for brevity)
- ajaxurl = infiniteScroll.settings.ajaxurl;
-
// Set stats, used for tracking stats
stats = infiniteScroll.settings.stats;
@@ -895,7 +892,7 @@
/**
* Monitor user scroll activity to update URL to correspond to archive page for current set of IS posts
*/
- if ( type == 'click' ) {
+ if ( type === 'click' ) {
var timer = null;
window.addEventListener( 'scroll', function () {
// run the real scroll handler once every 250 ms.
diff --git a/projects/plugins/jetpack/modules/plugin-search/plugin-search.js b/projects/plugins/jetpack/modules/plugin-search/plugin-search.js
index a306b1e44cc85..87eda471adc1b 100644
--- a/projects/plugins/jetpack/modules/plugin-search/plugin-search.js
+++ b/projects/plugins/jetpack/modules/plugin-search/plugin-search.js
@@ -3,7 +3,7 @@
* of the card with customized content.
*/
-/* global jetpackPluginSearch, JSON, jpTracksAJAX */
+/* global jetpackPluginSearch, jpTracksAJAX */
var JetpackPSH = {};
diff --git a/projects/plugins/jetpack/modules/scan/admin-bar-notice.js b/projects/plugins/jetpack/modules/scan/admin-bar-notice.js
index 4a226bc4d9309..1580169806a53 100644
--- a/projects/plugins/jetpack/modules/scan/admin-bar-notice.js
+++ b/projects/plugins/jetpack/modules/scan/admin-bar-notice.js
@@ -1,6 +1,6 @@
( function ( localized ) {
function ready( fn ) {
- if ( document.readyState != 'loading' ) {
+ if ( document.readyState !== 'loading' ) {
fn();
} else {
document.addEventListener( 'DOMContentLoaded', fn );
@@ -11,7 +11,7 @@
var xhrRequest = new XMLHttpRequest();
xhrRequest.open( 'GET', localized.scan_endpoint, true );
xhrRequest.onload = function () {
- if ( this.status == 200 ) {
+ if ( this.status === 200 ) {
// Success!
var body = JSON.parse( this.response );
if ( body && body.data ) {
@@ -45,7 +45,7 @@
return;
}
- var textLabel = numberOfThreats == 1 ? localized.singular : localized.multiple;
+ var textLabel = numberOfThreats === 1 ? localized.singular : localized.multiple;
element.innerHTML =
'
' + textLabel + '';
}
diff --git a/projects/plugins/jetpack/modules/videopress/js/videopress-plupload.js b/projects/plugins/jetpack/modules/videopress/js/videopress-plupload.js
index 1418b16c57ea1..4ccb5ddf50789 100644
--- a/projects/plugins/jetpack/modules/videopress/js/videopress-plupload.js
+++ b/projects/plugins/jetpack/modules/videopress/js/videopress-plupload.js
@@ -1,4 +1,4 @@
-/* global pluploadL10n, plupload, _wpPluploadSettings, JSON */
+/* global pluploadL10n, plupload, _wpPluploadSettings */
window.wp = window.wp || {};
diff --git a/projects/plugins/jetpack/modules/wpgroho.js b/projects/plugins/jetpack/modules/wpgroho.js
index 33c79d5afc90f..ae683793d1e51 100644
--- a/projects/plugins/jetpack/modules/wpgroho.js
+++ b/projects/plugins/jetpack/modules/wpgroho.js
@@ -4,10 +4,14 @@
out = out || {};
for ( var i = 1; i < arguments.length; i++ ) {
- if ( ! arguments[ i ] ) continue;
+ if ( ! arguments[ i ] ) {
+ continue;
+ }
for ( var key in arguments[ i ] ) {
- if ( Object.hasOwn( arguments[ i ], key ) ) out[ key ] = arguments[ i ][ key ];
+ if ( Object.hasOwn( arguments[ i ], key ) ) {
+ out[ key ] = arguments[ i ][ key ];
+ }
}
}
diff --git a/projects/plugins/jetpack/readme.txt b/projects/plugins/jetpack/readme.txt
index 610359d6a2a39..2ea5b8f05cca1 100644
--- a/projects/plugins/jetpack/readme.txt
+++ b/projects/plugins/jetpack/readme.txt
@@ -4,7 +4,7 @@ Tags: Security, backup, malware, scan, performance
Stable tag: 13.9.1
Requires at least: 6.5
Requires PHP: 7.0
-Tested up to: 6.6
+Tested up to: 6.7
License: GPLv2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
diff --git a/projects/plugins/jetpack/tests/php/general/test_jetpack-admin-menu.php b/projects/plugins/jetpack/tests/php/general/test_jetpack-admin-menu.php
index 7c26ad0aca3f0..c4d0a6983443a 100644
--- a/projects/plugins/jetpack/tests/php/general/test_jetpack-admin-menu.php
+++ b/projects/plugins/jetpack/tests/php/general/test_jetpack-admin-menu.php
@@ -87,20 +87,19 @@ public function test_jetpack_admin_menu_order() {
// Some sites - multisites / WoA for example - may not have all of the menu items.
if ( in_array( 'My Jetpack', $submenu_names, true ) ) {
$my_jetpack_submenu_position = array_search( 'My Jetpack', $submenu_names, true );
- $this->assertTrue( $my_jetpack_submenu_position < $stats_submenu_position, 'My Jetpack should be above Stats in the submenu order.' );
+ $this->assertLessThan( $stats_submenu_position, $my_jetpack_submenu_position, 'My Jetpack should be above Stats in the submenu order.' );
}
if ( in_array( 'Activity Log', $submenu_names, true ) ) {
$activity_log_submenu_position = array_search( 'Activity Log', $submenu_names, true );
- $this->assertTrue( $activity_log_submenu_position < $search_submenu_position, 'Activity Log should be above Search in the submenu order.' );
- $this->assertTrue( $backup_submenu_position < $activity_log_submenu_position, 'Jetpack VaultPress Backup should be above Activity Log in the submenu order.' );
+ $this->assertLessThan( $search_submenu_position, $activity_log_submenu_position, 'Activity Log should be above Search in the submenu order.' );
+ $this->assertLessThan( $activity_log_submenu_position, $backup_submenu_position, 'Jetpack VaultPress Backup should be above Activity Log in the submenu order.' );
}
-
- $this->assertTrue( $stats_submenu_position < $videopress_submenu_position, 'Stats should be above VideoPress in the submenu order.' );
- $this->assertTrue( $videopress_submenu_position < $backup_submenu_position, 'Jetpack VideoPress should be above Jetpack VaultPress Backup in the submenu order.' );
- $this->assertTrue( $backup_submenu_position < $search_submenu_position, 'Jetpack VaultPress Backup should be above Search in the submenu order.' );
- $this->assertTrue( $search_submenu_position < $wordads_submenu_position, 'Search should be above WordAds in the submenu order.' );
- $this->assertTrue( $wordads_submenu_position < $settings_submenu_position, 'WordAds should be above Settings in the submenu order.' );
- $this->assertTrue( $settings_submenu_position < $dashboard_submenu_position, 'Settings should be above Dashboard in the submenu order.' );
+ $this->assertLessThan( $videopress_submenu_position, $stats_submenu_position, 'Stats should be above VideoPress in the submenu order.' );
+ $this->assertLessThan( $backup_submenu_position, $videopress_submenu_position, 'Jetpack VideoPress should be above Jetpack VaultPress Backup in the submenu order.' );
+ $this->assertLessThan( $search_submenu_position, $backup_submenu_position, 'Jetpack VaultPress Backup should be above Search in the submenu order.' );
+ $this->assertLessThan( $wordads_submenu_position, $search_submenu_position, 'Search should be above WordAds in the submenu order.' );
+ $this->assertLessThan( $settings_submenu_position, $wordads_submenu_position, 'WordAds should be above Settings in the submenu order.' );
+ $this->assertLessThan( $dashboard_submenu_position, $settings_submenu_position, 'Settings should be above Dashboard in the submenu order.' );
}
}
diff --git a/projects/plugins/migration/changelog/update-tested-to-6-7 b/projects/plugins/migration/changelog/update-tested-to-6-7
new file mode 100644
index 0000000000000..9c1d5b4fabb5f
--- /dev/null
+++ b/projects/plugins/migration/changelog/update-tested-to-6-7
@@ -0,0 +1,4 @@
+Significance: patch
+Type: changed
+
+General: indicate compatibility with the upcoming version of WordPress - 6.7.
diff --git a/projects/plugins/migration/readme.txt b/projects/plugins/migration/readme.txt
index e841038dff934..0b5da1d9329a0 100644
--- a/projects/plugins/migration/readme.txt
+++ b/projects/plugins/migration/readme.txt
@@ -3,7 +3,7 @@ Contributors: automattic
Tags: migrate, migration, backup, restore, transfer, move, copy, wordpress.com, automattic, import, importer, hosting
Requires at least: 6.5
Requires PHP: 7.0
-Tested up to: 6.6
+Tested up to: 6.7
Stable tag: 2.0.0
License: GPLv2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
diff --git a/projects/plugins/protect/changelog/update-tested-to-6-7 b/projects/plugins/protect/changelog/update-tested-to-6-7
new file mode 100644
index 0000000000000..9c1d5b4fabb5f
--- /dev/null
+++ b/projects/plugins/protect/changelog/update-tested-to-6-7
@@ -0,0 +1,4 @@
+Significance: patch
+Type: changed
+
+General: indicate compatibility with the upcoming version of WordPress - 6.7.
diff --git a/projects/plugins/protect/readme.txt b/projects/plugins/protect/readme.txt
index 7196aefcbbf88..7d2253fff1a8c 100644
--- a/projects/plugins/protect/readme.txt
+++ b/projects/plugins/protect/readme.txt
@@ -3,7 +3,7 @@ Contributors: automattic, retrofox, leogermani, renatoagds, bjorsch, ebinnion, f
Tags: jetpack, protect, security, malware, scan
Requires at least: 6.5
Requires PHP: 7.0
-Tested up to: 6.6
+Tested up to: 6.7
Stable tag: 1.4.1
License: GPLv2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
diff --git a/projects/plugins/search/changelog/update-tested-to-6-7 b/projects/plugins/search/changelog/update-tested-to-6-7
new file mode 100644
index 0000000000000..9c1d5b4fabb5f
--- /dev/null
+++ b/projects/plugins/search/changelog/update-tested-to-6-7
@@ -0,0 +1,4 @@
+Significance: patch
+Type: changed
+
+General: indicate compatibility with the upcoming version of WordPress - 6.7.
diff --git a/projects/plugins/search/readme.txt b/projects/plugins/search/readme.txt
index b101853e40996..d92746c11d472 100644
--- a/projects/plugins/search/readme.txt
+++ b/projects/plugins/search/readme.txt
@@ -3,7 +3,7 @@ Contributors: automattic, annamcphee, bluefuton, kangzj, jsnmoon, robfelty, gibr
Tags: search, filter, woocommerce search, ajax search, product search, free cloud-based search
Requires at least: 6.5
Requires PHP: 7.0
-Tested up to: 6.6
+Tested up to: 6.7
Stable tag: 1.4.0
License: GPLv2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
diff --git a/projects/plugins/social/CHANGELOG.md b/projects/plugins/social/CHANGELOG.md
index 0eaa0d3f74a52..158d7ee767b35 100644
--- a/projects/plugins/social/CHANGELOG.md
+++ b/projects/plugins/social/CHANGELOG.md
@@ -5,6 +5,21 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
+## 5.5.0 - 2024-10-25
+### Added
+- Added Bluesky to social previews [#39659]
+- Social Notes: add support for the ActivityPub Reply-To block. [#39738]
+
+### Changed
+- General: indicate compatibility with the upcoming version of WordPress - 6.7. [#39786]
+- Initial State: Migrated URLs to script data [#39797]
+- Only include `wp-polyfill` as a script dependency when needed. [#39629]
+- Updated package dependencies. [#39594] [#39653] [#39707]
+
+### Fixed
+- Added Jetpack Beta's slug to Social OG conflicting plugins [#39792]
+- Social: Fixed share status tooltip text overflow [#39599]
+
## 5.4.1 - 2024-10-02
### Changed
- Internal updates.
diff --git a/projects/plugins/social/changelog/add-bluesky-to-social-previews b/projects/plugins/social/changelog/add-bluesky-to-social-previews
deleted file mode 100644
index 73211c933517d..0000000000000
--- a/projects/plugins/social/changelog/add-bluesky-to-social-previews
+++ /dev/null
@@ -1,4 +0,0 @@
-Significance: patch
-Type: added
-
-Added Bluesky to social previews
diff --git a/projects/plugins/social/changelog/add-dependency-extraction-auto-polyfill b/projects/plugins/social/changelog/add-dependency-extraction-auto-polyfill
deleted file mode 100644
index f4cd286e166af..0000000000000
--- a/projects/plugins/social/changelog/add-dependency-extraction-auto-polyfill
+++ /dev/null
@@ -1,4 +0,0 @@
-Significance: patch
-Type: changed
-
-Only include `wp-polyfill` as a script dependency when needed.
diff --git a/projects/plugins/social/changelog/add-reply-to-support-social-notes b/projects/plugins/social/changelog/add-reply-to-support-social-notes
deleted file mode 100644
index 9e7a0738be21b..0000000000000
--- a/projects/plugins/social/changelog/add-reply-to-support-social-notes
+++ /dev/null
@@ -1,4 +0,0 @@
-Significance: minor
-Type: added
-
-Social Notes: add support for the ActivityPub Reply-To block.
diff --git a/projects/plugins/social/changelog/fix-jetpack-social-notes-clobber-other-cpts b/projects/plugins/social/changelog/fix-jetpack-social-notes-clobber-other-cpts
deleted file mode 100644
index 8aac5c2fdff3e..0000000000000
--- a/projects/plugins/social/changelog/fix-jetpack-social-notes-clobber-other-cpts
+++ /dev/null
@@ -1,5 +0,0 @@
-Significance: patch
-Type: fixed
-Comment: Resolves a bug in an unreleased feature
-
-
diff --git a/projects/plugins/social/changelog/fix-social-og-tags-jetpack-dev-path b/projects/plugins/social/changelog/fix-social-og-tags-jetpack-dev-path
deleted file mode 100644
index 79af3f25d3565..0000000000000
--- a/projects/plugins/social/changelog/fix-social-og-tags-jetpack-dev-path
+++ /dev/null
@@ -1,4 +0,0 @@
-Significance: patch
-Type: fixed
-
-Added Jetpack Beta's slug to Social OG conflicting plugins
diff --git a/projects/plugins/social/changelog/fix-social-share-status-tooltip-text-overflow b/projects/plugins/social/changelog/fix-social-share-status-tooltip-text-overflow
deleted file mode 100644
index 9a6eda0cf22bb..0000000000000
--- a/projects/plugins/social/changelog/fix-social-share-status-tooltip-text-overflow
+++ /dev/null
@@ -1,4 +0,0 @@
-Significance: patch
-Type: fixed
-
-Social: Fixed share status tooltip text overflow
diff --git a/projects/plugins/social/changelog/fix-sync-filter-null-array b/projects/plugins/social/changelog/fix-sync-filter-null-array
deleted file mode 100644
index 3f56c90b3a7bf..0000000000000
--- a/projects/plugins/social/changelog/fix-sync-filter-null-array
+++ /dev/null
@@ -1,5 +0,0 @@
-Significance: patch
-Type: fixed
-Comment: Sync: update filter parameter to avoid conflicts with other plugins.
-
-
diff --git a/projects/plugins/social/changelog/update-social-initial-state-migrate-urls-on-social-admin b/projects/plugins/social/changelog/update-social-initial-state-migrate-urls-on-social-admin
deleted file mode 100644
index c23ee0fbdc59a..0000000000000
--- a/projects/plugins/social/changelog/update-social-initial-state-migrate-urls-on-social-admin
+++ /dev/null
@@ -1,4 +0,0 @@
-Significance: patch
-Type: changed
-
-Initial State: Migrated URLs to script data
diff --git a/projects/plugins/social/composer.json b/projects/plugins/social/composer.json
index 83f2a82e3643d..bdd956a7d1584 100644
--- a/projects/plugins/social/composer.json
+++ b/projects/plugins/social/composer.json
@@ -84,6 +84,6 @@
"automattic/jetpack-autoloader": true,
"automattic/jetpack-composer-plugin": true
},
- "autoloader-suffix": "c4802e05bbcf59fd3b6350e8d3e5482c_socialⓥ5_4_1"
+ "autoloader-suffix": "c4802e05bbcf59fd3b6350e8d3e5482c_socialⓥ5_5_0"
}
}
diff --git a/projects/plugins/social/composer.lock b/projects/plugins/social/composer.lock
index 7da20bcbcf2d6..71abf37eef397 100644
--- a/projects/plugins/social/composer.lock
+++ b/projects/plugins/social/composer.lock
@@ -1497,7 +1497,7 @@
"dist": {
"type": "path",
"url": "../../packages/publicize",
- "reference": "b8abac09471222cd803a35a623b5e9b7d4049c0d"
+ "reference": "1fc54eab768a14c867ab64b3a5b169c662bb6b77"
},
"require": {
"automattic/jetpack-assets": "@dev",
@@ -1525,7 +1525,7 @@
"link-template": "https://github.com/Automattic/jetpack-publicize/compare/v${old}...v${new}"
},
"branch-alias": {
- "dev-trunk": "0.54.x-dev"
+ "dev-trunk": "0.55.x-dev"
}
},
"autoload": {
diff --git a/projects/plugins/social/jetpack-social.php b/projects/plugins/social/jetpack-social.php
index a7d6093d591a1..227b32ff741de 100644
--- a/projects/plugins/social/jetpack-social.php
+++ b/projects/plugins/social/jetpack-social.php
@@ -4,7 +4,7 @@
* Plugin Name: Jetpack Social
* Plugin URI: https://wordpress.org/plugins/jetpack-social
* Description: Share your site’s posts on several social media networks automatically when you publish a new post.
- * Version: 5.4.1
+ * Version: 5.5.0
* Author: Automattic - Jetpack Social team
* Author URI: https://jetpack.com/social/
* License: GPLv2 or later
diff --git a/projects/plugins/social/readme.txt b/projects/plugins/social/readme.txt
index 73e34ae18e14a..dd42a1fd30aba 100644
--- a/projects/plugins/social/readme.txt
+++ b/projects/plugins/social/readme.txt
@@ -3,7 +3,7 @@ Contributors: automattic, pabline, siddarthan, gmjuhasz, manzoorwanijk
Tags: social media automation, social media scheduling, auto share, social sharing, social media marketing
Requires at least: 6.5
Requires PHP: 7.0
-Tested up to: 6.6
+Tested up to: 6.7
Stable tag: 4.5.1
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
@@ -102,9 +102,20 @@ The easiest way is to use the Custom Message option in the publishing options bo
6. Managing Social media accounts in the post editor
== Changelog ==
-### 5.4.1 - 2024-10-02
+### 5.5.0 - 2024-10-25
+#### Added
+- Added Bluesky to social previews
+- Social Notes: add support for the ActivityPub Reply-To block.
+
#### Changed
-- Internal updates.
+- General: indicate compatibility with the upcoming version of WordPress - 6.7.
+- Initial State: Migrated URLs to script data
+- Only include `wp-polyfill` as a script dependency when needed.
+- Updated package dependencies.
+
+#### Fixed
+- Added Jetpack Beta's slug to Social OG conflicting plugins
+- Social: Fixed share status tooltip text overflow
== Upgrade Notice ==
diff --git a/projects/plugins/social/src/class-note.php b/projects/plugins/social/src/class-note.php
index 73aa53395f6cd..b03256fd62a83 100644
--- a/projects/plugins/social/src/class-note.php
+++ b/projects/plugins/social/src/class-note.php
@@ -170,7 +170,7 @@ public function restrict_blocks_for_social_note( $allowed_blocks, $post ) {
*
* Default is ['core/paragraph', 'core/post-featured-image']
*
- * @since $$next-version$$
+ * @since 5.5.0
*
* @param array $allowed_blocks A linear array of blocks allowed by the CPT.
*/
diff --git a/projects/plugins/social/src/js/components/admin-page/index.jsx b/projects/plugins/social/src/js/components/admin-page/index.jsx
index fcb351364013c..466fd6342cda9 100644
--- a/projects/plugins/social/src/js/components/admin-page/index.jsx
+++ b/projects/plugins/social/src/js/components/admin-page/index.jsx
@@ -7,7 +7,12 @@ import {
GlobalNotices,
} from '@automattic/jetpack-components';
import { useConnection } from '@automattic/jetpack-connection';
-import { store as socialStore } from '@automattic/jetpack-publicize-components';
+import {
+ hasSocialPaidFeatures,
+ store as socialStore,
+ features,
+} from '@automattic/jetpack-publicize-components';
+import { siteHasFeature } from '@automattic/jetpack-script-data';
import { useSelect, useDispatch } from '@wordpress/data';
import { useState, useCallback, useEffect, useRef } from '@wordpress/element';
import React from 'react';
@@ -31,33 +36,30 @@ const Admin = () => {
const onPricingPageDismiss = useCallback( () => setForceDisplayPricingPage( false ), [] );
- const {
- isModuleEnabled,
- showPricingPage,
- hasPaidFeatures,
- pluginVersion,
- isSocialImageGeneratorAvailable,
- isUpdatingJetpackSettings,
- } = useSelect( select => {
- const store = select( socialStore );
- return {
- isModuleEnabled: store.isModuleEnabled(),
- showPricingPage: store.showPricingPage(),
- hasPaidFeatures: store.hasPaidFeatures(),
- pluginVersion: store.getPluginVersion(),
- isSocialImageGeneratorAvailable: store.isSocialImageGeneratorAvailable(),
- isUpdatingJetpackSettings: store.isUpdatingJetpackSettings(),
- };
- } );
+ const { isModuleEnabled, showPricingPage, pluginVersion, isUpdatingJetpackSettings } = useSelect(
+ select => {
+ const store = select( socialStore );
+ return {
+ isModuleEnabled: store.isModuleEnabled(),
+ showPricingPage: store.showPricingPage(),
+ pluginVersion: store.getPluginVersion(),
+ isUpdatingJetpackSettings: store.isUpdatingJetpackSettings(),
+ };
+ }
+ );
const hasEnabledModule = useRef( isModuleEnabled );
useEffect( () => {
- if ( isModuleEnabled && ! hasEnabledModule.current && isSocialImageGeneratorAvailable ) {
+ if (
+ isModuleEnabled &&
+ ! hasEnabledModule.current &&
+ siteHasFeature( features.IMAGE_GENERATOR )
+ ) {
hasEnabledModule.current = true;
refreshJetpackSocialSettings();
}
- }, [ isModuleEnabled, isSocialImageGeneratorAvailable, refreshJetpackSocialSettings ] );
+ }, [ isModuleEnabled, refreshJetpackSocialSettings ] );
const moduleName = `Jetpack Social ${ pluginVersion }`;
@@ -76,7 +78,7 @@ const Admin = () => {
return (
}>
- { ( ! hasPaidFeatures && showPricingPage ) || forceDisplayPricingPage ? (
+ { ( ! hasSocialPaidFeatures() && showPricingPage ) || forceDisplayPricingPage ? (
@@ -92,7 +94,7 @@ const Admin = () => {
{ isModuleEnabled && }
- { isModuleEnabled && isSocialImageGeneratorAvailable && (
+ { isModuleEnabled && siteHasFeature( features.IMAGE_GENERATOR ) && (
) }
diff --git a/projects/plugins/social/src/js/components/admin-page/test/index.test.jsx b/projects/plugins/social/src/js/components/admin-page/test/index.test.jsx
index fe6184c585049..e24423098cdb0 100644
--- a/projects/plugins/social/src/js/components/admin-page/test/index.test.jsx
+++ b/projects/plugins/social/src/js/components/admin-page/test/index.test.jsx
@@ -13,7 +13,6 @@ describe( 'load the app', () => {
let storeSelect;
renderHook( () => useSelect( select => ( storeSelect = select( SOCIAL_STORE_ID ) ) ) );
jest.spyOn( storeSelect, 'showPricingPage' ).mockReset().mockReturnValue( true );
- jest.spyOn( storeSelect, 'hasPaidPlan' ).mockReset().mockReturnValue( true );
jest.spyOn( storeSelect, 'getPluginVersion' ).mockReset().mockReturnValue( version );
render( );
expect( screen.getByText( `Jetpack Social ${ version }` ) ).toBeInTheDocument();
diff --git a/projects/plugins/social/src/js/components/social-module-toggle/index.tsx b/projects/plugins/social/src/js/components/social-module-toggle/index.tsx
index 77345ba97de14..6d955bc2f817d 100644
--- a/projects/plugins/social/src/js/components/social-module-toggle/index.tsx
+++ b/projects/plugins/social/src/js/components/social-module-toggle/index.tsx
@@ -9,6 +9,7 @@ import {
ConnectionManagement,
SOCIAL_STORE_ID,
getSocialScriptData,
+ hasSocialPaidFeatures,
} from '@automattic/jetpack-publicize-components';
import { ExternalLink } from '@wordpress/components';
import { useSelect, useDispatch } from '@wordpress/data';
@@ -26,7 +27,6 @@ const SocialModuleToggle: React.FC = () => {
isUpdating,
siteSuffix,
blogID,
- hasPaidFeatures,
} = useSelect( select => {
const store = select( SOCIAL_STORE_ID ) as SocialStoreSelectors;
return {
@@ -34,7 +34,6 @@ const SocialModuleToggle: React.FC = () => {
isUpdating: store.isUpdatingJetpackSettings(),
siteSuffix: store.getSiteSuffix(),
blogID: store.getBlogID(),
- hasPaidFeatures: store.hasPaidFeatures(),
};
}, [] );
@@ -97,7 +96,7 @@ const SocialModuleToggle: React.FC = () => {
{ __( 'Learn more', 'jetpack-social' ) }
- { ! hasPaidFeatures ? (
+ { ! hasSocialPaidFeatures() ? (
{
const [ isAtLeastMedium ] = useBreakpointMatch( 'md', '>=' );
- const hasPaidPlan = useSelect( select => select( SOCIAL_STORE_ID ).hasPaidPlan() );
- if ( ! hasPaidPlan ) {
+ if ( ! hasSocialPaidFeatures() ) {
return null;
}
diff --git a/projects/plugins/social/src/js/components/types/types.ts b/projects/plugins/social/src/js/components/types/types.ts
index 9ce1d062591fb..bd349bbd106f3 100644
--- a/projects/plugins/social/src/js/components/types/types.ts
+++ b/projects/plugins/social/src/js/components/types/types.ts
@@ -7,8 +7,6 @@ type JetpackSettingsSelectors = {
isModuleEnabled: () => boolean;
showPricingPage: () => boolean;
isUpdatingJetpackSettings: () => boolean;
- hasPaidPlan: () => boolean;
- hasPaidFeatures: () => boolean;
};
type ConnectionDataSelectors = {
@@ -31,7 +29,6 @@ type SocialImageGeneratorSettingsSelectors = {
template: string;
};
};
- isSocialImageGeneratorAvailable: () => boolean;
isSocialImageGeneratorEnabled: () => boolean;
isUpdatingSocialImageGeneratorSettings: () => boolean;
getSocialImageGeneratorDefaultTemplate: () => string;
diff --git a/projects/plugins/social/src/js/editor.js b/projects/plugins/social/src/js/editor.js
index 2966d8d49ae34..ed12f1e5c4f18 100644
--- a/projects/plugins/social/src/js/editor.js
+++ b/projects/plugins/social/src/js/editor.js
@@ -9,6 +9,7 @@ import {
useSyncPostDataToStore,
PostPublishPanels,
GlobalModals,
+ usePostCanUseSig,
} from '@automattic/jetpack-publicize-components';
import { JetpackEditorPanelLogo } from '@automattic/jetpack-shared-extension-utils';
import { PanelBody } from '@wordpress/components';
@@ -51,8 +52,9 @@ const JetpackSocialSidebar = () => {
const closeModal = useCallback( () => setIsModalOpened( false ), [] );
const { hasConnections, hasEnabledConnections } = useSocialMediaConnections();
- const { isPublicizeEnabled, hidePublicizeFeature, isSocialImageGeneratorAvailable } =
- usePublicizeConfig();
+ const { isPublicizeEnabled, hidePublicizeFeature } = usePublicizeConfig();
+ const postCanUseSig = usePostCanUseSig();
+
const isPostPublished = useSelect( select => select( editorStore ).isCurrentPostPublished(), [] );
const PanelDescription = () => (
{
- { isSocialImageGeneratorAvailable && }
+ { postCanUseSig && }
@@ -95,7 +97,7 @@ const JetpackSocialSidebar = () => {
- { isSocialImageGeneratorAvailable && (
+ { postCanUseSig && (
false
)
) {
+ // If we're building changelogger itself, we need to install before we can run it.
+ if ( t.project === 'packages/changelogger' ) {
+ await t.execa( 'composer', await getInstallArgs( t.project, 'composer', t.argv ), {
+ cwd: t.cwd,
+ stdio: [ 'ignore', 'inherit', 'inherit' ],
+ buffer: false,
+ } );
+ }
+
let prerelease = 'alpha';
if ( composerJson.extra?.[ 'dev-releases' ] ) {
const m = (
diff --git a/tools/cli/commands/changelog.js b/tools/cli/commands/changelog.js
index 9319a3e1c6843..5b24a6c7237f5 100644
--- a/tools/cli/commands/changelog.js
+++ b/tools/cli/commands/changelog.js
@@ -311,7 +311,8 @@ async function changelogAdd( argv ) {
return;
}
- let changelogInfo, needChangelog;
+ let changelogInfo,
+ needChangelog = [];
if ( argv.project ) {
needChangelog = [ argv.project ];
@@ -695,7 +696,11 @@ async function checkChangelogFiles() {
const branchReg = /\/branch-/; // match example: jetpack/branch-1.2.3
if ( currentBranch.match( branchReg ) ) {
console.log( chalk.green( 'Release branch detected. No changelog required.' ) );
- return [];
+ return {
+ touched: [],
+ files: new Map(),
+ need: [],
+ };
}
const re1 = /^projects\/([^/]+\/[^/]+)\//; // regex matches project file path, ie 'project/packages/connection/..'
diff --git a/tools/cli/commands/generate.js b/tools/cli/commands/generate.js
index f872709139c88..8a6f54a01d777 100644
--- a/tools/cli/commands/generate.js
+++ b/tools/cli/commands/generate.js
@@ -958,7 +958,7 @@ function createReadMeTxt( answers ) {
'Tags: jetpack, stuff\n' +
'Requires at least: 6.5\n' +
'Requires PHP: 7.0\n' +
- 'Tested up to: 6.6\n' +
+ 'Tested up to: 6.7\n' +
`Stable tag: ${ answers.version }\n` +
'License: GPLv2 or later\n' +
'License URI: http://www.gnu.org/licenses/gpl-2.0.html\n' +
diff --git a/tools/eslint-excludelist.json b/tools/eslint-excludelist.json
index e89841313592a..fda4bf3612853 100644
--- a/tools/eslint-excludelist.json
+++ b/tools/eslint-excludelist.json
@@ -24,7 +24,6 @@
"projects/plugins/jetpack/_inc/client/mixins/emitter/index.js",
"projects/plugins/jetpack/_inc/client/my-plan/index.jsx",
"projects/plugins/jetpack/_inc/client/notices/index.js",
- "projects/plugins/jetpack/_inc/client/pro-status/index.jsx",
"projects/plugins/jetpack/_inc/client/state/connection/reducer.js",
"projects/plugins/jetpack/_inc/client/state/dev-version/reducer.js",
"projects/plugins/jetpack/_inc/client/state/disconnect-survey/reducer.js",
@@ -47,30 +46,15 @@
"projects/plugins/jetpack/_inc/jetpack-deactivate-dialog.js",
"projects/plugins/jetpack/_inc/jetpack-modules.js",
"projects/plugins/jetpack/_inc/twitter-timeline.js",
- "projects/plugins/jetpack/extensions/blocks/eventbrite/utils.js",
- "projects/plugins/jetpack/extensions/blocks/image-compare/edit.js",
"projects/plugins/jetpack/extensions/blocks/image-compare/use-debounce.js",
- "projects/plugins/jetpack/extensions/blocks/opentable/edit.js",
- "projects/plugins/jetpack/extensions/blocks/opentable/restaurant-picker.js",
- "projects/plugins/jetpack/extensions/blocks/opentable/use-restaurant-search.js",
"projects/plugins/jetpack/extensions/blocks/pinterest/utils.js",
"projects/plugins/jetpack/extensions/blocks/podcast-player/utils.js",
"projects/plugins/jetpack/extensions/blocks/slideshow/transforms.js",
- "projects/plugins/jetpack/extensions/blocks/subscriptions/edit.js",
"projects/plugins/jetpack/extensions/shared/block-styles.js",
- "projects/plugins/jetpack/extensions/shared/components/block-styles-selector/index.js",
"projects/plugins/jetpack/extensions/shared/currencies.js",
- "projects/plugins/jetpack/extensions/shared/external-media/sources/google-photos/filter-request.js",
"projects/plugins/jetpack/extensions/shared/get-validated-attributes.js",
- "projects/plugins/jetpack/extensions/shared/plan-upgrade-notification.js",
"projects/plugins/jetpack/modules/infinite-scroll/infinity-customizer.js",
- "projects/plugins/jetpack/modules/infinite-scroll/infinity.js",
- "projects/plugins/jetpack/modules/plugin-search/plugin-search.js",
- "projects/plugins/jetpack/modules/scan/admin-bar-notice.js",
"projects/plugins/jetpack/modules/videopress/js/gutenberg-video-upload.js",
- "projects/plugins/jetpack/modules/videopress/js/videopress-plupload.js",
"projects/plugins/jetpack/modules/widgets/customizer-utils.js",
- "projects/plugins/jetpack/modules/widgets/milestone/admin.js",
- "projects/plugins/jetpack/modules/widgets/simple-payments/customizer.js",
- "projects/plugins/jetpack/modules/wpgroho.js"
+ "projects/plugins/jetpack/modules/widgets/simple-payments/customizer.js"
]
diff --git a/tools/js-tools/package.json b/tools/js-tools/package.json
index 0e238c864e288..ea9398358565d 100644
--- a/tools/js-tools/package.json
+++ b/tools/js-tools/package.json
@@ -13,7 +13,7 @@
"@automattic/eslint-changed": "workspace:*",
"@automattic/eslint-config-target-es": "workspace:*",
"@babel/core": "7.24.7",
- "@babel/eslint-parser": "7.24.7",
+ "@babel/eslint-parser": "7.25.9",
"@babel/preset-react": "7.24.7",
"@babel/preset-typescript": "7.24.7",
"@octokit/auth-token": "5.1.1",
@@ -28,22 +28,22 @@
"chalk": "4.1.2",
"debug": "4.3.4",
"enquirer": "2.4.1",
- "eslint": "8.57.0",
+ "eslint": "8.57.1",
"eslint-config-prettier": "9.1.0",
"eslint-import-resolver-exports": "1.0.0-beta.5",
"eslint-plugin-es-x": "7.8.0",
- "eslint-plugin-import": "2.29.1",
+ "eslint-plugin-import": "2.31.0",
"eslint-plugin-jest": "27.9.0",
"eslint-plugin-jest-dom": "5.4.0",
- "eslint-plugin-jsdoc": "48.8.3",
- "eslint-plugin-jsx-a11y": "6.9.0",
+ "eslint-plugin-jsdoc": "48.11.0",
+ "eslint-plugin-jsx-a11y": "6.10.1",
"eslint-plugin-lodash": "7.4.0",
"eslint-plugin-playwright": "0.22.2",
"eslint-plugin-prettier": "5.2.1",
- "eslint-plugin-react": "7.35.0",
+ "eslint-plugin-react": "7.37.2",
"eslint-plugin-react-hooks": "4.6.2",
- "eslint-plugin-svelte": "2.43.0",
- "eslint-plugin-testing-library": "6.3.0",
+ "eslint-plugin-svelte": "2.46.0",
+ "eslint-plugin-testing-library": "6.4.0",
"glob": "10.4.1",
"ignore": "5.1.8",
"jest": "29.7.0",