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: partial support for react 19, bump deps, tag requests, use async visibility #103

Merged
merged 2 commits into from
Jan 14, 2025

Conversation

rexxars
Copy link
Member

@rexxars rexxars commented Dec 18, 2024

This adds partial support for React 19. @hello-pangea/dnd is still working on React 19 support, and so until it has released a new version this module also won't be fully compatible - but it at the very least brings the latest Sanity dependencies along that does support it.

I've also done a few cleanups as I was going through the code:

  • Formats with prettier v3, probably best to review only the last commit as the changes will be easier to reason about
  • Upgrades build tooling and dependencies in general
  • Introduces request tags on mutations/queries for better visibility
  • Uses named exports and typed imports where possible
  • Async/await over mixing .then() and await

Note: I'm heading off to PTO, feel free to merge and release if approved.

Copy link

New and removed dependencies detected. Learn more about Socket for GitHub ↗︎

Package New capabilities Transitives Size Publisher
npm/@commitlint/cli@19.6.1 Transitive: environment, eval, filesystem, shell, unsafe +88 6.5 MB escapedcat
npm/@commitlint/config-conventional@19.6.0 Transitive: filesystem +10 2.5 MB escapedcat
npm/@hello-pangea/dnd@17.0.0 environment +11 2.79 MB 100terres
npm/@sanity/icons@3.5.3 None +1 2.02 MB sanity-io
npm/@sanity/incompatible-plugin@1.0.5 None 0 36.5 kB sanity-io
npm/@sanity/pkg-utils@6.12.0 environment Transitive: eval, filesystem, network, shell, unsafe +298 384 MB sanity-io
npm/@sanity/plugin-kit@4.0.18 Transitive: environment, eval, filesystem, network, shell, unsafe +490 602 MB sanity-io
npm/@sanity/semantic-release-preset@5.0.0 Transitive: environment, filesystem, shell +53 2.24 MB sanity-io
npm/@sanity/ui@2.10.11 Transitive: environment +36 10.9 MB armandocerna, ash, atombender, ...62 more
npm/@types/react@18.3.17 None +2 1.69 MB types
npm/@typescript-eslint/eslint-plugin@5.62.0 Transitive: environment, filesystem +44 7.38 MB jameshenry
npm/@typescript-eslint/parser@5.62.0 Transitive: environment, filesystem +32 2.49 MB jameshenry
npm/eslint-config-prettier@8.10.0 None 0 19.9 kB lydell
npm/eslint-plugin-prettier@5.2.1 Transitive: environment +5 255 kB jounqin
npm/eslint-plugin-react-hooks@4.6.2 environment 0 118 kB react-bot
npm/eslint-plugin-react@7.37.2 filesystem Transitive: environment, eval +110 6.29 MB ljharb
npm/eslint@8.57.1 environment, filesystem Transitive: eval, shell, unsafe +93 10.8 MB eslintbot
npm/lint-staged@13.3.0 Transitive: environment, filesystem, shell +40 2.04 MB okonet
npm/prettier-plugin-packagejson@2.5.6 Transitive: environment, filesystem +13 573 kB matzkoh
npm/prettier@3.4.2 None 0 7.83 MB prettier-bot
npm/react-dom@18.3.1 environment +3 4.63 MB react-bot
npm/react-is@18.3.1 environment 0 24 kB react-bot
npm/react@18.3.1 environment +2 339 kB react-bot
npm/rimraf@6.0.1 environment, filesystem Transitive: shell +28 3.52 MB isaacs
npm/sanity-plugin-utils@1.6.7 None +3 4.82 MB simeongriggs
npm/sanity@3.67.1 Transitive: environment, eval, filesystem, network, shell, unsafe +798 712 MB ash
npm/semantic-release@24.2.0 environment, network Transitive: eval, filesystem, shell, unsafe +252 36.5 MB semantic-release-bot
npm/styled-components@6.1.13 environment Transitive: filesystem +16 3.83 MB probablyup
npm/typescript@5.5.4 None 0 21.9 MB typescript-bot

