-
Notifications
You must be signed in to change notification settings - Fork 80
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
Use current time as published date #656
Use current time as published date #656
Conversation
d07f02e
to
15d747f
Compare
15d747f
to
9aa8906
Compare
9aa8906
to
6da962e
Compare
scripts/src/PackageDeleter.purs
Outdated
@@ -237,7 +237,7 @@ deleteVersion arguments name version = do | |||
Just (Left _) -> Log.error "Cannot reimport a version that was specifically unpublished" | |||
Just (Right specificPackageMetadata) -> do | |||
-- Obtains `newMetadata` via cache | |||
API.publish API.Legacy | |||
API.publish PackageSource'Legacy |
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.
We typically only use quotes in this codebase to represent types or functions that are a tweak on another; could we use something like “LegacyPackage” and “CurrentPackage” as constructors instead?
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.
Yeah, sorry was intentionally leaving this as "ugly"/unconventional to remind myself to comment about alternatives and ask for suggestions about the naming, since I'm not sure what to call the type/constructors here. I'll just paste what I had started typing up in another comment:
This was originally
data Source = Legacy | Current
but after moving to Prelude
that would conflict with Source
here
data Source a = Fetch FilePath Location String (Either String FetchedSource -> a) |
Current
constructor here registry-dev/app/src/App/CLI/Git.purs
Line 304 in 282a4f0
data GitStatus = Current | Behind Int | Ahead Int |
Another alternative would be keeping the original constructor names but hide Current
when importing in the CLI.Git
module, or renaming the GitStatus
constructor.
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.
But also happy rename things to
data PackageSource = LegacyPackage | CurrentPackage
if that's preferable
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.
Updated 706ea23
Thank you @pete-murphy! |
Fixes #652