Skip to content

Latest commit

 

History

History
960 lines (491 loc) · 39.4 KB

CHANGELOG.md

File metadata and controls

960 lines (491 loc) · 39.4 KB

1.1.1 (2021-08-14)

Bug Fixes

1.1.0 (2021-08-09)

Features

1.0.6 (2021-08-09)

Features

  • support second target argument for lifecycle functions (3f3b9c6)

1.1.0-beta.7 (2021-08-09)

Bug Fixes

  • effectScope: should have a vaild scope with component (da21873)

1.1.0-beta.6 (2021-08-09)

  • new watchPostEffect api (92fe90c)
  • support second target argument for lifecycle functions (0133c1e)

1.1.0-beta.4 (2021-07-22)

Bug Fixes

  • revert module field to esm.js version, close #769 (92afa6f)

1.1.0-beta.3 (2021-07-18)

Bug Fixes

  • build for mjs and exports all submodules (c116714)

1.1.0-beta.2 (2021-07-16)

Bug Fixes

  • effectScope: should stop along with parent component (784d96c)

1.1.0-beta.1 (2021-07-16)

Features

Features

  • implement effectScope api (#762) (fcadec2)
  • support second target argument for lifecycle functions (3f3b9c6)

1.0.6 (2021-08-09)

Features

1.0.5 (2021-08-01)

Bug Fixes

  • function: properties of function should not disappear. (#778) (68c1a35)

1.0.4 (2021-07-22)

Bug Fixes

  • revert module field to esm.js version, close #769 (4ac545c)

1.0.3 (2021-07-18)

Bug Fixes

  • build for mjs and exports all submodules (69538ee)

1.0.2 (2021-07-16)

Bug Fixes

  • readonly: align behavior with vue-next. (#765) (42104aa)
  • type: remove unnecessary type assertion (#766) (ebb7975)
  • should dynamically update refs in context (#764) (d7de23e)

1.0.1 (2021-07-16)

1.0.0 (2021-07-15)

Bug Fixes

  • mockReactivityDeep: add parameter seen for mockReactivityDeep. (#759) (40cb14a)
  • runtime-core: trigger warning when the injectionKey is undefined (#760) (2ccad9b)

1.0.0-rc.14 (2021-07-12)

Bug Fixes

  • customReactive: avoid circular reference. (#758) (2bd6ea5)
  • watch: traverse refs in deep watch (#753) (55a0a20)
  • only trigger warning in the dev environment (#755) (bc7c2af)
  • watch: errors thrown in the asynchronous callback function in watch will not be caught. (#751) (f0e423f)
  • watch: only trigger warning in the dev environment (#754) (0fe0088)

1.0.0-rc.13 (2021-07-02)

Bug Fixes

  • observe: solve the Ref not unwrapping on the ssr side issue with recursive way. (#723) (debd37d)
  • the hasOwn should be used to determine whether an attribute exists. (#737) (65abcb4)
  • shallowReadonly: align behavior with vue-next (#741) (14d1c7b)
  • types: use AnyObject insteads of any (#742) (efb4195)

1.0.0-rc.12 (2021-06-17)

Bug Fixes

  • proxyRefs: infinite loop when using proxyRefs. (#730) (0b6ab25)
  • reactivity: check type of ob in isRaw and isReactive (#732) (97dd671)
  • watch: watched previous values can't be destructure on first fire. (#727) (b3ab6f9)

1.0.0-rc.11 (2021-06-04)

Bug Fixes

  • reactivity: should trigger watchEffect when using set to change value of array length (#720) (9c03a45)
  • reactivity: unexpected behaviors for array index out of valid array length when set and del (#719) (f08a1d6)
  • shallowReactive: should keep array as array (#717) (620d09b)
  • shallowReadonly: watch should work for ref/reactive with shallowReadonly (#714) (b6fc1f7)

Features

  • reactivity: unwrap value when using set (#722) (bd198e7)

1.0.0-rc.10 (2021-05-27)

Bug Fixes

  • dev: setup data in nextTick is proxied to vm._data. (#697) (e231837)
  • watch: align behavior with vue-next(doWatch). (#710) (fcf8bc3)

1.0.0-rc.9 (2021-05-19)

Bug Fixes

  • The behavior of development and production merge should be consistent. (#694) (7ca7010)
  • shallowReactive: align behavior with vue-next (#696) (3485ecb)

Features

  • add and delete object attributes would trigger update. (#692) (8c27d80)

1.0.0-rc.8 (2021-04-29)

Bug Fixes

  • reactive: align behavior with vue-next (#689) (37fcbaa)
  • Memory leak caused by global variables. (#686) (badff82)

1.0.0-rc.7 (2021-04-18)

Bug Fixes

Features

  • types: export ComponentInternalInstance, close #677, close #675 (ccae670)

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