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

Resolve deprecation warnings #175

Open
jafeltra opened this issue Mar 7, 2022 · 1 comment
Open

Resolve deprecation warnings #175

jafeltra opened this issue Mar 7, 2022 · 1 comment

Comments

@jafeltra
Copy link
Collaborator

jafeltra commented Mar 7, 2022

When you install GoFSH v1.5.0, there are warnings reported about deprecated packages. We should update the dependencies to resolve any reported issues.

See: https://chat.fhir.org/#narrow/stream/215610-shorthand/topic/GoFSH.201.2E5.2E0/near/273491509

@julianxcarter
Copy link
Contributor

This warning is logged due to mkdirp a third-order dependency in use during the fishing-trip routine (the FSHing Trip algorithm renders the final html using the diff2html package, which names the hogan.js package as a dependency, which utilizes a long outdated version of the mkdirp package). There are two open pull requests on the hogan.js GitHub page to update this deprecated dependency, however the hogan.js project has not received any merges to the main branch since 2019 and has not received a npm release since 2014.

There are several options to force hogan.js to utilize the most recent version of mkdirp, which namely does not adversely affect fshing trip functionality at all:

  1. Use of the npm-force-resolutions package, which will force a specific version of mkdirp to be installed for all dependencies.
  2. Use of the "overrides" flag that is native to npm versions 8.3.x and above, which will allow for us to specify a version number for mkdirp to be loaded for hogan.js specifically. This will have no affect on other dependencies, which seems preferable.

The "overrides" flag is native to npm, however I could not get it to work and it will necessitate GoFSH relying on Node 14 and npm 8.3. There is an open issue on the npm gitHub page, and a maintainer has said that a fix is forthcoming, so I think if we decide to override the dependency then this should be our preferred option. Node 12 will be reaching EOL this year, so moving to Node 14 ahead of that and using the native option seems preferable.

There are two things to note when forcing the mkdirp dependency update. firstly, fshing trips still work fine even with the latest version of mkdirp being used by hogan.js. Secondly, the deprecation warning is still present when installing GoFSH. From what I can tell, that warning comes from the npm registry and there's nothing we can do to prevent that.

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

No branches or pull requests

3 participants