Skip to content
This repository has been archived by the owner on Feb 18, 2024. It is now read-only.

Purpose of '.jspm-hash' file? #789

Closed
tylerferguson opened this issue Mar 2, 2016 · 7 comments
Closed

Purpose of '.jspm-hash' file? #789

tylerferguson opened this issue Mar 2, 2016 · 7 comments

Comments

@tylerferguson
Copy link

Hello,

I've been playing around with jspm lately trying to get a feel for what it is up to behind the scenes.
This .jspm-hash file that you get when you install a package is upsetting me a little because I cannot work out its exact role!

Is there any documentation for it? Or are you able to quickly explain what it does?

I figure it is used somewhere along the way to identify packages (possibly in the registry?), but where? Is that even correct?

Thanks,

Tyler

@guybedford
Copy link
Member

This is the package hash, which jspm uses to evaluate if the package is freshly downloaded or needs to be downloaded again.

@tylerferguson
Copy link
Author

Thanks for the response! Are you able to tell me how it's constructed?

I can see the first portion is the commit hash that matches the version of the package being used. Where does the rest come from?

@guybedford
Copy link
Member

Sure, it's generated at https://github.com/jspm/jspm-cli/blob/master/lib/package.js#L511. Are you writing some sort of tooling on top of the workflow here? Closing, but feel free to continue discussion.

@tylerferguson
Copy link
Author

Excellent. Thanks for that.

No I'm not writing anything. I am currently in the middle of a blog post about using jspm as a client side package manager and thought I would take a look at the differences in a package installed with jspm vs. installing with bower.

I felt I had gripped what everything was up to except the .jspm-hash so thanks for clearing that up.

@nlwillia
Copy link

nlwillia commented Mar 3, 2016

@tylerferguson I'd be interested in reading that if you don't mind posting the link here once it's up. Thanks.

@guybedford
Copy link
Member

Sure, sounds great, just let me know if you have any further questions at all. I'd also strongly suggest looking into the jspm 0.17 version as well if you can which doesn't do any package code modifications, and has a much nicer handling of packages via separating the configuration into a separate package configuration file.

@tylerferguson
Copy link
Author

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants