From ab25dd2ab4ee7ed46a48dcb9669dc0632da5df80 Mon Sep 17 00:00:00 2001 From: auto200 <49625375+auto200@users.noreply.github.com> Date: Wed, 31 Jan 2024 15:18:29 +0100 Subject: [PATCH 1/3] fix: enable eslint and follow it's errors --- .eslintrc | 34 ------------------- .eslintrc.cjs | 16 +++++++++ example/src/main.tsx | 2 +- package.json | 13 ++----- src/core/index.ts | 4 +-- src/{index.tsx => index.ts} | 0 src/interfaces/piwikpro.window.ts | 8 +++-- src/interfaces/tracker.ts | 11 ++++++ src/interfaces/utils.ts | 10 ++++++ src/interfaces/visitorInfo.ts | 9 +++++ .../contentTracking.service.ts | 8 ++--- .../cookieManagement.service.ts | 3 +- .../customDimensions.service.ts | 5 +-- .../custom-events/customEvents.service.ts | 6 ++-- src/services/dataLayer/dataLayer.service.ts | 13 ++++--- .../download-and-outlink.service.ts | 10 +++--- src/services/e-commerce/e-commerce.service.ts | 3 +- .../goal-conversions.service.ts | 4 ++- src/services/paqService/paq.service.ts | 21 +++++++----- .../site-search/site-search.service.ts | 3 +- .../user-management/userManagement.service.ts | 13 ++++--- src/styles.module.css | 9 ----- src/typings.d.ts | 18 ++-------- 23 files changed, 113 insertions(+), 110 deletions(-) delete mode 100644 .eslintrc create mode 100644 .eslintrc.cjs rename src/{index.tsx => index.ts} (100%) create mode 100644 src/interfaces/tracker.ts create mode 100644 src/interfaces/visitorInfo.ts delete mode 100644 src/styles.module.css diff --git a/.eslintrc b/.eslintrc deleted file mode 100644 index 4c6c567..0000000 --- a/.eslintrc +++ /dev/null @@ -1,34 +0,0 @@ -{ - "parser": "@typescript-eslint/parser", - "extends": [ - "standard", - "standard-react", - "plugin:prettier/recommended", - "prettier/standard", - "prettier/react", - "plugin:@typescript-eslint/eslint-recommended" - ], - "env": { - "node": true - }, - "parserOptions": { - "ecmaVersion": 2020, - "ecmaFeatures": { - "legacyDecorators": true, - "jsx": true - } - }, - "settings": { - "react": { - "version": "16" - } - }, - "rules": { - "space-before-function-paren": 0, - "react/prop-types": 0, - "react/jsx-handler-names": 0, - "react/jsx-fragments": 0, - "react/no-unused-prop-types": 0, - "import/export": 0 - } -} diff --git a/.eslintrc.cjs b/.eslintrc.cjs new file mode 100644 index 0000000..4ecbb98 --- /dev/null +++ b/.eslintrc.cjs @@ -0,0 +1,16 @@ +/** @type {import('eslint').Linter.Config} */ +const config = { + parser: '@typescript-eslint/parser', + extends: [ + 'eslint:recommended', + 'plugin:@typescript-eslint/recommended-type-checked', + ], + plugins: ['@typescript-eslint'], + ignorePatterns:[".eslintrc.cjs", "example"], + parserOptions: { + project:true, + tsconfigRootDir: __dirname, + }, +} + +module.exports = config diff --git a/example/src/main.tsx b/example/src/main.tsx index f7892fa..416264b 100644 --- a/example/src/main.tsx +++ b/example/src/main.tsx @@ -7,7 +7,7 @@ import { SnackbarProvider } from 'notistack' import PiwikPro from '@piwikpro/react-piwik-pro' PiwikPro.initialize( - '0c0a8661-8c10-4f59-b8fc-1c926cbac184', + '957285ba-7867-4c6b-a8be-5e3e6c069b71', 'https://astralprojection.promilci.com' ) diff --git a/package.json b/package.json index cf737ea..841c69b 100644 --- a/package.json +++ b/package.json @@ -21,7 +21,9 @@ "test:unit": "cross-env CI=1 react-scripts test --env=jsdom", "test:watch": "react-scripts test --env=jsdom", "predeploy": "cd example && yarn install && yarn run build", - "deploy": "gh-pages -d example/build" + "deploy": "gh-pages -d example/build", + "format":"prettier src/**/*.ts --list-different", + "format:fix":"npm run format --write" }, "peerDependencies": { "react": "^16.8.0 || ^17.0.0 || ^18.0.0", @@ -41,15 +43,6 @@ "babel-eslint": "^10.1.0", "cross-env": "^7.0.3", "eslint": "^8.56.0", - "eslint-config-prettier": "^9.1.0", - "eslint-config-standard": "^17.1.0", - "eslint-config-standard-react": "^13.0.0", - "eslint-plugin-import": "^2.29.1", - "eslint-plugin-node": "^11.1.0", - "eslint-plugin-prettier": "^5.1.2", - "eslint-plugin-promise": "^6.1.1", - "eslint-plugin-react": "^7.33.2", - "eslint-plugin-standard": "^5.0.0", "gh-pages": "^6.1.1", "microbundle-crl": "^0.13.11", "npm-run-all": "^4.1.5", diff --git a/src/core/index.ts b/src/core/index.ts index a609325..c603bce 100644 --- a/src/core/index.ts +++ b/src/core/index.ts @@ -1,5 +1,3 @@ -import { PiwikProWindow } from '../interfaces/piwikpro.window' - function init(containerId: string, containerUrl: string, nonce?: string) { if (!containerId) { console.error('Empty tracking code for Piwik Pro.') @@ -37,7 +35,7 @@ tags.async=!0,tags.src="${containerUrl}/"+id+".js"+qPString,scripts.parentNode.i export const IS_DEBUG = (typeof process !== 'undefined' && process.env.NODE_ENV === 'development') || - (typeof window !== 'undefined' && (window as PiwikProWindow).IS_DEBUG) || + (typeof window !== 'undefined' && window.IS_DEBUG) || false export default { diff --git a/src/index.tsx b/src/index.ts similarity index 100% rename from src/index.tsx rename to src/index.ts diff --git a/src/interfaces/piwikpro.window.ts b/src/interfaces/piwikpro.window.ts index f8a513a..30253b4 100644 --- a/src/interfaces/piwikpro.window.ts +++ b/src/interfaces/piwikpro.window.ts @@ -1,5 +1,7 @@ -export interface PiwikProWindow extends Window { - _paq?: any; - dataLayer?: any; +import { AnyData, QueueItem } from './utils'; + +export interface PiwikProWindow { + _paq?: QueueItem[]; + dataLayer?: AnyData[]; IS_DEBUG?: boolean; } diff --git a/src/interfaces/tracker.ts b/src/interfaces/tracker.ts new file mode 100644 index 0000000..761a89c --- /dev/null +++ b/src/interfaces/tracker.ts @@ -0,0 +1,11 @@ +import { VisitorInfo } from "./visitorInfo"; + +export type Tracker = { + hasCookies: () => boolean; + getCustomDimensionValue: (id: string | number) => string | undefined; + getLinkTrackingTimer: () => number; + getEcommerceItems: () => object; + getUserId: () => string; + getVisitorId: () => string; + getVisitorInfo:()=> VisitorInfo +}; diff --git a/src/interfaces/utils.ts b/src/interfaces/utils.ts index f2f38e4..3ecdbb4 100644 --- a/src/interfaces/utils.ts +++ b/src/interfaces/utils.ts @@ -1 +1,11 @@ +import { TRACK_EVENT } from "../constants/track-event.constant"; +import { Tracker } from "./tracker"; + export type LimitedArrayFiveStrings = [string, ...T] | [string, string, string, string, string]; + +// eslint-disable-next-line @typescript-eslint/no-explicit-any +export type AnyData = any + +export type Dimensions = Record<`dimension${number}`,string> + +export type QueueItem =[TRACK_EVENT, ...unknown[]] | [(this: Tracker) => void] \ No newline at end of file diff --git a/src/interfaces/visitorInfo.ts b/src/interfaces/visitorInfo.ts new file mode 100644 index 0000000..4ce294b --- /dev/null +++ b/src/interfaces/visitorInfo.ts @@ -0,0 +1,9 @@ +export type VisitorInfo = [ + isNew: '0' | '1', + visitorId: string, + firstVisitTS: number, + previousVisitCount: string | number, + currentVisitTS: number, + lastVisitTS: number | '', + lastEcommerceOrderTS: number | '' + ] \ No newline at end of file diff --git a/src/services/content-tracking/contentTracking.service.ts b/src/services/content-tracking/contentTracking.service.ts index 5ba96bd..502c1e4 100644 --- a/src/services/content-tracking/contentTracking.service.ts +++ b/src/services/content-tracking/contentTracking.service.ts @@ -7,15 +7,15 @@ export function trackAllContentImpressions() { ]); } -export function trackVisibleContentImpressions(checkOnScroll?: boolean, watchIterval?: number) { +export function trackVisibleContentImpressions(checkOnScroll?: boolean, watchInterval?: number) { PaqService.push([ TRACK_EVENT.VISIBLE_CONTENT_IMPRESSIONS, checkOnScroll, - watchIterval, + watchInterval, ]); } -export function trackContentImpressionsWithinNode(domNode: any) { +export function trackContentImpressionsWithinNode(domNode: Node) { PaqService.push([ TRACK_EVENT.CONTENT_IMPRESSIONS_WITH_NODE, domNode @@ -35,7 +35,7 @@ export function logAllContentBlocksOnPage(): void { PaqService.push([ TRACK_EVENT.LOG_ALL_CONTENT_BLOCKS_ON_PAGE ]); } -export function trackContentInteractionNode(domNode: any, contentInteraction: string) { +export function trackContentInteractionNode(domNode: Node, contentInteraction: string) { PaqService.push([ TRACK_EVENT.CONTENT_INTERACTION_NODE, domNode, diff --git a/src/services/cookie-management/cookieManagement.service.ts b/src/services/cookie-management/cookieManagement.service.ts index 275faed..992b765 100644 --- a/src/services/cookie-management/cookieManagement.service.ts +++ b/src/services/cookie-management/cookieManagement.service.ts @@ -1,4 +1,5 @@ import { TRACK_EVENT } from '../../constants/track-event.constant'; +import { Tracker } from '../../interfaces/tracker'; import { PaqService } from '../paqService/paq.service'; export function disableCookies() { @@ -20,7 +21,7 @@ export function hasCookies(): Promise { return new Promise((resolve, reject) => { try { PaqService.push([ - function (this: any) { + function (this: Tracker) { resolve(this.hasCookies()); }, ]); diff --git a/src/services/custom-dimensions/customDimensions.service.ts b/src/services/custom-dimensions/customDimensions.service.ts index bdc4fbf..fd7dd8c 100644 --- a/src/services/custom-dimensions/customDimensions.service.ts +++ b/src/services/custom-dimensions/customDimensions.service.ts @@ -1,4 +1,5 @@ import { TRACK_EVENT } from '../../constants/track-event.constant'; +import { Tracker } from '../../interfaces/tracker'; import { PaqService } from '../paqService/paq.service'; export function setCustomDimensionValue(customDimensionId: string | number, customDimensionValue: string) { @@ -9,11 +10,11 @@ export function deleteCustomDimension(customDimensionId: string) { PaqService.push([TRACK_EVENT.DELETE_CUSTOM_DIMENSION, customDimensionId]); } -export function getCustomDimensionValue(customDimensionId: string | number): Promise { +export function getCustomDimensionValue(customDimensionId: string | number): Promise { return new Promise((resolve, reject) => { try { PaqService.push([ - function (this: any): void { + function (this: Tracker): void { resolve(this.getCustomDimensionValue(customDimensionId)); }, ]); diff --git a/src/services/custom-events/customEvents.service.ts b/src/services/custom-events/customEvents.service.ts index 72d9057..1b69942 100644 --- a/src/services/custom-events/customEvents.service.ts +++ b/src/services/custom-events/customEvents.service.ts @@ -1,12 +1,14 @@ import { TRACK_EVENT } from '../../constants/track-event.constant'; +import { Dimensions } from '../../interfaces/utils'; import { PaqService } from '../paqService/paq.service'; -export function trackEvent(category: string, action: string, name?: string, value?: number) { - const eventArguments: any[] = [ +export function trackEvent(category: string, action: string, name?: string, value?: number, dimensions?:Dimensions) { + const eventArguments = [ category, action, ...(name ? [name] : []), ...(name ? [value] : []), + ...(dimensions ? [dimensions] : []), ]; PaqService.push([TRACK_EVENT.CUSTOM_EVENT, ...eventArguments]) } diff --git a/src/services/dataLayer/dataLayer.service.ts b/src/services/dataLayer/dataLayer.service.ts index a124d99..c75c284 100644 --- a/src/services/dataLayer/dataLayer.service.ts +++ b/src/services/dataLayer/dataLayer.service.ts @@ -1,11 +1,14 @@ -import { PiwikProWindow } from '../../interfaces/piwikpro.window'; import { IS_DEBUG } from '../../core'; +import { AnyData } from '../../interfaces/utils'; -export function push(data: any) { - if (!(window as PiwikProWindow).dataLayer) { - (window as PiwikProWindow).dataLayer = []; + +export function push( + data: AnyData +) { + if (!window.dataLayer) { + window.dataLayer = []; } IS_DEBUG && console.log('DataLayer push', data); - return (window as PiwikProWindow).dataLayer.push(data); + return window.dataLayer.push(data); } diff --git a/src/services/download-and-outlink/download-and-outlink.service.ts b/src/services/download-and-outlink/download-and-outlink.service.ts index 7161afa..a38d45d 100644 --- a/src/services/download-and-outlink/download-and-outlink.service.ts +++ b/src/services/download-and-outlink/download-and-outlink.service.ts @@ -1,12 +1,14 @@ import { TRACK_EVENT } from '../../constants/track-event.constant'; +import { Tracker } from '../../interfaces/tracker'; +import { Dimensions } from '../../interfaces/utils'; import { PaqService } from '../paqService/paq.service'; -export function trackLink(url: string, linkType: string, customData?: object, callback?: (params: any) => void) { +export function trackLink(url: string, linkType: string, dimensions?: Dimensions, callback?: () => void) { PaqService.push([ TRACK_EVENT.LINK, url, linkType, - customData, + dimensions, callback ]); } @@ -39,11 +41,11 @@ export function setLinkTrackingTimer(time: number) { PaqService.push([TRACK_EVENT.SET_LINK_TRACKING_TIMER, time]); } -export function getLinkTrackingTimer(): Promise { +export function getLinkTrackingTimer(): Promise { return new Promise((resolve, reject) => { try { PaqService.push([ - function (this: any) { + function (this: Tracker) { resolve(this.getLinkTrackingTimer()); }, ]); diff --git a/src/services/e-commerce/e-commerce.service.ts b/src/services/e-commerce/e-commerce.service.ts index 5d64bdc..64d3d79 100644 --- a/src/services/e-commerce/e-commerce.service.ts +++ b/src/services/e-commerce/e-commerce.service.ts @@ -2,6 +2,7 @@ import { TRACK_EVENT } from '../../constants/track-event.constant' import { PaqService } from '../paqService/paq.service' import { Product } from '../../interfaces/product' import { PaymentInformation } from '../../interfaces/payment' +import { Tracker } from '../../interfaces/tracker' /** * @deprecated since version 1.3.1. Please use the ecommerceAddToCart instead. @@ -44,7 +45,7 @@ export function getEcommerceItems(): Promise { return new Promise((resolve, reject) => { try { PaqService.push([ - function (this: any): void { + function (this: Tracker): void { resolve(this.getEcommerceItems()) } ]) diff --git a/src/services/goal-conversions/goal-conversions.service.ts b/src/services/goal-conversions/goal-conversions.service.ts index bb00e60..0a28355 100644 --- a/src/services/goal-conversions/goal-conversions.service.ts +++ b/src/services/goal-conversions/goal-conversions.service.ts @@ -1,7 +1,9 @@ import { TRACK_EVENT } from '../../constants/track-event.constant'; +import { Dimensions } from '../../interfaces/utils'; import { PaqService } from '../paqService/paq.service'; -export function trackGoal(goalId: number | string, conversionValue: number, dimensions?: Object) { + +export function trackGoal(goalId: number | string, conversionValue: number, dimensions?: Dimensions) { PaqService.push([ TRACK_EVENT.GOAL, goalId, diff --git a/src/services/paqService/paq.service.ts b/src/services/paqService/paq.service.ts index 029d9d2..8bd1836 100644 --- a/src/services/paqService/paq.service.ts +++ b/src/services/paqService/paq.service.ts @@ -1,17 +1,20 @@ -import { PiwikProWindow } from '../../interfaces/piwikpro.window'; +import { TRACK_EVENT } from '../../constants/track-event.constant'; import { IS_DEBUG } from '../../core'; +import { QueueItem } from '../../interfaces/utils'; -function push(collection: any[]) { - if (!(window as PiwikProWindow)._paq) { - (window as PiwikProWindow)._paq = []; + + +function push(collection: QueueItem) { + if (!window._paq) { + window._paq = []; } - (window as PiwikProWindow)._paq.push(["setCustomUrl", window.location.href]); - (window as PiwikProWindow)._paq.push(["setDocumentTitle", document.title]); + window._paq.push([TRACK_EVENT.SET_CUSTOM_URL, window.location.href]); + window._paq.push([TRACK_EVENT.SET_DOCUMENT_TITLE, document.title]); IS_DEBUG && console.log('Push', collection); - return (window as PiwikProWindow)._paq.push(collection); + return window._paq.push(collection); } export const PaqService = { - push, -} + push +}; diff --git a/src/services/site-search/site-search.service.ts b/src/services/site-search/site-search.service.ts index f411272..25dd682 100644 --- a/src/services/site-search/site-search.service.ts +++ b/src/services/site-search/site-search.service.ts @@ -1,7 +1,8 @@ import { TRACK_EVENT } from '../../constants/track-event.constant'; +import { Dimensions } from '../../interfaces/utils'; import { PaqService } from '../paqService/paq.service'; -export function trackSiteSearch(keyword: string, category?: string, searchCount?: number, dimensions?: Object) { +export function trackSiteSearch(keyword: string, category?: string, searchCount?: number, dimensions?: Dimensions) { PaqService.push([ TRACK_EVENT.SEARCH, keyword, diff --git a/src/services/user-management/userManagement.service.ts b/src/services/user-management/userManagement.service.ts index 5aa755e..d8e8312 100644 --- a/src/services/user-management/userManagement.service.ts +++ b/src/services/user-management/userManagement.service.ts @@ -1,11 +1,13 @@ import { TRACK_EVENT } from '../../constants/track-event.constant'; +import { Tracker } from '../../interfaces/tracker'; +import { VisitorInfo } from '../../interfaces/visitorInfo'; import { PaqService } from '../paqService/paq.service'; export function getUserId(): Promise { return new Promise((resolve, reject) => { try { PaqService.push([ - function (this: any): void { + function (this:Tracker): void { resolve(this.getUserId()); }, ]); @@ -25,11 +27,11 @@ export function resetUserId(): void { PaqService.push([TRACK_EVENT.RESET_USER_ID]); } -export function getVisitorId(): Promise { +export function getVisitorId(): Promise { return new Promise((resolve, reject) => { try { PaqService.push([ - function (this: any): void { + function (this: Tracker): void { resolve(this.getVisitorId()); }, ]); @@ -41,11 +43,12 @@ export function getVisitorId(): Promise { }); } -export function getVisitorInfo(): Promise { + +export function getVisitorInfo(): Promise { return new Promise((resolve, reject) => { try { PaqService.push([ - function (this: any): void { + function (this: Tracker): void { resolve(this.getVisitorInfo()); }, ]); diff --git a/src/styles.module.css b/src/styles.module.css deleted file mode 100644 index 41006b5..0000000 --- a/src/styles.module.css +++ /dev/null @@ -1,9 +0,0 @@ -/* add css module styles here (optional) */ - -.test { - margin: 2em; - padding: 0.5em; - border: 2px solid #000; - font-size: 2em; - text-align: center; -} diff --git a/src/typings.d.ts b/src/typings.d.ts index cd16102..9955423 100644 --- a/src/typings.d.ts +++ b/src/typings.d.ts @@ -1,17 +1,5 @@ -/** - * Default CSS definition for typescript, - * will be overridden with file-specific definitions by rollup - */ -declare module '*.css' { - const content: { [className: string]: string }; - export default content; -} - -interface SvgrComponent extends React.StatelessComponent> {} +import { PiwikProWindow } from './interfaces/piwikpro.window' -declare module '*.svg' { - const svgUrl: string; - const svgComponent: SvgrComponent; - export default svgUrl; - export { svgComponent as ReactComponent } +declare global { + interface Window extends PiwikProWindow {} } From 67317738b91a5ca84a5e787ae9570352575b1120 Mon Sep 17 00:00:00 2001 From: auto200 <49625375+auto200@users.noreply.github.com> Date: Wed, 31 Jan 2024 15:41:35 +0100 Subject: [PATCH 2/3] format: run prettier --- .prettierrc | 2 +- example/src/main.tsx | 7 +++++-- package.json | 2 +- src/interfaces/payment.ts | 14 +++++++------- src/interfaces/piwikpro.window.ts | 8 ++++---- src/interfaces/product.ts | 18 +++++++++--------- src/interfaces/tracker.ts | 18 +++++++++--------- src/interfaces/utils.ts | 12 +++++++----- src/interfaces/visitorInfo.ts | 16 ++++++++-------- 9 files changed, 51 insertions(+), 46 deletions(-) diff --git a/.prettierrc b/.prettierrc index a9646d4..e87d615 100644 --- a/.prettierrc +++ b/.prettierrc @@ -4,7 +4,7 @@ "semi": false, "tabWidth": 2, "bracketSpacing": true, - "jsxBracketSameLine": false, + "bracketSameLine": false, "arrowParens": "always", "trailingComma": "none" } diff --git a/example/src/main.tsx b/example/src/main.tsx index 416264b..6c657d9 100644 --- a/example/src/main.tsx +++ b/example/src/main.tsx @@ -7,7 +7,7 @@ import { SnackbarProvider } from 'notistack' import PiwikPro from '@piwikpro/react-piwik-pro' PiwikPro.initialize( - '957285ba-7867-4c6b-a8be-5e3e6c069b71', + '0c0a8661-8c10-4f59-b8fc-1c926cbac184', 'https://astralprojection.promilci.com' ) @@ -36,5 +36,8 @@ const App = () => ( ) const container = document.getElementById('root') -// @ts-ignore +if(!container){ + throw new Error("#root element not found") +} + createRoot(container).render() diff --git a/package.json b/package.json index 841c69b..73c2e2f 100644 --- a/package.json +++ b/package.json @@ -23,7 +23,7 @@ "predeploy": "cd example && yarn install && yarn run build", "deploy": "gh-pages -d example/build", "format":"prettier src/**/*.ts --list-different", - "format:fix":"npm run format --write" + "format:fix":"npm run format -- --write" }, "peerDependencies": { "react": "^16.8.0 || ^17.0.0 || ^18.0.0", diff --git a/src/interfaces/payment.ts b/src/interfaces/payment.ts index c5a2801..8c0d4d0 100644 --- a/src/interfaces/payment.ts +++ b/src/interfaces/payment.ts @@ -1,8 +1,8 @@ export type PaymentInformation = { - orderId: string; - grandTotal: number | string; - subTotal?: number | string; - tax?: number | string; - shipping?: number | string; - discount?: number | string; -}; + orderId: string + grandTotal: number | string + subTotal?: number | string + tax?: number | string + shipping?: number | string + discount?: number | string +} diff --git a/src/interfaces/piwikpro.window.ts b/src/interfaces/piwikpro.window.ts index 30253b4..7cc6276 100644 --- a/src/interfaces/piwikpro.window.ts +++ b/src/interfaces/piwikpro.window.ts @@ -1,7 +1,7 @@ -import { AnyData, QueueItem } from './utils'; +import { AnyData, QueueItem } from './utils' export interface PiwikProWindow { - _paq?: QueueItem[]; - dataLayer?: AnyData[]; - IS_DEBUG?: boolean; + _paq?: QueueItem[] + dataLayer?: AnyData[] + IS_DEBUG?: boolean } diff --git a/src/interfaces/product.ts b/src/interfaces/product.ts index 3713ba3..1b613cc 100644 --- a/src/interfaces/product.ts +++ b/src/interfaces/product.ts @@ -1,14 +1,14 @@ import { LimitedArrayFiveStrings } from './utils' -type DimensionId = number; +type DimensionId = number export type Product = { - sku: string, - name?: string, - category?: LimitedArrayFiveStrings, - price?: number, - quantity?: number, - brand?: string, - variant?: string, - customDimensions?: Record, + sku: string + name?: string + category?: LimitedArrayFiveStrings + price?: number + quantity?: number + brand?: string + variant?: string + customDimensions?: Record } diff --git a/src/interfaces/tracker.ts b/src/interfaces/tracker.ts index 761a89c..d5c914f 100644 --- a/src/interfaces/tracker.ts +++ b/src/interfaces/tracker.ts @@ -1,11 +1,11 @@ -import { VisitorInfo } from "./visitorInfo"; +import { VisitorInfo } from './visitorInfo' export type Tracker = { - hasCookies: () => boolean; - getCustomDimensionValue: (id: string | number) => string | undefined; - getLinkTrackingTimer: () => number; - getEcommerceItems: () => object; - getUserId: () => string; - getVisitorId: () => string; - getVisitorInfo:()=> VisitorInfo -}; + hasCookies: () => boolean + getCustomDimensionValue: (id: string | number) => string | undefined + getLinkTrackingTimer: () => number + getEcommerceItems: () => object + getUserId: () => string + getVisitorId: () => string + getVisitorInfo: () => VisitorInfo +} diff --git a/src/interfaces/utils.ts b/src/interfaces/utils.ts index 3ecdbb4..751b357 100644 --- a/src/interfaces/utils.ts +++ b/src/interfaces/utils.ts @@ -1,11 +1,13 @@ -import { TRACK_EVENT } from "../constants/track-event.constant"; -import { Tracker } from "./tracker"; +import { TRACK_EVENT } from '../constants/track-event.constant' +import { Tracker } from './tracker' -export type LimitedArrayFiveStrings = [string, ...T] | [string, string, string, string, string]; +export type LimitedArrayFiveStrings = + | [string, ...T] + | [string, string, string, string, string] // eslint-disable-next-line @typescript-eslint/no-explicit-any export type AnyData = any -export type Dimensions = Record<`dimension${number}`,string> +export type Dimensions = Record<`dimension${number}`, string> -export type QueueItem =[TRACK_EVENT, ...unknown[]] | [(this: Tracker) => void] \ No newline at end of file +export type QueueItem = [TRACK_EVENT, ...unknown[]] | [(this: Tracker) => void] diff --git a/src/interfaces/visitorInfo.ts b/src/interfaces/visitorInfo.ts index 4ce294b..c89c699 100644 --- a/src/interfaces/visitorInfo.ts +++ b/src/interfaces/visitorInfo.ts @@ -1,9 +1,9 @@ export type VisitorInfo = [ - isNew: '0' | '1', - visitorId: string, - firstVisitTS: number, - previousVisitCount: string | number, - currentVisitTS: number, - lastVisitTS: number | '', - lastEcommerceOrderTS: number | '' - ] \ No newline at end of file + isNew: '0' | '1', + visitorId: string, + firstVisitTS: number, + previousVisitCount: string | number, + currentVisitTS: number, + lastVisitTS: number | '', + lastEcommerceOrderTS: number | '' +] From 21d04ef443c3d32aab3a2f51c79724dd05494b37 Mon Sep 17 00:00:00 2001 From: auto200 <49625375+auto200@users.noreply.github.com> Date: Thu, 1 Feb 2024 12:49:55 +0100 Subject: [PATCH 3/3] fix: build, update trackEvent docs, update lockfiles --- .nvmrc | 1 + README.md | 2 +- example/package-lock.json | 9 -- example/src/pages/CustomEventPage.tsx | 10 +- package.json | 3 +- src/{index.ts => index.tsx} | 1 + tsconfig.json | 2 +- yarn.lock | 176 ++------------------------ 8 files changed, 26 insertions(+), 178 deletions(-) create mode 100644 .nvmrc rename src/{index.ts => index.tsx} (92%) diff --git a/.nvmrc b/.nvmrc new file mode 100644 index 0000000..3462e8c --- /dev/null +++ b/.nvmrc @@ -0,0 +1 @@ +v18.19.0 \ No newline at end of file diff --git a/README.md b/README.md index aaeb3fc..873d7ee 100644 --- a/README.md +++ b/README.md @@ -190,7 +190,7 @@ Custom events enable tracking visitor actions that are not predefined in the exi import { CustomEvent } from '@piwikpro/react-piwik-pro' ``` #### Methods -* `trackEvent(category: string, action: string, name?: string, value?: number) ` - Tracks a custom event, e.g. when a visitor interacts with the page. +* `trackEvent(category: string, action: string, name?: string, value?: number, dimensions?: Object) ` - Tracks a custom event, e.g. when a visitor interacts with the page. ### Site search Service Site search tracking gives you insights into how visitors interact with the search engine on your website - what they search for and how many results they get back. diff --git a/example/package-lock.json b/example/package-lock.json index 38622aa..7ebaed5 100644 --- a/example/package-lock.json +++ b/example/package-lock.json @@ -50,15 +50,6 @@ "babel-eslint": "^10.1.0", "cross-env": "^7.0.3", "eslint": "^8.56.0", - "eslint-config-prettier": "^9.1.0", - "eslint-config-standard": "^17.1.0", - "eslint-config-standard-react": "^13.0.0", - "eslint-plugin-import": "^2.29.1", - "eslint-plugin-node": "^11.1.0", - "eslint-plugin-prettier": "^5.1.2", - "eslint-plugin-promise": "^6.1.1", - "eslint-plugin-react": "^7.33.2", - "eslint-plugin-standard": "^5.0.0", "gh-pages": "^6.1.1", "microbundle-crl": "^0.13.11", "npm-run-all": "^4.1.5", diff --git a/example/src/pages/CustomEventPage.tsx b/example/src/pages/CustomEventPage.tsx index 038289e..7b04bf1 100644 --- a/example/src/pages/CustomEventPage.tsx +++ b/example/src/pages/CustomEventPage.tsx @@ -45,9 +45,15 @@ const CustomEventPage: FunctionComponent = () => { variant='contained' onClick={() => { setFinish(true) - CustomEvent.trackEvent('user_data_form', 'submit') + CustomEvent.trackEvent( + 'user_data_form', + 'submit', + 'success', + 10, + { dimension1: 'value1' } + ) enqueueSnackbar( - "CustomEvent.trackEvent('user_data_form', 'submit')", + "CustomEvent.trackEvent('user_data_form', 'submit', 'success', 10, { dimension1: 'value1' })", { variant: 'success' } ) }} diff --git a/package.json b/package.json index 73c2e2f..de80fde 100644 --- a/package.json +++ b/package.json @@ -23,7 +23,8 @@ "predeploy": "cd example && yarn install && yarn run build", "deploy": "gh-pages -d example/build", "format":"prettier src/**/*.ts --list-different", - "format:fix":"npm run format -- --write" + "format:fix":"npm run format -- --write", + "typecheck": "tsc --noEmit" }, "peerDependencies": { "react": "^16.8.0 || ^17.0.0 || ^18.0.0", diff --git a/src/index.ts b/src/index.tsx similarity index 92% rename from src/index.ts rename to src/index.tsx index 45ab261..f0f858e 100644 --- a/src/index.ts +++ b/src/index.tsx @@ -1,3 +1,4 @@ +// NOTE: .tsx file extension is required for microbundle-crl to pick up and build the lib import * as PiwikPro from './core' export * as PageViews from './services/pageViews/pageViews.service'; diff --git a/tsconfig.json b/tsconfig.json index 226a616..e69488e 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -12,7 +12,7 @@ "noImplicitThis": true, "noImplicitAny": true, "strictNullChecks": true, - "suppressImplicitAnyIndexErrors": true, + "skipLibCheck": true, "noUnusedLocals": false, "noUnusedParameters": false, "allowSyntheticDefaultImports": true diff --git a/yarn.lock b/yarn.lock index 71d09f8..27af33f 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2596,11 +2596,6 @@ "@nodelib/fs.scandir" "2.1.5" fastq "^1.6.0" -"@pkgr/core@^0.1.0": - version "0.1.0" - resolved "https://registry.yarnpkg.com/@pkgr/core/-/core-0.1.0.tgz#7d8dacb7fdef0e4387caf7396cbd77f179867d06" - integrity sha512-Zwq5OCzuwJC2jwqmpEQt7Ds1DTi6BWSwoGkbb1n9pO3hzb35BoJELx7c0T23iDkBGkh2e7tvOtjF3tr3OaQHDQ== - "@pmmmwh/react-refresh-webpack-plugin@^0.5.3": version "0.5.11" resolved "https://registry.yarnpkg.com/@pmmmwh/react-refresh-webpack-plugin/-/react-refresh-webpack-plugin-0.5.11.tgz#7c2268cedaa0644d677e8c4f377bc8fb304f714a" @@ -3836,7 +3831,7 @@ array-includes@^3.1.3: get-intrinsic "^1.1.1" is-string "^1.0.7" -array-includes@^3.1.6, array-includes@^3.1.7: +array-includes@^3.1.6: version "3.1.7" resolved "https://registry.yarnpkg.com/array-includes/-/array-includes-3.1.7.tgz#8cd2e01b26f7a3086cbc87271593fe921c62abda" integrity sha512-dlcsNBIiWhPkHdOEEKnehA+RNUWDc4UqFtnIXU4uuYDPtA4LDkr7qip2p0VvFAEXNDr0yWZ9PJyIRiGjRLQzwQ== @@ -3864,7 +3859,7 @@ array-uniq@^1.0.1: resolved "https://registry.yarnpkg.com/array-uniq/-/array-uniq-1.0.3.tgz#af6ac877a25cc7f74e058894753858dfdb24fdb6" integrity sha1-r2rId6Jcx/dOBYiUdThY39sk/bY= -array.prototype.findlastindex@^1.2.2, array.prototype.findlastindex@^1.2.3: +array.prototype.findlastindex@^1.2.2: version "1.2.3" resolved "https://registry.yarnpkg.com/array.prototype.findlastindex/-/array.prototype.findlastindex-1.2.3.tgz#b37598438f97b579166940814e2c0493a4f50207" integrity sha512-LzLoiOMAxvy+Gd3BAq3B7VeIgPdo+Q8hthvKtXybMvRV0jrXfJM/t8mw7nNlpEcVlVUnCnM2KSX4XU5HmpodOA== @@ -3875,7 +3870,7 @@ array.prototype.findlastindex@^1.2.2, array.prototype.findlastindex@^1.2.3: es-shim-unscopables "^1.0.0" get-intrinsic "^1.2.1" -array.prototype.flat@^1.3.1, array.prototype.flat@^1.3.2: +array.prototype.flat@^1.3.1: version "1.3.2" resolved "https://registry.yarnpkg.com/array.prototype.flat/-/array.prototype.flat-1.3.2.tgz#1476217df8cff17d72ee8f3ba06738db5b387d18" integrity sha512-djYB+Zx2vLewY8RWlNCUdHjDXs2XOgm602S9E7P/UpHgfeHL00cRiIF+IN/G/aUJ7kGPb6yO/ErDI5V2s8iycA== @@ -3885,7 +3880,7 @@ array.prototype.flat@^1.3.1, array.prototype.flat@^1.3.2: es-abstract "^1.22.1" es-shim-unscopables "^1.0.0" -array.prototype.flatmap@^1.3.1, array.prototype.flatmap@^1.3.2: +array.prototype.flatmap@^1.3.1: version "1.3.2" resolved "https://registry.yarnpkg.com/array.prototype.flatmap/-/array.prototype.flatmap-1.3.2.tgz#c9a7c6831db8e719d6ce639190146c24bbd3e527" integrity sha512-Ewyx0c9PmpcsByhSW4r+9zDU7sGjFc86qf/kKtuSCRdhfbk0SNLLkaT5qvcHnRGgc5NP/ly/y+qkXkqONX54CQ== @@ -5713,11 +5708,6 @@ escodegen@^2.0.0: optionalDependencies: source-map "~0.6.1" -eslint-config-prettier@^9.1.0: - version "9.1.0" - resolved "https://registry.yarnpkg.com/eslint-config-prettier/-/eslint-config-prettier-9.1.0.tgz#31af3d94578645966c082fcb71a5846d3c94867f" - integrity sha512-NSWl5BFQWEPi1j4TjVNItzYV7dZXZ+wP6I6ZhrBGpChQhZRUaElihE9uRRkcbRnNb76UMKDF3r+WTmNcGPKsqw== - eslint-config-react-app@^7.0.1: version "7.0.1" resolved "https://registry.yarnpkg.com/eslint-config-react-app/-/eslint-config-react-app-7.0.1.tgz#73ba3929978001c5c86274c017ea57eb5fa644b4" @@ -5738,17 +5728,7 @@ eslint-config-react-app@^7.0.1: eslint-plugin-react-hooks "^4.3.0" eslint-plugin-testing-library "^5.0.1" -eslint-config-standard-react@^13.0.0: - version "13.0.0" - resolved "https://registry.yarnpkg.com/eslint-config-standard-react/-/eslint-config-standard-react-13.0.0.tgz#dcc85bc3210dac858bc94ac53d024a5488ce5568" - integrity sha512-HrVPGj8UncHfV+BsdJTuJpVsomn6AIrke3Af2Fh4XFvQQDU+iO6N2ZL+UsC+scExft4fU3uf7fJwj7PKWnXJDA== - -eslint-config-standard@^17.1.0: - version "17.1.0" - resolved "https://registry.yarnpkg.com/eslint-config-standard/-/eslint-config-standard-17.1.0.tgz#40ffb8595d47a6b242e07cbfd49dc211ed128975" - integrity sha512-IwHwmaBNtDK4zDHQukFDW5u/aTb8+meQWZvNFWkiGmbWjD6bqyuSSBxxXKkCftCUzc1zwCH2m/baCNDLGmuO5Q== - -eslint-import-resolver-node@^0.3.7, eslint-import-resolver-node@^0.3.9: +eslint-import-resolver-node@^0.3.7: version "0.3.9" resolved "https://registry.yarnpkg.com/eslint-import-resolver-node/-/eslint-import-resolver-node-0.3.9.tgz#d4eaac52b8a2e7c3cd1903eb00f7e053356118ac" integrity sha512-WFj2isz22JahUv+B788TlO3N6zL3nNJGU8CcZbPZvVEkBPaJdCV4vy5wyghty5ROFbCRnm132v8BScu5/1BQ8g== @@ -5764,14 +5744,6 @@ eslint-module-utils@^2.8.0: dependencies: debug "^3.2.7" -eslint-plugin-es@^3.0.0: - version "3.0.1" - resolved "https://registry.yarnpkg.com/eslint-plugin-es/-/eslint-plugin-es-3.0.1.tgz#75a7cdfdccddc0589934aeeb384175f221c57893" - integrity sha512-GUmAsJaN4Fc7Gbtl8uOBlayo2DqhwWvEzykMHSCZHU3XdJ+NSzzZcVhXh3VxX5icqQ+oQdIEawXX8xkR3mIFmQ== - dependencies: - eslint-utils "^2.0.0" - regexpp "^3.0.0" - eslint-plugin-flowtype@^8.0.3: version "8.0.3" resolved "https://registry.yarnpkg.com/eslint-plugin-flowtype/-/eslint-plugin-flowtype-8.0.3.tgz#e1557e37118f24734aa3122e7536a038d34a4912" @@ -5803,29 +5775,6 @@ eslint-plugin-import@^2.25.3: semver "^6.3.1" tsconfig-paths "^3.14.2" -eslint-plugin-import@^2.29.1: - version "2.29.1" - resolved "https://registry.yarnpkg.com/eslint-plugin-import/-/eslint-plugin-import-2.29.1.tgz#d45b37b5ef5901d639c15270d74d46d161150643" - integrity sha512-BbPC0cuExzhiMo4Ff1BTVwHpjjv28C5R+btTOGaCRC7UEz801up0JadwkeSk5Ued6TG34uaczuVuH6qyy5YUxw== - dependencies: - array-includes "^3.1.7" - array.prototype.findlastindex "^1.2.3" - array.prototype.flat "^1.3.2" - array.prototype.flatmap "^1.3.2" - debug "^3.2.7" - doctrine "^2.1.0" - eslint-import-resolver-node "^0.3.9" - eslint-module-utils "^2.8.0" - hasown "^2.0.0" - is-core-module "^2.13.1" - is-glob "^4.0.3" - minimatch "^3.1.2" - object.fromentries "^2.0.7" - object.groupby "^1.0.1" - object.values "^1.1.7" - semver "^6.3.1" - tsconfig-paths "^3.15.0" - eslint-plugin-jest@^25.3.0: version "25.7.0" resolved "https://registry.yarnpkg.com/eslint-plugin-jest/-/eslint-plugin-jest-25.7.0.tgz#ff4ac97520b53a96187bad9c9814e7d00de09a6a" @@ -5855,37 +5804,12 @@ eslint-plugin-jsx-a11y@^6.5.1: object.fromentries "^2.0.6" semver "^6.3.0" -eslint-plugin-node@^11.1.0: - version "11.1.0" - resolved "https://registry.yarnpkg.com/eslint-plugin-node/-/eslint-plugin-node-11.1.0.tgz#c95544416ee4ada26740a30474eefc5402dc671d" - integrity sha512-oUwtPJ1W0SKD0Tr+wqu92c5xuCeQqB3hSCHasn/ZgjFdA9iDGNkNf2Zi9ztY7X+hNuMib23LNGRm6+uN+KLE3g== - dependencies: - eslint-plugin-es "^3.0.0" - eslint-utils "^2.0.0" - ignore "^5.1.1" - minimatch "^3.0.4" - resolve "^1.10.1" - semver "^6.1.0" - -eslint-plugin-prettier@^5.1.2: - version "5.1.2" - resolved "https://registry.yarnpkg.com/eslint-plugin-prettier/-/eslint-plugin-prettier-5.1.2.tgz#584c94d4bf31329b2d4cbeb10fd600d17d6de742" - integrity sha512-dhlpWc9vOwohcWmClFcA+HjlvUpuyynYs0Rf+L/P6/0iQE6vlHW9l5bkfzN62/Stm9fbq8ku46qzde76T1xlSg== - dependencies: - prettier-linter-helpers "^1.0.0" - synckit "^0.8.6" - -eslint-plugin-promise@^6.1.1: - version "6.1.1" - resolved "https://registry.yarnpkg.com/eslint-plugin-promise/-/eslint-plugin-promise-6.1.1.tgz#269a3e2772f62875661220631bd4dafcb4083816" - integrity sha512-tjqWDwVZQo7UIPMeDReOpUgHCmCiH+ePnVT+5zVapL0uuHnegBUs2smM13CzOs2Xb5+MHMRFTs9v24yjba4Oig== - eslint-plugin-react-hooks@^4.3.0: version "4.6.0" resolved "https://registry.yarnpkg.com/eslint-plugin-react-hooks/-/eslint-plugin-react-hooks-4.6.0.tgz#4c3e697ad95b77e93f8646aaa1630c1ba607edd3" integrity sha512-oFc7Itz9Qxh2x4gNHStv3BqJq54ExXmfC+a1NjAta66IAN87Wu0R/QArgIS9qKzX3dXKPI9H5crl9QchNMY9+g== -eslint-plugin-react@^7.27.1, eslint-plugin-react@^7.33.2: +eslint-plugin-react@^7.27.1: version "7.33.2" resolved "https://registry.yarnpkg.com/eslint-plugin-react/-/eslint-plugin-react-7.33.2.tgz#69ee09443ffc583927eafe86ffebb470ee737608" integrity sha512-73QQMKALArI8/7xGLNI/3LylrEYrlKZSb5C9+q3OtOewTnMQi5cT+aE9E41sLCmli3I9PGGmD1yiZydyo4FEPw== @@ -5907,11 +5831,6 @@ eslint-plugin-react@^7.27.1, eslint-plugin-react@^7.33.2: semver "^6.3.1" string.prototype.matchall "^4.0.8" -eslint-plugin-standard@^5.0.0: - version "5.0.0" - resolved "https://registry.yarnpkg.com/eslint-plugin-standard/-/eslint-plugin-standard-5.0.0.tgz#c43f6925d669f177db46f095ea30be95476b1ee4" - integrity sha512-eSIXPc9wBM4BrniMzJRBm2uoVuXz2EPa+NXPk2+itrVt+r5SbKFERx/IgrK/HmfjddyKVz2f+j+7gBRvu19xLg== - eslint-plugin-testing-library@^5.0.1: version "5.11.1" resolved "https://registry.yarnpkg.com/eslint-plugin-testing-library/-/eslint-plugin-testing-library-5.11.1.tgz#5b46cdae96d4a78918711c0b4792f90088e62d20" @@ -5935,14 +5854,7 @@ eslint-scope@^7.2.2: esrecurse "^4.3.0" estraverse "^5.2.0" -eslint-utils@^2.0.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/eslint-utils/-/eslint-utils-2.1.0.tgz#d2de5e03424e707dc10c74068ddedae708741b27" - integrity sha512-w94dQYoauyvlDc43XnGB8lU3Zt713vNChgt4EWwhXAP2XkBvndfxF0AgIqKOOasjPIPzj9JqgwkwbCYD0/V3Zg== - dependencies: - eslint-visitor-keys "^1.1.0" - -eslint-visitor-keys@^1.0.0, eslint-visitor-keys@^1.1.0: +eslint-visitor-keys@^1.0.0: version "1.3.0" resolved "https://registry.yarnpkg.com/eslint-visitor-keys/-/eslint-visitor-keys-1.3.0.tgz#30ebd1ef7c2fdff01c3a4f151044af25fab0523e" integrity sha512-6J72N8UNa462wa/KFODt/PJ3IU60SDpC3QXC1Hjc1BXXpfL2C9R5+AU7jhe0F6GREqVMh4Juu+NY7xn+6dipUQ== @@ -6211,11 +6123,6 @@ fast-deep-equal@^3.1.1, fast-deep-equal@^3.1.3: resolved "https://registry.yarnpkg.com/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz#3a7d56b559d6cbc3eb512325244e619a65c6c525" integrity sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q== -fast-diff@^1.1.2: - version "1.2.0" - resolved "https://registry.yarnpkg.com/fast-diff/-/fast-diff-1.2.0.tgz#73ee11982d86caaf7959828d519cfe927fac5f03" - integrity sha512-xJuoT5+L99XlZ8twedaRf6Ax2TgQVxvgZOYoPKqZufmJib0tL2tegPBOZb1pVNgIhlqDlA0eO0c3wBvQcmzx4w== - fast-glob@^3.2.12, fast-glob@^3.2.9: version "3.3.1" resolved "https://registry.yarnpkg.com/fast-glob/-/fast-glob-3.3.1.tgz#784b4e897340f3dbbef17413b3f11acf03c874c4" @@ -6500,11 +6407,6 @@ function-bind@^1.1.1: resolved "https://registry.yarnpkg.com/function-bind/-/function-bind-1.1.1.tgz#a56899d3ea3c9bab874bb9773b7c5ede92f4895d" integrity sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A== -function-bind@^1.1.2: - version "1.1.2" - resolved "https://registry.yarnpkg.com/function-bind/-/function-bind-1.1.2.tgz#2c02d864d97f3ea6c8830c464cbd11ab6eab7a1c" - integrity sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA== - function.prototype.name@^1.1.5, function.prototype.name@^1.1.6: version "1.1.6" resolved "https://registry.yarnpkg.com/function.prototype.name/-/function.prototype.name-1.1.6.tgz#cdf315b7d90ee77a4c6ee216c3c3362da07533fd" @@ -6820,13 +6722,6 @@ has@^1.0.0, has@^1.0.3: dependencies: function-bind "^1.1.1" -hasown@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/hasown/-/hasown-2.0.0.tgz#f4c513d454a57b7c7e1650778de226b11700546c" - integrity sha512-vUptKVTpIJhcczKBbgnS+RtcuYMB8+oNzPK2/Hp3hanz8JmpATdmmgLgSaadVREkDm+e2giHwY3ZRkyjSIDDFA== - dependencies: - function-bind "^1.1.2" - he@^1.2.0: version "1.2.0" resolved "https://registry.yarnpkg.com/he/-/he-1.2.0.tgz#84ae65fa7eafb165fddb61566ae14baf05664f0f" @@ -7027,11 +6922,6 @@ identity-obj-proxy@^3.0.0: dependencies: harmony-reflect "^1.4.6" -ignore@^5.1.1: - version "5.2.0" - resolved "https://registry.yarnpkg.com/ignore/-/ignore-5.2.0.tgz#6d3bac8fa7fe0d45d9f9be7bac2fc279577e345a" - integrity sha512-CmxgYGiEPCLhfLnpPp1MoRmifwEIOgjcHXxOBjv7mY96c+eWScsOP9c112ZyLdWHi0FxHjI+4uVhKYp/gcdRmQ== - ignore@^5.2.0, ignore@^5.2.4: version "5.2.4" resolved "https://registry.yarnpkg.com/ignore/-/ignore-5.2.4.tgz#a291c0c6178ff1b960befe47fcdec301674a6324" @@ -7250,13 +7140,6 @@ is-core-module@^2.13.0, is-core-module@^2.9.0: dependencies: has "^1.0.3" -is-core-module@^2.13.1: - version "2.13.1" - resolved "https://registry.yarnpkg.com/is-core-module/-/is-core-module-2.13.1.tgz#ad0d7532c6fea9da1ebdc82742d74525c6273384" - integrity sha512-hHrIjvZsftOsvKSn2TRYl63zvxsgE0K+0mYMoH6gD4omR5IWB2KynivBQczo3+wF1cCkjzvptnI9Q0sPU66ilw== - dependencies: - hasown "^2.0.0" - is-core-module@^2.8.1: version "2.8.1" resolved "https://registry.yarnpkg.com/is-core-module/-/is-core-module-2.8.1.tgz#f59fdfca701d5879d0a6b100a40aa1560ce27211" @@ -8949,7 +8832,7 @@ object.entries@^1.1.6: define-properties "^1.2.0" es-abstract "^1.22.1" -object.fromentries@^2.0.6, object.fromentries@^2.0.7: +object.fromentries@^2.0.6: version "2.0.7" resolved "https://registry.yarnpkg.com/object.fromentries/-/object.fromentries-2.0.7.tgz#71e95f441e9a0ea6baf682ecaaf37fa2a8d7e616" integrity sha512-UPbPHML6sL8PI/mOqPwsH4G6iyXcCGzLin8KvEPenOZN5lpCNBZZQ+V62vdjB1mQHrmqGQt5/OJzemUA+KJmEA== @@ -8967,7 +8850,7 @@ object.getownpropertydescriptors@^2.1.0: define-properties "^1.1.3" es-abstract "^1.19.1" -object.groupby@^1.0.0, object.groupby@^1.0.1: +object.groupby@^1.0.0: version "1.0.1" resolved "https://registry.yarnpkg.com/object.groupby/-/object.groupby-1.0.1.tgz#d41d9f3c8d6c778d9cbac86b4ee9f5af103152ee" integrity sha512-HqaQtqLnp/8Bn4GL16cj+CUYbnpe1bh0TtEaWvybszDG4tgxCJuRpV8VGuvNaI1fAnI4lUJzDG55MXcOH4JZcQ== @@ -8994,7 +8877,7 @@ object.values@^1.1.0: define-properties "^1.1.3" es-abstract "^1.19.1" -object.values@^1.1.6, object.values@^1.1.7: +object.values@^1.1.6: version "1.1.7" resolved "https://registry.yarnpkg.com/object.values/-/object.values-1.1.7.tgz#617ed13272e7e1071b43973aa1655d9291b8442a" integrity sha512-aU6xnDFYT3x17e/f0IiiwlGPTy2jzMySGfUB4fq6z7CV8l85CWHDk5ErhyhpfDHhrOMwGFhSQkhMGHaIotA6Ng== @@ -10212,13 +10095,6 @@ prelude-ls@~1.1.2: resolved "https://registry.yarnpkg.com/prelude-ls/-/prelude-ls-1.1.2.tgz#21932a549f5e52ffd9a827f570e04be62a97da54" integrity sha1-IZMqVJ9eUv/ZqCf1cOBL5iqX2lQ= -prettier-linter-helpers@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/prettier-linter-helpers/-/prettier-linter-helpers-1.0.0.tgz#d23d41fe1375646de2d0104d3454a3008802cf7b" - integrity sha512-GbK2cP9nraSSUF9N2XwUwqfzlAFlMNYYl+ShE/V+H8a9uNl/oUqB1w2EL54Jh0OlyRSd8RfWYJ3coVS4TROP2w== - dependencies: - fast-diff "^1.1.2" - prettier@^3.1.1: version "3.1.1" resolved "https://registry.yarnpkg.com/prettier/-/prettier-3.1.1.tgz#6ba9f23165d690b6cbdaa88cb0807278f7019848" @@ -10638,11 +10514,6 @@ regexp.prototype.flags@^1.5.0, regexp.prototype.flags@^1.5.1: define-properties "^1.2.0" set-function-name "^2.0.0" -regexpp@^3.0.0: - version "3.2.0" - resolved "https://registry.yarnpkg.com/regexpp/-/regexpp-3.2.0.tgz#0425a2768d8f23bad70ca4b90461fa2f1213e1b2" - integrity sha512-pq2bWo9mVD43nbts2wGv17XLiNLya+GklZ8kaDLV2Z08gDCsGpnKn9BFMepvWuHCbyVvY7J5o5+BVvoQbmlJLg== - regexpu-core@^5.0.1: version "5.0.1" resolved "https://registry.yarnpkg.com/regexpu-core/-/regexpu-core-5.0.1.tgz#c531122a7840de743dcf9c83e923b5560323ced3" @@ -10771,7 +10642,7 @@ resolve@^1.1.7, resolve@^1.19.0, resolve@^1.20.0, resolve@^1.22.2, resolve@^1.22 path-parse "^1.0.7" supports-preserve-symlinks-flag "^1.0.0" -resolve@^1.10.0, resolve@^1.10.1, resolve@^1.11.0, resolve@^1.11.1, resolve@^1.12.0, resolve@^1.14.2, resolve@^1.16.0: +resolve@^1.10.0, resolve@^1.11.0, resolve@^1.11.1, resolve@^1.12.0, resolve@^1.14.2, resolve@^1.16.0: version "1.22.0" resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.22.0.tgz#5e0b8c67c15df57a89bdbabe603a002f21731198" integrity sha512-Hhtrw0nLeSrFQ7phPp4OOcVjLPIeMnRlr5mcnVuMe7M/7eBn98A3hmFRLoFo3DLZkivSYwhRUJTyPyWAk56WLw== @@ -11069,7 +10940,7 @@ semver@7.0.0: resolved "https://registry.yarnpkg.com/semver/-/semver-7.0.0.tgz#5f3ca35761e47e05b206c6daff2cf814f0316b8e" integrity sha512-+GB6zVA9LWh6zovYQLALHwv5rb2PHGlJi3lfiqIHxR0uuwCgefcOJc59v9fv1w8GbStwxuuqqAjI9NMAOOgq1A== -semver@^6.0.0, semver@^6.1.0, semver@^6.1.1, semver@^6.1.2, semver@^6.3.0: +semver@^6.0.0, semver@^6.1.1, semver@^6.1.2, semver@^6.3.0: version "6.3.0" resolved "https://registry.yarnpkg.com/semver/-/semver-6.3.0.tgz#ee0a64c8af5e8ceea67687b133761e1becbd1d3d" integrity sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw== @@ -11716,14 +11587,6 @@ symbol-tree@^3.2.4: resolved "https://registry.yarnpkg.com/symbol-tree/-/symbol-tree-3.2.4.tgz#430637d248ba77e078883951fb9aa0eed7c63fa2" integrity sha512-9QNk5KwDF+Bvz+PyObkmSYjI5ksVUYtjW7AU22r2NKcfLJcXp96hkDWU3+XndOsUb+AQ9QhfzfCT2O+CNWT5Tw== -synckit@^0.8.6: - version "0.8.8" - resolved "https://registry.yarnpkg.com/synckit/-/synckit-0.8.8.tgz#fe7fe446518e3d3d49f5e429f443cf08b6edfcd7" - integrity sha512-HwOKAP7Wc5aRGYdKH+dw0PRRpbO841v2DENBtjnR5HFWoiNByAl7vrx3p0G/rCyYXQsrxqtX48TImFtPcIHSpQ== - dependencies: - "@pkgr/core" "^0.1.0" - tslib "^2.6.2" - tailwindcss@^3.0.2: version "3.3.3" resolved "https://registry.yarnpkg.com/tailwindcss/-/tailwindcss-3.3.3.tgz#90da807393a2859189e48e9e7000e6880a736daf" @@ -11944,16 +11807,6 @@ tsconfig-paths@^3.14.2: minimist "^1.2.6" strip-bom "^3.0.0" -tsconfig-paths@^3.15.0: - version "3.15.0" - resolved "https://registry.yarnpkg.com/tsconfig-paths/-/tsconfig-paths-3.15.0.tgz#5299ec605e55b1abb23ec939ef15edaf483070d4" - integrity sha512-2Ac2RgzDe/cn48GvOe3M+o82pEFewD3UPbyoUHHdKasHwJKjds4fLXWf/Ux5kATBKN20oaFGu+jbElp1pos0mg== - dependencies: - "@types/json5" "^0.0.29" - json5 "^1.0.2" - minimist "^1.2.6" - strip-bom "^3.0.0" - tslib@1.10.0: version "1.10.0" resolved "https://registry.yarnpkg.com/tslib/-/tslib-1.10.0.tgz#c3c19f95973fb0a62973fb09d90d961ee43e5c8a" @@ -11969,11 +11822,6 @@ tslib@^2.0.3: resolved "https://registry.yarnpkg.com/tslib/-/tslib-2.3.1.tgz#e8a335add5ceae51aa261d32a490158ef042ef01" integrity sha512-77EbyPPpMz+FRFRuAFlWMtmgUWGe9UOG2Z25NqCwiIjRhOf5iKGuzSe5P2w1laq+FkRy4p+PCuVkJSGkzTEKVw== -tslib@^2.6.2: - version "2.6.2" - resolved "https://registry.yarnpkg.com/tslib/-/tslib-2.6.2.tgz#703ac29425e7b37cd6fd456e92404d46d1f3e4ae" - integrity sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q== - tsutils@^3.21.0: version "3.21.0" resolved "https://registry.yarnpkg.com/tsutils/-/tsutils-3.21.0.tgz#b48717d394cea6c1e096983eed58e9d61715b623"