Skip to content

Commit

Permalink
DEP Upgrade JS deps
Browse files Browse the repository at this point in the history
  • Loading branch information
emteknetnz committed Jan 14, 2025
1 parent 7b01f05 commit 2c0e06e
Show file tree
Hide file tree
Showing 7 changed files with 9 additions and 76 deletions.
2 changes: 1 addition & 1 deletion client/dist/js/bundle-cms.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion client/dist/js/bundle.js

Large diffs are not rendered by default.

1 change: 0 additions & 1 deletion client/dist/js/injector.js

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@ The MFA module provides a clear path for creating additional authentication meth
implement the front-end portion of the required code, using the Basic Math method as an example. Some prior experience
with React / Redux is recommended.

The front-end components of MFA make use of [`react-injector`](https://github.com/silverstripe/react-injector/)
The front-end components of MFA make use of [`lib/Injector`](https://github.com/silverstripe/silverstripe-admin/blob/3/client/src/lib/Injector.js)
(Injector) to allow sharing of React components and Redux reducers between separate JS bundles. You can find more
documentation on the Injector API in the [Silverstripe docs](https://docs.silverstripe.org/en/developer_guides/customising_the_admin_interface/reactjs_redux_and_graphql/#the-injector-api).
documentation on the Injector API in the [Silverstripe docs](https://docs.silverstripe.org/en/developer_guides/customising_the_admin_interface/reactjs_redux_and_graphql/#the-injector-api). This means you'll need to ensure that [silverstripe/admin](https://github.com/silverstripe/silverstripe-admin/) is installed in your project.

You'll find it easiest to get up and running by matching the NPM dependencies and Webpack configuration used in the TOTP
and WebAuthn modules, with a single entry point that handles registering your components with Injector. We also suggest
Expand Down
3 changes: 1 addition & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@
"lint-sass": "stylelint client/src"
},
"dependencies": {
"@silverstripe/react-injector": "^0.2.1",
"classnames": "^2.3.2",
"core-js": "^3.26.0",
"es6-promise": "^4.2.8",
Expand All @@ -35,7 +34,7 @@
"reactstrap": "^8.9.0",
"reactstrap-confirm": "^1.3.2",
"redux": "^5.0.1",
"regenerator-runtime": "^0.13.11"
"regenerator-runtime": "^0.14.1"
},
"devDependencies": {
"@silverstripe/eslint-config": "^1.3.0",
Expand Down
10 changes: 0 additions & 10 deletions webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,22 +23,12 @@ const frontendJsConfig = new JavascriptWebpackConfig('js-frontend', PATHS, 'silv
from: `${PATHS.SRC}/images`,
to: `${PATHS.DIST}/images`,
},
{
from: `${PATHS.MODULES}/@silverstripe/react-injector/dist/injector.js`,
to: `${PATHS.DIST}/js`,
},
]
}),
],
})
.getConfig();

// Only include a single "external" which is actually addedto the DOM separately
// Don't include any other externals as this will be used on the frontend
frontendJsConfig.externals = {
'lib/Injector': 'Injector',
};

