-
-
Notifications
You must be signed in to change notification settings - Fork 3
Conversation
af9b7c6
to
56af347
Compare
{ | ||
files: ['**/*.d.ts'], | ||
rules: { | ||
'import/unambiguous': 'off', |
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.
Why disable this? 🤔
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.
Wait, on type definitions!? How does this rule apply to those 😕
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.
Well, I've looked into this, but I am still confused. No update. Welp.
I'm OK to let this slide for now but I still suspect we're doing something wrong.
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 think it makes sense given the documentation of import/unambiguous
: https://github.com/benmosher/eslint-plugin-import/blob/master/docs/rules/unambiguous.md
And indeed, using parserOptions: { sourceType: 'script' } }
in the override works equally well. Maybe we prefer that?
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'm not sure 🤔 I'm curious which part of the docs indicate that this makes sense 😅 That is, it's not clear to me that a type definition is a module or a script. I don't know which fits better, if either. I was hoping that the TypeScript ESLint module would make some sense from this, but no such luck.
Given my limited understanding at the moment, turning it off seems like the most sensible approach.
* the git config remote.origin.url string matches one of: | ||
* | ||
* - https://github.com/OrganizationName/RepositoryName | ||
* - [email protected]:OrganizationName/RepositoryName.git |
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.
Any idea when each of these are used? The @action/checkout
docs indicate that github.repository
is the default, but I haven't tracked down what that is yet.
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.
Hm, I think it's simply dictated by whether git
is configured to use SSH or HTTP/HTTPS. If you search for github.repository
here, you'll see that it's just OrganizationName/RepositoryName
.
actions/checkout
supports either HTTPS or SSH, and the one it uses is determined by the inputs you provide to it, so for present purposes I think we're good so long as we support both?
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.
actions/checkout supports either HTTPS or SSH, and the one it uses is determined by the inputs you provide to it
I couldn't find confirmation of this in their docs, but I found some code that indicates that this is true! https://github.com/actions/checkout/blob/main/src/url-helper.ts
src/package-operations.ts
Outdated
const { newVersion, repositoryUrl } = updateSpecification; | ||
|
||
let changelogContent: string; | ||
const changelogPath = `${projectRootDirectory}/CHANGELOG.md`; |
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.
Nit: Probably better to use path.join
here for Windows compatibility.
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.
Done in 19c3a07
src/package-operations.ts
Outdated
*/ | ||
function getTruncatedPath(absolutePath: string): string { | ||
return absolutePath | ||
.split('/') |
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.
Nit: we can use path.sep
here for better windows support
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.
Done in b5096e0
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.
LGTM!
Adds changelog updating to the package update workflow via
@metamask/auto-changelog
. The action now assumes that there's a Keep-a-ChangelogCHANGELOG.md
file at the root of every package in the repository.