Skip to content

Releases: dargmuesli/nuxt-cookie-control

2.0.1

09 Dec 08:09
Compare
Choose a tag to compare

2.0.1 (2022-12-09)

Bug Fixes

v2.0.0

14 Jan 04:11
Compare
Choose a tag to compare

The first release of @dargmuesli/nuxt-cookie-control for Vue 3 only! 🎉

This repo continues the great work done on nuxt-cookie-control by Dario Ferderber 👏 Make sure to account for the breaking changes listed below and check the README!

🔥 BREAKING CHANGES

  1. cookies.(necessary|optional).cookies is now called cookies.(necessary|optional).targetCookieIds

  2. The following properties do not exist anymore:

    • cookies.(necessary|optional).async
    • cookies.(necessary|optional).accepted (see below)
    • cookies.(necessary|optional).declined (see below)
    • cookies.(necessary|optional).initialState

🚚 Migration instructions

To react to cookies being accepted or declined you can watch the Cookie Control's cookiesEnabled and cookiesEnabledIds state properties instead, as they are Refs.

watch(
  () => cookieControl.cookiesEnabledIds.value,
  (current, previous) => {
    if (
      (!previous?.includes('google-analytics') &&
        current?.includes('google-analytics')) ||
      (previous?.includes('google-analytics') &&
        !current?.includes('google-analytics'))
    ) {
      // cookie with id `google-analytics` got added or removed
      window.location.reload() // placeholder for your custom change handler
    }
  },
  { deep: true }
)

To check if the user has accepted a cookie having the id: 'google-analytics' (or name: { en: 'google-analytics' }) without adding a Ref watcher you may write in a client side plugin:

const cookieControl = useCookieControl()

if (cookieControl.cookiesEnabledIds.value.includes('google-analytics')) {
    initGoogleAnalytics() // placeholder for your custom initialization
}

2.0.0-beta.7

09 Dec 05:44
Compare
Choose a tag to compare
2.0.0-beta.7 Pre-release
Pre-release

2.0.0-beta.7 (2022-12-09)

Bug Fixes

  • component: extract external dependencies (31c6945)
  • components: add specific types on stream functions (0fccd65)
  • package: remove peer dependencies (7c0efed)

2.0.0-beta.6

08 Dec 09:56
Compare
Choose a tag to compare
2.0.0-beta.6 Pre-release
Pre-release

2.0.0-beta.6 (2022-12-08)

Bug Fixes

  • methods: fallback to default language (6655207)

2.0.0-beta.5

08 Dec 09:12
Compare
Choose a tag to compare
2.0.0-beta.5 Pre-release
Pre-release

2.0.0-beta.5 (2022-12-08)

Bug Fixes

2.0.0-beta.4

08 Dec 08:55
Compare
Choose a tag to compare
2.0.0-beta.4 Pre-release
Pre-release

2.0.0-beta.4 (2022-12-08)

Bug Fixes

  • module: resolve paths correctly (b25832c)
  • package: correct scripts (43d2679)
  • playground: readd lost nuxt config (a9dddf8)

2.0.0-beta.3

08 Dec 08:12
Compare
Choose a tag to compare
2.0.0-beta.3 Pre-release
Pre-release

2.0.0-beta.3 (2022-12-08)

Bug Fixes

  • package: correct postinstall hook (17038d7)

2.0.0-beta.2

08 Dec 07:43
Compare
Choose a tag to compare
2.0.0-beta.2 Pre-release
Pre-release

2.0.0-beta.2 (2022-12-08)

Bug Fixes

  • package: remove release-it (204394f)

v2.0.0-beta.1

08 Dec 07:46
Compare
Choose a tag to compare
v2.0.0-beta.1 Pre-release
Pre-release
chore(release): 2.0.0-beta.1 [skip ci]

# [2.0.0-beta.1](https://github.com/dargmuesli/nuxt-cookie-control/compare/1.9.9...2.0.0-beta.1) (2022-12-08)

### Bug Fixes

