Skip to content

Commit

Permalink
chore(release): set package.json to 2.1.3 [skip ci]
Browse files Browse the repository at this point in the history
## [2.1.3](v2.1.2...v2.1.3) (2022-04-21)

### Bug Fixes

* updated npm packages ([d70ab22](d70ab22))
  • Loading branch information
semantic-release-bot committed Apr 21, 2022
1 parent 14f062d commit 509e4b9
Show file tree
Hide file tree
Showing 13 changed files with 189 additions and 344 deletions.
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
## [2.1.3](https://github.com/kouts/vue-path-store/compare/v2.1.2...v2.1.3) (2022-04-21)


### Bug Fixes

* updated npm packages ([d70ab22](https://github.com/kouts/vue-path-store/commit/d70ab22e332113749a2b8b2f5aa1ec69bee5db4d))

## [2.1.2](https://github.com/kouts/vue-path-store/compare/v2.1.1...v2.1.2) (2022-01-11)


Expand Down
62 changes: 22 additions & 40 deletions dist/cjs/pathStore.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,34 +13,22 @@ function ownKeys(object, enumerableOnly) {

if (Object.getOwnPropertySymbols) {
var symbols = Object.getOwnPropertySymbols(object);

if (enumerableOnly) {
symbols = symbols.filter(function (sym) {
return Object.getOwnPropertyDescriptor(object, sym).enumerable;
});
}

keys.push.apply(keys, symbols);
enumerableOnly && (symbols = symbols.filter(function (sym) {
return Object.getOwnPropertyDescriptor(object, sym).enumerable;
})), keys.push.apply(keys, symbols);
}

return keys;
}

function _objectSpread2(target) {
for (var i = 1; i < arguments.length; i++) {
var source = arguments[i] != null ? arguments[i] : {};

if (i % 2) {
ownKeys(Object(source), true).forEach(function (key) {
_defineProperty(target, key, source[key]);
});
} else if (Object.getOwnPropertyDescriptors) {
Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));
} else {
ownKeys(Object(source)).forEach(function (key) {
Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
});
}
var source = null != arguments[i] ? arguments[i] : {};
i % 2 ? ownKeys(Object(source), !0).forEach(function (key) {
_defineProperty(target, key, source[key]);
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) {
Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
});
}

return target;
Expand All @@ -64,17 +52,11 @@ function _defineProperty(obj, key, value) {
function _typeof(obj) {
"@babel/helpers - typeof";

if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") {
_typeof = function _typeof(obj) {
return typeof obj;
};
} else {
_typeof = function _typeof(obj) {
return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
};
}

return _typeof(obj);
return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) {
return typeof obj;
} : function (obj) {
return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
}, _typeof(obj);
}

function isObject(obj) {
Expand All @@ -90,7 +72,7 @@ function isArray(arr) {
}

function splitPath(str) {
var regex = /(\w+)|\[([^\]]+)\]/g;
var regex = /([\w\s-]+)|\[([^\]]+)\]/g;
var result = [];
var path;

Expand Down Expand Up @@ -135,27 +117,27 @@ var setOne = function setOne(obj, pathStr, value) {
if (objValue && _typeof(objValue) === 'object') {
// eslint-disable-next-line no-prototype-builtins
if (!objValue.hasOwnProperty('__ob__')) {
Vue__default['default'].set(obj, prop, objValue);
Vue__default["default"].set(obj, prop, objValue);
} // Array to object transformation
// Check if parent path is an array, we are not on the last item
// and the next key in the path is not a number


if (isArray(objValue) && !isNumeric(path[index + 1])) {
Vue__default['default'].set(obj, prop, {});
Vue__default["default"].set(obj, prop, {});
}
} else {
// Create an empty object or an empty array based on the next path entry
if (isNumeric(path[index + 1])) {
Vue__default['default'].set(obj, prop, []);
Vue__default["default"].set(obj, prop, []);
} else {
Vue__default['default'].set(obj, prop, {});
Vue__default["default"].set(obj, prop, {});
}
}
} else {
// If we are on the last index then we just assign the the value to the data object
// Note: If we used obj[prop] = value; arrays wouldn't be updated.
Vue__default['default'].set(obj, prop, value);
Vue__default["default"].set(obj, prop, value);
}

