@guardian/ab-core
Advanced tools
Comparing version 7.0.3 to 8.0.0
@@ -7,3 +7,3 @@ import { ABTestAPI, AbTestConfig, ABTest, Runnable, Variant } from './@types/index.js'; | ||
constructor({ abTestSwitches, arrayOfTestObjects, errorReporter, forcedTestException, forcedTestVariants, mvtId, mvtMaxValue, ophanRecord, pageIsSensitive, serverSideTests, }: AbTestConfig); | ||
get allRunnableTests(): (tests: readonly ABTest[]) => readonly Runnable<ABTest>[] | []; | ||
get allRunnableTests(): (tests: readonly ABTest[]) => ReadonlyArray<Runnable<ABTest>> | []; | ||
get firstRunnableTest(): (tests: readonly ABTest[]) => Runnable<ABTest> | null; | ||
@@ -13,8 +13,8 @@ get runnableTest(): (test: ABTest) => Runnable<ABTest & { | ||
}> | null; | ||
get isUserInVariant(): (testId: string, variantId?: string | undefined) => boolean; | ||
get registerCompleteEvents(): (tests: readonly Runnable<ABTest>[]) => void; | ||
get registerImpressionEvents(): (tests: readonly Runnable<ABTest>[]) => void; | ||
get trackABTests(): (tests: readonly Runnable<ABTest>[]) => void; | ||
get isUserInVariant(): (testId: ABTest["id"], variantId?: Variant["id"]) => boolean; | ||
get registerCompleteEvents(): (tests: ReadonlyArray<Runnable<ABTest>>) => void; | ||
get registerImpressionEvents(): (tests: ReadonlyArray<Runnable<ABTest>>) => void; | ||
get trackABTests(): (tests: ReadonlyArray<Runnable<ABTest>>) => void; | ||
} | ||
export { AB }; |
@@ -6,6 +6,3 @@ import { initCore } from './core.js'; | ||
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value; | ||
var __publicField = (obj, key, value) => { | ||
__defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value); | ||
return value; | ||
}; | ||
var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value); | ||
class AB { | ||
@@ -12,0 +9,0 @@ constructor({ |
141
package.json
{ | ||
"name": "@guardian/ab-core", | ||
"version": "7.0.3", | ||
"version": "8.0.0", | ||
"private": false, | ||
@@ -20,9 +20,14 @@ "description": "A client-side library for A/B & multivariate testing", | ||
"devDependencies": { | ||
"rollup": "4.17.2", | ||
"@types/jest": "29.5.8", | ||
"jest": "29.7.0", | ||
"jest-environment-jsdom": "29.7.0", | ||
"rollup": "4.18.0", | ||
"ts-jest": "29.1.1", | ||
"tslib": "2.6.2", | ||
"typescript": "5.3.3" | ||
"typescript": "5.5.2", | ||
"wireit": "0.14.4" | ||
}, | ||
"peerDependencies": { | ||
"tslib": "^2.6.2", | ||
"typescript": "~5.3.3" | ||
"typescript": "~5.5.2" | ||
}, | ||
@@ -37,57 +42,85 @@ "peerDependenciesMeta": { | ||
}, | ||
"nx": { | ||
"targets": { | ||
"build": { | ||
"inputs": [ | ||
"{projectRoot}/src/**", | ||
"{projectRoot}/package.json", | ||
"{projectRoot}/tsconfig.json" | ||
], | ||
"outputs": [ | ||
"{projectRoot}/dist" | ||
] | ||
}, | ||
"lint": { | ||
"inputs": [ | ||
"{projectRoot}/**", | ||
"{workspaceRoot}/.eslint*" | ||
] | ||
}, | ||
"fix": { | ||
"inputs": [ | ||
"{projectRoot}/**", | ||
"{workspaceRoot}/.eslint*" | ||
], | ||
"outputs": [ | ||
"{projectRoot}" | ||
] | ||
}, | ||
"test": { | ||
"inputs": [ | ||
"{projectRoot}/**", | ||
"{workspaceRoot}/jest.*" | ||
] | ||
}, | ||
"verify-dist": { | ||
"inputs": [ | ||
"{projectRoot}/**", | ||
"{workspaceRoot}/jest.*" | ||
] | ||
}, | ||
"dev": { | ||
"inputs": [ | ||
"{projectRoot}/**", | ||
"{workspaceRoot}/jest.*" | ||
] | ||
} | ||
"wireit": { | ||
"build": { | ||
"command": "rollup -c", | ||
"files": [ | ||
"src/**", | ||
"package.json", | ||
"tsconfig.json", | ||
"rollup.config.js", | ||
"../../../configs/rollup/rollup.config.js" | ||
], | ||
"output": [ | ||
"dist" | ||
] | ||
}, | ||
"fix": { | ||
"command": "eslint --cache --color . --fix", | ||
"files": [ | ||
"**", | ||
"../../../.eslint*", | ||
"!(dist)/**", | ||
"!.eslintcache" | ||
], | ||
"clean": false, | ||
"output": [ | ||
"." | ||
] | ||
}, | ||
"lint": { | ||
"command": "eslint --cache --color .", | ||
"files": [ | ||
"**", | ||
"../../../.eslint*", | ||
"!(dist)/**", | ||
"!.eslintcache" | ||
], | ||
"output": [] | ||
}, | ||
"test": { | ||
"command": "jest", | ||
"files": [ | ||
"**", | ||
"../../../configs/jest.*", | ||
"!(dist)/**", | ||
"!.eslintcache" | ||
], | ||
"output": [] | ||
}, | ||
"tsc": { | ||
"command": "tsc --pretty", | ||
"files": [ | ||
"**", | ||
"tsconfig.json", | ||
"../tsconfig/tsconfig.json", | ||
"../../../@types/**", | ||
"../../../tsconfig.base.json", | ||
"!(dist)/**", | ||
"!.eslintcache" | ||
], | ||
"output": [] | ||
}, | ||
"verify-dist": { | ||
"command": "jest --setupFilesAfterEnv ./jest.dist.setup.js", | ||
"dependencies": [ | ||
"build" | ||
], | ||
"files": [ | ||
"**", | ||
"../../../configs/jest.*", | ||
"!(dist)/**", | ||
"!.eslintcache" | ||
], | ||
"output": [] | ||
} | ||
}, | ||
"scripts": { | ||
"build": "rm -rf dist && rollup -c", | ||
"build": "wireit", | ||
"dev": "jest --watch", | ||
"fix": "pnpm lint --fix", | ||
"lint": "eslint --cache .", | ||
"test": "jest", | ||
"verify-dist": "jest --setupFilesAfterEnv ./jest.dist.setup.js" | ||
"fix": "wireit", | ||
"lint": "wireit", | ||
"test": "wireit", | ||
"tsc": "wireit", | ||
"verify-dist": "wireit" | ||
} | ||
} |
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
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
43788
0
8
519