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

refactor: remove non-null assertion #6826

Closed
wants to merge 1 commit into from
Closed

Conversation

stipsan
Copy link
Member

@stipsan stipsan commented May 31, 2024

Follows up on https://github.com/sanity-io/sanity/pull/6813/files#r1622000741 as non-null assertions are indeed bad :)

@stipsan stipsan requested a review from a team as a code owner May 31, 2024 09:28
@stipsan stipsan requested review from binoy14 and removed request for a team May 31, 2024 09:28
Copy link

vercel bot commented May 31, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
page-building-studio ✅ Ready (Inspect) Visit Preview 💬 Add feedback May 31, 2024 9:32am
performance-studio ✅ Ready (Inspect) Visit Preview 💬 Add feedback May 31, 2024 9:32am
test-compiled-studio ✅ Ready (Inspect) Visit Preview 💬 Add feedback May 31, 2024 9:32am
test-next-studio ✅ Ready (Inspect) Visit Preview 💬 Add feedback May 31, 2024 9:32am
test-studio ✅ Ready (Inspect) Visit Preview 💬 Add feedback May 31, 2024 9:32am
1 Ignored Deployment
Name Status Preview Comments Updated (UTC)
studio-workshop ⬜️ Ignored (Inspect) May 31, 2024 9:32am

Copy link

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

Package New capabilities Transitives Size Publisher
npm/@babel/core@7.24.6 environment, filesystem, unsafe +20 4.52 MB nicolo-ribaudo
npm/@babel/plugin-proposal-class-properties@7.18.6 Transitive: environment +15 2.88 MB nicolo-ribaudo
npm/@babel/preset-env@7.24.5 environment, filesystem +98 5.32 MB nicolo-ribaudo
npm/@babel/preset-react@7.24.1 None +9 330 kB nicolo-ribaudo
npm/@babel/preset-typescript@7.24.1 Transitive: environment +23 3.33 MB nicolo-ribaudo
npm/@babel/register@7.23.7 environment, filesystem, unsafe 0 62 kB nicolo-ribaudo
npm/@babel/traverse@7.24.6 Transitive: environment +9 2.73 MB nicolo-ribaudo
npm/@bjoerge/mutiny@0.5.3 None 0 1.62 MB bjoerge
npm/@codemirror/autocomplete@6.16.1 None +1 479 kB marijn
npm/@codemirror/commands@6.5.0 None +1 461 kB marijn
npm/@codemirror/lang-javascript@6.2.2 Transitive: environment +4 862 kB marijn
npm/@codemirror/language@6.10.1 Transitive: environment +2 707 kB marijn
npm/@codemirror/search@6.5.6 None 0 132 kB marijn
npm/@codemirror/state@6.4.1 None 0 436 kB marijn
npm/@codemirror/view@6.26.3 None 0 1.1 MB marijn
npm/@dnd-kit/core@6.1.0 environment +1 1.07 MB clauderic
npm/@dnd-kit/modifiers@6.0.1 environment 0 47.6 kB clauderic
npm/@dnd-kit/sortable@7.0.2 environment 0 232 kB clauderic
npm/@dnd-kit/utilities@3.2.2 environment 0 88.5 kB clauderic
npm/@google-cloud/storage@7.11.0 environment, filesystem +5 1.86 MB google-wombot
npm/@lezer/highlight@1.2.0 None +1 336 kB marijn
npm/@node-ipc/compat@9.2.5 filesystem, network +1 140 kB aarondewes
npm/@playwright/experimental-ct-react@1.41.2 Transitive: environment +1 76 kB yurys
npm/@playwright/test@1.41.2 None 0 25.3 kB yurys
npm/@portabletext/react@3.1.0 None +1 22.9 kB
npm/@portabletext/toolkit@2.0.15 None +1 169 kB sanity-io
npm/@react-three/cannon@6.6.0 None +1 4.22 MB isaacmason
npm/@react-three/fiber@8.16.6 environment +3 748 kB codyjasonbennett
npm/@repo/package.config@3.44.0 None 0 0 B
npm/@repo/tsconfig@3.44.0 None 0 0 B
npm/@rexxars/gitconfiglocal@3.0.1 environment, filesystem 0 4.52 kB rexxars
npm/@rexxars/react-json-inspector@8.0.1 None 0 25.5 kB rexxars
npm/@rexxars/react-split-pane@0.1.93 None 0 56 kB rexxars
npm/@rollup/plugin-node-resolve@15.2.3 filesystem +3 200 kB shellscape
npm/@sanity/asset-utils@1.3.0 environment 0 363 kB rexxars
npm/@sanity/assist@3.0.4 network +3 5.96 MB sanity-io
npm/@sanity/bifur-client@0.4.0 None 0 52.8 kB rexxars
npm/@sanity/block-tools@3.44.0 None 0 0 B
npm/@sanity/cli@3.44.0 None 0 0 B
npm/@sanity/client@6.19.1 None 0 2.23 MB sanity-io
npm/@sanity/codegen@3.44.0 None 0 0 B
npm/@sanity/color@3.0.6 None 0 171 kB sanity-io
npm/@sanity/diff-match-patch@3.1.1 None 0 533 kB sanity-io
npm/@sanity/diff@3.44.0 None 0 0 B
npm/@sanity/eslint-config-i18n@1.0.0 None +2 280 kB ricokahler
npm/@sanity/eslint-config-studio@4.0.0 Transitive: unsafe +3 394 kB sanity-io
npm/@sanity/eventsource@5.0.2 None +2 20.3 kB sanity-io
npm/@sanity/export@3.38.1 filesystem +2 610 kB ricokahler
npm/@sanity/generate-help-url@3.0.0 None 0 5.25 kB rexxars
npm/@sanity/google-maps-input@4.0.1 None +3 4.17 MB sanity-io
npm/@sanity/icons@3.0.0 None 0 1.27 MB sanity-io
npm/@sanity/image-url@1.0.2 None 0 166 kB rexxars
npm/@sanity/import@3.37.4 filesystem, network +1 922 kB ricokahler
npm/@sanity/locale-ko-kr@1.1.4 None 0 1.03 MB sanity-io
npm/@sanity/locale-nb-no@1.1.7 None 0 950 kB sanity-io
npm/@sanity/locale-nn-no@1.1.6 None 0 951 kB sanity-io
npm/@sanity/locale-pt-pt@1.1.3 None 0 972 kB sanity-io
npm/@sanity/locale-sv-se@1.2.4 None 0 957 kB sanity-io
npm/@sanity/logos@2.1.12 None 0 0 B
npm/@sanity/migrate@3.44.0 None 0 0 B
npm/@sanity/mutator@3.44.0 None 0 0 B
npm/@sanity/pkg-utils@6.8.18 environment Transitive: eval, filesystem, shell, unsafe +54 20.6 MB sanity-io
npm/@sanity/portable-text-editor@3.44.0 None 0 0 B
npm/@sanity/presentation@1.15.11 None +1 3.19 kB
npm/@sanity/prettier-config@1.0.2 None 0 8.4 kB sanity-io
npm/@sanity/react-loader@1.10.1 None 0 0 B
npm/@sanity/schema@3.44.0 None 0 0 B
npm/@sanity/telemetry@0.7.9 None 0 0 B
npm/@sanity/test@0.0.1-alpha.1 environment 0 73 kB sanity-io
npm/@sanity/tsdoc@1.0.67 filesystem Transitive: environment, eval, shell, unsafe +36 24.1 MB sanity-io
npm/@sanity/tsdoc@1.0.69 Transitive: environment, eval, filesystem, shell, unsafe +17 9.53 MB
npm/@sanity/types@3.44.0 None 0 0 B
npm/@sanity/ui-workshop@1.2.11 environment 0 747 kB sanity-io
npm/@sanity/ui@2.1.14 None +4 4.98 MB sanity-io
npm/@sanity/util@3.44.0 None 0 0 B
npm/@sanity/uuid@3.0.2 None +1 10.1 kB rexxars
npm/@sanity/vision@3.44.0 None 0 0 B
npm/@sanity/visual-editing@2.1.3 None 0 0 B
npm/@tanstack/react-table@8.16.0 Transitive: environment +1 4.04 MB tannerlinsley
npm/@tanstack/react-virtual@3.0.0-beta.54 Transitive: environment +1 600 kB tannerlinsley
npm/@testing-library/jest-dom@6.4.2 None +3 887 kB testing-library-bot
npm/@testing-library/react@13.4.0 environment +7 7.47 MB testing-library-bot
npm/@testing-library/user-event@13.5.0 Transitive: environment +7 3.14 MB testing-library-bot
npm/@turf/helpers@6.5.0 None 0 93.6 kB rowanwins
npm/@turf/points-within-polygon@5.1.5 None +4 372 kB deniscarriere
npm/@types/archiver@6.0.2 None +1 15.1 kB types
npm/@types/arrify@1.0.4 None 0 5.13 kB types
npm/@types/arrify@2.0.1 None 0 1.72 kB types
npm/@types/babel__core@7.20.5 None +2 1.93 MB types
npm/@types/babel__register@7.17.3 None 0 3.88 kB types
npm/@types/babel__traverse@7.20.5 None 0 84.1 kB types
npm/@types/configstore@5.0.1 None 0 6 kB types
npm/@types/connect-history-api-fallback@1.5.4 None +5 76.4 kB types
npm/@types/cpx@1.5.5 None 0 5.66 kB types
npm/@types/decompress@4.2.7 None 0 4.81 kB types
npm/@types/express-ws@3.0.4 None +5 77 kB types
npm/@types/express@4.17.21 None +9 107 kB types
npm/@types/glob@7.2.0 None +1 19.1 kB types
npm/@types/inquirer@6.5.0 None +1 73.4 kB types
npm/@types/jsdom@20.0.1 None +1 35.8 kB types
npm/@types/log-symbols@2.0.0 None 0 2.7 kB types
npm/@types/minimist@1.2.5 None 0 6.27 kB types
npm/@types/moment@2.13.0 None 0 508 B types
npm/@types/node-ipc@9.2.3 None 0 20.6 kB types
npm/@types/node@18.19.31 None 0 1.97 MB types
npm/@types/object-inspect@1.13.0 None 0 6.05 kB types
npm/@types/raf@3.4.3 None 0 2.85 kB types
npm/@types/react-copy-to-clipboard@5.0.7 None 0 4.36 kB types
npm/@types/react-is@18.3.0 None 0 5.72 kB types
npm/@types/refractor@3.4.1 None +1 47 kB types
npm/@types/resolve-from@4.0.0 None 0 3.04 kB types
npm/@types/rimraf@3.0.2 None 0 7.5 kB types
npm/@types/semver-compare@1.0.3 None 0 2.97 kB types
npm/@types/semver@6.2.7 None 0 13.5 kB types
npm/@types/shallow-equals@1.0.3 None 0 2.86 kB types
npm/@types/speakingurl@13.0.6 None 0 3.96 kB types
npm/@types/tar-fs@2.0.4 None 0 5.96 kB types
npm/@types/tar-stream@3.1.3 None 0 7.85 kB types
npm/@types/tar@6.1.12 None 0 30.2 kB types
npm/@types/three@0.164.1 None +3 1.33 MB types
npm/@types/use-sync-external-store@0.0.6 None 0 3.29 kB types
npm/@types/validate-npm-package-name@3.0.3 None 0 5.2 kB types
npm/@types/ws@8.5.10 None 0 21.7 kB types
npm/@typescript-eslint/eslint-plugin@7.11.0 None +8 5.31 MB jameshenry
npm/@typescript-eslint/parser@7.11.0 None +4 1.38 MB jameshenry
npm/@uiw/react-codemirror@4.21.25 None +4 1.15 MB wcjiang
npm/@vercel/frameworks@1.6.0 filesystem Transitive: eval +1 312 kB vercel-release-bot
npm/@vercel/fs-detectors@4.1.3 environment, filesystem, shell +2 277 kB vercel-release-bot
npm/@vercel/stega@0.1.2 None 0 29.4 kB vercel-release-bot
npm/@vitejs/plugin-react@4.3.0 None +3 250 kB vitebot
npm/@vvo/tzdb@6.137.0 None 0 175 kB vvo
npm/archiver@7.0.1 filesystem +2 863 kB ctalkington
npm/async-mutex@0.4.1 None 0 54.7 kB dirtyhairy
npm/groq@3.44.0 None 0 0 B
npm/sanity-test-studio@3.44.0 None 0 0 B
npm/sanity@3.44.0 None 0 0 B

🚮 Removed packages: npm/cac@6.7.14, npm/chalk@4.1.2, npm/classnames@2.5.1, npm/clean-stack@3.0.1, npm/color2k@2.0.3, npm/configstore@5.0.1, npm/debug@3.2.7, npm/eslint-config-prettier@9.1.0, npm/eslint-plugin-react-hooks@4.6.2, npm/express@4.19.2, npm/fast-fifo@1.3.2, npm/glob@7.2.3, npm/husky@9.0.11, npm/import-fresh@3.3.0, npm/is-builtin-module@3.2.1, npm/is-installed-globally@0.4.0, npm/js-yaml@4.1.0, npm/json5@2.2.3, npm/leven@3.1.0, npm/lodash@4.17.21, npm/minimist@1.2.8, npm/object-inspect@1.13.1, npm/ora@5.4.1, npm/p-filter@2.1.0, npm/pirates@4.0.6, npm/pkg-dir@5.0.0, npm/pretty-ms@7.0.1, npm/quick-lru@5.1.1, npm/raf@3.4.1, npm/react-fast-compare@3.2.2, npm/read-pkg-up@7.0.1, npm/resolve-from@5.0.0, npm/rimraf@3.0.2, npm/rxjs@7.8.1, npm/semver-compare@1.0.0, npm/tar-fs@2.1.1

