-
Notifications
You must be signed in to change notification settings - Fork 21
Conversation
@@ -1299,6 +1299,7 @@ module.exports = { | |||
"use strict"; | |||
|
|||
Object.defineProperty(exports, "__esModule", { value: true }); | |||
exports.previewFromCommits = void 0; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
TS 3.9.9 output change. It defines the export first then assigns it later.
if (!matches) { | ||
// Malformed commit prefix. Try our best. | ||
return { | ||
type: prefix.split(':')[0] || '' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've kept this logic from previous behaviour in case some existing user is reliant on it.
scope ? `${scope}:` : undefined, | ||
rest, | ||
`(${hash})` | ||
].filter(part => !!part).join(' '); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've split these sections up as scope is optional and a ternary inside a template literal is confusing.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Didn't review this thoroughly, but I rather not block this feature :) Thanks!
@jahed-snyk would you be able to reopen the PR from a branch on this repo rather than a fork? |
@Shesekino will do, I assumed I didn't have write-access. Is there a testing process for this? If not, I'll try this out on a test repo before merging just to confirm everything's working. |
A test repo sounds fantastic 👌 |
There's a good chance I won't have time for this... So closing for now. If anyone else wants to pick it up feel free to. |
Fixes #31
Currently the
prefix
can contain bothtype
andscope
but it's treated astype
only. So I've added a step to parse those out. The scope is used in the line description similar to how they show up in conventional release notes.I had to include
tslib
as to target ES2018 and use various syntax (like destructuring), it's needed.Downgrading the target to ES2015 avoids the error. I guess they include helpers automatically in ES2015 and stopped doing that in later versions.
I've also committed changes in the
dist
folder as that seems to be convention here.Since the tsbuildinfo is on
3.8.3
, I made a separate commit to upgrade to 3.9.9 which allows us to use the latesttslib
. I can split this into a separate PR if needed.