updated plugin Jetpack Protect version 4.0.0

This commit is contained in:
2025-04-29 21:19:56 +00:00
committed by Gitium
parent eb9181b250
commit ebd40ef928
265 changed files with 11864 additions and 3987 deletions

View File

@ -5,6 +5,94 @@ 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.2.13] - 2025-03-21
### Changed
- Internal updates.
## [0.2.12] - 2025-03-18
### Changed
- Update package dependencies. [#42511]
## [0.2.11] - 2025-03-12
### Changed
- Internal updates.
## [0.2.10] - 2025-03-05
### Changed
- Internal updates.
## [0.2.9] - 2025-03-03
### Changed
- Update package dependencies. [#42163]
## [0.2.8] - 2025-02-24
### Changed
- Update dependencies.
## [0.2.7] - 2025-02-17
### Changed
- Update dependencies.
## [0.2.6] - 2025-02-10
### Changed
- Updated package dependencies. [#41491]
## [0.2.5] - 2025-02-03
### Changed
- Updated package dependencies. [#41286]
## [0.2.4] - 2025-01-20
### Changed
- Updated package dependencies. [#41099]
## [0.2.3] - 2024-12-16
### Changed
- Updated package dependencies. [#40564]
## [0.2.2] - 2024-12-04
### Changed
- Updated package dependencies. [#40363] [#40372]
## [0.2.1] - 2024-11-25
### Changed
- Updated package dependencies. [#40232] [#40288]
## [0.2.0] - 2024-11-14
### Removed
- General: Update minimum PHP version to 7.2. [#40147]
## [0.1.15] - 2024-11-11
### Changed
- Updated package dependencies. [#39999] [#40000] [#40060]
## [0.1.14] - 2024-11-04
### Added
- Enable test coverage. [#39961]
## [0.1.13] - 2024-10-29
### Changed
- Internal updates.
## [0.1.12] - 2024-10-14
### Changed
- Only include `wp-polyfill` as a script dependency when needed. [#39629]
## [0.1.11] - 2024-10-10
### Changed
- Updated package dependencies. [#39649] [#39707]
## [0.1.10] - 2024-10-07
### Changed
- Updated package dependencies. [#39594]
## [0.1.9] - 2024-09-23
### Changed
- Update dependencies.
## [0.1.8] - 2024-09-10
### Changed
- Updated package dependencies. [#39302]
## [0.1.7] - 2024-09-05
### Changed
- Update dependencies.
@ -43,6 +131,28 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- ExPlat: add condition to prevent fetching the experiment assignment if there's not anon id (meaning that Tracks is likely disabled) [#38327]
- Updated package dependencies. [#38132]
[0.2.13]: https://github.com/Automattic/jetpack-explat/compare/v0.2.12...v0.2.13
[0.2.12]: https://github.com/Automattic/jetpack-explat/compare/v0.2.11...v0.2.12
[0.2.11]: https://github.com/Automattic/jetpack-explat/compare/v0.2.10...v0.2.11
[0.2.10]: https://github.com/Automattic/jetpack-explat/compare/v0.2.9...v0.2.10
[0.2.9]: https://github.com/Automattic/jetpack-explat/compare/v0.2.8...v0.2.9
[0.2.8]: https://github.com/Automattic/jetpack-explat/compare/v0.2.7...v0.2.8
[0.2.7]: https://github.com/Automattic/jetpack-explat/compare/v0.2.6...v0.2.7
[0.2.6]: https://github.com/Automattic/jetpack-explat/compare/v0.2.5...v0.2.6
[0.2.5]: https://github.com/Automattic/jetpack-explat/compare/v0.2.4...v0.2.5
[0.2.4]: https://github.com/Automattic/jetpack-explat/compare/v0.2.3...v0.2.4
[0.2.3]: https://github.com/Automattic/jetpack-explat/compare/v0.2.2...v0.2.3
[0.2.2]: https://github.com/Automattic/jetpack-explat/compare/v0.2.1...v0.2.2
[0.2.1]: https://github.com/Automattic/jetpack-explat/compare/v0.2.0...v0.2.1
[0.2.0]: https://github.com/Automattic/jetpack-explat/compare/v0.1.15...v0.2.0
[0.1.15]: https://github.com/Automattic/jetpack-explat/compare/v0.1.14...v0.1.15
[0.1.14]: https://github.com/Automattic/jetpack-explat/compare/v0.1.13...v0.1.14
[0.1.13]: https://github.com/Automattic/jetpack-explat/compare/v0.1.12...v0.1.13
[0.1.12]: https://github.com/Automattic/jetpack-explat/compare/v0.1.11...v0.1.12
[0.1.11]: https://github.com/Automattic/jetpack-explat/compare/v0.1.10...v0.1.11
[0.1.10]: https://github.com/Automattic/jetpack-explat/compare/v0.1.9...v0.1.10
[0.1.9]: https://github.com/Automattic/jetpack-explat/compare/v0.1.8...v0.1.9
[0.1.8]: https://github.com/Automattic/jetpack-explat/compare/v0.1.7...v0.1.8
[0.1.7]: https://github.com/Automattic/jetpack-explat/compare/v0.1.6...v0.1.7
[0.1.6]: https://github.com/Automattic/jetpack-explat/compare/v0.1.5...v0.1.6
[0.1.5]: https://github.com/Automattic/jetpack-explat/compare/v0.1.4...v0.1.5

View File

@ -1 +1 @@
<?php return array('dependencies' => array('react', 'react-jsx-runtime', 'wp-api-fetch', 'wp-polyfill', 'wp-url'), 'version' => '94dc255b5871f56d5cf3');
<?php return array('dependencies' => array('react', 'react-jsx-runtime', 'wp-api-fetch', 'wp-url'), 'version' => '37d1ea057f1a1470ad33');

View File

@ -1,6 +0,0 @@
/*!
* cookie
* Copyright(c) 2012-2014 Roman Shtylman
* Copyright(c) 2015 Douglas Christopher Wilson
* MIT Licensed
*/

View File

@ -4,12 +4,13 @@
"type": "jetpack-library",
"license": "GPL-2.0-or-later",
"require": {
"php": ">=7.0",
"automattic/jetpack-connection": "^4.0.0"
"php": ">=7.2",
"automattic/jetpack-connection": "^6.7.7"
},
"require-dev": {
"yoast/phpunit-polyfills": "^1.1.1",
"automattic/jetpack-changelogger": "^4.2.6"
"yoast/phpunit-polyfills": "^3.0.0",
"automattic/jetpack-changelogger": "^6.0.2",
"automattic/phpunit-select-config": "^1.0.1"
},
"autoload": {
"classmap": [
@ -18,13 +19,14 @@
},
"scripts": {
"phpunit": [
"./vendor/phpunit/phpunit/phpunit --colors=always"
"phpunit-select-config phpunit.#.xml.dist --colors=always"
],
"test-coverage": "pnpm concurrently --names php,js 'php -dpcov.directory=. ./vendor/bin/phpunit-select-config phpunit.#.xml.dist --coverage-php \"$COVERAGE_DIR/php.cov\"' 'pnpm:test-coverage'",
"test-php": [
"@composer phpunit"
],
"test-js": [
"echo 'Run `pnpm run test` when ready'"
"pnpm run test"
],
"test-js-watch": [
"Composer\\Config::disableProcessTimeout",
@ -46,7 +48,7 @@
"extra": {
"autotagger": true,
"branch-alias": {
"dev-trunk": "0.1.x-dev"
"dev-trunk": "0.2.x-dev"
},
"changelogger": {
"link-template": "https://github.com/Automattic/jetpack-explat/compare/v${old}...v${new}"

View File

@ -20,7 +20,7 @@ class ExPlat {
*
* @var string
*/
const PACKAGE_VERSION = '0.1.7';
const PACKAGE_VERSION = '0.2.13';
/**
* Initializer.

View File

@ -11,6 +11,8 @@ namespace Automattic\Jetpack\ExPlat;
use Automattic\Jetpack\Connection\Client;
use Automattic\Jetpack\Connection\Manager as Jetpack_Connection;
use WP_Error;
use WP_REST_Request;
use WP_REST_Response;
use WP_REST_Server;
/**
@ -71,7 +73,7 @@ class REST_Controller {
* Get the assignments for a given experiment and anon_id
*
* @param WP_REST_Request $request The REST request object.
* @return WP_REST_Response
* @return WP_REST_Response|WP_Error
*/
public function get_assignments( $request ) {
$response = null;

View File

@ -1,7 +1,7 @@
/**
* External dependencies
*/
import cookie from 'cookie';
import { parse as cookieParse } from 'cookie';
let initializeAnonIdPromise: Promise< string | null > | null = null;
const anonIdPollingIntervalMilliseconds = 50;
@ -13,7 +13,7 @@ const anonIdPollingIntervalMaxAttempts = 100; // 50 * 100 = 5000 = 5 seconds
* @return {?string} The anonymous cookie value, or null if it doesn't exist
*/
export const readAnonCookie = (): string | null => {
return cookie.parse( document.cookie ).tk_ai || null;
return cookieParse( document.cookie ).tk_ai || null;
};
/**