-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Chore: Package updates #49
Changes from all commits
c6745db
f69d166
9e105aa
6cb12fe
ed9ab3d
5d993de
7eedf58
6427c65
25df9ae
10c7fc3
1b82a97
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
{ | ||
module.exports = { | ||
"presets": [ "@launchpadlab/babel-preset/react" ] | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
{ | ||
"name": "redux-flash", | ||
"version": "2.0.6", | ||
"version": "2.0.7", | ||
"description": "Redux action creators for displaying flash messages", | ||
"main": "lib/index.js", | ||
"scripts": { | ||
|
@@ -12,8 +12,7 @@ | |
"prepublish": "yarn run lint && yarn run clean && yarn run build", | ||
"test": "jest", | ||
"size": "yarn build && size-limit", | ||
"test:coverage": "jest --coverage", | ||
"report-coverage": "codeclimate-test-reporter < coverage/lcov.info" | ||
"test:coverage": "jest --coverage" | ||
}, | ||
"repository": "launchpadlab/redux-flash", | ||
"keywords": [ | ||
|
@@ -31,23 +30,23 @@ | |
"lib/" | ||
], | ||
"devDependencies": { | ||
"@babel/eslint-parser": "^7.22.6", | ||
"@launchpadlab/babel-preset": "^2.1.0", | ||
"@size-limit/preset-small-lib": "^2.1.1", | ||
"babel-eslint": "^10.0.2", | ||
"codeclimate-test-reporter": "^0.4.1", | ||
"eslint": "^6.1.0", | ||
"@size-limit/file": "^8.2.6", | ||
"@size-limit/webpack": "^8.2.6", | ||
Comment on lines
+35
to
+36
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Given that |
||
"eslint": "^8.44.0", | ||
"eslint-plugin-import": "^2.2.0", | ||
"jest": "^24.8.0", | ||
"jest": "^29.5.0", | ||
"redux": "^4.0.4", | ||
"redux-mock-store": "^1.3.0", | ||
"size-limit": "^2.1.1" | ||
"size-limit": "^8.2.6" | ||
}, | ||
"dependencies": { | ||
"@babel/cli": "^7.5.5", | ||
"@babel/core": "^7.5.5", | ||
"prop-types": "^15.6.1", | ||
"redux-actions": "^2.6.5", | ||
"uuid": "^3.1.0" | ||
"uuid": "^9.0.0" | ||
}, | ||
"peerDependencies": { | ||
"redux": "^4.0.0 || ^3.0.0" | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -21,31 +21,31 @@ test('flashMessage sets default timeout if none is provided', () => { | |
const store = createMockStore() | ||
store.dispatch(flashMessage('Hi')) | ||
expect(store.getActionTypes()).toEqual([ADD_MESSAGE_ACTION_TYPE]) | ||
jest.runTimersToTime(4000) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This method was deprecated |
||
jest.advanceTimersByTime(4000) | ||
expect(store.getActionTypes()).toEqual([ADD_MESSAGE_ACTION_TYPE, REMOVE_MESSAGE_ACTION_TYPE]) | ||
}) | ||
|
||
test('flashMessage sets custom timeout if one is provided in action creator', () => { | ||
const store = createMockStore() | ||
store.dispatch(flashMessage('Hi', { timeout: 500 })) | ||
expect(store.getActionTypes()).toEqual([ADD_MESSAGE_ACTION_TYPE]) | ||
jest.runTimersToTime(1000) | ||
jest.advanceTimersByTime(1000) | ||
expect(store.getActionTypes()).toEqual([ADD_MESSAGE_ACTION_TYPE, REMOVE_MESSAGE_ACTION_TYPE]) | ||
}) | ||
|
||
test('flashMessage sets custom timeout if one is provided in middleware config', () => { | ||
const store = createMockStore({}, { timeout: 500 }) | ||
store.dispatch(flashMessage('Hi')) | ||
expect(store.getActionTypes()).toEqual([ADD_MESSAGE_ACTION_TYPE]) | ||
jest.runTimersToTime(1000) | ||
jest.advanceTimersByTime(1000) | ||
expect(store.getActionTypes()).toEqual([ADD_MESSAGE_ACTION_TYPE, REMOVE_MESSAGE_ACTION_TYPE]) | ||
}) | ||
|
||
test('flashMessage sets no timeout if "false" is provided', () => { | ||
const store = createMockStore() | ||
store.dispatch(flashMessage('Hi', { timeout: false })) | ||
expect(store.getActionTypes()).toEqual([ADD_MESSAGE_ACTION_TYPE]) | ||
jest.runTimersToTime(4000) | ||
jest.advanceTimersByTime(4000) | ||
expect(store.getActionTypes()).toEqual([ADD_MESSAGE_ACTION_TYPE]) | ||
}) | ||
|
||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,6 +5,8 @@ import { | |
} from '../src' | ||
import { createMockStore } from './helpers' | ||
|
||
jest.useFakeTimers() | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Without this, There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Wow. I'm sure that was fun to figure out. |
||
|
||
function validatePropType (propType, value) { | ||
// checkPropTypes will log an error if it fails | ||
const spy = jest.spyOn(console, 'error') | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This command doesn't work on
main
currently and it might never have worked. The package itself has been deprecated. Given that it's not used by anything, I'd rather remove it then "fix" it.