const config = [
frontendJsConfig,
// Main JS bundle
Expand Down
63 changes: 4 additions & 59 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1631,19 +1631,6 @@
stylelint-config-standard "^36.0.0"
stylelint-scss "^6.2.1"

"@silverstripe/react-injector@^0.2.1":
version "0.2.1"
resolved "https://registry.yarnpkg.com/@silverstripe/react-injector/-/react-injector-0.2.1.tgz#b77f9c79c19a7c7e7f1898fafc75056ae9a3bb28"
integrity sha512-ZzhT3P7ieQtCFtB8FMrCLB2K6yd0yYkJ66pAujj1qiqIyuHQ7p0y+eWvQ97i/tEHL/iH/e2eSsA2fnZgNuAJkA==
dependencies:
classnames "^2.2.6"
core-js "^3.1.4"
merge "^1.2.1"
prop-types "^15.7.2"
react "^16.8.3"
react-dom "^16.8.3"
toposort "^2.0.2"

"@silverstripe/webpack-config@^3.0.0-alpha1":
version "3.0.0-alpha2"
resolved "https://registry.yarnpkg.com/@silverstripe/webpack-config/-/webpack-config-3.0.0-alpha2.tgz#ea2c50a953e5de4e53dacfc42501c9b3c88835f2"
Expand Down Expand Up @@ -2640,7 +2627,7 @@ cjs-module-lexer@^1.0.0:
resolved "https://registry.yarnpkg.com/cjs-module-lexer/-/cjs-module-lexer-1.4.1.tgz#707413784dbb3a72aa11c2f2b042a0bef4004170"
integrity sha512-cuSVIHi9/9E/+821Qjdvngor+xpnlwnuwIyZOaLmHBVdXL+gP+I6QQB9VkO7RI77YIcTV+S1W9AreJ5eN63JBA==

classnames@^2.2.3, classnames@^2.2.6, classnames@^2.3.2:
classnames@^2.2.3, classnames@^2.3.2:
version "2.5.1"
resolved "https://registry.yarnpkg.com/classnames/-/classnames-2.5.1.tgz#ba774c614be0f016da105c858e7159eae8e7687b"
integrity sha512-saHYOzhIQs6wy2sVxTM6bUDsQO4F50V9RQ22qBpEdCW+I+/Wmke2HOl6lS6dTpdxVhb88/I6+Hs+438c3lfUow==
Expand Down Expand Up @@ -2839,7 +2826,7 @@ core-js-compat@^3.38.0, core-js-compat@^3.38.1:
dependencies:
browserslist "^4.24.2"

core-js@^3.1.4, core-js@^3.26.0:
core-js@^3.26.0:
version "3.39.0"
resolved "https://registry.yarnpkg.com/core-js/-/core-js-3.39.0.tgz#57f7647f4d2d030c32a72ea23a0555b2eaa30f83"
integrity sha512-raM0ew0/jJUqkJ0E6e8UDtl+y/7ktFivgWvqw8dNSQeNWoSDLvQ1H/RN3aPXB9tBd4/FhyR4RDPGhsNIMsAn7g==
Expand Down Expand Up @@ -5492,11 +5479,6 @@ merge2@^1.3.0, merge2@^1.4.1:
resolved "https://registry.yarnpkg.com/merge2/-/merge2-1.4.1.tgz#4368892f885e907455a6fd7dc55c0c9d404990ae"
integrity sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg==

merge@^1.2.1:
version "1.2.1"
resolved "https://registry.yarnpkg.com/merge/-/merge-1.2.1.tgz#38bebf80c3220a8a487b6fcfb3941bb11720c145"
integrity sha512-VjFo4P5Whtj4vsLzsYBu5ayHhoHJ0UqNm7ibvShmbmoz7tGi0vXaoJbGdB+GmDMLUdg8DpQXEIeVDAe8MaABvQ==

micromatch@^4.0.4, micromatch@^4.0.5, micromatch@^4.0.8:
version "4.0.8"
resolved "https://registry.yarnpkg.com/micromatch/-/micromatch-4.0.8.tgz#d66fa18f3a47076789320b9b1af32bd86d9fa202"
Expand Down Expand Up @@ -6408,7 +6390,7 @@ promzard@^0.3.0:
dependencies:
read "1"

prop-types@^15.5.8, prop-types@^15.6.1, prop-types@^15.6.2, prop-types@^15.7.2, prop-types@^15.8.1:
prop-types@^15.5.8, prop-types@^15.6.1, prop-types@^15.6.2, prop-types@^15.8.1:
version "15.8.1"
resolved "https://registry.yarnpkg.com/prop-types/-/prop-types-15.8.1.tgz#67d87bf1a694f48435cf332c24af10214a3140b5"
integrity sha512-oj87CgZICdulUohogVAR7AjlC0327U4el4L6eAvOqCeudMDVU0NThNaV+b9Df4dXgSP1gXMTnPdhfe/2qDH5cg==
Expand Down Expand Up @@ -6464,16 +6446,6 @@ react-copy-to-clipboard@^5.1.0:
copy-to-clipboard "^3.3.1"
prop-types "^15.8.1"

react-dom@^16.8.3:
version "16.14.0"
resolved "https://registry.yarnpkg.com/react-dom/-/react-dom-16.14.0.tgz#7ad838ec29a777fb3c75c3a190f661cf92ab8b89"
integrity sha512-1gCeQXDLoIqMgqD3IO2Ah9bnf0w9kzhwN5q4FGnHZ67hBm9yePzB5JJAIQCc8x3pFnNlwFq4RidZggNAAkzWWw==
dependencies:
loose-envify "^1.1.0"
object-assign "^4.1.1"
prop-types "^15.6.2"
scheduler "^0.19.1"

react-dom@^18.2.0:
version "18.3.1"
resolved "https://registry.yarnpkg.com/react-dom/-/react-dom-18.3.1.tgz#c2265d79511b57d479b3dd3fdfa51536494c5cb4"
Expand Down Expand Up @@ -6533,15 +6505,6 @@ react-transition-group@^3.0.0:
prop-types "^15.6.2"
react-lifecycles-compat "^3.0.4"

react@^16.8.3:
version "16.14.0"
resolved "https://registry.yarnpkg.com/react/-/react-16.14.0.tgz#94d776ddd0aaa37da3eda8fc5b6b18a4c9a3114d"
integrity sha512-0X2CImDkJGApiAlcf0ODKIneSwBPhqJawOa5wCtKbu7ZECrmS26NvtSILynQ66cgkT/RJ4LidJOc3bUESwmU8g==
dependencies:
loose-envify "^1.1.0"
object-assign "^4.1.1"
prop-types "^15.6.2"

react@^18.2.0:
version "18.3.1"
resolved "https://registry.yarnpkg.com/react/-/react-18.3.1.tgz#49ab892009c53933625bd16b2533fc754cab2891"
Expand Down Expand Up @@ -6658,12 +6621,7 @@ regenerate@^1.4.2:
resolved "https://registry.yarnpkg.com/regenerate/-/regenerate-1.4.2.tgz#b9346d8827e8f5a32f7ba29637d398b69014848a"
integrity sha512-zrceR/XhGYU/d/opr2EKO7aRHUeiBI8qjtfHqADTwZd6Szfy16la6kqD0MIUs5z5hx6AaKa+PixpPrR289+I0A==

regenerator-runtime@^0.13.11:
version "0.13.11"
resolved "https://registry.yarnpkg.com/regenerator-runtime/-/regenerator-runtime-0.13.11.tgz#f6dca3e7ceec20590d07ada785636a90cdca17f9"
integrity sha512-kY1AZVr2Ra+t+piVaJ4gxaFaReZVH40AKNo7UCX6W+dEwBo/2oZJzqfuN1qLq1oL45o56cPaTXELwrTh8Fpggg==

regenerator-runtime@^0.14.0:
regenerator-runtime@^0.14.0, regenerator-runtime@^0.14.1:
version "0.14.1"
resolved "https://registry.yarnpkg.com/regenerator-runtime/-/regenerator-runtime-0.14.1.tgz#356ade10263f685dda125100cd862c1db895327f"
integrity sha512-dYnhHh0nJoMfnkZs6GmmhFknAGRrLznOu5nc9ML+EJxGvrx6H7teuevqVqCuPcPK//3eDrrjQhehXVx9cnkGdw==
Expand Down Expand Up @@ -6868,14 +6826,6 @@ saxes@^6.0.0:
dependencies:
xmlchars "^2.2.0"

scheduler@^0.19.1:
version "0.19.1"
resolved "https://registry.yarnpkg.com/scheduler/-/scheduler-0.19.1.tgz#4f3e2ed2c1a7d65681f4c854fa8c5a1ccb40f196"
integrity sha512-n/zwRWRYSUj0/3g/otKDRPMh6qv2SYMWNq85IEa8iZyAv8od9zDYpGSnpBEjNgcMNq6Scbu5KfIPxNF72R/2EA==
dependencies:
loose-envify "^1.1.0"
object-assign "^4.1.1"

scheduler@^0.23.2:
version "0.23.2"
resolved "https://registry.yarnpkg.com/scheduler/-/scheduler-0.23.2.tgz#414ba64a3b282892e944cf2108ecc078d115cdc3"
Expand Down Expand Up @@ -7451,11 +7401,6 @@ toggle-selection@^1.0.6:
resolved "https://registry.yarnpkg.com/toggle-selection/-/toggle-selection-1.0.6.tgz#6e45b1263f2017fa0acc7d89d78b15b8bf77da32"
integrity sha512-BiZS+C1OS8g/q2RRbJmy59xpyghNBqrr6k5L/uKBGRsTfxmu3ffiRnd8mlGPUVayg8pvfi5urfnu8TU7DVOkLQ==

toposort@^2.0.2:
version "2.0.2"
resolved "https://registry.yarnpkg.com/toposort/-/toposort-2.0.2.tgz#ae21768175d1559d48bef35420b2f4962f09c330"
integrity sha512-0a5EOkAUp8D4moMi2W8ZF8jcga7BgZd91O/yabJCFY8az+XSzeGyTKs0Aoo897iV1Nj6guFq8orWDS96z91oGg==

totalist@^3.0.0:
version "3.0.1"
resolved "https://registry.yarnpkg.com/totalist/-/totalist-3.0.1.tgz#ba3a3d600c915b1a97872348f79c127475f6acf8"
Expand Down

0 comments on commit 2c0e06e

Please sign in to comment.