
Security News
Insecure Agents Podcast: Certified Patches, Supply Chain Security, and AI Agents
Socket CEO Feross Aboukhadijeh joins Insecure Agents to discuss CVE remediation and why supply chain attacks require a different security approach.
@automattic/explat-client
Advanced tools
⚠️ You probably shouldn't be using this package directly.
Search for createExPlatClient within your codebase to find your platform's implementation.
This is a standalone client for Automattic's ExPlat, allowing use of ExPlat in any Javascript context.
const exPlatClient = createExPlatClient(config)
ExperimentAssignmentExperimentAssignment represents an experiment assignment, as an experimenter you just need to look at ExperimentAssignment.variationName.
variationName === null: This means you should return the default experience.variationName !== null: This means you should return the treatment experience. Currently variationName will always be treatment, but this may change.This type will likely be extended, it can also be missing in some API functions, particularly in the React side of things. A missing experiment assignment does not mean the default experience, it means we do not have an assignment yet and if we can afford to wait we should, generally displaying a loading experience.
exPlatClient.loadExperimentAssignmentloadExperimentAssignment: (experimentName: string) => Promise<ExperimentAssignment>
const experimentAssignment = await loadExperimentAssignment('experiment_name')
exPlatClient.dangerouslyGetExperimentAssignmentdangerouslyGetExperimentAssignment: ( experimentName: string ) => ExperimentAssignment
// An experiment MUST be loaded beforehand:
loadExperimentAssignment( 'experiment_name' );
// Then, significantly enough in the future for the loading to have occurred:
const experimentAssignment = dangerouslyGetExperimentAssignment( 'experiment_name' );
This is an "asyncronous escape hatch", allowing you to use ExPlat in more synchronous code such as within /lib.
Checklist for use:
loadExperimentAssignment get called before dangerouslyGetExperimentAssignment gets called.loadExperimentAssignment get called significantly before it (minimum 2 seconds looking at perf data, 5-10 seconds is best).dangerouslyGetExperimentAssignment wrapped in a try-catch blockconsole.log errors being emitted?FAQs
Standalone ExPlat Client.
We found that @automattic/explat-client demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 49 open source maintainers collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
Socket CEO Feross Aboukhadijeh joins Insecure Agents to discuss CVE remediation and why supply chain attacks require a different security approach.

Security News
Tailwind Labs laid off 75% of its engineering team after revenue dropped 80%, as LLMs redirect traffic away from documentation where developers discover paid products.

Security News
The planned feature introduces a review step before releases go live, following the Shai-Hulud attacks and a rocky migration off classic tokens that disrupted maintainer workflows.