diff --git a/bun.lockb b/bun.lockb index 49421e24..31e2f0e2 100755 Binary files a/bun.lockb and b/bun.lockb differ diff --git a/package.json b/package.json index dbd59c08..d3dfbec4 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "notivue-monorepo", - "version": "1.4.1", + "version": "1.4.0", "private": true, "workspaces": [ "packages/*", @@ -14,13 +14,12 @@ "build:demo": "bun run build && bun install && cd demo && bun run build", "test": "bun run build && bun install && cd tests && bun run test", "test:gui": "bun run build && concurrently \"cd packages/notivue && bun run watch\" \"bun install && cd tests && bun run test:gui\"", - "prepare": "bun x husky install" + "prepare": "bunx husky install" }, "devDependencies": { "concurrently": "^8.2.1", "lint-staged": "^14.0.1", - "prettier": "^2.8.8", - "husky": "^8.0.3" + "prettier": "^2.8.8" }, "trustedDependencies": [ "husky" diff --git a/packages/notivue/core/useStore.ts b/packages/notivue/core/useStore.ts index 96cfeefb..25689fd0 100644 --- a/packages/notivue/core/useStore.ts +++ b/packages/notivue/core/useStore.ts @@ -21,7 +21,7 @@ export function useStore() { * for the fact that each property is a [shallowRef](https://vuejs.org/api/reactivity-advanced.html#shallowref) * that allows for reactive updates and side effects. * - * Documentation: https://notivuedocs.netlify.app/api/use-notivue + * Documentation: https://notivue.netlify.app/api/use-notivue */ export function useNotivue(): ConfigSlice { if (isSSR) { @@ -36,7 +36,7 @@ export function useNotivue(): ConfigSlice { * * Portion of the store matching the actions to create notifications. * - * Documentation: https://notivuedocs.netlify.app/api/use-push + * Documentation: https://notivue.netlify.app/api/use-push */ export function usePush() { if (isSSR) return createPushSSR() @@ -52,7 +52,7 @@ export function usePush() { * - `entries` - read-only reactive array of all the current displayed notifications * - `queue` - read-only reactive array of all the notifications waiting to be displayed * - * Documentation: https://notivuedocs.netlify.app/api/use-notifications + * Documentation: https://notivue.netlify.app/api/use-notifications */ export function useNotifications(): NotivueComputedEntries { if (isSSR) { diff --git a/packages/notivue/core/utils.ts b/packages/notivue/core/utils.ts index f69a48ad..d8315522 100644 --- a/packages/notivue/core/utils.ts +++ b/packages/notivue/core/utils.ts @@ -45,7 +45,6 @@ export function mergeNotificationOptions( return { ...(mergedConfigOptions[optionsFromPush.type] ?? mergedConfigOptions.success), ...mergedConfigOptions.global, - ...(optionsFromPush.type === 'promise' ? { duration: Infinity } : {}), // Force duration infinity... - ...optionsFromPush, // ...except for push options + ...optionsFromPush, } } diff --git a/packages/notivue/nuxt/module.json b/packages/notivue/nuxt/module.json index 60ddb8ea..a478347b 100644 --- a/packages/notivue/nuxt/module.json +++ b/packages/notivue/nuxt/module.json @@ -1,5 +1,5 @@ { "name": "notivue/nuxt", "configKey": "notivue", - "version": "1.4.1" + "version": "1.4.0" } diff --git a/packages/notivue/package.json b/packages/notivue/package.json index 0451fa12..34aaa27b 100644 --- a/packages/notivue/package.json +++ b/packages/notivue/package.json @@ -1,6 +1,6 @@ { "name": "notivue", - "version": "1.4.1", + "version": "1.4.0", "private": false, "description": "Fully-featured toast notification system for Vue and Nuxt", "keywords": [ diff --git a/tests/Notivue/components/Notivue.vue b/tests/Notivue/components/Notivue.vue index fc697839..00e463af 100644 --- a/tests/Notivue/components/Notivue.vue +++ b/tests/Notivue/components/Notivue.vue @@ -103,14 +103,14 @@ function pushSkipQueue() { } async function pushPromiseAndResolve() { - const promise = push.promise(cyProps.options ?? {}) + const promise = push.promise({ ...cyProps.options, duration: Infinity } ?? {}) await new Promise((resolve) => setTimeout(resolve, RESOLVE_REJECT_DELAY)) promise.resolve(cyProps.newOptions ?? cyProps.options ?? {}) } async function pushPromiseAndReject() { - const promise = push.promise(cyProps.options ?? {}) + const promise = push.promise({ ...cyProps.options, duration: Infinity } ?? {}) await new Promise((resolve) => setTimeout(resolve, RESOLVE_REJECT_DELAY)) promise.reject(cyProps.newOptions ?? cyProps.options ?? {}) diff --git a/tests/Notivue/slot-custom-push-options.cy.ts b/tests/Notivue/slot-custom-push-options.cy.ts index 5a8d157e..0852046a 100644 --- a/tests/Notivue/slot-custom-push-options.cy.ts +++ b/tests/Notivue/slot-custom-push-options.cy.ts @@ -141,12 +141,12 @@ describe('Push notification options are merged properly with config', () => { .checkSlotAgainst(expectedOptions) }) - it('Promise - Should not override promise duration', () => { + it('Promise', () => { cy.mountNotivue(componentConf) .get('.Promise') .click() - .checkSlotAgainst({ ...expectedOptions, duration: null }) + .checkSlotAgainst(expectedOptions) }) }) diff --git a/tests/Notivue/slot-global-options.cy.ts b/tests/Notivue/slot-global-options.cy.ts index 39410506..32a8dc40 100644 --- a/tests/Notivue/slot-global-options.cy.ts +++ b/tests/Notivue/slot-global-options.cy.ts @@ -55,12 +55,12 @@ describe('Global options have higher priority over defaults', () => { .checkSlotAgainst(globalOptions) }) - it('Promise - Should not override duration', () => { + it('Promise', () => { cy.mountNotivue(customConfig) .get('.Promise') .click() - .checkSlotAgainst({ ...globalOptions, duration: null }) + .checkSlotAgainst(globalOptions) }) })