New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

twreporter-redux

Package Overview
Dependencies
Maintainers
2
Versions
46
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

twreporter-redux - npm Package Compare versions

Comparing version 2.1.2 to 2.1.3-beta.1

3

CHANGELOG.md

@@ -0,1 +1,4 @@

### 2.1.3
- Add isFetching in topics and topic reducers
### 2.1.2

@@ -2,0 +5,0 @@ - Fetch topics if topics exist but is empty object

12

lib/reducers/__test__/topics.test.js

@@ -34,3 +34,4 @@ 'use strict';

slug: topic1.slug,
error: null
error: null,
isFetching: false
});

@@ -49,3 +50,4 @@ });

slug: 'mock-slug',
error: err
error: err,
isFetching: false
});

@@ -70,3 +72,4 @@ });

total: 10,
error: null
error: null,
isFetching: false
});

@@ -87,5 +90,6 @@ });

total: 10,
error: err
error: err,
isFetching: false
});
});
});

@@ -53,16 +53,22 @@ 'use strict';

{
return {
return _.merge({}, state, {
slug: _.get(action, 'payload.slug'),
error: null
};
error: null,
isFetching: false
});
}
case _actionTypes2.default.START_TO_GET_A_FULL_TOPIC:
return {
return _.merge({}, state, {
slug: _.get(action, 'payload.slug'),
error: null
};
error: null,
isFetching: true
});
case _actionTypes2.default.ERROR_TO_GET_A_FULL_TOPIC:
return action.payload;
return _.merge({}, state, {
slug: _.get(action, 'payload.slug'),
error: _.get(action, 'payload.error'),
isFetching: false
});
default:

@@ -90,3 +96,4 @@ return state;

total: total,
error: null
error: null,
isFetching: false
});

@@ -97,7 +104,11 @@ }

console.log('url to fetch:', action.url);
return state;
return _.merge({}, state, {
error: null,
isFetching: true
});
case _actionTypes2.default.ERROR_TO_GET_TOPICS:
return _.merge({}, state, {
error: _.get(action, 'error')
error: _.get(action, 'error'),
isFetching: false
});

@@ -104,0 +115,0 @@ default:

{
"name": "twreporter-redux",
"version": "2.1.2",
"version": "2.1.3-beta.1",
"description": "redux actions and reducers for twreporter website",

@@ -5,0 +5,0 @@ "main": "lib/index.js",

@@ -33,2 +33,3 @@ /* global describe, it*/

error: null,
isFetching: false,
})

@@ -51,2 +52,3 @@ })

error: err,
isFetching: false,
})

@@ -77,2 +79,3 @@ })

error: null,
isFetching: false,
})

@@ -96,4 +99,5 @@ })

error: err,
isFetching: false,
})
})
})

@@ -22,16 +22,22 @@ import types from '../constants/action-types'

case types.CHANGE_SELECTED_TOPIC: {
return {
return _.merge({}, state, {
slug: _.get(action, 'payload.slug'),
error: null,
}
isFetching: false,
})
}
case types.START_TO_GET_A_FULL_TOPIC:
return {
return _.merge({}, state, {
slug: _.get(action, 'payload.slug'),
error: null,
}
isFetching: true,
})
case types.ERROR_TO_GET_A_FULL_TOPIC:
return action.payload
return _.merge({}, state, {
slug: _.get(action, 'payload.slug'),
error: _.get(action, 'payload.error'),
isFetching: false,
})
default:

@@ -54,2 +60,3 @@ return state

error: null,
isFetching: false,
})

@@ -60,3 +67,6 @@ }

console.log('url to fetch:', action.url)
return state
return _.merge({}, state, {
error: null,
isFetching: true,
})

@@ -66,2 +76,3 @@ case types.ERROR_TO_GET_TOPICS:

error: _.get(action, 'error'),
isFetching: false,
})

@@ -68,0 +79,0 @@ default:

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