Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -110,12 +110,12 @@ npm install @tincre/promo-button # --save-dev if you want it as a dev dep

### ⚠️ Release 0.5.0 breaking changes ⚠️

Tincre released [`promo-button-node`](https://github.com/Tincre/promo-button-node) to handle utility and other functionality. As such **this lib will no longer export `getToken` or `generateAccessToken`**.
Tincre released [`promo-node`](https://github.com/Tincre/promo-node) to handle utility and other functionality. As such **this lib will no longer export `getToken` or `generateAccessToken`**.

To get those imports back, simply install the new dependency:

```
yarn add @tincre/promo-button-node@latest
yarn add @tincre/promo-node@latest
```

### Usage
Expand Down Expand Up @@ -157,7 +157,7 @@ securely authenticate requests to the [Promo API](https://tincre.dev/promo/docs/

```ts
// Promo API route support: https://tincre.dev/docs/reference
import { generateAccessToken, getToken } from '@tincre/promo-button-node';
import { generateAccessToken, getToken } from '@tincre/promo-node';
import type { NextApiRequest, NextApiResponse } from 'next';

export default async function handler(
Expand Down
3 changes: 1 addition & 2 deletions example/nextjs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,7 @@
"devDependencies": {
"@headlessui/react": "^1.6.0",
"@react-icons/all-files": "^4.1.0",
"@tincre/promo-button": "^0.6.0",
"@tincre/promo-button-node": "^0.0.6",
"@tincre/promo-button": "^0.7.0",
"@types/node": "^17.0.25",
"@types/react": "^18.0.6",
"@types/react-dom": "^18.0.2",
Expand Down
22 changes: 11 additions & 11 deletions example/nextjs/yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -187,22 +187,22 @@
dependencies:
tslib "^2.4.0"

"@tincre/promo-button-node@^0.0.6":
version "0.0.6"
resolved "https://registry.yarnpkg.com/@tincre/promo-button-node/-/promo-button-node-0.0.6.tgz#68a8520d7c63db86b2c911fc7213ffb1a954b073"
integrity sha512-dbE578XaWXad87Q5JMsPbYTiXM1W7sANMWac4LYjJMD7OmYH/YZpvzbmF1x4yOSQ6wqXsnyvkLXUi8czE19qUQ==
"@tincre/promo-button@^0.7.0":
version "0.7.0"
resolved "https://registry.yarnpkg.com/@tincre/promo-button/-/promo-button-0.7.0.tgz#5d069c93f24b320d6cbbaef8b52c992ad4324f05"
integrity sha512-7PfYhTICdUBAaYte81Ib9FhLRNc3MSwBjIjim7z1g7nQmumTUPOolOzKuh6nareOWik6MSAE7heucb8Ll5JkPA==
dependencies:
"@tincre/promo-node" "^0.1.0"

"@tincre/promo-node@^0.1.0":
version "0.1.0"
resolved "https://registry.yarnpkg.com/@tincre/promo-node/-/promo-node-0.1.0.tgz#2806cbea337e75cc2d9bb2a76778de3d26981308"
integrity sha512-qg8y6aE2mGrCUM8DScqksMl7jD/U+DdyOZmDYoNUMj8aCWwl00J7dB3LaRZb1qzQMbyB02SnbZzkAw1JPKmw0w==
dependencies:
"@types/jsonwebtoken" ">=8"
cross-fetch ">=3.0"
jsonwebtoken ">=8"

"@tincre/promo-button@^0.6.0":
version "0.6.0"
resolved "https://registry.yarnpkg.com/@tincre/promo-button/-/promo-button-0.6.0.tgz#d2fbb87e14277a3c2d9204fab6bd81035f12232c"
integrity sha512-ygXPSIzwxxkxaHEr4fofqJcZ2ws1jvzDt01/9L3AbJW5E5cNCW/Cg2vvfXoZ3tFiL6337lgFQAz9doC89uISSQ==
dependencies:
"@tincre/promo-button-node" "^0.0.6"

"@types/json5@^0.0.29":
version "0.0.29"
resolved "https://registry.yarnpkg.com/@types/json5/-/json5-0.0.29.tgz#ee28707ae94e11d2b827bcbe5270bcea7f3e71ee"
Expand Down
2 changes: 1 addition & 1 deletion example/react/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
"devDependencies": {
"@esbuild-plugins/node-globals-polyfill": "^0.1.1",
"@esbuild-plugins/node-modules-polyfill": "^0.1.4",
"@tincre/promo-button": "^0.6.0",
"@tincre/promo-button": "^0.7.0",
"@types/react": "^17.0.40",
"@types/react-dom": "^17.0.13",
"jsonwebtoken": "^8.5.1",
Expand Down
63 changes: 32 additions & 31 deletions example/react/yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -315,33 +315,33 @@
estree-walker "^2.0.1"
picomatch "^2.2.2"

"@tincre/promo-button-node@^0.0.6":
version "0.0.6"
resolved "https://registry.yarnpkg.com/@tincre/promo-button-node/-/promo-button-node-0.0.6.tgz#68a8520d7c63db86b2c911fc7213ffb1a954b073"
integrity sha512-dbE578XaWXad87Q5JMsPbYTiXM1W7sANMWac4LYjJMD7OmYH/YZpvzbmF1x4yOSQ6wqXsnyvkLXUi8czE19qUQ==
"@tincre/promo-button@^0.7.0":
version "0.7.0"
resolved "https://registry.yarnpkg.com/@tincre/promo-button/-/promo-button-0.7.0.tgz#5d069c93f24b320d6cbbaef8b52c992ad4324f05"
integrity sha512-7PfYhTICdUBAaYte81Ib9FhLRNc3MSwBjIjim7z1g7nQmumTUPOolOzKuh6nareOWik6MSAE7heucb8Ll5JkPA==
dependencies:
"@tincre/promo-node" "^0.1.0"

"@tincre/promo-node@^0.1.0":
version "0.1.0"
resolved "https://registry.yarnpkg.com/@tincre/promo-node/-/promo-node-0.1.0.tgz#2806cbea337e75cc2d9bb2a76778de3d26981308"
integrity sha512-qg8y6aE2mGrCUM8DScqksMl7jD/U+DdyOZmDYoNUMj8aCWwl00J7dB3LaRZb1qzQMbyB02SnbZzkAw1JPKmw0w==
dependencies:
"@types/jsonwebtoken" ">=8"
cross-fetch ">=3.0"
jsonwebtoken ">=8"

"@tincre/promo-button@^0.6.0":
version "0.6.0"
resolved "https://registry.yarnpkg.com/@tincre/promo-button/-/promo-button-0.6.0.tgz#d2fbb87e14277a3c2d9204fab6bd81035f12232c"
integrity sha512-ygXPSIzwxxkxaHEr4fofqJcZ2ws1jvzDt01/9L3AbJW5E5cNCW/Cg2vvfXoZ3tFiL6337lgFQAz9doC89uISSQ==
dependencies:
"@tincre/promo-button-node" "^0.0.6"

"@types/jsonwebtoken@>=8":
version "9.0.2"
resolved "https://registry.yarnpkg.com/@types/jsonwebtoken/-/jsonwebtoken-9.0.2.tgz#9eeb56c76dd555039be2a3972218de5bd3b8d83e"
integrity sha512-drE6uz7QBKq1fYqqoFKTDRdFCPHd5TCub75BM+D+cMx7NU9hUz7SESLfC2fSCXVFMO5Yj8sOWHuGqPgjc+fz0Q==
version "9.0.3"
resolved "https://registry.yarnpkg.com/@types/jsonwebtoken/-/jsonwebtoken-9.0.3.tgz#1f22283b8e1f933af9e195d720798b64b399d84c"
integrity sha512-b0jGiOgHtZ2jqdPgPnP6WLCXZk1T8p06A/vPGzUvxpFGgKMbjXJDjC5m52ErqBnIuWZFgGoIJyRdeG5AyreJjA==
dependencies:
"@types/node" "*"

"@types/node@*":
version "20.4.4"
resolved "https://registry.yarnpkg.com/@types/node/-/node-20.4.4.tgz#c79c7cc22c9d0e97a7944954c9e663bcbd92b0cb"
integrity sha512-CukZhumInROvLq3+b5gLev+vgpsIqC2D0deQr/yS1WnxvmYLlJXZpaQrQiseMY+6xusl79E04UjWoqyr+t1/Ew==
version "20.6.3"
resolved "https://registry.yarnpkg.com/@types/node/-/node-20.6.3.tgz#5b763b321cd3b80f6b8dde7a37e1a77ff9358dd9"
integrity sha512-HksnYH4Ljr4VQgEy2lTStbCKv/P590tmPe5HqOnv9Gprffgv5WXAY+Y5Gqniu0GGqeTCUdBnzC3QSrzPkBkAMA==

"@types/prop-types@*":
version "15.7.5"
Expand Down Expand Up @@ -685,14 +685,20 @@ json5@^2.2.2:
integrity sha512-XmOWe7eyHYH14cLdVPoyg+GOH3rYX++KpzrylJwSW98t3Nk+U8XOl8FWKOgwtzdb8lXGf6zYwDUzeHMWfxasyg==

jsonwebtoken@>=8:
version "9.0.1"
resolved "https://registry.yarnpkg.com/jsonwebtoken/-/jsonwebtoken-9.0.1.tgz#81d8c901c112c24e497a55daf6b2be1225b40145"
integrity sha512-K8wx7eJ5TPvEjuiVSkv167EVboBDv9PZdDoF7BgeQnBLVvZWW9clr2PsQHVJDTKaEIH5JBIwHujGcHp7GgI2eg==
version "9.0.2"
resolved "https://registry.yarnpkg.com/jsonwebtoken/-/jsonwebtoken-9.0.2.tgz#65ff91f4abef1784697d40952bb1998c504caaf3"
integrity sha512-PRp66vJ865SSqOlgqS8hujT5U4AOgMfhrwYIuIhfKaoSCZcirrmASQr8CX7cUg+RMih+hgznrjp99o+W4pJLHQ==
dependencies:
jws "^3.2.2"
lodash "^4.17.21"
lodash.includes "^4.3.0"
lodash.isboolean "^3.0.3"
lodash.isinteger "^4.0.4"
lodash.isnumber "^3.0.3"
lodash.isplainobject "^4.0.6"
lodash.isstring "^4.0.1"
lodash.once "^4.0.0"
ms "^2.1.1"
semver "^7.3.8"
semver "^7.5.4"

jsonwebtoken@^8.5.1:
version "8.5.1"
Expand Down Expand Up @@ -762,11 +768,6 @@ lodash.once@^4.0.0:
resolved "https://registry.yarnpkg.com/lodash.once/-/lodash.once-4.1.1.tgz#0dd3971213c7c56df880977d504c88fb471a97ac"
integrity sha512-Sb487aTOCr9drQVL8pIxOzVhafOjZN9UU54hiN8PU3uAiSV7lx1yYNpbNmex2PK6dSJoNTSJUUswT651yww3Mg==

lodash@^4.17.21:
version "4.17.21"
resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.21.tgz#679591c564c3bffaae8454cf0b3df370c3d6911c"
integrity sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==

lru-cache@^5.1.1:
version "5.1.1"
resolved "https://registry.yarnpkg.com/lru-cache/-/lru-cache-5.1.1.tgz#1da27e6710271947695daf6848e847f01d84b920"
Expand Down Expand Up @@ -804,9 +805,9 @@ nanoid@^3.3.6:
integrity sha512-BGcqMMJuToF7i1rt+2PWSNVnWIkGCU78jBG3RxO/bZlnZPK2Cmi2QaffxGO/2RvWi9sL+FAiRiXMgsyxQ1DIDA==

node-fetch@^2.6.12:
version "2.6.12"
resolved "https://registry.yarnpkg.com/node-fetch/-/node-fetch-2.6.12.tgz#02eb8e22074018e3d5a83016649d04df0e348fba"
integrity sha512-C/fGU2E8ToujUivIO0H+tpQ6HWo4eEmchoPIoXtxCrVghxdKq+QOHqEZW7tuP3KlV3bC8FRMO5nMCC7Zm1VP6g==
version "2.7.0"
resolved "https://registry.yarnpkg.com/node-fetch/-/node-fetch-2.7.0.tgz#d0f0fa6e3e2dc1d27efcd8ad99d550bda94d187d"
integrity sha512-c4FRfUm/dbcWZ7U+1Wq0AwCyFL+3nt2bEw05wfxSz+DWpWsitgmSgYmy2dQdWyKC1694ELPqMs/YzUSNozLt8A==
dependencies:
whatwg-url "^5.0.0"

Expand Down Expand Up @@ -939,7 +940,7 @@ semver@^5.6.0:
resolved "https://registry.yarnpkg.com/semver/-/semver-5.7.2.tgz#48d55db737c3287cd4835e17fa13feace1c41ef8"
integrity sha512-cBznnQ9KjJqU67B52RMC65CMarK2600WFnbkcaiwWq3xy/5haFJlshgnpjovMVJ+Hff49d8GEn0b87C5pDQ10g==

semver@^7.3.8:
semver@^7.5.4:
version "7.5.4"
resolved "https://registry.yarnpkg.com/semver/-/semver-7.5.4.tgz#483986ec4ed38e1c6c48c34894a9182dbff68a6e"
integrity sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA==
Expand Down