From 7ac18ca46355789c6bf0e2b66a72e05cd3e1decc Mon Sep 17 00:00:00 2001 From: Paulo Date: Wed, 7 Jul 2021 21:43:24 +0100 Subject: [PATCH 1/3] Update dependency list --- package-lock.json | 5 +++-- package.json | 3 ++- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/package-lock.json b/package-lock.json index df47d4b..c6f64da 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "@phntms/next-gtm", - "version": "0.0.1", + "version": "0.0.2", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "@phntms/next-gtm", - "version": "0.0.1", + "version": "0.0.2", "license": "MIT", "devDependencies": { "@babel/preset-env": "^7.4.5", @@ -38,6 +38,7 @@ "typescript": "^4.1.5" }, "peerDependencies": { + "@phntms/react-gtm": "^0.0.5", "next": ">=11.0.1", "react": ">=17.0.2" } diff --git a/package.json b/package.json index 1a9dac3..d130d16 100755 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "@phntms/next-gtm", "description": "A lightweight Next library to implement custom Google Tag Manager events.", - "version": "0.0.1", + "version": "0.0.2", "main": "lib/index.js", "types": "lib/index.d.ts", "homepage": "https://github.com/phantomstudios/next-gtm#readme", @@ -42,6 +42,7 @@ "author": "Paulo Ferreira Jorge (paulo.jorge@phntms.com)", "license": "MIT", "peerDependencies": { + "@phntms/react-gtm": "^0.0.5", "next": ">=11.0.1", "react": ">=17.0.2" }, From 30a96699d42f9137a22440d3e0dccdcb661ba5a7 Mon Sep 17 00:00:00 2001 From: Paulo Date: Wed, 7 Jul 2021 21:43:42 +0100 Subject: [PATCH 2/3] Remove types and update to use import --- src/components/TrackingHeadScript.tsx | 3 +-- src/types.tsx | 13 ------------- 2 files changed, 1 insertion(+), 15 deletions(-) delete mode 100644 src/types.tsx diff --git a/src/components/TrackingHeadScript.tsx b/src/components/TrackingHeadScript.tsx index b405bed..fe2584c 100644 --- a/src/components/TrackingHeadScript.tsx +++ b/src/components/TrackingHeadScript.tsx @@ -1,9 +1,8 @@ import React from "react"; +import { EmbedTrackingProps } from "@phntms/react-gtm"; import Script from "next/script"; -import { EmbedTrackingProps } from "../types"; - const TrackingHeadScript = ({ id }: EmbedTrackingProps) => ( <> {id && ( diff --git a/src/types.tsx b/src/types.tsx deleted file mode 100644 index f351296..0000000 --- a/src/types.tsx +++ /dev/null @@ -1,13 +0,0 @@ -export interface EmbedTrackingProps { - id?: string; -} - -export interface EventTrackingProps { - event?: string; - data?: EventDataProps; -} - -export interface EventDataProps { - // eslint-disable-next-line @typescript-eslint/no-explicit-any - [key: string]: any; -} From 9514c6e26329a0b49249a46095df0b364e9682f4 Mon Sep 17 00:00:00 2001 From: Paulo Date: Wed, 7 Jul 2021 21:46:44 +0100 Subject: [PATCH 3/3] Update package --- package-lock.json | 21 ++++++--------------- package.json | 5 +++-- 2 files changed, 9 insertions(+), 17 deletions(-) diff --git a/package-lock.json b/package-lock.json index c6f64da..963f457 100644 --- a/package-lock.json +++ b/package-lock.json @@ -8,10 +8,12 @@ "name": "@phntms/next-gtm", "version": "0.0.2", "license": "MIT", + "dependencies": { + "@phntms/react-gtm": "^0.0.5" + }, "devDependencies": { "@babel/preset-env": "^7.4.5", "@babel/preset-typescript": "^7.3.3", - "@phntms/react-gtm": "^0.0.5", "@testing-library/react": "^11.2.5", "@testing-library/react-hooks": "^5.0.3", "@types/jest": "^26.0.20", @@ -38,7 +40,6 @@ "typescript": "^4.1.5" }, "peerDependencies": { - "@phntms/react-gtm": "^0.0.5", "next": ">=11.0.1", "react": ">=17.0.2" } @@ -1963,7 +1964,6 @@ "version": "0.0.5", "resolved": "https://registry.npmjs.org/@phntms/react-gtm/-/react-gtm-0.0.5.tgz", "integrity": "sha512-v/Pchgdy3IFJm+7Yo5gNMxIm3Obc9G30Zl2kfqAe+JfMetsDIQUHp8ZiKiTwm7v25is+rab/naL7tamWqPymNg==", - "dev": true, "peerDependencies": { "react": ">=16.8.0" } @@ -8266,8 +8266,7 @@ "node_modules/js-tokens": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz", - "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==", - "dev": true + "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==" }, "node_modules/js-yaml": { "version": "3.14.1", @@ -8531,7 +8530,6 @@ "version": "1.4.0", "resolved": "https://registry.npmjs.org/loose-envify/-/loose-envify-1.4.0.tgz", "integrity": "sha512-lyuxPGr/Wfhrlem2CL/UcnUc1zcqKAImBDzukY7Y5F/yQiNdko6+fRLevlw1HgMySw7f611UIY408EtxRSoK3Q==", - "dev": true, "dependencies": { "js-tokens": "^3.0.0 || ^4.0.0" }, @@ -9367,7 +9365,6 @@ "version": "4.1.1", "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz", "integrity": "sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM=", - "dev": true, "engines": { "node": ">=0.10.0" } @@ -10187,7 +10184,6 @@ "version": "17.0.2", "resolved": "https://registry.npmjs.org/react/-/react-17.0.2.tgz", "integrity": "sha512-gnhPt75i/dq/z3/6q/0asP78D0u592D5L1pd7M8P+dck6Fu/jJeL6iVVK23fptSUZj8Vjf++7wXA8UNclGQcbA==", - "dev": true, "dependencies": { "loose-envify": "^1.1.0", "object-assign": "^4.1.1" @@ -14424,7 +14420,6 @@ "version": "0.0.5", "resolved": "https://registry.npmjs.org/@phntms/react-gtm/-/react-gtm-0.0.5.tgz", "integrity": "sha512-v/Pchgdy3IFJm+7Yo5gNMxIm3Obc9G30Zl2kfqAe+JfMetsDIQUHp8ZiKiTwm7v25is+rab/naL7tamWqPymNg==", - "dev": true, "requires": {} }, "@sinonjs/commons": { @@ -19532,8 +19527,7 @@ "js-tokens": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz", - "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==", - "dev": true + "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==" }, "js-yaml": { "version": "3.14.1", @@ -19751,7 +19745,6 @@ "version": "1.4.0", "resolved": "https://registry.npmjs.org/loose-envify/-/loose-envify-1.4.0.tgz", "integrity": "sha512-lyuxPGr/Wfhrlem2CL/UcnUc1zcqKAImBDzukY7Y5F/yQiNdko6+fRLevlw1HgMySw7f611UIY408EtxRSoK3Q==", - "dev": true, "requires": { "js-tokens": "^3.0.0 || ^4.0.0" } @@ -20443,8 +20436,7 @@ "object-assign": { "version": "4.1.1", "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz", - "integrity": "sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM=", - "dev": true + "integrity": "sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM=" }, "object-copy": { "version": "0.1.0", @@ -21094,7 +21086,6 @@ "version": "17.0.2", "resolved": "https://registry.npmjs.org/react/-/react-17.0.2.tgz", "integrity": "sha512-gnhPt75i/dq/z3/6q/0asP78D0u592D5L1pd7M8P+dck6Fu/jJeL6iVVK23fptSUZj8Vjf++7wXA8UNclGQcbA==", - "dev": true, "requires": { "loose-envify": "^1.1.0", "object-assign": "^4.1.1" diff --git a/package.json b/package.json index d130d16..20b9787 100755 --- a/package.json +++ b/package.json @@ -42,14 +42,12 @@ "author": "Paulo Ferreira Jorge (paulo.jorge@phntms.com)", "license": "MIT", "peerDependencies": { - "@phntms/react-gtm": "^0.0.5", "next": ">=11.0.1", "react": ">=17.0.2" }, "devDependencies": { "@babel/preset-env": "^7.4.5", "@babel/preset-typescript": "^7.3.3", - "@phntms/react-gtm": "^0.0.5", "@testing-library/react": "^11.2.5", "@testing-library/react-hooks": "^5.0.3", "@types/jest": "^26.0.20", @@ -74,5 +72,8 @@ "react-test-renderer": ">=17.0.2", "ts-jest": "^26.1.0", "typescript": "^4.1.5" + }, + "dependencies": { + "@phntms/react-gtm": "^0.0.5" } }