Shopify / shopify-app-bridge

https://shopify.dev/docs/api/app-bridge
85 stars 9 forks source link

Versions above 2.0.16 are not available on JSPM #162

Closed jagthedrummer closed 1 year ago

jagthedrummer commented 1 year ago

Describe the bug

I'm trying to use this package via importmaps and JSPM (in a rails project).

When I do bin/importmap pin @shopify/app-bridge-utils I would expect to get the latest version of 3.4.3, instead I end up with version 2.0.16.

If I go to their online generator and enter @shopify/app-bridge-utils it auto-selects 2.0.16. If I choose a version lower than that, say 2.0.15 everything works as expected. But if I choose a version higher, say 2.0.17. It shows an error message saying:

Error: Unable to load package configuration for @shopify/app-bridge-utils@2.0.17

To Reproduce

Visit this link to see the error with version 3.4.3:

https://generator.jspm.io/#U2VhYGBkDM0rySzJSU1hcCjOyC/ITKvUTywo0E0qykxJT9UtLcnMKXYw1jPRMwYAIZpTRi4A

Expected behaviour

All versions available through npm should also be available via jspm. I think this is an automated process (between npm and jspm) and that a change in how the package is generated is probably at fault.

Contextual information

Trying to upgrade an app from webpacker to importmaps, and doing so has forced a downgrade in @shopify/app-bridge-utils.

Packages and versions

Platform

All platforms

Additional context

None

jagthedrummer commented 1 year ago

I've tried pinning the package from unpkg and jsdelivr and both of them also don't have any packages greater than 2.0.16.

jagthedrummer commented 1 year ago

Skypack is also showing the latest version as being from Feb of 2022, which is when 2.0.16 was released. https://www.skypack.dev/view/@shopify/app-bridge-utils

henrytao-me commented 1 year ago

Can you access these links?

henrytao-me commented 1 year ago

I think you might want to ask this question in JSPM repo then 🙇

jagthedrummer commented 1 year ago

@henrytao-me Those aren't ESM style modules, they're UMD and are unusable via importmaps. This is definitely a problem with the app-bridge-utils package and is not a JSPM issue.

henrytao-me commented 1 year ago

We will take a closer look 🙇

jagthedrummer commented 1 year ago

Well, @henrytao-me it seems this may have been (at least partly) a jspm issue after all.

https://github.com/jspm/registry/issues/1090#issuecomment-1337696049

I'm still not sure why all of the other package sources only have UMD packages, but ESM via jspm does seem to be working for me now.

I'll leave this open in case you all want to investigate what's happening in the other package repositories, but my blocker is resolved.

henrytao-me commented 1 year ago

I think I will close this issue for now then. All of app-bridge packages are released under the same build system. The util package is so small, I don't see why it's slow on JSPM build. I am glad you asked on both sides. 🙇