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

Update for resolving tarball location of custom registries to support NPM clients #16

Merged
merged 5 commits into from
Jul 25, 2023

Conversation

bkaney
Copy link
Contributor

@bkaney bkaney commented Jul 20, 2023

This is a POC to fix assumptions when trying to download the tarball. See https://chat.fhir.org/#narrow/stream/179239-tooling/topic/NPM.20Registry

@cmoesel
Copy link
Member

cmoesel commented Jul 20, 2023

I like this. Thank you.

Before we can take it as-is, I think we need to determine if this is a valid approach for FHIR registry servers, as they don't document use of dist.tarball and instead specify the hard-coded URL pattern here.

@cmoesel
Copy link
Member

cmoesel commented Jul 20, 2023

Oh. And I'm sure it must break some tests too. So I guess we'd need to fix those up as well.

@bkaney
Copy link
Contributor Author

bkaney commented Jul 21, 2023

Great! I can work on passing tests / linting / etc.

@cmoesel - do you think this should only apply with custom registries -- e.g. shall this part get reverted? https://github.com/standardhealth/fhir-package-loader/pull/16/files#diff-51cd61f2399d311debdd2c813260b4a799b0cd6155b8eaa0f1498aebdc5ca281L225-R239 -- then if the FHIR Package spec changes, it could be use for both.

@bkaney
Copy link
Contributor Author

bkaney commented Jul 21, 2023

I decided to make that change, need to figure out how expectDownloadSequence works, and then should be able to get tests to pass.

@bkaney bkaney marked this pull request as ready for review July 21, 2023 14:40
@bkaney
Copy link
Contributor Author

bkaney commented Jul 21, 2023

I had to modify expectDownloadSequence to indicate when a zipfile was expected (vs when it was not). This is ready to review now @cmoesel

@bkaney bkaney changed the title POC Fix for resolving tarball location of packages Update for resolving tarball location of custom registries to support NPM clients Jul 21, 2023
Copy link
Member

@cmoesel cmoesel left a comment

Choose a reason for hiding this comment

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

Thanks for the PR, @bkaney! I like the approach!

I just found a couple of nit-picky things in the tests that I'd like updated if possible. Other than that, it looks good and works well. I tested it by exporting FPL_REGISTRY as https://registry.npmjs.org and then installing [email protected] (which Josh Mandel uploaded to NPM the other day). It worked as expected!

test/load.test.ts Outdated Show resolved Hide resolved
test/load.test.ts Outdated Show resolved Hide resolved
@bkaney
Copy link
Contributor Author

bkaney commented Jul 25, 2023

@cmoesel - I think this is ready now, LMK if you see anything else.

@bkaney bkaney requested a review from cmoesel July 25, 2023 14:41
Copy link
Member

@cmoesel cmoesel left a comment

Choose a reason for hiding this comment

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

Thank you, @bkaney! It looks great!

We usually require two reviews for PRs, so after someone else from our team reviews it, we'll get it merged!

Copy link
Collaborator

@jafeltra jafeltra left a comment

Choose a reason for hiding this comment

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

This looks good to me! Thanks!

@cmoesel cmoesel merged commit 4fb5362 into FHIR:main Jul 25, 2023
7 checks passed
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