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

Support latest prince version #59

Open
arjangeertsema opened this issue Jul 24, 2024 · 6 comments
Open

Support latest prince version #59

arjangeertsema opened this issue Jul 24, 2024 · 6 comments

Comments

@arjangeertsema
Copy link
Contributor

Hi,

Can you make the princeXml version configurable:

  1. Exact version
  2. Current version
  3. Latest version

Thank you!

Arjan

@rse
Copy link
Owner

rse commented Aug 15, 2024

That's not such easy, as the URLs for downloading are heavily depending on the current available operating systems and PrinceXML versions. As a workaround, you can always just install your favorite PrinceXML version somewhere in your system (just ensure the prince binary is in your $PATH) and this Node.js module which pick it up before trying to download anything.

@arjangeertsema
Copy link
Contributor Author

arjangeertsema commented Aug 15, 2024

Thank you for responding. My suggestion is to make the version configurable. So that you can specify which version to download. When this is possible we can ask PrinceXML to create an npm package with version information which is create from their CI/CD script. This json file holds the current version and the latest version so that you can also configure current and latest.

In this way you will recieve a pull request ccreated by dependabot as soon as there is a new release.

@arjangeertsema
Copy link
Contributor Author

If have asked Micheal Day (@adrianwong) to create an NPM package (which is linked to their release pipeline) with latest and current version information so that this project can link and consume this information.

I think a good first step is to create a NPM package with one file: version.json. This file contains the current and the latest PrinceXML version information:

current:
version: 15.4
latest:
version: 20240704

You can add a step to your release pipeline to create and publish this NPM artifact when you release a new PrinceXML version.

Then https://github.com/rse/node-prince can be changed to add a dependency to this NPM package and to get version information from the json file inside the referenced npm package (current and latest).

Dependabot will then automatically create a pull request for https://github.com/rse/node-prince when PrinceXml has released a new version, which is what we want.

@rse
Copy link
Owner

rse commented Aug 15, 2024

Well, for determining the current version a version.json file could be just placed onto their website. There is no need to publish a whole NPM package. But the main issue is that one would need actually a file where all the particular binaries (with their platform/OS identifiers) is listed. That's the main issue.

@arjangeertsema
Copy link
Contributor Author

arjangeertsema commented Aug 15, 2024

Well, for determining the current version a version.json file could be just placed onto their website. There is no need to publish a whole NPM package.

Then you do not have controlled upgrade via a pull request created automatically by dependabot, right?

But the main issue is that one would need actually a file where all the particular binaries (with their platform/OS identifiers) is listed. That's the main issue.

Maybe I am wrong, but from what I can see, the file paths are created by convention where only the version changes. So only templating the urls with version will be sufficient.... @adrianwong can you elaborate on this?

@mikeday
Copy link

mikeday commented Aug 15, 2024

Hi, we've been looking at this and perhaps we can submit a pull request to refactor the if-then-else chain that determines princeDownloadURL with a JSON table of download URLs indexed by platform/arch instead? That would be a good starting point for subsequent developments.

(By the way Adrian Wong and I are separate people at YesLogic working on Prince).

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