View full report↗︎

Copy link
Contributor

No changes to documentation

Copy link
Contributor

Component Testing Report Updated May 31, 2024 9:38 AM (UTC)

File Status Duration Passed Skipped Failed
comments/CommentInput.spec.tsx ✅ Passed (Inspect) 38s 15 0 0
formBuilder/ArrayInput.spec.tsx ✅ Passed (Inspect) 7s 3 0 0
formBuilder/inputs/PortableText/Annotations.spec.tsx ✅ Passed (Inspect) 26s 6 0 0
formBuilder/inputs/PortableText/copyPaste/CopyPaste.spec.tsx ✅ Passed (Inspect) 32s 11 7 0
formBuilder/inputs/PortableText/Decorators.spec.tsx ✅ Passed (Inspect) 15s 6 0 0
formBuilder/inputs/PortableText/DisableFocusAndUnset.spec.tsx ✅ Passed (Inspect) 9s 3 0 0
formBuilder/inputs/PortableText/FocusTracking.spec.tsx ✅ Passed (Inspect) 37s 15 0 0
formBuilder/inputs/PortableText/Input.spec.tsx ✅ Passed (Inspect) 1m 21s 21 0 0
formBuilder/inputs/PortableText/ObjectBlock.spec.tsx ✅ Passed (Inspect) 1m 4s 18 0 0
formBuilder/inputs/PortableText/PresenceCursors.spec.tsx ✅ Passed (Inspect) 7s 3 9 0
formBuilder/inputs/PortableText/RangeDecoration.spec.tsx ✅ Passed (Inspect) 22s 9 0 0
formBuilder/inputs/PortableText/Styles.spec.tsx ✅ Passed (Inspect) 15s 6 0 0
formBuilder/inputs/PortableText/Toolbar.spec.tsx ✅ Passed (Inspect) 31s 12 0 0

@stipsan stipsan disabled auto-merge May 31, 2024 10:15
@stipsan
Copy link
Member Author

stipsan commented May 31, 2024

Replaced by #6827

@stipsan stipsan closed this May 31, 2024
@stipsan stipsan deleted the remove-non-null-assertion branch May 31, 2024 10:50
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.

1 participant