Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor: move and document getNpmAuthenticationHeader #3888

Merged
merged 5 commits into from
Mar 13, 2022

Conversation

paul-soporan
Copy link
Member

What's the problem this PR addresses?

The getNpmAuthenticationHeader hook was defined inside a Hooks.ts file instead of the index. Because of this, the hook extraction script didn't see that it wasn't documented.

How did you fix it?

Moved it to index.ts and added more checks to make sure that this can never happen again.

Checklist

  • I have set the packages that need to be released for my changes to be effective.
  • I will check that all automated PR checks pass before the PR gets reviewed.

scripts/extract-hooks.ts Outdated Show resolved Hide resolved
`packages/plugin-compat/extra/fsevents/fsevents-*.js`,
overrides: [
{
files: [`!packages/*/sources/{index,Plugin}.ts`],
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

While the correct value would be ['!packages/*/sources/index.ts', '!packages/yarnpkg-core/sources/Plugin.ts'], ESLint seems to still match the files if I put both negated patterns, even though the docs state that:

Override blocks can also specify patterns to exclude from matches. If a file matches any of the excluded patterns, the configuration won't apply.

Copy link
Member

@arcanis arcanis left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Forgot to press send 😅

@arcanis arcanis merged commit 50f19b9 into master Mar 13, 2022
@arcanis arcanis deleted the paul/refactor/document-getNpmAuthenticationHeader branch March 13, 2022 18:29
merceyz pushed a commit that referenced this pull request Sep 21, 2022
* refactor: move and document getNpmAuthenticationHeader

* refactor: feedback

* chore: versions

* revert: revert leftovers
merceyz pushed a commit that referenced this pull request Sep 28, 2022
* refactor: move and document getNpmAuthenticationHeader

* refactor: feedback

* chore: versions

* revert: revert leftovers
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants