Skip to content

Latest commit

 

History

History
695 lines (368 loc) · 27.7 KB

CHANGELOG.md

File metadata and controls

695 lines (368 loc) · 27.7 KB

1.0.0-rc.6 (2021-03-29)

Bug Fixes

1.0.0-rc.5 (2021-03-11)

1.0.0-rc.4 (2021-03-11)

Bug Fixes

1.0.0-rc.3 (2021-03-03)

Bug Fixes

1.0.0-rc.2 (2021-02-18)

Bug Fixes

Features

1.0.0-rc.1 (2021-01-20)

1.0.0-beta.26 (2021-01-14)

Bug Fixes

1.0.0-beta.25 (2021-01-08)

BREAKING CHANGES

  • useCSSModule renamed to useCssModule to align with Vue 3 (#626)
  • useCSSModule is depreacted.

1.0.0-beta.24 (2021-01-06)

Bug Fixes

1.0.0-beta.23 (2021-01-05)

Bug Fixes

  • useCSSModule to adapt the change of getCurrentInstance, close #620 (#622) (2ddead0)
  • README: The correct option name is emits (#617) (4b2f1ab)

1.0.0-beta.22 (2020-12-19)

Features

  • getCurrentInstance: Aligning with vue3 (#520) (1495a46)

BREAKING CHANGES

  • getCurrentInstance: The internal vm can be accessed with getCurrentInstance().proxy
const vm = getCurrentInstance()

// becomes

const vm = getCurrentInstance().proxy

1.0.0-beta.21 (2020-12-07)

Bug Fixes

  • destructure attrs from context keep reactive, close #264 (#594) (4eecd66)

Features

1.0.0-beta.20 (2020-11-24)

Bug Fixes

Features

1.0.0-beta.19 (2020-11-02)

Bug Fixes

1.0.0-beta.18 (2020-10-21)

Bug Fixes

  • type: vue constructor should not require props with default values (#567) (964f9f3)
  • better vueDependency importing, close #564 (#572) (555f20a)

Features

  • reactivity: add Vue.delete workaround (#571) (b41da83)

1.0.0-beta.17 (2020-10-17)

Bug Fixes

Code Refactoring

BREAKING CHANGES

1.0.0-beta.16 (2020-10-10)

Bug Fixes

1.0.0-beta.15 (2020-10-04)

Bug Fixes

  • reactive: fix issue when using reactive array in the template (#532) (d99b91d)
  • reactive in SSR (#546) (535c829)
  • incorrect warning for getRegisteredVueOrDefault, resolve #544 (3a1d992)
  • reactive for props (#547) (4d39443)
  • vue-test: prevent warning when using multiple localVue (#531) (5484bb7)

1.0.0-beta.14 (2020-09-15)

Bug Fixes

  • circular objects and making all Vue.observable objects isReactive (#512) (f204daa)

Features

  • reactive: allow usage of reactive before Vue.use (#515) (89fd11c)

1.0.0-beta.13 (2020-09-12)

Bug Fixes

  • sets: check for window to avoid SSR errors (#511) (9ea7230)

1.0.0-beta.12 (2020-09-12)

Features

1.0.0-beta.11 (2020-08-22)

Bug Fixes

  • setup: handle updates for directly return a reactive object (#488) (a7f2c25), closes #487
  • watch: check if ob has value before addSub (#477) (d8cd30d)

1.0.0-beta.10 (2020-08-15)

Bug Fixes

  • watch: check if ob has value before addSub (#477) (d8cd30d)

1.0.0-beta.9 (2020-08-11)

Bug Fixes

  • watch: watch will trigger when added new keys using set (#468) (13bfed1)

1.0.0-beta.8 (2020-08-07)

Bug Fixes

1.0.0-beta.7 (2020-08-07)

BREAKING CHANGES

  • template auto ref unwrapping are now applied shallowly, i.e. only at the root level. See vuejs/core#1682 for more details.

Features

  • proxyRefs method and ShallowUnwrapRefs type (#456) (149821a)

Performance Improvements

1.0.0-beta.6 (2020-07-22)

Features

  • shallowReadonly: add shallowReadonly and set computed to be shallowReadonly (#447) (cfbbcec)

1.0.0-beta.5 (2020-07-20)

1.0.0-beta.4 (2020-07-18)

Bug Fixes

Features

1.0.0-beta.3 (2020-07-09)

Bug Fixes

1.0.0-beta.2 (2020-07-05)

Bug Fixes

Features

1.0.0-beta.1 (2020-06-30)

BREAKING CHANGES

  • change umd exported name to VueCompositionAPI (#399)
  • rename createElement to h (#400)
  • drop createComponent (#389)
  • match dist file naming with vue-next (#413)

Bug Fixes

Features

0.6.7 (2020-06-24)

Bug Fixes

  • toRefs: do not warn when toRefs is called in a prop value (#405) (048b6d3)
  • type: improve defineComponent type for option apis (#406) (1c64108)

Features

0.6.6 (2020-06-21)

Reverts

0.6.5 (2020-06-19)

Bug Fixes

  • watchEffect: prevent recursive calls when using flush:sync (#389) (f7f1e77)
  • not unwrapping markRaw objects (#386) (575d100)
  • unwrap refs returned by data (#387) (1f07075)

0.6.4 (2020-06-16)

Bug Fixes

  • setup: call stack exceeded when returning circular dependency (#380) (66f58ba)
  • setup: Vue.extend(Comp).extend({}) - vue-test-utils (#383) (ce932bf)

0.6.3 (2020-06-12)

Bug Fixes

0.6.2 (2020-06-11)

Bug Fixes

  • reactivity: unwrap nested refs on the template (#361) (1fd48f5)
  • defineComponent() with array props (#364) (d7048d4)
  • setup: Allow retuning frozen objects on the setup (#366) (bca3a69)
  • mark props as reactive (#359) (bc78428)

0.6.1

Fix

  • __DEV__ is not defined, #355, @yoyo930021

0.6.0

Great thanks to @pikax for #311, making most of the APIs better aligned with the latest vue-next.

BREAKING CHANGE

  • The lazy option of watch has been replaced by the opposite immediate option, which defaults to false. (It's ignored when using the effect signature). more details (#266)
  • Rename nonReactive to markRaw
  • watchEffect now follows the same behaviour as v3 (triggers immediately).
  • UnwrapRef types from vue-next this can cause some incompatibilities.

Bug Fixes

  • Added missing reactivity API from vue-next, #311, @pikax
  • Fix return type of toRefs, #315
  • Fix incorrect ref typing, #344, @antfu
  • Binding context vm when using function without parentheses, #148, @pikax
  • computed: destroy helper vm of computed to prevent memleak, #277, @LinusBorg
  • Remove the surplus Function type from PropType, #352, @pikax

Features

  • Added unref(#309), isReactive (#327), toRef (#313), UnwrapRef (#247)
  • Added shallowReactive, shallowRef
  • Added toRaw
  • getCurrentInstance available on the lifecycle hooks (onMounted, etc)
  • getCurrentInstance returns undefined when called outside setup instead of throwing exception

Types

  • Align reactivity types with vue-next

0.5.0

  • New: watchEffect function, lingin up with the latest version of the RFC (RFC docs) (#275)
  • Fix: setup from a mixin should called before the component's own (#276)
  • Fix(types): Fix corner case in UnWrapRef internal type (#261)
  • types: Add Element to bailout types for unwrapping (#278)

0.4.0

  • Refactor: rename createComponent to defineComponent (the createComponent function is still there but deprecated) #230
  • Fix: correct the symbol check; fixes the compatibility issue in iOS 9 #218
  • Fix: avoid accessing undeclared instance fields on type-level; fixes Vetur template type checking; fixes vue-router type compatibility #189
  • Fix: onUnmounted should not be run on deactivated #217

0.3.4

  • Fixed reactive setter not working on the server.
  • New isServer setup context property.

0.3.3

  • Fixed make __ob__ unenumerable #149.
  • Fixed computed type
  • Expose getCurrentInstance for advanced usage in Vue plugins.
  • New onServerPrefetch lifecycle hook and new ssrContext setup context property #198.

0.3.2

  • Improve TypeScript type infer for props option #106.
  • Fix return type of createComponent not being compatible with vue-router #130.
  • Expose listeners on SetupContext #132.

0.3.1

  • Fix cleaup callback not running when watcher stops #113.
  • Fix watcher callback not flushing at right timing #120.

0.3.0

  • Improve TypeScript type definitions.
  • Fix context.slots not being available before render #84.

Changed

The render function returned from setup no longer receives any parameters.

Previous

export default {
  setup() {
    return props => h('div', prop.msg);
  },
};

Now

export default {
  setup(props) {
    return () => h('div', prop.msg);
  },
};

0.2.1

  • Declare your expected prop types directly in TypeScript:

    import { createComponent, createElement as h } from '@vue/composition-api';
    
    interface Props {
      msg: string;
    }
    
    const MyComponent =
      createComponent <
      Props >
      {
        props: {
          msg: {}, // required by vue 2 runtime
        },
        setup(props) {
          return () => h('div', props.msg);
        },
      };
  • Declare ref type in TypeScript:

    const dateRef = ref < Date > new Date();
  • Fix createComponent not working with import() #81.

  • Fix inject type declaration #83.

0.2.0

Fixed

  • computed property is called immediately in reactive() #79.

Changed

0.1.0

The package has been renamed to @vue/composition-api to be consistent with RFC.

The @vue/composition-api reflects the Composition API RFC.

2.2.0

  • Improve typescript support.
  • Export createElement.
  • Export SetupContext.
  • Support returning a render function from setup.
  • Allow string keys in provide/inject.

2.1.2

  • Remove auto-unwrapping for Array (#53).

2.1.1

  • Export set() function. Using exported set whenever you need to use Vue.set or vm.$set. The custom set ensures that auto-unwrapping works for the new property.
  • Add a new signature of provide: provide(key, value).
  • Fix multiple provide invoking per component.
  • Fix order of setup invoking.
  • onErrorCaptured not triggered (#25).
  • Fix this losing in nested setup call (#38).
  • Fix some edge cases of unwarpping.
  • Change context.slots's value. It now proxies to $scopeSlots instead of $slots.

2.0.6

Fixed

  • watch callback is called repeatedly with multi-sources

Improved

  • reduce watch() memory overhead

2.0.0

Implement the newest version of RFC

Breaking Changes

this is not available inside setup(). See setup for details.

Features

Complex Prop Types:

import { createComponent, PropType } from 'vue';

createComponent({
  props: {
    options: (null as any) as PropType<{ msg: string }>,
  },
  setup(props) {
    props.options; // { msg: string } | undefined
  },
});

1.x

Implement the init version of RFC