Skip to content
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

fix: move react and react-dom under peerDependencies #78

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

huyenltnguyen
Copy link
Member

Checklist:

This PR moves react and react-dom from the dependencies list to peerDependencies. This change is to be explicit in the framework we support.

Copy link

socket-security bot commented Apr 12, 2024

👍 Dependency issues cleared. Learn more about Socket for GitHub ↗︎

This PR previously contained dependency changes with security issues that have been resolved, removed, or ignored.

Ignoring: npm/acorn-import-assertions@1.9.0, npm/acorn-walk@8.3.2, npm/agent-base@6.0.2, npm/ansi-regex@5.0.1, npm/any-promise@1.3.0, npm/arg@5.0.2, npm/array.prototype.flat@1.3.2, npm/asynckit@0.4.0, npm/big.js@5.2.2, npm/binary-extensions@2.3.0, npm/boolbase@1.0.0, npm/braces@3.0.3, npm/buffer-from@1.1.2, npm/camelcase-css@2.0.1, npm/caniuse-api@3.0.0, npm/char-regex@1.0.2, npm/chokidar@3.6.0, npm/chrome-trace-event@1.0.3, npm/cliui@8.0.1, npm/colord@2.9.3, npm/combined-stream@1.0.8, npm/commander@7.2.0, npm/concat-with-sourcemaps@1.1.0, npm/cosmiconfig@9.0.0, npm/create-require@1.1.1, npm/css-declaration-sorter@6.4.1, npm/css-select@4.3.0, npm/css-tree@1.1.3, npm/css-what@6.1.0, npm/cssesc@3.0.0, npm/cssnano-preset-default@5.2.14, npm/cssnano-utils@3.1.0, npm/cssnano@5.1.15, npm/csso@4.2.0, npm/cssom@0.3.8, npm/deep-is@0.1.4, npm/delayed-stream@1.0.0, npm/didyoumean@1.2.2, npm/diff@4.0.2, npm/dlv@1.1.3, npm/dom-serializer@1.4.1, npm/domelementtype@2.3.0, npm/domhandler@4.3.1, npm/domutils@2.8.0, npm/emojis-list@3.0.0, npm/enhanced-resolve@5.16.1, npm/entities@2.2.0, npm/entities@4.5.0, npm/env-paths@2.2.1, npm/error-ex@1.3.2, npm/es-module-lexer@1.5.3, npm/esbuild@0.20.2, npm/escalade@3.1.2, npm/eventemitter3@4.0.7, npm/events@3.3.0, npm/fast-glob@3.3.2, npm/fast-levenshtein@2.0.6, npm/fill-range@7.1.1, npm/for-each@0.3.3, npm/generic-names@4.0.0, npm/get-caller-file@2.0.5, npm/get-tsconfig@4.7.5, npm/glob-to-regexp@0.4.1, npm/has-bigints@1.0.2, npm/hosted-git-info@2.8.9, npm/iconv-lite@0.6.3, npm/icss-replace-symbols@1.1.0, npm/import-cwd@3.0.0, npm/import-from@3.0.0, npm/is-arrayish@0.2.1, npm/is-async-function@2.0.0, npm/is-bigint@1.0.4, npm/is-binary-path@2.1.0, npm/is-boolean-object@1.1.2, npm/is-finalizationregistry@1.0.2, npm/is-fullwidth-code-point@3.0.0, npm/is-generator-function@1.0.10, npm/is-map@2.0.3, npm/is-number-object@1.0.7, npm/is-number@7.0.0, npm/is-set@2.0.3, npm/is-weakmap@2.0.2, npm/is-weakset@2.0.3, npm/isarray@2.0.5, npm/isexe@2.0.0, npm/loader-utils@3.2.1, npm/react-dom@17.0.2, npm/react-dom@18.3.1, npm/react@17.0.2, npm/react@18.3.1, npm/scheduler@0.20.2

View full report↗︎

Next steps

Take a deeper look at the dependency

Take a moment to review the security alert above. Review the linked package source code to understand the potential risk. Ensure the package is not malicious before proceeding. If you're unsure how to proceed, reach out to your security team or ask the Socket team for help at support [AT] socket [DOT] dev.

Remove the package

If you happen to install a dependency that Socket reports as Known Malware you should immediately remove it and select a different dependency. For other alert types, you may may wish to investigate alternative packages or consider if there are other ways to mitigate the specific risk posed by the dependency.

Mark a package as acceptable risk

To ignore an alert, reply with a comment starting with @SocketSecurity ignore followed by a space separated list of ecosystem/package-name@version specifiers. e.g. @SocketSecurity ignore npm/foo@1.0.0 or ignore all packages with @SocketSecurity ignore-all

Comment on lines +55 to +58
"react": "^16.14.0 || ^17.0.0 || ^18.0.0",
"react-dom": "^16.14.0 || ^17.0.0 || ^18.0.0"
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We previously pinned the React version at 16.14.0 because that's the version /learn is on. But I think we should start developing the library for other consumers whose React versions are more up-to-date.

Our component library uses very basic React APIs, so I'm quite confident that it's compatible with newer React versions (and I'm eyeing https://github.com/freeCodeCamp/Developer_Quiz_Site to be our first React 18 guinea pig consumer).

@huyenltnguyen
Copy link
Member Author

@SocketSecurity ignore-all

@huyenltnguyen huyenltnguyen marked this pull request as ready for review April 15, 2024 04:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant