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

Is this package version number following semver? #130

Open
jrencz opened this issue Apr 5, 2019 · 5 comments
Open

Is this package version number following semver? #130

jrencz opened this issue Apr 5, 2019 · 5 comments

Comments

@jrencz
Copy link

jrencz commented Apr 5, 2019

Background:

Recently I had to wipe out my old package-lock.json which kept me at 1.4.x because I lost access to the private instance of NPM registry I used to have.
Current latest was installed: 1.8.2

Problem:
It made my app throw errors saying some function from _aureliaPal.DOM is not there.

Solution:
Eventually I found out that there's aurelia-pal and aurelia-pal-browser now and one needs to call initialize. Everything is OK now.

But that made me think: the constraint was expressed ^1.4.0 so npm was allowed to install 1.8.2 once I removed the lock. The problem is that 1.5.0 is not backwards compatible with 1.4.0. It's requird to initialize the PAL. Once I found that out I was like: "PAL is really a great idea!", but there's also no notice about that in the readme.

I imagine users of aurelia-fetch-client inside aurelia-framework have no such problem (I have no aurelia apps to find out quickly)

I suggest at least a notice about how to use the aurelia-fetch-client package stand-alone should be added to the readme. I'm using aurelia-fetch-client stand-alone, without aurelia-framework. I do it because I like its features but the app it's used in is not aurelia app. It would be great to have it mentioned in readme in here and in any other packages suitable to be used stand-alone as well.

@bigopon
Copy link
Member

bigopon commented Apr 5, 2019

I guess when we made that changes, this module being used in non-Aurelia apps was not considered carefully. So, for Aurelia apps: not a breaking change. For non-Aurelia apps: it was a breaking changes. Now, it's hard to answer your Q

@jrencz
Copy link
Author

jrencz commented Apr 5, 2019

That's what I guessed :)

I'm aware that stand-alone usage is not a first-class usage, but I'd like to raise awareness on that. I'd be grateful if this example made the team consider such usage in the future

I'm not currently aware of where's the best place to put the informacji about necessity to use aurelia-pal-browser. I know that being a user of aurelia-fetch-client stand alone I'd look for such information either in README.md of the package (most obvious way) or maybe in package docs on aurelia page

Maybe a good way would be to add a section about stand-alone usage linking to an article in the docs?

@zewa666
Copy link
Member

zewa666 commented Apr 5, 2019

Would an explicit peerdependency on the respective version of pal help?

@jrencz
Copy link
Author

jrencz commented Apr 5, 2019

Would an explicit peerdependency on the respective version of pal help?

Setting aurelia-pal-browser as a peer dependency of aurelia-fetch-client, right?
This might help but I'm not sure if it will draw as much attention as it deserves (all in all - if the PAL is not initialized then client will fail on first request)

I also have an idea: checking if PAL is initialized when client is created and warning the developer in console.

It will be a message just in time.

@johnmanko
Copy link

johnmanko commented Oct 30, 2021

What are the versions? Looking at NPM and it goes from 0.9.0 (I'm not counting 0.10.0-dev* as releases for general usage) to 2.* alpha/dev. 1.* is completely missing.

https://www.npmjs.com/package/@aurelia/fetch-client

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

4 participants