Skip to content

Commit

Permalink
Update dependency cookie to v1 (#40232)
Browse files Browse the repository at this point in the history
* Update dependency cookie to v1
* Remove deprecated `@types/cookie`
* Update code for new version

---------

Co-authored-by: Renovate Bot <[email protected]>
Co-authored-by: Brad Jorsch <[email protected]>

Committed via a GitHub action: https://github.com/Automattic/jetpack/actions/runs/11899281053

Upstream-Ref: Automattic/jetpack@34ab347
  • Loading branch information
anomiex authored and matticbot committed Nov 18, 2024
1 parent 18acf39 commit 3c267b5
Show file tree
Hide file tree
Showing 14 changed files with 99 additions and 105 deletions.
8 changes: 8 additions & 0 deletions jetpack_vendor/automattic/jetpack-explat/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,13 @@ 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.1-alpha] - unreleased

This is an alpha version! The changes listed here are not final.

### Changed
- Updated package dependencies.

## [0.2.0] - 2024-11-14
### Removed
- General: Update minimum PHP version to 7.2. [#40147]
Expand Down Expand Up @@ -79,6 +86,7 @@ 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.1-alpha]: https://github.com/Automattic/jetpack-explat/compare/v0.2.0...v0.2.1-alpha
[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
Expand Down
Original file line number Diff line number Diff line change
@@ -1 +1 @@
<?php return array('dependencies' => array('react', 'react-jsx-runtime', 'wp-api-fetch', 'wp-url'), 'version' => '3c050f0c6b858f4a2ec5');
<?php return array('dependencies' => array('react', 'react-jsx-runtime', 'wp-api-fetch', 'wp-url'), 'version' => '37d1ea057f1a1470ad33');
3 changes: 1 addition & 2 deletions jetpack_vendor/automattic/jetpack-explat/build/index.js

Large diffs are not rendered by default.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ class ExPlat {
*
* @var string
*/
const PACKAGE_VERSION = '0.2.0';
const PACKAGE_VERSION = '0.2.1-alpha';

/**
* Initializer.
Expand Down
4 changes: 2 additions & 2 deletions jetpack_vendor/automattic/jetpack-explat/src/client/anon.ts
Original file line number Diff line number Diff line change
@@ -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;
Expand All @@ -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;
};

/**
Expand Down
Original file line number Diff line number Diff line change
@@ -1 +1 @@
<?php return array('dependencies' => array('jetpack-connection', 'jetpack-script-data', 'react', 'react-jsx-runtime', 'wp-api-fetch', 'wp-components', 'wp-compose', 'wp-data', 'wp-date', 'wp-element', 'wp-i18n', 'wp-polyfill', 'wp-primitives', 'wp-url'), 'version' => '6ecc2f6e42803ab88180');
<?php return array('dependencies' => array('jetpack-connection', 'jetpack-script-data', 'react', 'react-jsx-runtime', 'wp-api-fetch', 'wp-components', 'wp-compose', 'wp-data', 'wp-date', 'wp-element', 'wp-i18n', 'wp-polyfill', 'wp-primitives', 'wp-url'), 'version' => '88d37a42d9912670f2bf');
32 changes: 16 additions & 16 deletions jetpack_vendor/automattic/jetpack-my-jetpack/build/index.js

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,6 @@
* @see https://github.com/kvz/phpjs/blob/ffe1356af23a6f2512c84c954dd4e828e92579fa/functions/strings/number_format.js
*/

/*!
* cookie
* Copyright(c) 2012-2014 Roman Shtylman
* Copyright(c) 2015 Douglas Christopher Wilson
* MIT Licensed
*/

/**
* @remix-run/router v1.2.1
*
Expand Down
2 changes: 1 addition & 1 deletion jetpack_vendor/automattic/jetpack-my-jetpack/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"automattic/jetpack-assets": "^4.0.0-alpha",
"automattic/jetpack-boost-speed-score": "^0.4.0",
"automattic/jetpack-connection": "^6.0.1",
"automattic/jetpack-explat": "^0.2.0",
"automattic/jetpack-explat": "^0.2.1-alpha",
"automattic/jetpack-jitm": "^4.0.0",
"automattic/jetpack-licensing": "^3.0.0",
"automattic/jetpack-plugins-installer": "^0.5.0",
Expand Down
2 changes: 1 addition & 1 deletion jetpack_vendor/i18n-map.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
),
'jetpack-explat' => array(
'path' => 'jetpack_vendor/automattic/jetpack-explat',
'ver' => '0.2.0',
'ver' => '0.2.1-alpha1731956635',
),
'jetpack-image-cdn' => array(
'path' => 'jetpack_vendor/automattic/jetpack-image-cdn',
Expand Down
66 changes: 33 additions & 33 deletions vendor/composer/installed.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"dist": {
"type": "path",
"url": "/tmp/jetpack-build/Automattic/jetpack-a8c-mc-stats",
"reference": "8a48011f9a37f26cb88ee1ad0d2d0ffbd403b315"
"reference": "f34d25bbba6416873821529d078931f5809080db"
},
"require": {
"php": ">=7.2"
Expand Down Expand Up @@ -63,7 +63,7 @@
"dist": {
"type": "path",
"url": "/tmp/jetpack-build/Automattic/jetpack-admin-ui",
"reference": "b8257abc88d7018e9bf92cbe9aa733bedba04055"
"reference": "92b5bf211f42ad76ed230054c30eb451d87e9570"
},
"require": {
"php": ">=7.2"
Expand Down Expand Up @@ -131,7 +131,7 @@
"dist": {
"type": "path",
"url": "/tmp/jetpack-build/Automattic/jetpack-assets",
"reference": "f2b8e2ecc22cf5391a85491c9d1fbeddb38ccbe2"
"reference": "f4ab2c0b47457f38a3df7df03c88147b09c966cf"
},
"require": {
"automattic/jetpack-constants": "^3.0.0",
Expand Down Expand Up @@ -203,7 +203,7 @@
"dist": {
"type": "path",
"url": "/tmp/jetpack-build/Automattic/jetpack-autoloader",
"reference": "f5f63b7d048e8ab0b58a3b263a85e95d84801d59"
"reference": "a334f8107328cdd0e7012265aeee4557183d65e6"
},
"require": {
"composer-plugin-api": "^1.1 || ^2.0",
Expand Down Expand Up @@ -274,7 +274,7 @@
"dist": {
"type": "path",
"url": "/tmp/jetpack-build/Automattic/jetpack-boost-core",
"reference": "01486ab702ee291092a1fbdaae413b92e2683814"
"reference": "45715c33f61ff4f29bee62b4ba6b6e13ee1e2fd9"
},
"require": {
"automattic/jetpack-connection": "^6.0.1",
Expand Down Expand Up @@ -345,7 +345,7 @@
"dist": {
"type": "path",
"url": "/tmp/jetpack-build/Automattic/jetpack-boost-speed-score",
"reference": "712314bb620f5951c0e81f913d452eea87a3fb6e"
"reference": "00feecffbcb57d1a922e6d52ddfbbf0f91d9d399"
},
"require": {
"automattic/jetpack-boost-core": "^0.3.0",
Expand Down Expand Up @@ -424,7 +424,7 @@
"dist": {
"type": "path",
"url": "/tmp/jetpack-build/Automattic/jetpack-composer-plugin",
"reference": "458674c13d197bf61a3479bbbe249e1190c89e0c"
"reference": "215840343dd50b1bc83f0f6786c9c4d17b589159"
},
"require": {
"composer-plugin-api": "^2.1.0",
Expand Down Expand Up @@ -487,7 +487,7 @@
"dist": {
"type": "path",
"url": "/tmp/jetpack-build/Automattic/jetpack-config",
"reference": "0e3495abfbd1201d9e02cf87ec7ceded65918e76"
"reference": "aaa7a2c42a20e34d5c554cde8491f737c5bfd798"
},
"require": {
"php": ">=7.2"
Expand Down Expand Up @@ -562,7 +562,7 @@
"dist": {
"type": "path",
"url": "/tmp/jetpack-build/Automattic/jetpack-connection",
"reference": "98c529da67df7fad04738e835e725f7ff756d601"
"reference": "fc4a962d81efe6401d22566843bec5138810bf2f"
},
"require": {
"automattic/jetpack-a8c-mc-stats": "^3.0.0",
Expand Down Expand Up @@ -655,7 +655,7 @@
"dist": {
"type": "path",
"url": "/tmp/jetpack-build/Automattic/jetpack-constants",
"reference": "a3ca2625ed131fabfe3ad60c83e95a8a24b7b9bd"
"reference": "56d827914fd4620d0963538f5cef59d97c76fbb9"
},
"require": {
"php": ">=7.2"
Expand Down Expand Up @@ -712,7 +712,7 @@
"dist": {
"type": "path",
"url": "/tmp/jetpack-build/Automattic/jetpack-device-detection",
"reference": "a121e920ce8cb3fe9bc4c770a05c872568d9061b"
"reference": "a23ce453259c1135f67289d922b7064638cec3fa"
},
"require": {
"php": ">=7.2"
Expand Down Expand Up @@ -763,12 +763,12 @@
},
{
"name": "automattic/jetpack-explat",
"version": "0.2.0",
"version_normalized": "0.2.0.0",
"version": "0.2.1-alpha.1731956635",
"version_normalized": "0.2.1.0-alpha1731956635",
"dist": {
"type": "path",
"url": "/tmp/jetpack-build/Automattic/jetpack-explat",
"reference": "5f1316e16445563d38231000ab6185f6803cd30f"
"reference": "6aa391bced6df0e2d77e833646b08a8245c3105a"
},
"require": {
"automattic/jetpack-connection": "^6.0.1",
Expand Down Expand Up @@ -846,7 +846,7 @@
"dist": {
"type": "path",
"url": "/tmp/jetpack-build/Automattic/jetpack-image-cdn",
"reference": "f4b7fb3f1787297f067e24e32d83b190ed255882"
"reference": "f4b779b0d0f10cc2c41cf12c92d898398788aaa7"
},
"require": {
"automattic/jetpack-assets": "^4.0.0-alpha",
Expand Down Expand Up @@ -915,7 +915,7 @@
"dist": {
"type": "path",
"url": "/tmp/jetpack-build/Automattic/jetpack-ip",
"reference": "aca6c0b7b58ef706215e6344767df1cc78cfcde0"
"reference": "9511fc545c39a66ce8288e88a428111bb6bf1c68"
},
"require": {
"php": ">=7.2"
Expand Down Expand Up @@ -976,7 +976,7 @@
"dist": {
"type": "path",
"url": "/tmp/jetpack-build/Automattic/jetpack-jitm",
"reference": "eff1442c8a73d90f3bdfa21c13ed64b5d7dcd784"
"reference": "518cf761d7d60573e2b07a5c1b6005d74e373057"
},
"require": {
"automattic/jetpack-a8c-mc-stats": "^3.0.0",
Expand Down Expand Up @@ -1054,7 +1054,7 @@
"dist": {
"type": "path",
"url": "/tmp/jetpack-build/Automattic/jetpack-licensing",
"reference": "fe12a7a873c1b53a1ecdb166b22d0779ba7ab9c1"
"reference": "25380abb694515a6dd0c7b1c4bd176f9f1cf0e31"
},
"require": {
"automattic/jetpack-connection": "^6.0.1",
Expand Down Expand Up @@ -1119,7 +1119,7 @@
"dist": {
"type": "path",
"url": "/tmp/jetpack-build/Automattic/jetpack-logo",
"reference": "7337eb7d287994adc85f2b62143670103eb6a9cc"
"reference": "15d35078891bfe48e3bbb716bbbb3bec07d14b82"
},
"require": {
"php": ">=7.2"
Expand Down Expand Up @@ -1175,15 +1175,15 @@
"dist": {
"type": "path",
"url": "/tmp/jetpack-build/Automattic/jetpack-my-jetpack",
"reference": "bb6591643a79d136f893f0bdb947fa9486068347"
"reference": "29eedbe332853893b0161a9054effa5fe91e9b22"
},
"require": {
"automattic/jetpack-admin-ui": "^0.5.0",
"automattic/jetpack-assets": "^4.0.0-alpha",
"automattic/jetpack-boost-speed-score": "^0.4.0",
"automattic/jetpack-connection": "^6.0.1",
"automattic/jetpack-constants": "^3.0.0",
"automattic/jetpack-explat": "^0.2.0",
"automattic/jetpack-explat": "^0.2.1-alpha",
"automattic/jetpack-jitm": "^4.0.0",
"automattic/jetpack-licensing": "^3.0.0",
"automattic/jetpack-plans": "^0.5.0",
Expand Down Expand Up @@ -1280,7 +1280,7 @@
"dist": {
"type": "path",
"url": "/tmp/jetpack-build/Automattic/jetpack-password-checker",
"reference": "591f1c4a99833009b8596c0cceb533154ce75de3"
"reference": "45bb1f10946e96e7401783633ee873911939d50a"
},
"require": {
"php": ">=7.2"
Expand Down Expand Up @@ -1344,7 +1344,7 @@
"dist": {
"type": "path",
"url": "/tmp/jetpack-build/Automattic/jetpack-plans",
"reference": "d4c7d5c1b5ebfb081fd2dc5b4b8257a2f06bbc7c"
"reference": "aaee3cf98757aa045a51e73a0731276be592e359"
},
"require": {
"automattic/jetpack-connection": "^6.0.1",
Expand Down Expand Up @@ -1415,7 +1415,7 @@
"dist": {
"type": "path",
"url": "/tmp/jetpack-build/Automattic/jetpack-plugin-deactivation",
"reference": "8661264cf05bd93312b81d9fa614b0c116381496"
"reference": "ccc0ed965ec491b378b51b7efa575941e796f002"
},
"require": {
"automattic/jetpack-assets": "^4.0.0-alpha",
Expand Down Expand Up @@ -1486,7 +1486,7 @@
"dist": {
"type": "path",
"url": "/tmp/jetpack-build/Automattic/jetpack-plugins-installer",
"reference": "a8591dc2febec06743ddd499a5c0466464293941"
"reference": "31cabf94775ac52256ed91dfb27abe1121fc7c12"
},
"require": {
"automattic/jetpack-a8c-mc-stats": "^3.0.0",
Expand Down Expand Up @@ -1545,7 +1545,7 @@
"dist": {
"type": "path",
"url": "/tmp/jetpack-build/Automattic/jetpack-protect-models",
"reference": "fb954c925084a313765c84bc55328adc893e20e9"
"reference": "39199aaa6a1791e59d2bbf29b79d8a5abac885ec"
},
"require": {
"php": ">=7.2"
Expand Down Expand Up @@ -1618,7 +1618,7 @@
"dist": {
"type": "path",
"url": "/tmp/jetpack-build/Automattic/jetpack-protect-status",
"reference": "2e1139cd210e35b0550fc9baacf0fc708611e7b1"
"reference": "8bd0d463c441156728441d9c1a9551e826ff143d"
},
"require": {
"automattic/jetpack-connection": "^6.0.1",
Expand Down Expand Up @@ -1696,7 +1696,7 @@
"dist": {
"type": "path",
"url": "/tmp/jetpack-build/Automattic/jetpack-redirect",
"reference": "46e8f94ed27e2f6212b6d1d056c4d6cac1304585"
"reference": "daeacf175c6cea92a9097a74728df07e42052ab6"
},
"require": {
"automattic/jetpack-status": "^5.0.1-alpha",
Expand Down Expand Up @@ -1754,7 +1754,7 @@
"dist": {
"type": "path",
"url": "/tmp/jetpack-build/Automattic/jetpack-roles",
"reference": "a8be733b07b2e5b0e53b28d27aa3f1e1117c9a9c"
"reference": "f17a1c46a72b75e09e49f5aa35a637734554021c"
},
"require": {
"php": ">=7.2"
Expand Down Expand Up @@ -1811,7 +1811,7 @@
"dist": {
"type": "path",
"url": "/tmp/jetpack-build/Automattic/jetpack-schema",
"reference": "da51d5cb390149622cb301de6105869133e68a03"
"reference": "f50572cf58d0d867e0e0186a9812c627ebc5fe03"
},
"require": {
"php": ">=7.2"
Expand Down Expand Up @@ -1884,7 +1884,7 @@
"dist": {
"type": "path",
"url": "/tmp/jetpack-build/Automattic/jetpack-status",
"reference": "a7c3f7a2389aa78db60f7af86f016c4509e8b9ad"
"reference": "211d93adde82bb64226ffe6440dcff51788135fc"
},
"require": {
"automattic/jetpack-constants": "^3.0.0",
Expand Down Expand Up @@ -1951,7 +1951,7 @@
"dist": {
"type": "path",
"url": "/tmp/jetpack-build/Automattic/jetpack-sync",
"reference": "9603d2c98da8f177f0a785fcc4ecc1358ec774b3"
"reference": "1b358ed7f3b9e8bc2c5021e31b574a7cf5bf2f92"
},
"require": {
"automattic/jetpack-connection": "^6.0.1",
Expand Down Expand Up @@ -2032,7 +2032,7 @@
"dist": {
"type": "path",
"url": "/tmp/jetpack-build/Automattic/jetpack-wp-js-data-sync",
"reference": "db1bb3d22b4f76c4056a614df72c37e593c7c0aa"
"reference": "3965aa1e0dd5e72a0d133b8f0832bceae672af4b"
},
"require": {
"automattic/jetpack-schema": "^0.2.0-alpha",
Expand Down
Loading

0 comments on commit 3c267b5

Please sign in to comment.