@ninetailed/experience.js-shared
Advanced tools
Comparing version 7.4.3 to 7.5.0-beta.0
10
index.js
@@ -75,3 +75,2 @@ import { z } from 'zod'; | ||
const CreateProfileRequestBody = z.object({ | ||
// TODO | ||
events: z.array(z.unknown()).min(1), | ||
@@ -86,3 +85,2 @@ options: RequestBodyOptions.optional() | ||
const UpdateProfileRequestBody = z.object({ | ||
// TODO | ||
events: z.array(z.unknown()).min(1), | ||
@@ -97,3 +95,2 @@ options: RequestBodyOptions.optional() | ||
const UpsertManyProfilesRequestBody = z.object({ | ||
// TODO | ||
events: z.array(z.unknown()).min(1), | ||
@@ -427,3 +424,3 @@ options: RequestBodyOptions.optional() | ||
* Every events needs to have a anonymous ID. | ||
* Profiles will get created or updated according to the set anonymus ID. | ||
* Profiles will get created or updated according to the set anonymous ID. | ||
* | ||
@@ -478,3 +475,2 @@ * This method is intended to be used from server environments. | ||
} | ||
// default to plaintext if plaintext option is not defined | ||
if ((_a = options.plainText) !== null && _a !== void 0 ? _a : true) { | ||
@@ -614,3 +610,3 @@ headers.set('Content-Type', 'text/plain'); | ||
name: 'Ninetailed React Analytics SDK', | ||
version: "7.4.3" | ||
version: "7.5.0-beta.0" | ||
}, | ||
@@ -737,3 +733,2 @@ userAgent: ctx.userAgent, | ||
const experimentTraitsIds = Object.keys(experimentTraits).map(id => id.replace(EXPERIENCE_TRAIT_PREFIX, '')); | ||
// a experiment is active when the use has it set as a true value on the traits and the experiment config is still active | ||
const activeExperiments = experiments.filter(experiment => experimentTraitsIds.includes(experiment.id)); | ||
@@ -761,3 +756,2 @@ return activeExperiments; | ||
if (!distribution) { | ||
// This should never happen. If it happens then the distribution is not configured correctly. So we just return the baseline. | ||
return { | ||
@@ -764,0 +758,0 @@ index: 0, |
{ | ||
"name": "@ninetailed/experience.js-shared", | ||
"version": "7.4.3", | ||
"version": "7.5.0-beta.0", | ||
"devDependencies": { | ||
"@ninetailed/testing-utils": "*" | ||
}, | ||
"license": "BSL-1.1", | ||
"module": "./index.js", | ||
"main": "./index.cjs", | ||
"type": "module", | ||
"types": "./index.d.ts", | ||
"types": "./src/index.d.ts", | ||
"dependencies": { | ||
"async-retry": "1.3.3", | ||
"diary": "0.4.4", | ||
"async-retry": "1.3.3", | ||
"ts-toolbelt": "9.6.0", | ||
"zod": "3.21.4", | ||
"locale-enum": "1.1.1", | ||
"i18n-iso-countries": "7.5.0", | ||
"murmurhash-js": "1.0.0", | ||
"radash": "10.9.0" | ||
"radash": "10.9.0", | ||
"ts-toolbelt": "9.6.0", | ||
"zod": "3.21.4" | ||
}, | ||
"peerDependencies": {} | ||
} |
@@ -1,11 +0,32 @@ | ||
# shared | ||
# @ninetailed/experience.js-shared | ||
This library was generated with [Nx](https://nx.dev). | ||
<!--Insert badges begin--> | ||
<!--GENERATED TEXT - DO NOT EDIT HERE --> | ||
<p align="center"> | ||
<a href="https://www.npmjs.com/package/@ninetailed/experience.js-shared"><img src="https://img.shields.io/npm/v/@ninetailed/experience.js-shared.svg" alt="NPM Version" /></a> | ||
<a href="https://www.npmjs.com/package/@ninetailed/experience.js-shared"><img src="https://img.shields.io/npm/l/@ninetailed/experience.js-shared.svg" alt="Package License" /></a> | ||
<a href="https://www.npmjs.com/package/@ninetailed/experience.js-shared"><img src="https://img.shields.io/npm/dm/@ninetailed/experience.js-shared.svg" alt="NPM Downloads" /></a> | ||
<a href="https://docs.ninetailed.io/" target="_blank"><img src="https://img.shields.io/badge/%F0%9F%93%96-Documentation-green.svg" alt="Documentation"/></a> | ||
<a href="ninetailed-community.slack.com" target="_blank"><img src="https://img.shields.io/badge/Slack-Ninetailed%20Community-blue.svg" alt="Join the official Slack community"/> | ||
</p> | ||
<!--Insert badges end--> | ||
<!--Insert template begin--> | ||
<!--GENERATED TEXT - DO NOT EDIT HERE --> | ||
## About Ninetailed | ||
Our extensible [Experience SDKs](https://docs.ninetailed.io/#getting-started-for-developers) help you integrate Ninetailed Experiences into your JavaScript / TypeScript applications. With support for ESR and SSR, out-of-the-box utilities, and plugins, you have all the tools you need to get started. | ||
Using a framework we don't currently support? No problem! Our [Experience API](https://docs.ninetailed.io/for-developers/experience-api) enables you to use Ninetailed Experiences virtually anywhere. | ||
<!--Insert template end--> | ||
## Building | ||
Run `nx build shared` to build the library. | ||
Run `nx build sdks-shared` to build the library. | ||
## Running unit tests | ||
Run `nx test shared` to execute the unit tests via [Jest](https://jestjs.io). | ||
Run `nx test sdks-shared` to execute the unit tests via [Jest](https://jestjs.io). |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
Misc. License Issues
License(Experimental) A package's licensing information has fine-grained problems.
Found 1 instance in 1 package
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
No License Found
License(Experimental) License information could not be found.
Found 1 instance in 1 package
157208
7
0
4135
33
1
2
5
- Removedlocale-enum@1.1.1
- Removedlocale-enum@1.1.1(transitive)