pursuit
pursuit copied to clipboard
Tool to show differences between two versions of a package
In short, copy elm-package diff. For example:
$ elm-package diff evancz/elm-markdown 1.0.0 1.1.0
Comparing evancz/elm-markdown 1.0.0 to 1.1.0...
This is a MINOR change.
------ Changes to module Markdown - MINOR ------
Added:
type alias Options =
{ githubFlavored : Maybe { tables : Bool,
breaks : Bool
},
sanitize : Bool,
smartypants : Bool
}
defaultOptions : Options
toElementWith : Options -> String -> Element
toHtmlWith : Options -> String -> Html
Source: http://elm-lang.org/blog/announce/0.14#better-build-tools
I wonder if it might work better for us to implement this inside the Pursuit web app, though.
Having a visual representation of this on the site would be really great. For the diffing algorithm, what were you thinking? We could keep it simple for now, like
- Declaration added
- Declaration removed
- Declaration modified
Ideally if something were modified, we'd be able to tell if the new type was a supertype of the old type, but we can implement that later. If we had that, we could reject uploads based on semver incompatibility like elm-package does, I think.
Yeah, that's what I was thinking, although it's hard to tell before I've started trying to implement it :)
If we had that, we could reject uploads based on semver incompatibility like elm-package does, I think.
I'm a bit hesitant to do this while we don't control the real source of the information about published versions -- that is, how a version counts as published as soon as a tag is pushed to GitHub. If we can't reject it there, I'd rather not reject it at all. Perhaps this is an argument for creating our own package manager, with its own registry?
I do think using the same approach to suggest what kind of version bump a package author should use could work well, though.
👍 This would be great to have!