obj = obj[prop];
Expand All @@ -177,7 +159,7 @@ var setMany = function setMany(obj, path, value) {
var deleteOne = function deleteOne(obj, pathStr) {
var path = splitPath(pathStr);
var prop = path.pop();
Vue__default['default']["delete"](getByPath(obj, path), prop);
Vue__default["default"]["delete"](getByPath(obj, path), prop);
};

var deleteMany = function deleteMany(obj, path) {
Expand Down Expand Up @@ -229,7 +211,7 @@ function createPathStoreMethods() {
}

var createPathStore = function createPathStore(state) {
return Object.assign(Vue__default['default'].observable(state), createPathStoreMethods());
return Object.assign(Vue__default["default"].observable(state), createPathStoreMethods());
};

exports.createPathStore = createPathStore;
60 changes: 21 additions & 39 deletions dist/cjs/pathStorePiniaPlugin.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,34 +13,22 @@ function ownKeys(object, enumerableOnly) {

if (Object.getOwnPropertySymbols) {
var symbols = Object.getOwnPropertySymbols(object);

if (enumerableOnly) {
symbols = symbols.filter(function (sym) {
return Object.getOwnPropertyDescriptor(object, sym).enumerable;
});
}

keys.push.apply(keys, symbols);
enumerableOnly && (symbols = symbols.filter(function (sym) {
return Object.getOwnPropertyDescriptor(object, sym).enumerable;
})), keys.push.apply(keys, symbols);
}

return keys;
}

function _objectSpread2(target) {
for (var i = 1; i < arguments.length; i++) {
var source = arguments[i] != null ? arguments[i] : {};

if (i % 2) {
ownKeys(Object(source), true).forEach(function (key) {
_defineProperty(target, key, source[key]);
});
} else if (Object.getOwnPropertyDescriptors) {
Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));
} else {
ownKeys(Object(source)).forEach(function (key) {
Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
});
}
var source = null != arguments[i] ? arguments[i] : {};
i % 2 ? ownKeys(Object(source), !0).forEach(function (key) {
_defineProperty(target, key, source[key]);
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) {
Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
});
}

return target;
Expand All @@ -64,17 +52,11 @@ function _defineProperty(obj, key, value) {
function _typeof(obj) {
"@babel/helpers - typeof";

if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") {
_typeof = function _typeof(obj) {
return typeof obj;
};
} else {
_typeof = function _typeof(obj) {
return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
};
}

return _typeof(obj);
return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) {
return typeof obj;
} : function (obj) {
return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
}, _typeof(obj);
}

function isObject(obj) {
Expand All @@ -90,7 +72,7 @@ function isArray(arr) {
}

function splitPath(str) {
var regex = /(\w+)|\[([^\]]+)\]/g;
var regex = /([\w\s-]+)|\[([^\]]+)\]/g;
var result = [];
var path;

Expand Down Expand Up @@ -135,27 +117,27 @@ var setOne = function setOne(obj, pathStr, value) {
if (objValue && _typeof(objValue) === 'object') {
// eslint-disable-next-line no-prototype-builtins
if (!objValue.hasOwnProperty('__ob__')) {
Vue__default['default'].set(obj, prop, objValue);
Vue__default["default"].set(obj, prop, objValue);
} // Array to object transformation
// Check if parent path is an array, we are not on the last item
// and the next key in the path is not a number


if (isArray(objValue) && !isNumeric(path[index + 1])) {
Vue__default['default'].set(obj, prop, {});
Vue__default["default"].set(obj, prop, {});
}
} else {
// Create an empty object or an empty array based on the next path entry
if (isNumeric(path[index + 1])) {
Vue__default['default'].set(obj, prop, []);
Vue__default["default"].set(obj, prop, []);
} else {
Vue__default['default'].set(obj, prop, {});
Vue__default["default"].set(obj, prop, {});
}
}
} else {
// If we are on the last index then we just assign the the value to the data object
// Note: If we used obj[prop] = value; arrays wouldn't be updated.
Vue__default['default'].set(obj, prop, value);
Vue__default["default"].set(obj, prop, value);
}

obj = obj[prop];
Expand All @@ -177,7 +159,7 @@ var setMany = function setMany(obj, path, value) {
var deleteOne = function deleteOne(obj, pathStr) {
var path = splitPath(pathStr);
var prop = path.pop();
Vue__default['default']["delete"](getByPath(obj, path), prop);
Vue__default["default"]["delete"](getByPath(obj, path), prop);
};

var deleteMany = function deleteMany(obj, path) {
Expand Down
60 changes: 21 additions & 39 deletions dist/cjs/pathStoreVuexPlugin.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,34 +13,22 @@ function ownKeys(object, enumerableOnly) {

if (Object.getOwnPropertySymbols) {
var symbols = Object.getOwnPropertySymbols(object);

if (enumerableOnly) {
symbols = symbols.filter(function (sym) {
return Object.getOwnPropertyDescriptor(object, sym).enumerable;
});
}

keys.push.apply(keys, symbols);
enumerableOnly && (symbols = symbols.filter(function (sym) {
return Object.getOwnPropertyDescriptor(object, sym).enumerable;
})), keys.push.apply(keys, symbols);
}

return keys;
}

function _objectSpread2(target) {
for (var i = 1; i < arguments.length; i++) {
var source = arguments[i] != null ? arguments[i] : {};

if (i % 2) {
ownKeys(Object(source), true).forEach(function (key) {
_defineProperty(target, key, source[key]);
});
} else if (Object.getOwnPropertyDescriptors) {
Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));
} else {
ownKeys(Object(source)).forEach(function (key) {
Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
});
}
var source = null != arguments[i] ? arguments[i] : {};
i % 2 ? ownKeys(Object(source), !0).forEach(function (key) {
_defineProperty(target, key, source[key]);
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) {
Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
});
}

return target;
Expand Down Expand Up @@ -97,17 +85,11 @@ function _nonIterableSpread() {
function _typeof(obj) {
"@babel/helpers - typeof";

if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") {
_typeof = function _typeof(obj) {
return typeof obj;
};
} else {
_typeof = function _typeof(obj) {
return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
};
}

return _typeof(obj);
return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) {
return typeof obj;
} : function (obj) {
return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
}, _typeof(obj);
}

function isObject(obj) {
Expand All @@ -123,7 +105,7 @@ function isArray(arr) {
}

function splitPath(str) {
var regex = /(\w+)|\[([^\]]+)\]/g;
var regex = /([\w\s-]+)|\[([^\]]+)\]/g;
var result = [];
var path;

Expand Down Expand Up @@ -168,27 +150,27 @@ var setOne = function setOne(obj, pathStr, value) {
if (objValue && _typeof(objValue) === 'object') {
// eslint-disable-next-line no-prototype-builtins
if (!objValue.hasOwnProperty('__ob__')) {
Vue__default['default'].set(obj, prop, objValue);
Vue__default["default"].set(obj, prop, objValue);
} // Array to object transformation
// Check if parent path is an array, we are not on the last item
// and the next key in the path is not a number


if (isArray(objValue) && !isNumeric(path[index + 1])) {
Vue__default['default'].set(obj, prop, {});
Vue__default["default"].set(obj, prop, {});
}
} else {
// Create an empty object or an empty array based on the next path entry
if (isNumeric(path[index + 1])) {
Vue__default['default'].set(obj, prop, []);
Vue__default["default"].set(obj, prop, []);
} else {
Vue__default['default'].set(obj, prop, {});
Vue__default["default"].set(obj, prop, {});
}
}
} else {
// If we are on the last index then we just assign the the value to the data object
// Note: If we used obj[prop] = value; arrays wouldn't be updated.
Vue__default['default'].set(obj, prop, value);
Vue__default["default"].set(obj, prop, value);
}

obj = obj[prop];
Expand All @@ -210,7 +192,7 @@ var setMany = function setMany(obj, path, value) {
var deleteOne = function deleteOne(obj, pathStr) {
var path = splitPath(pathStr);
var prop = path.pop();
Vue__default['default']["delete"](getByPath(obj, path), prop);
Vue__default["default"]["delete"](getByPath(obj, path), prop);
};

var deleteMany = function deleteMany(obj, path) {
Expand Down
Loading

0 comments on commit 509e4b9

Please sign in to comment.