A pure JavaScript implementation of git for node and browsers!
MIT License
Bot releases are visible (Hide)
Published by isomorphic-git-bot over 4 years ago
These are the auto-generated release notes, which are exhaustive if not pretty.
readObject
and writeObject
typings (#1023) (9f905d9)onAuth
the replacement for username
, password
, token
, and oauth2format
(#1051) (e344578)sign
command (#1007) (a549b2b)pattern
param with filter
param (#1004) (fe6d98a)log
command (#1005) (2ae9b78)E
has been removed and replaced by Errors
. The errors are typed so if you use an instanceof
comparison in the catch
statement, auto-completion on their .data
property works. There are fewer errors total, they have shorter names, and thus the resulting gzip bundle is smaller despite the addition of 28 new classes. Lastly, the distinction between Fail
and Error
has been removed since it was subjective.Here's the complete breakdown of which Errors
classes replaced which E
codes:
AlreadyExistsError
replaces AddingRemoteWouldOverwrite
, NoteAlreadyExistsError
, RefExistsError
AmbiguousError
replaces AmbiguousShortOid
CheckoutConflictError
replaces CheckoutConflictError
CommitNotFetchedError
replaces CommitNotFetchedError
EmptyServerResponseError
replaces EmptyServerResponseFail
FastForwardError
replaces FastForwardFail
GitPushError
replaces GitPushError
HttpError
replaces HTTPError
InternalError
replaces InternalFail
InvalidFilepathError
replaces DirectorySeparatorsError
InvalidOidError
replaces CorruptShallowOidFail
, NotAnOidFail
InvalidRefNameError
replaces InvalidRefNameError
MaxDepthError
replaces MaxSearchDepthExceeded
MergeNotSupportedError
replaces MergeNotSupportedFail
MissingNameError
replaces MissingAuthorError
, MissingCommitterError
, MissingTaggerError
MissingParameterError
replaces MissingRequiredParameterError
NoRefspecError
replaces NoRefspecConfiguredError
NotFoundError
replaces ExpandRefError
, FileReadError
, GitRootNotFoundError
, ReadObjectFail
, RefNotExistsError
, ResolveRefError
, ShortOidNotFound
, TreeOrBlobNotFoundError
ObjectTypeError
replaces DirectoryIsAFileError
, ObjectTypeAssertionFail
, ObjectTypeAssertionInPathFail
, ObjectTypeAssertionInTreeFail
, ObjectTypeUnknownFail
, ResolveCommitError
, ResolveTreeError
ParseError
replaces AssertServerResponseFail
, UnparseableServerResponseFail
PushRejectedError
replaces PushRejectedNonFastForward
, PushRejectedTagExists
RemoteCapabilityError
replaces RemoteDoesNotSupportDeepenNotFail
, RemoteDoesNotSupportDeepenRelativeFail
, RemoteDoesNotSupportDeepenSinceFail
, RemoteDoesNotSupportShallowFail
SmartHttpError
replaces RemoteDoesNotSupportSmartHTTP
UnknownTransportError
replaces UnknownTransportError
UrlParseError
replaces RemoteUrlParseError
UserCanceledError
replaces UserCancelledError
The following error codes are no longer used / have no equivalent: AcquireLockFileFail
, BranchDeleteError
, CoreNotFound
, DoubleReleaseLockFileFail
, InvalidDepthParameterError
, InvalidParameterCombinationError
, MismatchRefValueError
, NoHeadCommitError
, NotImplementedFail
, ObjectTypeAssertionInRefFail
, PluginSchemaViolation
, PluginUndefined
, PluginUnrecognized
author.date
, committer.date
, tagger.date
parameters were removed in favor of author.timestamp
, comitter.timestamp
, tagger.timestamp
in order to be clear about what is actually written and better reflect the return types in readCommit
, log
, and readTag
.username
, password
, token
, and oauth2format
params were removed and replaced with the onAuth
callback. Since onAuth
also replaced the credentialManager
plugin, this means now there is a single way to do authentication instead of two..git
since sometimes that actually makes things worse, and subverts user expectations. Accordingly, the noGitSuffix
parameter has been removed since it's the default behavior. Furthermore, the User-Agent
is now totally in the user's hands, because it is just a minefield, and I'm done trying to make sense of it. I added a Headers page to the docs documenting what I know about User-Agent + GitHub + CORS + Chrome bugs.verify
function has been removed, and the signature
property of TagObject renamed to gpgsig
to match CommitObject. Since log
, readCommit
, and readTag
all include the gpgsig
and signing payload
in their return values now, it is simpler and more efficient to do the verification outside of isomorphic-git
. See the documentation for the onSign
parameter for complete code examples.newSubmoduleBehavior
parameter has been removed and is now the default and only behavior, because it is good. And the noSubmodules
parameter has been removed and is also the default and only behavior. (This only affects you if you a) liked seeing the console warnings or b) were using statusMatrix
to traverse submodules for some reason.)push
function now throws if any of the refs on the remote were not updated successfully. It also returns a nicely typed result object organized by ref, rather than a loose collection of strings organized by outcome.fetch
and push
functions now respect previously ignored git config settings like: branch.${ref}.pushRemote
, remote.pushDefault
, remote.${remote}.pushurl
, and branch.${ref}.merge
. (Note the pull
command already respected branch.${ref}.merge
but fetch
did not.)main
file and a browser HTTP client hard-coded into the module
file. The HTTP clients are now in their own files; users pick one, import it, and provide it to functions that make requests.readObject
and writeObject
have been updated to use the same object schemas used in readCommit
, readTree
, and readTag
. And they are actually documented now in the docs. (The main change is trees are simply arrays now, rather than objects with a .entries
property.) The types returned by readObject
also form a proper discriminated union so TypeScript will infer the type of .object
given .format
and .type
.authUsername
and authPassword
are removed in favor of username
and password
.plugins.set
has been replaced by plugins.fs
, plugins.emitter
, plugins.credentialManager
, plugins.pgp
, and plugins.http
.token
and oauth2format
properties have been removed from the GitAuth interface, which makes it much simpler and and eliminates a dozen GitErrors handling specific edge cases.A headers
property has been added to the GitAuth interface. This makes onAuth
much more powerful because you can inject whatever HTTP headers you want.
The onAuthFailed
callback now lets you return a GitAuth object. This means you can keep retrying to authenticate as many times as you like.
A cancel
property has been added to the GitAuth interface. This means you gracefully give up authenticating and the function will throw an E.UserCancelledError instead of an E.HTTPError.
fs
and emitter
params have been removed. They've been superseded by the fs
and emitter
plugins.internal-apis
are no longer included in the npm package. I never really intended that; they were just for running unit tests. Also, I renamed dist/for-future/isomorphic-git/index.js
to dist/index.js
and dist/for-node/isomorphic-git/index.js
to dist/index.cjs
.And I removed the jasmine
fallback. I'm sorry jest
uses native modules, but it's just too good not to use and maintaining a fallback test runner is an added complication.
message
events were trimmed. This was lossy and removed valuable information, such as an '\r'
by itself, which is a signal to update the existing line instead of appending a new one. The rawmessage
event was added as a temporary workaround to expose the untrimmed data. The rawmessage
event has been removed and from now on, message
events emit the full untrimmed data.Buffer
objects now instead return Uint8Array
objects. This is so we can eventually drop the bloated Buffer
browser polyfill.sign
command was deprecated a while ago (back when commit
got a signingKey
param) and has now been removed.autoTranslateSSH
feature has been removed since it's kind of hacky, and it's trivial to implement your own version using the data.suggestion
property of the UnknownTransportError
when something fails.signing
argument of log
has been removed, and log
now returns an array of objects with the same interface as those returned from readCommit
. Also, the log
function will throw now instead of returning errors as objects inside the result array. This greatly simplifies the TS definition (which previously consisted of 3 different overloaded variations) so that we can generate the TS definitions directly from the JSDoc in the future.pattern
param added two dependencies to the project (globrex and globalyzer) for very little benefit since we haven't ended up using globbing anywhere else in the library. The same result can be achieved via the new function parameter filter
which lets you provide the pattern-matching logic yourself.fastCheckout
function has been renamed checkout
and the old checkout
function has been removed entirely.walkBeta2
function has been renamed walk
and the walkBeta1
function has been removed entirely.core
has been replaced by plugins.createCore
and plugins.deleteCore
.Published by isomorphic-git-bot over 4 years ago
Published by isomorphic-git-bot over 4 years ago
Published by isomorphic-git-bot over 4 years ago
E
has been removed and replaced by Errors
. The errors are typed so if you use an instanceof
comparison in the catch
statement, auto-completion on their .data
property works. There are fewer errors total, they have shorter names, and thus the resulting gzip bundle is smaller despite the addition of 28 new classes. Lastly, the distinction between Fail
and Error
has been removed since it was subjective.Here's the complete breakdown of which Errors
classes replaced which E
codes:
AlreadyExistsError
replaces AddingRemoteWouldOverwrite
, NoteAlreadyExistsError
, RefExistsError
AmbiguousError
replaces AmbiguousShortOid
CheckoutConflictError
replaces CheckoutConflictError
CommitNotFetchedError
replaces CommitNotFetchedError
EmptyServerResponseError
replaces EmptyServerResponseFail
FastForwardError
replaces FastForwardFail
GitPushError
replaces GitPushError
HttpError
replaces HTTPError
InternalError
replaces InternalFail
InvalidFilepathError
replaces DirectorySeparatorsError
InvalidOidError
replaces CorruptShallowOidFail
, NotAnOidFail
InvalidRefNameError
replaces InvalidRefNameError
MaxDepthError
replaces MaxSearchDepthExceeded
MergeNotSupportedError
replaces MergeNotSupportedFail
MissingNameError
replaces MissingAuthorError
, MissingCommitterError
, MissingTaggerError
MissingParameterError
replaces MissingRequiredParameterError
NoRefspecError
replaces NoRefspecConfiguredError
NotFoundError
replaces ExpandRefError
, FileReadError
, GitRootNotFoundError
, ReadObjectFail
, RefNotExistsError
, ResolveRefError
, ShortOidNotFound
, TreeOrBlobNotFoundError
ObjectTypeError
replaces DirectoryIsAFileError
, ObjectTypeAssertionFail
, ObjectTypeAssertionInPathFail
, ObjectTypeAssertionInTreeFail
, ObjectTypeUnknownFail
, ResolveCommitError
, ResolveTreeError
ParseError
replaces AssertServerResponseFail
, UnparseableServerResponseFail
PushRejectedError
replaces PushRejectedNonFastForward
, PushRejectedTagExists
RemoteCapabilityError
replaces RemoteDoesNotSupportDeepenNotFail
, RemoteDoesNotSupportDeepenRelativeFail
, RemoteDoesNotSupportDeepenSinceFail
, RemoteDoesNotSupportShallowFail
SmartHttpError
replaces RemoteDoesNotSupportSmartHTTP
UnknownTransportError
replaces UnknownTransportError
UrlParseError
replaces RemoteUrlParseError
UserCanceledError
replaces UserCancelledError
The following error codes are no longer used / have no equivalent: AcquireLockFileFail
, BranchDeleteError
, CoreNotFound
, DoubleReleaseLockFileFail
, InvalidDepthParameterError
, InvalidParameterCombinationError
, MismatchRefValueError
, NoHeadCommitError
, NotImplementedFail
, ObjectTypeAssertionInRefFail
, PluginSchemaViolation
, PluginUndefined
, PluginUnrecognized
Published by isomorphic-git-bot over 4 years ago
Published by isomorphic-git-bot over 4 years ago
Published by isomorphic-git-bot over 4 years ago
token
and oauth2format
properties have been removed from the GitAuth interface, which makes it much simpler and and eliminates a dozen GitErrors handling specific edge cases.A headers
property has been added to the GitAuth interface. This makes onAuth
much more powerful because you can inject whatever HTTP headers you want.
The onAuthFailed
callback now lets you return a GitAuth object. This means you can keep retrying to authenticate as many times as you like.
A cancel
property has been added to the GitAuth interface. This means you gracefully give up authenticating and the function will throw an E.UserCancelledError instead of an E.HTTPError.
Published by isomorphic-git-bot over 4 years ago
Published by isomorphic-git-bot over 4 years ago
Published by isomorphic-git-bot over 4 years ago
author.date
, committer.date
, tagger.date
parameters were removed in favor of author.timestamp
, comitter.timestamp
, tagger.timestamp
in order to be clear about what is actually written and better reflect the return types in readCommit
, log
, and readTag
.