From 68e74e2211318b255a7fc803b5f7acc7817cc3aa Mon Sep 17 00:00:00 2001 From: anomiex Date: Wed, 14 Aug 2024 20:09:39 +0000 Subject: [PATCH] Update wordpress monorepo (#38662) * Update wordpress monorepo * Fix lint errors in Boost * js-packages/publicize-components: Fix apiFetch handler in unit test to handle `parse` option. * plugins/jetpack: Fix unit test for loader recursion inside `@wordpress/components` --------- Co-authored-by: Renovate Bot Co-authored-by: Brad Jorsch Committed via a GitHub action: https://github.com/Automattic/jetpack/actions/runs/10394097476 Upstream-Ref: Automattic/jetpack@d7279d97cef228dbd27f5d8bd217b048683deab6 --- CHANGELOG.md | 8 ++++++++ build/index.asset.php | 2 +- build/index.js | 2 +- build/index.js.LICENSE.txt | 10 ---------- composer.json | 2 +- package.json | 6 +++--- src/class-explat.php | 2 +- 7 files changed, 15 insertions(+), 17 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 0759c69..60d6ba9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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.1.2-alpha] - unreleased + +This is an alpha version! The changes listed here are not final. + +### Changed +- Updated package dependencies. + ## [0.1.1] - 2024-08-01 ### Changed - Internal updates. @@ -19,4 +26,5 @@ 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.1.2-alpha]: https://github.com/Automattic/jetpack-explat/compare/v0.1.1...v0.1.2-alpha [0.1.1]: https://github.com/Automattic/jetpack-explat/compare/v0.1.0...v0.1.1 diff --git a/build/index.asset.php b/build/index.asset.php index c78d3bb..959e49a 100644 --- a/build/index.asset.php +++ b/build/index.asset.php @@ -1 +1 @@ - array('react', 'wp-api-fetch', 'wp-polyfill', 'wp-url'), 'version' => '6b00a7b07d8748dca811'); + array('react', 'react-jsx-runtime', 'wp-api-fetch', 'wp-polyfill', 'wp-url'), 'version' => '83bbf8166e53a439d249'); diff --git a/build/index.js b/build/index.js index 92693e8..1bf93f1 100644 --- a/build/index.js +++ b/build/index.js @@ -1,2 +1,2 @@ /*! For license information please see index.js.LICENSE.txt */ -(()=>{"use strict";var e={102:(e,t,n)=>{n.d(t,{Z:()=>s});var r=n(275),i=n(196);const o={isEligible:!0};function s(e){const t=(t,n={})=>{const r={...o,...n},[,s]=(0,i.useReducer)((e=>e+1),0),a=(0,i.useRef)(t);if((0,i.useEffect)((()=>{let n=!0;return r.isEligible&&e.loadExperimentAssignment(t).then((()=>{n&&s()})),()=>{n=!1}}),[t,r.isEligible]),t===a.current||a.current.startsWith("explat_test")||e.config.logError({message:"[ExPlat] useExperiment: experimentName should never change between renders!"}),!r.isEligible)return[!1,null];const m=e.dangerouslyGetMaybeLoadedExperimentAssignment(t);return[!m,m]};return{useExperiment:t,Experiment:({defaultExperience:e,treatmentExperience:n,loadingExperience:i,name:o,options:s})=>{const[a,m]=t(o,s);return a?(0,r.jsx)(r.Fragment,{children:i}):m?.variationName?(0,r.jsx)(r.Fragment,{children:n}):(0,r.jsx)(r.Fragment,{children:e})},ProvideExperimentData:({children:e,name:n,options:r})=>{const[i,o]=t(n,r);return e(i,o)}}}},926:(e,t,n)=>{n.d(t,{Hr:()=>l,O8:()=>c});var r=n(765),i=n(784),o=n(667),s=n(181),a=n(939);const m=1e4;Error;function c(e){if("undefined"==typeof window)throw new Error("Running outside of a browser context.");const t={},n=(...t)=>{try{e.logError(...t)}catch(e){}};try{(0,r._U)()}catch(e){n({message:e.message,source:"removeExpiredExperimentAssignments-error"})}return{loadExperimentAssignment:async c=>{try{if(!a.K9(c))throw new Error(`Invalid experimentName: "${c}"`);const n=(0,r.cd)(c);if(n&&i.fh(n))return n;void 0===t[c]&&(t[c]=(t=>s.I1((async()=>{const n=await o.pC(e,t);return(0,r.NV)(n),n})))(c));let l=m;Math.random()>.5&&(l=5e3);const p=await s.GR(t[c](),l);if(!p)throw new Error("Could not fetch ExperimentAssignment");return p}catch(e){n({message:e.message,experimentName:c,source:"loadExperimentAssignment-initialError"})}try{const e=(0,r.cd)(c);if(e)return e;const t=(0,i.pl)(c);return(0,r.NV)(t),t}catch(e){return n({message:e.message,experimentName:c,source:"loadExperimentAssignment-fallbackError"}),(0,i.pl)(c)}},dangerouslyGetExperimentAssignment:t=>{try{if(!a.K9(t))throw new Error(`Invalid experimentName: ${t}`);const i=(0,r.cd)(t);if(!i)throw new Error("Trying to dangerously get an ExperimentAssignment that hasn't loaded.");return e.isDevelopmentMode&&i&&s.qS()-i.retrievedTimestamp<1e3&&n({message:"Warning: Trying to dangerously get an ExperimentAssignment too soon after loading it.",experimentName:t,source:"dangerouslyGetExperimentAssignment"}),i}catch(r){return e.isDevelopmentMode&&n({message:r.message,experimentName:t,source:"dangerouslyGetExperimentAssignment-error"}),(0,i.pl)(t)}},dangerouslyGetMaybeLoadedExperimentAssignment:t=>{try{if(!a.K9(t))throw new Error(`Invalid experimentName: ${t}`);const e=(0,r.cd)(t);return e||null}catch(r){return e.isDevelopmentMode&&n({message:r.message,experimentName:t,source:"dangerouslyGetMaybeLoadedExperimentAssignment-error"}),(0,i.pl)(t)}},config:e}}function l(e){return{loadExperimentAssignment:async t=>(e.logError({message:"Attempting to load ExperimentAssignment in SSR context",experimentName:t}),(0,i.pl)(t)),dangerouslyGetExperimentAssignment:t=>(e.logError({message:"Attempting to dangerously get ExperimentAssignment in SSR context",experimentName:t}),(0,i.pl)(t)),dangerouslyGetMaybeLoadedExperimentAssignment:t=>(e.logError({message:"Attempting to dangerously get ExperimentAssignment in SSR context",experimentName:t}),(0,i.pl)(t)),config:e}}},105:(e,t,n)=>{n.d(t,{O:()=>i});var r=n(926);const i="undefined"==typeof window?r.Hr:r.O8},765:(e,t,n)=>{n.d(t,{NV:()=>m,_U:()=>d,cd:()=>c});var r=n(784),i=n(257),o=n(939);const s="explat-experiment-",a=e=>`${s}-${e}`;function m(e){o.mm(e);const t=c(e.experimentName);if(t&&e.retrievedTimestamp[...Array(e).keys()];function p(e){return e.startsWith(s)}function u(e){return e.slice(s.length+1)}function d(){l(i.Z.length).map((e=>i.Z.key(e))).filter(p).map(u).filter((e=>{try{if(r.fh(c(e)))return!1}catch(e){}return!0})).map(a).map((e=>i.Z.removeItem(e)))}},784:(e,t,n)=>{n.d(t,{fh:()=>i,gY:()=>o,pl:()=>s});var r=n(181);function i(e){return r.qS()({experimentName:e,variationName:null,retrievedTimestamp:r.qS(),ttl:Math.max(o,t),isFallbackExperimentAssignment:!0})},257:(e,t,n)=>{n.d(t,{Z:()=>i});let r={_data:{},setItem:function(e,t){this._data[e]=t},getItem:function(e){return this._data.hasOwnProperty(e)?this._data[e]:null},removeItem:function(e){delete this._data[e]},clear:function(){this._data={}},get length(){return Object.keys(this._data).length},key:function(e){const t=Object.keys(this._data);return e in t?t[e]:null}};try{window.localStorage&&(r=window.localStorage)}catch(e){}const i=r},667:(e,t,n)=>{n.d(t,{pC:()=>p});var r=n(784),i=n(257),o=n(181),s=n(939);function a(e){if(function(e){return(0,s.Kn)(e)&&(0,s.Kn)(e.variations)&&"number"==typeof e.ttl&&0{const t=await e();if(t)return i.Z.setItem(m,t),i.Z.setItem(c,String((0,o.qS)())),t;const n=i.Z.getItem(m),r=i.Z.getItem(c);return n&&r&&(0,o.qS)()-parseInt(r,10)<864e5?n:null};async function p(e,t){const n=(0,o.qS)(),{variations:i,ttl:m}=a(await e.fetchExperimentAssignment({anonId:await l(e.getAnonId),experimentName:t})),c=Math.max(r.gY,m),p=Object.entries(i).map((([e,t])=>({experimentName:e,variationName:t,retrievedTimestamp:n,ttl:c}))).map(s.mm);if(p.length>1)throw new Error("Received multiple experiment assignments while trying to fetch exactly one.");if(0===p.length)return r.pl(t,c);const u=p[0];if(u.experimentName!==t)throw new Error("Newly fetched ExperimentAssignment's experiment name does not match request.");if(!r.fh(u))throw new Error("Newly fetched experiment isn't alive.");return u}},181:(e,t,n)=>{n.d(t,{GR:()=>s,I1:()=>a,qS:()=>o,s9:()=>r});const r=1e3;let i=Date.now();function o(){const e=Date.now();return i=isetTimeout((()=>n(new Error(`Promise has timed-out after ${t}ms.`))),t)))])}function a(e){let t=null;return()=>(t||(t=e().finally((()=>{t=null}))),t)}},939:(e,t,n)=>{function r(e){return"object"==typeof e&&null!==e}function i(e){return"string"==typeof e&&""!==e&&/^[a-z0-9_]*$/.test(e)}function o(e){if(!function(e){return r(e)&&i(e.experimentName)&&(i(e.variationName)||null===e.variationName)&&"number"==typeof e.retrievedTimestamp&&"number"==typeof e.ttl&&0!==e.ttl}(e))throw new Error("Invalid ExperimentAssignment");return e}n.d(t,{K9:()=>i,Kn:()=>r,mm:()=>o})},990:(e,t)=>{t.parse=function(e,t){if("string"!=typeof e)throw new TypeError("argument str must be a string");for(var r={},o=t||{},a=e.split(i),m=o.decode||n,c=0;c{var r=n(196),i=Symbol.for("react.element"),o=Symbol.for("react.fragment"),s=Object.prototype.hasOwnProperty,a=r.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,m={key:!0,ref:!0,__self:!0,__source:!0};function c(e,t,n){var r,o={},c=null,l=null;for(r in void 0!==n&&(c=""+n),void 0!==t.key&&(c=""+t.key),void 0!==t.ref&&(l=t.ref),t)s.call(t,r)&&!m.hasOwnProperty(r)&&(o[r]=t[r]);if(e&&e.defaultProps)for(r in t=e.defaultProps)void 0===o[r]&&(o[r]=t[r]);return{$$typeof:i,type:e,key:c,ref:l,props:o,_owner:a.current}}t.Fragment=o,t.jsx=c},275:(e,t,n)=>{e.exports=n(561)},180:(e,t,n)=>{n.d(t,{Iq:()=>o,L7:()=>s});var r=n(990);let i=null;const o=async()=>{let e=0;return i=new Promise((t=>{const n=()=>{const i=r.parse(document.cookie).tk_ai||null;"string"!=typeof i||""===i?99<=e?t(null):(e+=1,setTimeout(n,50)):t(i)};n()})),i},s=async()=>await i},622:(e,t,n)=>{n.d(t,{n:()=>a,u:()=>m});var r=n(989),i=n.n(r),o=n(483);const s=(e=!1)=>async({experimentName:t,anonId:n})=>{if(!n)throw new Error("Tracking is disabled, can't fetch experimentAssignment");const r={experiment_name:t,anon_id:n??void 0,as_connected_user:e},s=(0,o.addQueryArgs)("jetpack/v4/explat/assignments",r);return await i()({path:s})},a=s(!1),m=s(!0)},210:(e,t,n)=>{n.d(t,{H:()=>i});var r=n(79);const i=e=>{const t=e=>{r.b&&console.error("[ExPlat] Unable to send error to server:",e)};try{const{message:n,...i}=e,o={message:n,properties:{...i,context:"explat",explat_client:"jetpack"}};if(r.b)console.error("[ExPlat] ",e.message,e);else{const e=new window.FormData;e.append("error",JSON.stringify(o)),window.fetch("https://public-api.wordpress.com/rest/v1.1/js-error",{method:"POST",body:e}).catch(t)}}catch(e){t(e)}}},79:(e,t,n)=>{n.d(t,{b:()=>r});const r=!1},196:e=>{e.exports=window.React},989:e=>{e.exports=window.wp.apiFetch},483:e=>{e.exports=window.wp.url}},t={};function n(r){var i=t[r];if(void 0!==i)return i.exports;var o=t[r]={exports:{}};return e[r](o,o.exports,n),o.exports}n.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return n.d(t,{a:t}),t},n.d=(e,t)=>{for(var r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),(()=>{var e=n(105),t=n(102),r=n(180),i=n(622),o=n(210),s=n(79);(0,r.Iq)().catch((e=>(0,o.H)({message:e.message})));const a=(0,e.O)({fetchExperimentAssignment:i.n,getAnonId:r.L7,logError:o.H,isDevelopmentMode:s.b}),{loadExperimentAssignment:m,dangerouslyGetExperimentAssignment:c}=a,{useExperiment:l,Experiment:p,ProvideExperimentData:u}=(0,t.Z)(a),d=(0,e.O)({fetchExperimentAssignment:i.u,getAnonId:r.L7,logError:o.H,isDevelopmentMode:s.b}),{loadExperimentAssignment:g,dangerouslyGetExperimentAssignment:f}=d,{useExperiment:x,Experiment:h,ProvideExperimentData:y}=(0,t.Z)(d)})()})(); \ No newline at end of file +(()=>{"use strict";var e={102:(e,t,n)=>{n.d(t,{Z:()=>s});var r=n(501),i=n(196);const o={isEligible:!0};function s(e){const t=(t,n={})=>{const r={...o,...n},[,s]=(0,i.useReducer)((e=>e+1),0),a=(0,i.useRef)(t);if((0,i.useEffect)((()=>{let n=!0;return r.isEligible&&e.loadExperimentAssignment(t).then((()=>{n&&s()})),()=>{n=!1}}),[t,r.isEligible]),t===a.current||a.current.startsWith("explat_test")||e.config.logError({message:"[ExPlat] useExperiment: experimentName should never change between renders!"}),!r.isEligible)return[!1,null];const m=e.dangerouslyGetMaybeLoadedExperimentAssignment(t);return[!m,m]};return{useExperiment:t,Experiment:({defaultExperience:e,treatmentExperience:n,loadingExperience:i,name:o,options:s})=>{const[a,m]=t(o,s);return a?(0,r.jsx)(r.Fragment,{children:i}):m?.variationName?(0,r.jsx)(r.Fragment,{children:n}):(0,r.jsx)(r.Fragment,{children:e})},ProvideExperimentData:({children:e,name:n,options:r})=>{const[i,o]=t(n,r);return e(i,o)}}}},926:(e,t,n)=>{n.d(t,{Hr:()=>l,O8:()=>c});var r=n(765),i=n(784),o=n(667),s=n(181),a=n(939);const m=1e4;Error;function c(e){if("undefined"==typeof window)throw new Error("Running outside of a browser context.");const t={},n=(...t)=>{try{e.logError(...t)}catch(e){}};try{(0,r._U)()}catch(e){n({message:e.message,source:"removeExpiredExperimentAssignments-error"})}return{loadExperimentAssignment:async c=>{try{if(!a.K9(c))throw new Error(`Invalid experimentName: "${c}"`);const n=(0,r.cd)(c);if(n&&i.fh(n))return n;void 0===t[c]&&(t[c]=(t=>s.I1((async()=>{const n=await o.pC(e,t);return(0,r.NV)(n),n})))(c));let l=m;Math.random()>.5&&(l=5e3);const p=await s.GR(t[c](),l);if(!p)throw new Error("Could not fetch ExperimentAssignment");return p}catch(e){n({message:e.message,experimentName:c,source:"loadExperimentAssignment-initialError"})}try{const e=(0,r.cd)(c);if(e)return e;const t=(0,i.pl)(c);return(0,r.NV)(t),t}catch(e){return n({message:e.message,experimentName:c,source:"loadExperimentAssignment-fallbackError"}),(0,i.pl)(c)}},dangerouslyGetExperimentAssignment:t=>{try{if(!a.K9(t))throw new Error(`Invalid experimentName: ${t}`);const i=(0,r.cd)(t);if(!i)throw new Error("Trying to dangerously get an ExperimentAssignment that hasn't loaded.");return e.isDevelopmentMode&&i&&s.qS()-i.retrievedTimestamp<1e3&&n({message:"Warning: Trying to dangerously get an ExperimentAssignment too soon after loading it.",experimentName:t,source:"dangerouslyGetExperimentAssignment"}),i}catch(r){return e.isDevelopmentMode&&n({message:r.message,experimentName:t,source:"dangerouslyGetExperimentAssignment-error"}),(0,i.pl)(t)}},dangerouslyGetMaybeLoadedExperimentAssignment:t=>{try{if(!a.K9(t))throw new Error(`Invalid experimentName: ${t}`);const e=(0,r.cd)(t);return e||null}catch(r){return e.isDevelopmentMode&&n({message:r.message,experimentName:t,source:"dangerouslyGetMaybeLoadedExperimentAssignment-error"}),(0,i.pl)(t)}},config:e}}function l(e){return{loadExperimentAssignment:async t=>(e.logError({message:"Attempting to load ExperimentAssignment in SSR context",experimentName:t}),(0,i.pl)(t)),dangerouslyGetExperimentAssignment:t=>(e.logError({message:"Attempting to dangerously get ExperimentAssignment in SSR context",experimentName:t}),(0,i.pl)(t)),dangerouslyGetMaybeLoadedExperimentAssignment:t=>(e.logError({message:"Attempting to dangerously get ExperimentAssignment in SSR context",experimentName:t}),(0,i.pl)(t)),config:e}}},105:(e,t,n)=>{n.d(t,{O:()=>i});var r=n(926);const i="undefined"==typeof window?r.Hr:r.O8},765:(e,t,n)=>{n.d(t,{NV:()=>m,_U:()=>d,cd:()=>c});var r=n(784),i=n(257),o=n(939);const s="explat-experiment-",a=e=>`${s}-${e}`;function m(e){o.mm(e);const t=c(e.experimentName);if(t&&e.retrievedTimestamp[...Array(e).keys()];function p(e){return e.startsWith(s)}function u(e){return e.slice(s.length+1)}function d(){l(i.Z.length).map((e=>i.Z.key(e))).filter(p).map(u).filter((e=>{try{if(r.fh(c(e)))return!1}catch(e){}return!0})).map(a).map((e=>i.Z.removeItem(e)))}},784:(e,t,n)=>{n.d(t,{fh:()=>i,gY:()=>o,pl:()=>s});var r=n(181);function i(e){return r.qS()({experimentName:e,variationName:null,retrievedTimestamp:r.qS(),ttl:Math.max(o,t),isFallbackExperimentAssignment:!0})},257:(e,t,n)=>{n.d(t,{Z:()=>i});let r={_data:{},setItem:function(e,t){this._data[e]=t},getItem:function(e){return this._data.hasOwnProperty(e)?this._data[e]:null},removeItem:function(e){delete this._data[e]},clear:function(){this._data={}},get length(){return Object.keys(this._data).length},key:function(e){const t=Object.keys(this._data);return e in t?t[e]:null}};try{window.localStorage&&(r=window.localStorage)}catch(e){}const i=r},667:(e,t,n)=>{n.d(t,{pC:()=>p});var r=n(784),i=n(257),o=n(181),s=n(939);function a(e){if(function(e){return(0,s.Kn)(e)&&(0,s.Kn)(e.variations)&&"number"==typeof e.ttl&&0{const t=await e();if(t)return i.Z.setItem(m,t),i.Z.setItem(c,String((0,o.qS)())),t;const n=i.Z.getItem(m),r=i.Z.getItem(c);return n&&r&&(0,o.qS)()-parseInt(r,10)<864e5?n:null};async function p(e,t){const n=(0,o.qS)(),{variations:i,ttl:m}=a(await e.fetchExperimentAssignment({anonId:await l(e.getAnonId),experimentName:t})),c=Math.max(r.gY,m),p=Object.entries(i).map((([e,t])=>({experimentName:e,variationName:t,retrievedTimestamp:n,ttl:c}))).map(s.mm);if(p.length>1)throw new Error("Received multiple experiment assignments while trying to fetch exactly one.");if(0===p.length)return r.pl(t,c);const u=p[0];if(u.experimentName!==t)throw new Error("Newly fetched ExperimentAssignment's experiment name does not match request.");if(!r.fh(u))throw new Error("Newly fetched experiment isn't alive.");return u}},181:(e,t,n)=>{n.d(t,{GR:()=>s,I1:()=>a,qS:()=>o,s9:()=>r});const r=1e3;let i=Date.now();function o(){const e=Date.now();return i=isetTimeout((()=>n(new Error(`Promise has timed-out after ${t}ms.`))),t)))])}function a(e){let t=null;return()=>(t||(t=e().finally((()=>{t=null}))),t)}},939:(e,t,n)=>{function r(e){return"object"==typeof e&&null!==e}function i(e){return"string"==typeof e&&""!==e&&/^[a-z0-9_]*$/.test(e)}function o(e){if(!function(e){return r(e)&&i(e.experimentName)&&(i(e.variationName)||null===e.variationName)&&"number"==typeof e.retrievedTimestamp&&"number"==typeof e.ttl&&0!==e.ttl}(e))throw new Error("Invalid ExperimentAssignment");return e}n.d(t,{K9:()=>i,Kn:()=>r,mm:()=>o})},990:(e,t)=>{t.parse=function(e,t){if("string"!=typeof e)throw new TypeError("argument str must be a string");for(var r={},o=t||{},a=e.split(i),m=o.decode||n,c=0;c{n.d(t,{Iq:()=>o,L7:()=>s});var r=n(990);let i=null;const o=async()=>{let e=0;return i=new Promise((t=>{const n=()=>{const i=r.parse(document.cookie).tk_ai||null;"string"!=typeof i||""===i?99<=e?t(null):(e+=1,setTimeout(n,50)):t(i)};n()})),i},s=async()=>await i},622:(e,t,n)=>{n.d(t,{n:()=>a,u:()=>m});var r=n(989),i=n.n(r),o=n(483);const s=(e=!1)=>async({experimentName:t,anonId:n})=>{if(!n)throw new Error("Tracking is disabled, can't fetch experimentAssignment");const r={experiment_name:t,anon_id:n??void 0,as_connected_user:e},s=(0,o.addQueryArgs)("jetpack/v4/explat/assignments",r);return await i()({path:s})},a=s(!1),m=s(!0)},210:(e,t,n)=>{n.d(t,{H:()=>i});var r=n(79);const i=e=>{const t=e=>{r.b&&console.error("[ExPlat] Unable to send error to server:",e)};try{const{message:n,...i}=e,o={message:n,properties:{...i,context:"explat",explat_client:"jetpack"}};if(r.b)console.error("[ExPlat] ",e.message,e);else{const e=new window.FormData;e.append("error",JSON.stringify(o)),window.fetch("https://public-api.wordpress.com/rest/v1.1/js-error",{method:"POST",body:e}).catch(t)}}catch(e){t(e)}}},79:(e,t,n)=>{n.d(t,{b:()=>r});const r=!1},196:e=>{e.exports=window.React},501:e=>{e.exports=window.ReactJSXRuntime},989:e=>{e.exports=window.wp.apiFetch},483:e=>{e.exports=window.wp.url}},t={};function n(r){var i=t[r];if(void 0!==i)return i.exports;var o=t[r]={exports:{}};return e[r](o,o.exports,n),o.exports}n.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return n.d(t,{a:t}),t},n.d=(e,t)=>{for(var r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),(()=>{var e=n(105),t=n(102),r=n(180),i=n(622),o=n(210),s=n(79);(0,r.Iq)().catch((e=>(0,o.H)({message:e.message})));const a=(0,e.O)({fetchExperimentAssignment:i.n,getAnonId:r.L7,logError:o.H,isDevelopmentMode:s.b}),{loadExperimentAssignment:m,dangerouslyGetExperimentAssignment:c}=a,{useExperiment:l,Experiment:p,ProvideExperimentData:u}=(0,t.Z)(a),d=(0,e.O)({fetchExperimentAssignment:i.u,getAnonId:r.L7,logError:o.H,isDevelopmentMode:s.b}),{loadExperimentAssignment:g,dangerouslyGetExperimentAssignment:f}=d,{useExperiment:x,Experiment:h,ProvideExperimentData:w}=(0,t.Z)(d)})()})(); \ No newline at end of file diff --git a/build/index.js.LICENSE.txt b/build/index.js.LICENSE.txt index f0986d1..8d392d0 100644 --- a/build/index.js.LICENSE.txt +++ b/build/index.js.LICENSE.txt @@ -4,13 +4,3 @@ * Copyright(c) 2015 Douglas Christopher Wilson * MIT Licensed */ - -/** - * @license React - * react-jsx-runtime.production.min.js - * - * Copyright (c) Facebook, Inc. and its affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ diff --git a/composer.json b/composer.json index 3cecd1c..e18885b 100644 --- a/composer.json +++ b/composer.json @@ -5,7 +5,7 @@ "license": "GPL-2.0-or-later", "require": { "php": ">=7.0", - "automattic/jetpack-connection": "^2.12.0" + "automattic/jetpack-connection": "^2.12.1-alpha" }, "require-dev": { "yoast/phpunit-polyfills": "1.1.0", diff --git a/package.json b/package.json index 8317266..d26c839 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "private": true, "name": "@automattic/jetpack-explat", - "version": "0.1.1", + "version": "0.1.2-alpha", "description": "A package for running A/B tests on the Experimentation Platform (ExPlat) in the plugin.", "homepage": "https://github.com/Automattic/jetpack/tree/HEAD/projects/packages/explat/#readme", "bugs": { @@ -41,8 +41,8 @@ "dependencies": { "@automattic/explat-client": "0.1.0", "@automattic/explat-client-react-helpers": "0.1.1", - "@wordpress/api-fetch": "7.2.0", - "@wordpress/url": "4.2.0", + "@wordpress/api-fetch": "7.5.0", + "@wordpress/url": "4.5.0", "cookie": "0.4.1", "qs": "6.12.1" } diff --git a/src/class-explat.php b/src/class-explat.php index 5c6db2b..11acdf1 100644 --- a/src/class-explat.php +++ b/src/class-explat.php @@ -20,7 +20,7 @@ class ExPlat { * * @var string */ - const PACKAGE_VERSION = '0.1.1'; + const PACKAGE_VERSION = '0.1.2-alpha'; /** * Initializer.