Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

vue-async-computed

Package Overview
Dependencies
Maintainers
1
Versions
54
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

vue-async-computed - npm Package Compare versions

Comparing version 3.8.3 to 3.9.0

4

CHANGELOG.md

@@ -5,2 +5,3 @@ <!-- START doctoc generated TOC please keep comment here to allow auto update -->

- [v3.9.0](#v390)
- [v3.8.1](#v381)

@@ -33,2 +34,5 @@ - [v3.8.0](#v380)

### v3.9.0
* [#95](https://github.com/foxbenjaminfox/vue-async-computed/pull/95) Fix a bug where default values weren't properly used properly for lazy async computed properties.
### v3.8.1

@@ -35,0 +39,0 @@ * Bugfix release in order to actually publish the typescript types along with the pacakge.

14

dist/vue-async-computed.esm.esnext.js

@@ -29,5 +29,5 @@ function setAsyncState (vm, stateObject, state) {

function initLazy (data, key) {
function initLazy (data, key, value) {
data[lazyActivePrefix + key] = false;
data[lazyDataPrefix + key] = null;
data[lazyDataPrefix + key] = value;
}

@@ -143,3 +143,3 @@

this.$options.data = initDataWithAsyncComputed(this.$options);
this.$options.data = initDataWithAsyncComputed(this.$options, pluginOptions);
},

@@ -211,3 +211,3 @@ created () {

function initDataWithAsyncComputed (options) {
function initDataWithAsyncComputed (options, pluginOptions) {
const optionData = options.data;

@@ -222,7 +222,9 @@ const asyncComputed = options.asyncComputed || {};

const item = this.$options.asyncComputed[key];
var value = generateDefault.call(this, item, pluginOptions);
if (isComputedLazy(item)) {
initLazy(data, key);
initLazy(data, key, value);
this.$options.computed[key] = makeLazyComputed(key);
} else {
data[key] = null;
data[key] = value;
}

@@ -229,0 +231,0 @@ }

@@ -29,5 +29,5 @@ function setAsyncState(vm, stateObject, state) {

function initLazy(data, key) {
function initLazy(data, key, value) {
data[lazyActivePrefix + key] = false;
data[lazyDataPrefix + key] = null;
data[lazyDataPrefix + key] = value;
}

@@ -146,3 +146,3 @@

this.$options.data = initDataWithAsyncComputed(this.$options);
this.$options.data = initDataWithAsyncComputed(this.$options, pluginOptions);
},

@@ -212,3 +212,3 @@ created: function created() {

function initDataWithAsyncComputed(options) {
function initDataWithAsyncComputed(options, pluginOptions) {
var optionData = options.data;

@@ -221,7 +221,9 @@ var asyncComputed = options.asyncComputed || {};

var item = this.$options.asyncComputed[key];
var value = generateDefault.call(this, item, pluginOptions);
if (isComputedLazy(item)) {
initLazy(data, key);
initLazy(data, key, value);
this.$options.computed[key] = makeLazyComputed(key);
} else {
data[key] = null;
data[key] = value;
}

@@ -228,0 +230,0 @@ }

(function (global, factory) {
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :
typeof define === 'function' && define.amd ? define(factory) :
(global = global || self, global.AsyncComputed = factory());
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.AsyncComputed = factory());
}(this, (function () { 'use strict';

@@ -35,5 +35,5 @@

function initLazy (data, key) {
function initLazy (data, key, value) {
data[lazyActivePrefix + key] = false;
data[lazyDataPrefix + key] = null;
data[lazyDataPrefix + key] = value;
}

@@ -149,3 +149,3 @@

this.$options.data = initDataWithAsyncComputed(this.$options);
this.$options.data = initDataWithAsyncComputed(this.$options, pluginOptions);
},

@@ -217,3 +217,3 @@ created () {

function initDataWithAsyncComputed (options) {
function initDataWithAsyncComputed (options, pluginOptions) {
const optionData = options.data;

@@ -228,7 +228,9 @@ const asyncComputed = options.asyncComputed || {};

const item = this.$options.asyncComputed[key];
var value = generateDefault.call(this, item, pluginOptions);
if (isComputedLazy(item)) {
initLazy(data, key);
initLazy(data, key, value);
this.$options.computed[key] = makeLazyComputed(key);
} else {
data[key] = null;
data[key] = value;
}

@@ -235,0 +237,0 @@ }

var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; };
(function (global, factory) {
(typeof exports === 'undefined' ? 'undefined' : _typeof(exports)) === 'object' && typeof module !== 'undefined' ? module.exports = factory() : typeof define === 'function' && define.amd ? define(factory) : (global = global || self, global.AsyncComputed = factory());
(typeof exports === 'undefined' ? 'undefined' : _typeof(exports)) === 'object' && typeof module !== 'undefined' ? module.exports = factory() : typeof define === 'function' && define.amd ? define(factory) : (global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.AsyncComputed = factory());
})(this, function () {

@@ -36,5 +36,5 @@ 'use strict';

function initLazy(data, key) {
function initLazy(data, key, value) {
data[lazyActivePrefix + key] = false;
data[lazyDataPrefix + key] = null;
data[lazyDataPrefix + key] = value;
}

@@ -153,3 +153,3 @@

this.$options.data = initDataWithAsyncComputed(this.$options);
this.$options.data = initDataWithAsyncComputed(this.$options, pluginOptions);
},

@@ -219,3 +219,3 @@ created: function created() {

function initDataWithAsyncComputed(options) {
function initDataWithAsyncComputed(options, pluginOptions) {
var optionData = options.data;

@@ -228,7 +228,9 @@ var asyncComputed = options.asyncComputed || {};

var item = this.$options.asyncComputed[key];
var value = generateDefault.call(this, item, pluginOptions);
if (isComputedLazy(item)) {
initLazy(data, key);
initLazy(data, key, value);
this.$options.computed[key] = makeLazyComputed(key);
} else {
data[key] = null;
data[key] = value;
}

@@ -235,0 +237,0 @@ }

{
"name": "vue-async-computed",
"version": "3.8.3",
"version": "3.9.0",
"description": "Async computed properties for Vue",

@@ -27,5 +27,2 @@ "main": "dist/vue-async-computed.js",

"postbuild": "npm run test -s",
"coverage": "node_modules/.bin/babel-node node_modules/.bin/babel-istanbul cover test/index.js",
"coveralls": "npm run coverage -s && coveralls < coverage/lcov.info",
"postcoveralls": "rimraf ./coverage",
"prepublishOnly": "npm run build -s",

@@ -61,19 +58,17 @@ "patch": "npm version patch && npm publish",

"babel-core": "^6.26.3",
"babel-eslint": "^10.0.2",
"babel-istanbul": "^0.12.2",
"babel-eslint": "^10.1.0",
"babel-preset-env": "^1.7.0",
"coveralls": "^3.0.4",
"doctoc": "^1.4.0",
"eslint": "^6.8.0",
"eslint-config-standard": "^14.1.0",
"eslint-plugin-import": "^2.19.1",
"eslint-plugin-node": "^10.0.0",
"eslint": "^7.7.0",
"eslint-config-standard": "^14.1.1",
"eslint-plugin-import": "^2.22.0",
"eslint-plugin-node": "^11.1.0",
"eslint-plugin-promise": "^4.2.1",
"eslint-plugin-standard": "^4.0.1",
"estraverse-fb": "^1.3.2",
"mkdirp": "^0.5.1",
"rimraf": "^3.0.0",
"rollup": "^1.27.14",
"mkdirp": "^1.0.4",
"rimraf": "^3.0.2",
"rollup": "^2.26.3",
"tap-spec": "^5.0.0",
"tape": "^4.12.0",
"tape": "^5.0.1",
"vue": "^2.5.21",

@@ -80,0 +75,0 @@ "watch": "^1.0.2"

@@ -9,7 +9,2 @@ <big><h1 align="center">vue-async-computed</h1></big>

<a href="https://coveralls.io/r/foxbenjaminfox/vue-async-computed">
<img src="https://img.shields.io/coveralls/foxbenjaminfox/vue-async-computed.svg?style=flat-square"
alt="Coverage Status">
</a>
<a href="https://travis-ci.org/foxbenjaminfox/vue-async-computed">

@@ -25,7 +20,2 @@ <img src="https://img.shields.io/travis/foxbenjaminfox/vue-async-computed.svg?style=flat-square"

<a href="https://david-dm.org/foxbenjaminfox/vue-async-computed.svg">
<img src="https://david-dm.org/foxbenjaminfox/vue-async-computed.svg?style=flat-square"
alt="Dependency Status">
</a>
<a href="https://github.com/foxbenjaminfox/vue-async-computed/blob/master/LICENSE">

@@ -105,3 +95,3 @@ <img src="https://img.shields.io/npm/l/vue-async-computed.svg?style=flat-square"

-->
<script src="https://unpkg.com/vue-async-computed@3.8.1"></script>
<script src="https://unpkg.com/vue-async-computed@3.9.0"></script>
```

@@ -108,0 +98,0 @@

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc