[Snyk] Upgrade: react, react-dom, body-parser, express, redux-thunk, sanitize-html #61
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Snyk has created this PR to upgrade multiple dependencies.
👯 The following dependencies are linked and will therefore be updated together.ℹ️ Keep your dependencies up-to-date. This makes it easier to fix existing vulnerabilities and to more quickly identify and fix newly disclosed vulnerabilities when they affect your project.
react
from 15.6.2 to 15.7.0 | 1 version ahead of your current version | 4 years ago
on 2020-10-14
react-dom
from 15.6.2 to 15.7.0 | 1 version ahead of your current version | 4 years ago
on 2020-10-14
body-parser
from 1.19.0 to 1.20.2 | 5 versions ahead of your current version | 2 years ago
on 2023-02-22
express
from 4.17.1 to 4.19.2 | 9 versions ahead of your current version | 5 months ago
on 2024-03-25
redux-thunk
from 2.3.0 to 2.4.2 | 3 versions ahead of your current version | 2 years ago
on 2022-11-04
sanitize-html
from 1.27.4 to 1.27.5 | 1 version ahead of your current version | 4 years ago
on 2020-09-23
Issues fixed by the recommended upgrade:
SNYK-JS-QS-3153490
SNYK-JS-EXPRESS-6474509
Release notes
Package name: react
React
Package name: react-dom
React
Package name: body-parser
strict
eval
usage withFunction
constructorprocess
to check for listeners__proto__
keyspb
) supportthrow
on invalid typePackage name: express
What's Changed
Full Changelog: 4.19.0...4.19.1
What's Changed
New Contributors
Full Changelog: 4.18.3...4.19.0
Main Changes
Other Changes
New Contributors
Full Changelog: 4.18.2...4.18.3
res.download
options
withoutfilename
inres.download
res.status
null
/undefined
asmaxAge
inres.cookie
Object.prototype
values in settings throughapp.set
/app.get
default
with same arguments as types inres.format
res.send
http-errors
forres.format
errorstrict
priority
optionexpires
option to reject invalid dateseval
usage withFunction
constructorprocess
to check for listeners425 Unordered Collection
to standard425 Too Early
__proto__
keysundefined
inres.jsonp
undefined
when"json escape"
is enabledRegExp
sres.jsonp(obj, status)
deprecation messageres.is
JSDocmaxAge
option to reject invalid valuesreq.socket
over deprecatedreq.connection
Package name: redux-thunk
This release removes an unused TS type that caused errors when users were type-checking libraries in
node_modules
.What's Changed
Full Changelog: v2.4.1...v2.4.2
This release adds an explicit plain
action
overload to theThunkDispatch
TS type to better handle inference of the return value in some cases.What's Changed
Full Changelog: v2.4.0...v2.4.1
This very overdue release makes several major improvements to the TypeScript types, and converts the actual source to TypeScript. Sorry for the delay!
Changelog
TypeScript Improvements
This release fixes several outstanding issues that had been reported with the types. An extra overload has been added to let TS correctly understand some generically-typed values being passed to
dispatch
, and the overloads have been reworked for additional compatibility.There's also a new
ThunkActionDispatch
type that can be used to represent howbindActionCreators
turns bound thunks into(arg) => thunkReturnValue
.Additionally, all of the generic args have been giving meaningful names instead of one-letter abbreviations (
S
->State
,E
->ExtraArgument
, etc), and we've added descriptive comments in the type definitions for clarity.Optional Global
Dispatch
Type ExtensionMost Redux apps have the thunk middleware enabled, but the default
Dispatch
andbindActionCreator
types only know about the standard behavior of a basic Redux store without any middleware. The thunk middleware types add to that type behavior, so thatDispatch
knows dispatching a thunk can actually return a value such as a Promise.We generally recommend inferring the type of
dispatch
and using that to create reusable types, including creating pre-typed hooks. However, some users may prefer to globally augment theDispatch
type to always use the additional thunk behavior.You can now
import 'redux-thunk/extend-redux'
to globally augment theDispatch
type as an opt-in change in behavior.Codebase Converted to TypeScript
We've gone ahead and converted the actual source to TS. Since the source was only 15-ish lines to begin with, most of the "conversion" time was just trying to convince TS that assigning
thunk.extraArgument = createThunkMiddleware
was a legal operation :)We also updated the build tooling:
Finally, the README has been updated with newer instructions and usage information.
What's Changed
applyMiddleware
by @ iamandrewluca in #279|
by @ Philipp91 in #317New Contributors