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

feat: create import map w/ installed sanity version #6784

Merged
merged 2 commits into from
May 28, 2024
Merged

Conversation

ricokahler
Copy link
Contributor

Description

This PR adds the minimum version to the import map grabbed from the installed sanity version.

What to review

Try the build action out, try the deploy action out with auto updates.

Testing

Tested it in by building the test-studio with --enable-auto-updates (flag needs to be renamed but will come in another PR)

Notes for release

N/A

@ricokahler ricokahler requested a review from a team as a code owner May 28, 2024 15:58
@ricokahler ricokahler requested review from rexxars and removed request for a team May 28, 2024 15:58
Copy link

vercel bot commented May 28, 2024

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

Name Status Preview Comments Updated (UTC)
performance-studio ✅ Ready (Inspect) Visit Preview 💬 Add feedback May 28, 2024 5:25pm
test-next-studio ✅ Ready (Inspect) Visit Preview 💬 Add feedback May 28, 2024 5:25pm
test-studio ✅ Ready (Inspect) Visit Preview 💬 Add feedback May 28, 2024 5:25pm
1 Ignored Deployment
Name Status Preview Comments Updated (UTC)
studio-workshop ⬜️ Ignored (Inspect) Visit Preview May 28, 2024 5:25pm

Copy link
Contributor

No changes to documentation

Copy link
Contributor

github-actions bot commented May 28, 2024

Component Testing Report Updated May 28, 2024 5:28 PM (UTC)

File Status Duration Passed Skipped Failed
comments/CommentInput.spec.tsx ✅ Passed (Inspect) 39s 15 0 0
formBuilder/ArrayInput.spec.tsx ✅ Passed (Inspect) 6s 3 0 0
formBuilder/inputs/PortableText/Annotations.spec.tsx ✅ Passed (Inspect) 27s 6 0 0
formBuilder/inputs/PortableText/copyPaste/CopyPaste.spec.tsx ✅ Passed (Inspect) 31s 11 7 0
formBuilder/inputs/PortableText/Decorators.spec.tsx ✅ Passed (Inspect) 14s 6 0 0
formBuilder/inputs/PortableText/DisableFocusAndUnset.spec.tsx ✅ Passed (Inspect) 8s 3 0 0
formBuilder/inputs/PortableText/FocusTracking.spec.tsx ✅ Passed (Inspect) 36s 15 0 0
formBuilder/inputs/PortableText/Input.spec.tsx ✅ Passed (Inspect) 1m 18s 21 0 0
formBuilder/inputs/PortableText/ObjectBlock.spec.tsx ✅ Passed (Inspect) 1m 3s 18 0 0
formBuilder/inputs/PortableText/PresenceCursors.spec.tsx ✅ Passed (Inspect) 7s 3 9 0
formBuilder/inputs/PortableText/RangeDecoration.spec.tsx ✅ Passed (Inspect) 21s 9 0 0
formBuilder/inputs/PortableText/Styles.spec.tsx ✅ Passed (Inspect) 15s 6 0 0
formBuilder/inputs/PortableText/Toolbar.spec.tsx ✅ Passed (Inspect) 30s 12 0 0

Copy link
Contributor

@binoy14 binoy14 left a comment

Choose a reason for hiding this comment

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

Code is good, the url is incorrect tho

const version = encodeURIComponent(`^${installedSanityVersion}`)
const autoUpdatesImports = {
// /:packageName/:channel/:minVersion/:file?
'sanity': `https://api.sanity.work/v1/sanity/default/${version}`,
Copy link
Contributor

Choose a reason for hiding this comment

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

The URL is incorrect for all, missing modules

Suggested change
'sanity': `https://api.sanity.work/v1/sanity/default/${version}`,
'sanity': `https://api.sanity.work/v1/modules/sanity/default/${version}`,

@ricokahler ricokahler merged commit bf136d0 into sdx-1349 May 28, 2024
39 of 40 checks passed
@ricokahler ricokahler deleted the sdx-1371 branch May 28, 2024 17:47
ricokahler added a commit that referenced this pull request May 28, 2024
* feat(cli): build user peer-deps

* chore: remove shared-modules build

* test(cli):  verify build config and `exports` subpaths

* text(cli): add depcheck config for fixture projects

* docs: update comments and test name

* feat: create import map w/ installed sanity version (#6784)

* feat: create import map w/ installed sanity version

* fix: use correct URL
binoy14 pushed a commit that referenced this pull request May 28, 2024
* feat(cli): build user peer-deps

* chore: remove shared-modules build

* test(cli):  verify build config and `exports` subpaths

* text(cli): add depcheck config for fixture projects

* docs: update comments and test name

* feat: create import map w/ installed sanity version (#6784)

* feat: create import map w/ installed sanity version

* fix: use correct URL
binoy14 pushed a commit that referenced this pull request May 29, 2024
* feat(cli): build user peer-deps

* chore: remove shared-modules build

* test(cli):  verify build config and `exports` subpaths

* text(cli): add depcheck config for fixture projects

* docs: update comments and test name

* feat: create import map w/ installed sanity version (#6784)

* feat: create import map w/ installed sanity version

* fix: use correct URL
binoy14 pushed a commit that referenced this pull request May 30, 2024
* feat(cli): build user peer-deps

* chore: remove shared-modules build

* test(cli):  verify build config and `exports` subpaths

* text(cli): add depcheck config for fixture projects

* docs: update comments and test name

* feat: create import map w/ installed sanity version (#6784)

* feat: create import map w/ installed sanity version

* fix: use correct URL
binoy14 pushed a commit that referenced this pull request May 30, 2024
* feat(cli): build user peer-deps

* chore: remove shared-modules build

* test(cli):  verify build config and `exports` subpaths

* text(cli): add depcheck config for fixture projects

* docs: update comments and test name

* feat: create import map w/ installed sanity version (#6784)

* feat: create import map w/ installed sanity version

* fix: use correct URL
binoy14 pushed a commit that referenced this pull request May 31, 2024
* feat(cli): build user peer-deps

* chore: remove shared-modules build

* test(cli):  verify build config and `exports` subpaths

* text(cli): add depcheck config for fixture projects

* docs: update comments and test name

* feat: create import map w/ installed sanity version (#6784)

* feat: create import map w/ installed sanity version

* fix: use correct URL
binoy14 pushed a commit that referenced this pull request Jun 10, 2024
* feat(cli): build user peer-deps

* chore: remove shared-modules build

* test(cli):  verify build config and `exports` subpaths

* text(cli): add depcheck config for fixture projects

* docs: update comments and test name

* feat: create import map w/ installed sanity version (#6784)

* feat: create import map w/ installed sanity version

* fix: use correct URL
github-merge-queue bot pushed a commit that referenced this pull request Jun 11, 2024
* feat: add CLI options to enable auto-updating studios

* refactor(cli): prefix with `unstable_`

* test: Update packages/sanity/src/_internal/cli/server/renderDocument.ts

Co-authored-by: Espen Hovlandsdal <espen@hovlandsdal.com>

* chore(core): update import map urls

* feat(cli): build user peer-deps (#6742)

* feat(cli): build user peer-deps

* chore: remove shared-modules build

* test(cli):  verify build config and `exports` subpaths

* text(cli): add depcheck config for fixture projects

* docs: update comments and test name

* feat: create import map w/ installed sanity version (#6784)

* feat: create import map w/ installed sanity version

* fix: use correct URL

* chore(cli): rename auto updates flag

---------

Co-authored-by: Espen Hovlandsdal <espen@hovlandsdal.com>
Co-authored-by: Binoy Patel <me@binoy.io>
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

2 participants