🚮 Removed packages: npm/@commitlint/cli@17.6.6, npm/@commitlint/config-conventional@17.6.6, npm/@hello-pangea/dnd@16.3.0, npm/@sanity/icons@2.10.0, npm/@sanity/incompatible-plugin@1.0.4, npm/@sanity/pkg-utils@2.3.3, npm/@sanity/plugin-kit@3.1.7, npm/@sanity/semantic-release-preset@4.1.6, npm/@sanity/ui@1.7.1, npm/@types/react@18.2.14, npm/@typescript-eslint/eslint-plugin@5.61.0, npm/@typescript-eslint/parser@5.61.0, npm/autoprefixer@10.4.14, npm/eslint-config-prettier@8.8.0, npm/eslint-plugin-prettier@4.2.1, npm/eslint-plugin-react-hooks@4.6.0, npm/eslint-plugin-react@7.32.2, npm/eslint@8.44.0, npm/lint-staged@13.2.3, npm/npm-run-all@4.1.5, npm/prettier-plugin-packagejson@2.4.4, npm/prettier@2.8.8, npm/react-dom@18.2.0, npm/react-is@18.2.0, npm/react@18.2.0, npm/rimraf@5.0.1, npm/sanity-plugin-utils@1.6.2, npm/sanity@3.27.0, npm/semantic-release@22.0.12, npm/styled-components@5.3.11, npm/typescript@5.1.6

View full report↗︎

Copy link

🚨 Potential security issues detected. Learn more about Socket for GitHub ↗︎

To accept the risk, merge this PR and you will not be notified again.

Alert Package NoteSourceCI
License Policy Violation npm/polished@4.3.1
  • License: OFL-1.1 - Not allowed by license policy (package/docs/assets/fonts/LICENSE.txt)
⚠︎
License Policy Violation npm/spdx-exceptions@2.5.0
  • License: CC-BY-3.0 - Not allowed by license policy (npm metadata, package/package.json)
⚠︎
License Policy Violation npm/typescript@5.4.2
  • License: CC-BY-4.0 - Not allowed by license policy (package/ThirdPartyNoticeText.txt)
  • License: W3C-20150513 - Not allowed by license policy (package/ThirdPartyNoticeText.txt)
⚠︎
License Policy Violation npm/silver-fleece@1.1.0
  • License: -- - No known license was found
⚠︎
License Policy Violation npm/typescript@5.5.4
  • License: CC-BY-4.0 - Not allowed by license policy (package/ThirdPartyNoticeText.txt)
  • License: W3C-20150513 - Not allowed by license policy (package/ThirdPartyNoticeText.txt)
⚠︎
License Policy Violation npm/npm@10.9.2
  • License: CC-BY-3.0 - Not allowed by license policy (package/node_modules/spdx-exceptions/package.json)
⚠︎
License Policy Violation npm/caniuse-lite@1.0.30001689
  • License: CC-BY-4.0 - Not allowed by license policy (npm metadata, package/LICENSE, package/package.json)
⚠︎

View full report↗︎

Next steps

What is a license policy violation?

This package is not allowed per your license policy. Review the package's license to ensure compliance.

Find a package that does not violate your license policy or adjust your policy to allow this package's license.

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

  • @SocketSecurity ignore npm/polished@4.3.1
  • @SocketSecurity ignore npm/spdx-exceptions@2.5.0
  • @SocketSecurity ignore npm/typescript@5.4.2
  • @SocketSecurity ignore npm/silver-fleece@1.1.0
  • @SocketSecurity ignore npm/typescript@5.5.4
  • @SocketSecurity ignore npm/npm@10.9.2
  • @SocketSecurity ignore npm/caniuse-lite@1.0.30001689

@rexxars rexxars merged commit 25ab0c2 into main Jan 14, 2025
10 of 11 checks passed
@rexxars rexxars deleted the fix/partial-react-19 branch January 14, 2025 17:34
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.

3 participants