Skip to content

Releases: nuxt/vue-meta

v2.0.1

09 Jun 18:58
Compare
Choose a tag to compare

In some circumstances (mostly ssr) the VueMeta plugin could be installed twice, make sure to prevent that

Bug fixes

  • allow _hasMetaInfo to be configurable (8b7b991)
  • prevent vue-meta plugin to be installed twice (094fd9d)

v2.0.0

09 Jun 15:27
Compare
Choose a tag to compare

🎀 We are delighted to officially release Vue-Meta v2.0!

Breaking Change

  • The behaviour of keys with undefined as value has changed:
    • In v1 an undefined value would be rendered as a boolean attribute, but as boolean attributes are actually part of e.g. the html5 specifications this functionality has been removed
    • In v2 an undefined value can be used to render child properties conditionally.

See the docs for more information about boolean attribute handling and how to use child properties conditionally

Noteworthy Changes

  • We now have a separate documentation website! https://vue-meta.nuxtjs.org
  • The global mixin which vue-meta uses now only injects a beforeCreate lifecycle hook. Other lifecycle hooks will only be added when a component has a metaInfo property defined
  • When retrieving and merging the metaInfo in your app, component branches without any component which defines metaInfo are skipped
  • A refreshOnceOnNavigation option has been added which uses vue-router navigation guards to only trigger meta updates once after navigation. Also check the afterNavigation callback which can be used to run some script that relies on update metadata (e.g. page tracking)
  • You have more control on which value is used when a parent and child define the same vmid. See the docs on special cases for more information
  • Basic support has been added for using multiple Vue apps or off-document components on a page, currently the following is supported:
    • adding/removing tags (without a vmid) is fully supported
    • there is partial support for using vmid across apps:
      • an app can override a previous set tag with the same vmid from another app
      • if you remove a vmid in app 2 then vue-meta wont automatically load the corresponding vmid from app 1
    • applying attributes are not supported across apps, its recommended to only have one app which adds attributes to a tag
      • you could eg have one app to add html attributes, one to add head and one to add bod but you cant have two apps which both add html attributes as the second app will fully overwrite the attributes of the first app

Migration Guide

  1. Update your vue-meta version (tip: use ncu)
  2. Run npm install or yarn install
  3. Change the boolean attributes you use within your app to have a different value than undefined
  4. Profit!

Features

  • add afterNavigation callback (97badf6)
  • add amp as boolean attribute (b7ee040)
  • add browser build without ssr code (2862a5b)
  • add esm builds (56f0b61)
  • add getOptions method (31e975d)
  • add option to refresh once during navigation (8e21175)
  • add pause/resume methods to pause updates (d237180)
  • attr keys can have array values (01edc8c)
  • child can indicate its content should be ignored (22e456c)
  • child can indicate parent vmid to be removed (915fedf)
  • export hasMetaInfo helper function (173b31d)
  • major refactor, cleanup and jest tests (5d64d43)
  • render boolean attributes correctly (deea5cf)
  • track branches which contain metaInfo components (f2e8eb5)
  • use named exports to export helper functions (95c3b7d)
  • add basic support for multiple apps on one page (024e7c5)
  • ts: update types for v2 (7b85ff2)
  • ts: add microdata meta tag type (11c8138)

Bug Fixes

  • add afterNavigation type (722786d)
  • add inject stub for browser build (02e4094)
  • add ts type for refresh once (5935cf3)
  • dont call changed with explicit this (5ad6711)
  • dont inline typeof definitions (5031acf)
  • implement simply array polyfills (d38f81e)
  • rollup paths (bfbd181)
  • trigger meta refresh on page load (b824a27)
  • move addNavGuards check to mounted hook (e80643b)
  • use timers instead of requestAnimationFrame (c040de7)

Thanks to

v2.0.0-rc.2

06 Jun 09:34
Compare
Choose a tag to compare
v2.0.0-rc.2 Pre-release
Pre-release

This release candidate adds basic support for using multiple Vue apps or off-document components on a page.

Currently the following is supported:

  • adding/removing tags (without a vmid) is fully supported
  • there is partial support for using vmid across apps:
    • app 2 can override a tag with the same vmid from app 1 (vice versa is not possible)
    • if you remove a vmid in app 2 then vue-meta wont automatically load the corresponding vmid from app 1
  • applying attributes are not supported across apps, its recommended to only have one app which adds attributes to a tag
    • you could eg have one app to add html attributes, one to add head and one to add bod but you cant have two apps which both add html attributes as the second app will fully overwrite the attributes of the first app

Features

  • add basic support for multiple apps on one page (024e7c5)

Bug Fixes

  • detect and apply changes triggered before or during initialization (34c6ad9)

v2.0.0-rc.1

23 Apr 10:54
Compare
Choose a tag to compare
v2.0.0-rc.1 Pre-release
Pre-release

The second Release Candidate fixes an issue introduced by the first RC and a long-standing issue when opening a page in a not-visible tab

Bug Fixes

  • move addNavGuards check to mounted hook (e80643b)
  • use timers instead of requestAnimationFrame (c040de7)

v2.0.0-rc.0

20 Apr 11:58
Compare
Choose a tag to compare
v2.0.0-rc.0 Pre-release
Pre-release

After a long wait here it is, the first Release Candidate for vue-meta v2.0 which should resolve most outstanding issues. As v2 is mostly a refactor of v1, there are not many breaking changes and we expect to release v2 soon

Breaking Change

  • The behaviour of keys with undefined as value has changed:
    • In v1 it would be rendered as a boolean attribute, but as boolean attributes are actually part of e.g. the html5 specifications this functionality has been removed
    • In v2 it can be used to render child properties conditionally.

See the docs for more information about boolean attribute handling and how to use child properties conditionally

Noteworthy Changes

  • We now have a separate documentation website! https://vue-meta.nuxtjs.org
  • The global mixin which vue-meta uses now only injects a beforeCreate lifecycle hook. Other lifecycle hooks will only be added when a component has a metaInfo property defined
  • When retrieving and merging the metaInfo in your app, component branches without any component which defines metaInfo are skipped
  • A refreshOnceOnNavigation option has been added which uses vue-router navigation guards to only trigger meta updates once after navigation. Also check the afterNavigation callback which can be used to run some script that relies on update metadata (e.g. page tracking)
  • You have more control on which value is used when a parent and child define the same vmid. See the docs on special cases for more information

Migration Guide

If you want to help us test this release candidate, please follow these steps:

  1. Manually update your vue-meta version

    1. E.g. update your package.json to read "vue-meta": "2.0.0-rc.0" (or use the next tag):
    2. Run npm install or yarn install
  2. Change the boolean attributes you use to have a different value than undefined

  3. Test and please report any issues you experience!

Features

  • add afterNavigation callback (97badf6)
  • add amp as boolean attribute (b7ee040)
  • add browser build without ssr code (2862a5b)
  • add es build (56f0b61)
  • add getOptions method (31e975d)
  • add option to refresh once during navigation (8e21175)
  • add pause/resume methods to pause updates (d237180)
  • attr keys can have array values (01edc8c)
  • child can indicate its content should be ignored (22e456c)
  • child can indicate parent vmid to be removed (915fedf)
  • export hasMetaInfo helper function (173b31d)
  • major refactor, cleanup and jest tests (5d64d43)
  • ts: update types for v2 (7b85ff2)
  • render boolean attributes correctly (deea5cf)
  • track branches which contain metaInfo components (f2e8eb5)
  • use named exports to export helper functions (95c3b7d)

Bug Fixes

  • add afterNavigation type (722786d)
  • add inject stub for browser build (02e4094)
  • add ts type for refresh once (5935cf3)
  • dont call changed with explicit this (5ad6711)
  • dont inline typeof definitions (5031acf)
  • implement simply array polyfills (d38f81e)
  • rollup paths (bfbd181)
  • trigger meta refresh on page load (b824a27)

v1.6.0

28 Mar 16:16
Compare
Choose a tag to compare

Patches

  • ci: add .circleci (pooya parsa) (6f60512)
  • docs: add tips about inline script in README.md script example (#304) (William Chong) (bf7035b)
  • docs: fix CI link (Alexander Lichter) (2742965)
  • feat: don't generate title tag if title is empty (#334) (Xin Du (Clark)) (2141bab)
  • fix: follow html specs with regards to end tags (#314) (Pim) (a21037f)
  • fix: $meta is not defined in Vue interface type (#312) (Nicolas Igot) (9dfb001)
  • fix: type annotation for script tag (#305) (Taku Fukada) (f79f5b3)
  • 🚢 CDN update (Sébastien Chopin) (f626a42)

v1.5.8

18 Dec 16:44
Compare
Choose a tag to compare

Patches

  • fix: replace lodash.uniqby with internal fn #298 by @manniL

v1.5.7

18 Dec 15:46
Compare
Choose a tag to compare

Patches

v1.5.6

26 Nov 16:51
Compare
Choose a tag to compare

Fixes

  • Dependencies upgrade for audit fix, also upgraded to Webpack 4 & Babel 7
  • fix(pkg): remove extra yarn.lock from npm package (#287)
  • Bail on empty objects sent to the tagGenerator function (#286)
  • Fix empty string is undefined #52 (#274)

v1.5.5

29 Sep 00:34
Compare
Choose a tag to compare

Fix

Revert "feat: merge mixins options" #273