* **components:** add missing imports ([aa88808](https://github.com/dargmuesli/nuxt-cookie-control/commit/aa888087086baa7c44298f7d25ddbb073d82893e))
* **components:** correct properties ([ef752ea](https://github.com/dargmuesli/nuxt-cookie-control/commit/ef752ead79150597bac0fba843d86009f3527f80))
* **components:** include typing ([443bda0](https://github.com/dargmuesli/nuxt-cookie-control/commit/443bda0c51fdc0e9abb1c83a33830467f4d27dcb))
* **components:** migrate to script setup ([d7f3b3e](https://github.com/dargmuesli/nuxt-cookie-control/commit/d7f3b3e7ca9d3b30a3c97af2e3ed726297b0f298))
* correct composables ([22faf97](https://github.com/dargmuesli/nuxt-cookie-control/commit/22faf97f2041faaebaecc261d07a87fab89d9511))
* correct typing ([79322a3](https://github.com/dargmuesli/nuxt-cookie-control/commit/79322a38431b23451c305ec960342458b2e13c14))
* correct typing ([bde33f4](https://github.com/dargmuesli/nuxt-cookie-control/commit/bde33f4282d5691cf6be202eeaddc1395047e1bb))
* **eslint:** set end of line to auto ([17890db](https://github.com/dargmuesli/nuxt-cookie-control/commit/17890dbc2f648e49465e26b264337d520d91fe14))
* **git:** ignore output ([a1fa4c3](https://github.com/dargmuesli/nuxt-cookie-control/commit/a1fa4c356e68541ef9872b2ddd42ad147d9512e7))
* **lint-stages:** only lint staged files ([d392cdd](https://github.com/dargmuesli/nuxt-cookie-control/commit/d392cdddc7d4f8afee463352b655307acdc3275f))
* **locale:** correct imports ([71c5eab](https://github.com/dargmuesli/nuxt-cookie-control/commit/71c5eab0a80f7bf9b8e9329d5a4ba4046bb85789))
* **package:** add release configuration ([68c944a](https://github.com/dargmuesli/nuxt-cookie-control/commit/68c944ac6c922b95e5bdf848e63e28333dd783d5))
* **package:** correct files ([759c520](https://github.com/dargmuesli/nuxt-cookie-control/commit/759c5205b28ba9fc77370770a0d495a2a6138b0d))
* **package:** correct typecheck command ([3e2fc33](https://github.com/dargmuesli/nuxt-cookie-control/commit/3e2fc33b74c8d02ca5ee0bf19cc848f2ea7b4a89))
* **package:** improve script names ([0d61201](https://github.com/dargmuesli/nuxt-cookie-control/commit/0d6120142ff6645ea073a03e9b969e7d15a4d9df))
* **package:** use npm in prepack ([fe73557](https://github.com/dargmuesli/nuxt-cookie-control/commit/fe7355703a094dd0414205a981ab8e3ef816233a))
* **src:** add missing tsconfig ([c0a0cd6](https://github.com/dargmuesli/nuxt-cookie-control/commit/c0a0cd651782d0d480e7997878d3562e54d2d2db))

### Features

* add Arabic and Dutch translations ([c0c0422](https://github.com/dargmuesli/nuxt-cookie-control/commit/c0c042279fe60b52f34fe31c6e157ffe0d8c720f))
* begin nuxt 3 migration ([64c997d](https://github.com/dargmuesli/nuxt-cookie-control/commit/64c997d5e7294a066c58036a111034c87621d942))
* continue migration ([a07b462](https://github.com/dargmuesli/nuxt-cookie-control/commit/a07b462f34f0c40da3e4501e5ee178a8f9edf47b))
* continue nuxt 3 migration ([3ace873](https://github.com/dargmuesli/nuxt-cookie-control/commit/3ace873a6566a3a1f06d57794f1bca97a8e066e9))
* **deps:** make peer dependencies optional ([355fd43](https://github.com/dargmuesli/nuxt-cookie-control/commit/355fd439da0630fcda1d75349bdf243cea8732f6))
* finish nuxt 3 migration ([ccc55a7](https://github.com/dargmuesli/nuxt-cookie-control/commit/ccc55a76d7fa2443fbb9cfbe41054751b224f56d))
* import composable ([a07f344](https://github.com/dargmuesli/nuxt-cookie-control/commit/a07f344fdbe6eb9c06c7c267a86912d6688faedd))
* improve typing ([1c982c9](https://github.com/dargmuesli/nuxt-cookie-control/commit/1c982c9f4a95cda91c2be5e89a0ad1b8cf679eb2))
* **playground:** add cookie iframe component ([33f3624](https://github.com/dargmuesli/nuxt-cookie-control/commit/33f3624ee77a07ed1d2193b2ab2cb9d672e18bcc))
* **playground:** add module configuration ([8140d81](https://github.com/dargmuesli/nuxt-cookie-control/commit/8140d8152d68b45edb2939d8934ecc052678af15))
* **plugin:** add nuxt context to accepted / declined calls ([9ac2fd0](https://github.com/dargmuesli/nuxt-cookie-control/commit/9ac2fd03feeae6ec0f316dfafd920b386ca7d9a2))
* **postinstall:** remove outdated link ([0f66469](https://github.com/dargmuesli/nuxt-cookie-control/commit/0f664694f810332db1a7610cbb76917ef83732ef))
* remove `globalname` ([f2d2178](https://github.com/dargmuesli/nuxt-cookie-control/commit/f2d2178f396225096661ed9fe64c9e716bbcc0da))

### BREAKING CHANGES

* `globalname` is not available anymore.

v1.9.9

08 Dec 07:09
3210b4d
Compare
Choose a tag to compare
chore(package): change remote