release: version packages - #4
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR was opened by the Changesets release GitHub action. When you're ready to do a release, you can merge this and the packages will be published to npm automatically. If you're not ready to do a release yet, that's fine, whenever you add more changesets to main, this PR will be updated.
Releases
mailgrade@2.0.0
Major Changes
#3
bfdbdb6Thanks @IgnaceMaes! - Rework the public interface around the calls people actually make, put aletter on the grade, and ship the grade as a CLI.
npx mailgrade acme.com. The package now has a bin: the grade in aterminal (letter, verdict, per-mechanism headlines, and the fixes) with
--jsonfor scripts and--strictfor CI, where a non-zero exit catches theday someone "temporarily" weakens the DMARC record. Zero dependencies, like
everything else here.
A letter on the grade.
DomainGradenow carriesletter,"A+"down to"F". The verdict sets the band (enforcing, partial, nothing) and the detailsmove within it;
+allis an automaticF. The rubric lives in the speccorpus (
spec/grade.json), so ports share it.One import.
gradeDomain,verifyMessageandanalyzeHeadersare now onmailgradeitself, so the common cases need no second import and no guessingat a subpath. Every existing entry point still resolves;
mailgrade/dohandmailgrade/verifyare now for narrowing a bundle, not for finding the API.No setup.
resolveris optional everywhere it was required, defaulting toDNS over HTTPS.
verifyMessage(raw, { ip, sender })works on its own, the waycheckDomainalready did. A Node service that wants the system resolver stillpasses
nodeResolver()frommailgrade/node-dns.Headers you can use.
verifyMessagetakesmtaand returnsauthResultsand
headers: a folded, CRLF-terminatedReceived-SPFandAuthentication-Resultsblock, ready to prepend to the message. The valuesembedded there arrive off the wire, so they are sanitised on the way in: a
CRLF in a hostile MAIL FROM becomes a space, never a forged header field. The
folder is quote-aware, so a legal
"a;b"@example.comsurvives intact.DmarcAnalysisalso gainsreporting: whether the record carries arua=tag, read with the same tag parsing as everything else.
Names that match the package. The headline call is
gradeDomain, notcheckDomain: this library grades, and the README section has always beencalled "Grade a domain". The pure function that used to hold that name is now
gradeRecords, which is what it always took;gradeDomain(records)named adomain and accepted
DomainRecords. The trio now reads in order:resolveDomain->gradeRecords, andgradeDomainfor both at once.Breaking: the JSON conformance corpus is no longer published in the tarball,
and the
mailgrade/spec/*subpath is gone with it. The corpus stays in therepository, which is where a port reads it from.
Breaking: the root barrel is now a curated list rather than
export *, soroughly 25 internals no longer appear on
mailgrade. Each is still exportedfrom the entry point for its own area, so
blankCheck,editDistance,parseHeadersandstripCommentsmove tomailgrade/headers,txtChunksand
recordTagstomailgrade/dmarc, and so on.toAuthResultskeeps itssignature and now accepts any object with the five fields it reads. The
options type for
gradeDomainandresolveDomainis now namedGradeDomainOptions(wasDohOptions).