Skip to content

Commit

Permalink
feat: Update packages
Browse files Browse the repository at this point in the history
  • Loading branch information
andreidmt committed Nov 17, 2020
1 parent 7b9993f commit b92b13f
Show file tree
Hide file tree
Showing 20 changed files with 1,691 additions and 1,675 deletions.
2 changes: 1 addition & 1 deletion .eslintrc
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"root": true,
"parser": "babel-eslint",
"extends": [
"./node_modules/eslint-config.xyz/targets/node"
"@asd14/eslint-config/targets/node"
],
"settings": {
// Recommended if you use eslint_d
Expand Down
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -69,3 +69,5 @@ bin/
lib/
docs/
.coveralls.yml
tags
.tern-port
3,217 changes: 1,616 additions & 1,601 deletions package-lock.json

Large diffs are not rendered by default.

39 changes: 20 additions & 19 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -41,37 +41,38 @@
"coverage": "NODE_ENV=test nyc npm test && nyc report --reporter=text-lcov | coveralls"
},
"dependencies": {
"@babel/runtime-corejs3": "^7.11.2",
"core-js": "^3.6.5",
"m.xyz": "^2.12.1",
"@asd14/m": "^3.3.0",
"@babel/runtime-corejs3": "^7.12.5",
"core-js": "^3.7.0",
"regenerator-runtime": "^0.13.7",
"socket.io-client": "^2.3.0"
"socket.io-client": "^3.0.1"
},
"devDependencies": {
"@babel/cli": "^7.11.6",
"@babel/core": "^7.11.6",
"@babel/plugin-transform-runtime": "^7.11.5",
"@babel/preset-env": "^7.11.5",
"@babel/register": "^7.11.5",
"@asd14/eslint-config": "^5.18.2",
"@babel/cli": "^7.12.1",
"@babel/core": "^7.12.3",
"@babel/plugin-transform-runtime": "^7.12.1",
"@babel/preset-env": "^7.12.1",
"@babel/register": "^7.12.1",
"babel-eslint": "^10.1.0",
"coveralls": "^3.1.0",
"eslint": "^7.8.1",
"eslint-config-prettier": "^6.11.0",
"eslint-config.xyz": "^5.13.0",
"eslint-plugin-import": "^2.22.0",
"eslint": "^7.13.0",
"eslint-config-prettier": "^6.15.0",
"eslint-plugin-import": "^2.22.1",
"eslint-plugin-jsdoc": "^30.7.8",
"eslint-plugin-json": "^2.1.2",
"eslint-plugin-no-inferred-method-name": "^2.0.0",
"eslint-plugin-prettier": "^3.1.4",
"eslint-plugin-promise": "^4.2.1",
"eslint-plugin-unicorn": "^21.0.0",
"markdownlint-cli": "^0.23.2",
"nodemon": "^2.0.4",
"eslint-plugin-unicorn": "^23.0.0",
"markdownlint-cli": "^0.25.0",
"nodemon": "^2.0.6",
"npm-check": "^5.9.2",
"nyc": "^15.1.0",
"prettier": "^2.1.1",
"prettier": "^2.1.2",
"redux": "^4.0.5",
"semantic-release": "^17.1.1",
"socket.io": "^2.3.0",
"semantic-release": "^17.2.3",
"socket.io": "^3.0.1",
"tap-nirvana": "^1.1.0",
"tape": "^5.0.1"
},
Expand Down
14 changes: 7 additions & 7 deletions src/create/create.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,15 @@ const debug = require("debug")("JustAList:CreateAction")
/**
* Call list.create method to add result to slice.items
*
* @param {String} listName Slice name - for error messages
* @param {Function} dispatch Redux dispatch
* @param {Function} api API method
* @param {Function} onChange Appy on items array before changing state
* @param {string} listName Slice name - for error messages
* @param {Function} dispatch Redux dispatch
* @param {Function} api API method
* @param {Function} onChange Appy on items array before changing state
*
* @param {Object} data Model data
* @param {Array} rest Other paramaters passed when calling list.create
* @param {object} data Model data
* @param {Array} rest Other paramaters passed when calling list.create
*
* @return {Promise<Object<error, result>>}
* @returns {Promise<object<error, result>>}
*/
export const createAction = ({
listName,
Expand Down
2 changes: 1 addition & 1 deletion src/create/create.reducers.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
const debug = require("debug")("JustAList:CreateReducers")

import { hasWith, intersect, not, is, i } from "m.xyz"
import { hasWith, intersect, not, is, i } from "@asd14/m"

export const startReducer = (state, { items }) => ({
...state,
Expand Down
2 changes: 1 addition & 1 deletion src/create/create.test.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import test from "tape"
import { createStore, combineReducers } from "redux"
import { map } from "m.xyz"
import { map } from "@asd14/m"

import { buildList } from ".."

Expand Down
2 changes: 1 addition & 1 deletion src/index.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
const debug = require("debug")("JustAList:Main")

import { get, pipe, findWith, hasWith, is, isEmpty, hasKey } from "m.xyz"
import { get, pipe, findWith, hasWith, is, isEmpty, hasKey } from "@asd14/m"

import { createAction } from "./create/create"
import {
Expand Down
17 changes: 8 additions & 9 deletions src/read-one/read-one.js
Original file line number Diff line number Diff line change
@@ -1,20 +1,19 @@
const debug = require("debug")("JustAList:ReadOneAction")

import { hasKey, isEmpty } from "m.xyz"
import { hasKey, isEmpty } from "@asd14/m"

/**
* Call list.readOne method to add/update item in slice.items
*
* @param {String} listName Slice name - for error messages
* @param {Function} dispatch Redux dispatch
* @param {Function} api API method
* @param {Function} onChange Appy on items array before changing state
* @param {string} listName Slice name - for error messages
* @param {Function} dispatch Redux dispatch
* @param {Function} api API method
* @param {Function} onChange Appy on items array before changing state
*
* @param {string|number} id Id of item to update or add
* @param {Array} rest Other paramaters passed when calling list
* instance .readOne
* @param {string|number} id Id of item to update or add
* @param {Array} rest Other paramaters passed when calling list instance .readOne
*
* @return {Promise<Object<error, result>>}
* @returns {Promise<object<error, result>>}
*/
export const readOneAction = ({
listName,
Expand Down
2 changes: 1 addition & 1 deletion src/read-one/read-one.reducers.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
const debug = require("debug")("JustAList:ReadOneReducers")

import { intersect, merge, i } from "m.xyz"
import { intersect, merge, i } from "@asd14/m"

export const startReducer = (state, id) => {
if (state.isLoadingOne) {
Expand Down
2 changes: 1 addition & 1 deletion src/read-one/read-one.test.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import test from "tape"
import { createStore, combineReducers } from "redux"
import { map } from "m.xyz"
import { map } from "@asd14/m"

import { buildList } from ".."

Expand Down
17 changes: 8 additions & 9 deletions src/read/read.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,16 @@ const debug = require("debug")("JustAList:ReadAction")
/**
* Call list.read method to set slice.items array
*
* @param {Function} dispatch Redux dispatch
* @param {Function} api API method
* @param {Function} onChange Appy on items array before changing state
* @param {Function} dispatch Redux dispatch
* @param {Function} api API method
* @param {Function} onChange Appy on items array before changing state
*
* @param {Object} query Control/Filter attributes
* @param {Boolean} opt.shouldClear If true, method result will replace existing
* items. Otherwise, merge both arrays by id
* @param {Object} opt.rest Other options passed when calling list
* instance .read
* @param {object} query Control/Filter attributes
* @param {boolean} opt.shouldClear If true, method result will replace existing items.
* Otherwise, merge both arrays by id
* @param {object} opt.rest Other options passed when calling list instance .read
*
* @return {Promise<Object<error, result>>}
* @returns {Promise<object<error, result>>}
*/
export const readAction = ({
listName,
Expand Down
2 changes: 1 addition & 1 deletion src/read/read.reducers.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
const debug = require("debug")("JustAList:ReadReducers")

import { intersect, i, merge } from "m.xyz"
import { intersect, i, merge } from "@asd14/m"

export const startReducer = state => {
if (state.isLoading) {
Expand Down
2 changes: 1 addition & 1 deletion src/read/read.test.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import test from "tape"
import { createStore, combineReducers } from "redux"
import { sortWith, map, pick } from "m.xyz"
import { sortWith, map, pick } from "@asd14/m"

import { buildList } from ".."

Expand Down
18 changes: 9 additions & 9 deletions src/remove/remove.js
Original file line number Diff line number Diff line change
@@ -1,20 +1,20 @@
const debug = require("debug")("JustAList:RemoveAction")

import { isEmpty, get } from "m.xyz"
import { isEmpty, get } from "@asd14/m"

/**
* Call list.remove method to remove item from slice.items
*
* @param {String} listName Slice name - for error messages
* @param {Function} dispatch Redux dispatch
* @param {Function} api API method
* @param {Function} onChange Appy on items array before changing state
* @param {string} listName Slice name - for error messages
* @param {Function} dispatch Redux dispatch
* @param {Function} api API method
* @param {Function} onChange Appy on items array before changing state
*
* @param {string|number} id Id of item to delete
* @param {Array} rest Other paramaters passed when calling list
* instance .remove
* @param {string|number} id Id of item to delete
* @param {Array} rest Other paramaters passed when calling list
* instance .remove
*
* @return {Promise<Object<error, result>>}
* @returns {Promise<object<error, result>>}
*/
export const removeAction = ({
listName,
Expand Down
2 changes: 1 addition & 1 deletion src/remove/remove.reducers.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
const debug = require("debug")("JustAList:RemoveReducers")

import { findWith, hasWith, removeWith, i, isEmpty } from "m.xyz"
import { findWith, hasWith, removeWith, i, isEmpty } from "@asd14/m"

export const startReducer = (state, { id, isOptimist }) => {
if (!isEmpty(state.removing)) {
Expand Down
2 changes: 1 addition & 1 deletion src/remove/remove.test.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import test from "tape"
import { createStore, combineReducers } from "redux"
import { map } from "m.xyz"
import { map } from "@asd14/m"

import { buildList } from ".."

Expand Down
16 changes: 8 additions & 8 deletions src/update/update.js
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
const debug = require("debug")("JustAList:UpdateAction")

import { isEmpty, get } from "m.xyz"
import { isEmpty, get } from "@asd14/m"

/**
* Call list.update method to change existing item in slice.items
*
* @param {String} listName Slice name - for error messages
* @param {Function} dispatch Redux dispatch
* @param {Function} api API method
* @param {Function} onChange Appy on items array before changing state
* @param {string} listName Slice name - for error messages
* @param {Function} dispatch Redux dispatch
* @param {Function} api API method
* @param {Function} onChange Appy on items array before changing state
*
* @param {string|number} id Id of item to update
* @param {Array} rest Other paramaters passed when calling list.update
* @param {string|number} id Id of item to update
* @param {Array} rest Other paramaters passed when calling list.update
*
* @return {Promise<Object<error, result>>}
* @returns {Promise<object<error, result>>}
*/
export const updateAction = ({
listName,
Expand Down
2 changes: 1 addition & 1 deletion src/update/update.reducers.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import {
push,
i,
isEmpty,
} from "m.xyz"
} from "@asd14/m"

export const startReducer = (
state,
Expand Down
4 changes: 2 additions & 2 deletions src/update/update.test.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import test from "tape"
import { createStore, combineReducers } from "redux"
import { map, concat, is } from "m.xyz"
import { map, concat, is } from "@asd14/m"

import { buildList } from ".."

Expand Down Expand Up @@ -98,7 +98,7 @@ test("Update", async t => {
{
id: 2,
name: "Updated foo",
items: [{ id: 1, label: "item 1" }, { id: 2 }],
items: [{ id: 2 }, { id: 1, label: "item 1" }],
onChange: 4,
},
],
Expand Down

0 comments on commit b92b13f

Please sign in to comment.