Skip to content
New issue

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

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

Already on GitHub? # to your account

Fix incorrect AuthAccessCallback and AuthCallback #374

Merged
merged 1 commit into from
Jul 17, 2020

Conversation

frimuchkov
Copy link
Contributor

@frimuchkov frimuchkov commented Jul 10, 2020

@codecov
Copy link

codecov bot commented Jul 10, 2020

Codecov Report

❗ No coverage uploaded for pull request base (9.x@2e40ebb). Click here to learn what that means.
The diff coverage is n/a.

Impacted file tree graph

@@          Coverage Diff           @@
##             9.x     #374   +/-   ##
======================================
  Coverage       ?   87.87%           
======================================
  Files          ?        5           
  Lines          ?      132           
  Branches       ?       29           
======================================
  Hits           ?      116           
  Misses         ?        8           
  Partials       ?        8           
Flag Coverage Δ
#core 86.36% <ø> (?)
#plugins 88.63% <ø> (?)

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
core/file-locking/src/unclock.ts 100.00% <0.00%> (ø)
core/file-locking/src/readFile.ts 82.35% <0.00%> (ø)
plugins/htpasswd/src/crypt3.ts 100.00% <0.00%> (ø)
core/file-locking/src/lockfile.ts 100.00% <0.00%> (ø)
plugins/htpasswd/src/htpasswd.ts 87.17% <0.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 2e40ebb...dddfe76. Read the comment docs.

type AuthAccessCallback = (error: string | null, access: boolean) => void;
type AuthCallback = (error: string | null, groups: string[] | false) => void;
// FIXME: error should be export type `VerdaccioError = HttpError & { code: number };` instead of AuthError
// but this type is on @verdaccio/commons-api and cannot be used here yet (I don't know why)
Copy link
Member

Choose a reason for hiding this comment

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

Yeah, that's something I regret now. This types and also commons api will be part of the 5.x so we won't have this issue anymore eventually.

core/types/index.d.ts Outdated Show resolved Hide resolved
@frimuchkov frimuchkov force-pushed the patch-1 branch 2 times, most recently from 376f25e to aaa048a Compare July 13, 2020 13:22
Copy link
Member

@juanpicado juanpicado left a comment

Choose a reason for hiding this comment

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

LGTM

@juanpicado
Copy link
Member

Great job @frimuchkov !!

@juanpicado juanpicado merged commit 97538f8 into verdaccio:9.x Jul 17, 2020
@frimuchkov frimuchkov deleted the patch-1 branch July 18, 2020 08:21
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants