Skip to content

Commit 7d74da3

Browse files
Merge branch 'master' into trh/compilers-in-metadata
2 parents d7d5e49 + fc203a9 commit 7d74da3

5 files changed

Lines changed: 32 additions & 36 deletions

File tree

lib/src/Manifest.purs

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,6 @@ import Registry.Range (Range)
4040
import Registry.Range as Range
4141
import Registry.Version (Version)
4242
import Registry.Version as Version
43-
import Type.Proxy (Proxy(..))
4443

4544
-- | The manifest for a package version, which records critical information for
4645
-- | the registry, pursuit, and package managers to use.
@@ -73,13 +72,13 @@ instance Ord Manifest where
7372
-- | record sugar.
7473
codec :: CJ.Codec Manifest
7574
codec = Profunctor.wrapIso Manifest $ CJ.named "Manifest" $ CJ.object
76-
$ CJ.recordProp (Proxy :: _ "name") PackageName.codec
77-
$ CJ.recordProp (Proxy :: _ "version") Version.codec
78-
$ CJ.recordProp (Proxy :: _ "license") License.codec
79-
$ CJ.recordPropOptional (Proxy :: _ "description") (Internal.Codec.limitedString 300)
80-
$ CJ.recordProp (Proxy :: _ "location") Location.codec
81-
$ CJ.recordPropOptional (Proxy :: _ "owners") (CJ.Common.nonEmptyArray Owner.codec)
82-
$ CJ.recordPropOptional (Proxy :: _ "includeFiles") (CJ.Common.nonEmptyArray CJ.Common.nonEmptyString)
83-
$ CJ.recordPropOptional (Proxy :: _ "excludeFiles") (CJ.Common.nonEmptyArray CJ.Common.nonEmptyString)
84-
$ CJ.recordProp (Proxy :: _ "dependencies") (Internal.Codec.packageMap Range.codec)
75+
$ CJ.recordProp @"name" PackageName.codec
76+
$ CJ.recordProp @"version" Version.codec
77+
$ CJ.recordProp @"license" License.codec
78+
$ CJ.recordPropOptional @"description" (Internal.Codec.limitedString 300)
79+
$ CJ.recordProp @"location" Location.codec
80+
$ CJ.recordPropOptional @"owners" (CJ.Common.nonEmptyArray Owner.codec)
81+
$ CJ.recordPropOptional @"includeFiles" (CJ.Common.nonEmptyArray CJ.Common.nonEmptyString)
82+
$ CJ.recordPropOptional @"excludeFiles" (CJ.Common.nonEmptyArray CJ.Common.nonEmptyString)
83+
$ CJ.recordProp @"dependencies" (Internal.Codec.packageMap Range.codec)
8584
$ CJ.record

lib/src/Metadata.purs

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,6 @@ import Registry.Sha256 (Sha256)
4343
import Registry.Sha256 as Sha256
4444
import Registry.Version (Version)
4545
import Registry.Version as Version
46-
import Type.Proxy (Proxy(..))
4746

4847
-- | A record of all published and unpublished versions of a package, along with
4948
-- | the last-used location and any owners (public keys) authorized to take
@@ -62,10 +61,10 @@ derive instance Eq Metadata
6261
-- | as a JSON object. Keys are explicitly ordered.
6362
codec :: CJ.Codec Metadata
6463
codec = Profunctor.wrapIso Metadata $ CJ.named "Metadata" $ CJ.object
65-
$ CJ.recordProp (Proxy :: _ "location") Location.codec
66-
$ CJ.recordPropOptional (Proxy :: _ "owners") (CJ.Common.nonEmptyArray Owner.codec)
67-
$ CJ.recordProp (Proxy :: _ "published") (Internal.Codec.versionMap publishedMetadataCodec)
68-
$ CJ.recordProp (Proxy :: _ "unpublished") (Internal.Codec.versionMap unpublishedMetadataCodec)
64+
$ CJ.recordProp @"location" Location.codec
65+
$ CJ.recordPropOptional @"owners" (CJ.Common.nonEmptyArray Owner.codec)
66+
$ CJ.recordProp @"published" (Internal.Codec.versionMap publishedMetadataCodec)
67+
$ CJ.recordProp @"unpublished" (Internal.Codec.versionMap unpublishedMetadataCodec)
6968
$ CJ.record
7069

7170
-- | Metadata about a published package version.

lib/src/PackageSet.purs

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@ import Registry.Internal.Codec as Internal.Codec
2323
import Registry.PackageName (PackageName)
2424
import Registry.Version (Version)
2525
import Registry.Version as Version
26-
import Type.Proxy (Proxy(..))
2726

2827
-- | A Registry package set, which contains a set of packages at specific
2928
-- | versions known to compile together with the given compiler version.
@@ -42,8 +41,8 @@ derive newtype instance Eq PackageSet
4241
-- | implementation.
4342
codec :: CJ.Codec PackageSet
4443
codec = Profunctor.wrapIso PackageSet $ CJ.named "PackageSet" $ CJ.object
45-
$ CJ.recordProp (Proxy :: _ "version") Version.codec
46-
$ CJ.recordProp (Proxy :: _ "compiler") Version.codec
47-
$ CJ.recordProp (Proxy :: _ "published") Internal.Codec.iso8601Date
48-
$ CJ.recordProp (Proxy :: _ "packages") (Internal.Codec.packageMap Version.codec)
44+
$ CJ.recordProp @"version" Version.codec
45+
$ CJ.recordProp @"compiler" Version.codec
46+
$ CJ.recordProp @"published" Internal.Codec.iso8601Date
47+
$ CJ.recordProp @"packages" (Internal.Codec.packageMap Version.codec)
4948
$ CJ.record

spago.lock

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -201,9 +201,8 @@ workspace:
201201
- variant
202202
test_dependencies: []
203203
package_set:
204-
registry: 50.10.0
204+
registry: 59.0.0
205205
extra_packages:
206-
codec-json: 1.2.0
207206
dodo-printer:
208207
repo: https://github.com/natefaubion/purescript-dodo-printer.git
209208
version: v2.2.1
@@ -407,8 +406,8 @@ packages:
407406
- profunctor
408407
codec-json:
409408
type: registry
410-
version: 1.2.0
411-
integrity: sha256-59+uYYe/5uTFa/Q6EqF8ekvP/Y4SOjUNfwIqIYtNiGI=
409+
version: 2.0.0
410+
integrity: sha256-NLm5BmDZKKexQwtnoZ/NI4yI16srsqIe0M7NdlqB96U=
412411
dependencies:
413412
- codec
414413
- foreign-object
@@ -594,8 +593,8 @@ packages:
594593
- unfoldable
595594
exceptions:
596595
type: registry
597-
version: 6.0.0
598-
integrity: sha256-y/xTAEIZIARCE+50/u1di0ncebJ+CIwNOLswyOWzMTw=
596+
version: 6.1.0
597+
integrity: sha256-K0T89IHtF3vBY7eSAO7eDOqSb2J9kZGAcDN5+IKsF8E=
599598
dependencies:
600599
- effect
601600
- either
@@ -940,8 +939,8 @@ packages:
940939
- maybe
941940
json:
942941
type: registry
943-
version: 1.0.0
944-
integrity: sha256-UCHdePAoOD19UyCPLU97oZjcdxLlQZQneWFsfoUNNpE=
942+
version: 1.1.0
943+
integrity: sha256-LuN8PyX/gvRR4/7X7M9P+zL7BKbv34NcUE/7MILXQSA=
945944
dependencies:
946945
- either
947946
- foldable-traversable
@@ -1159,8 +1158,8 @@ packages:
11591158
- unsafe-reference
11601159
node-fs:
11611160
type: registry
1162-
version: 9.1.0
1163-
integrity: sha256-TzhvGdrwcM0bazDvrWSqh+M/H8GKYf1Na6aGm2Qg4+c=
1161+
version: 9.2.0
1162+
integrity: sha256-Sg0vkXycEzkEerX6hLccz21Ygd9w1+QSk1thotRZPGI=
11641163
dependencies:
11651164
- datetime
11661165
- effect
@@ -1619,8 +1618,8 @@ packages:
16191618
- unsafe-coerce
16201619
spec:
16211620
type: registry
1622-
version: 7.6.0
1623-
integrity: sha256-+merGdQbL9zWONbnt8S8J9afGJ59MQqGtS0qSd3yu4I=
1621+
version: 8.0.0
1622+
integrity: sha256-Yn7MhDai1YULlQF45+9FTOTf2rcjoda1Jf2IrEFCoeg=
16241623
dependencies:
16251624
- aff
16261625
- ansi
@@ -1705,8 +1704,8 @@ packages:
17051704
- tuples
17061705
transformers:
17071706
type: registry
1708-
version: 6.0.0
1709-
integrity: sha256-Pzw40HjthX77tdPAYzjx43LK3X5Bb7ZspYAp27wksFA=
1707+
version: 6.1.0
1708+
integrity: sha256-3Bm+Z6tsC/paG888XkywDngJ2JMos+JfOhRlkVfb7gI=
17101709
dependencies:
17111710
- control
17121711
- distributive
@@ -1719,6 +1718,7 @@ packages:
17191718
- maybe
17201719
- newtype
17211720
- prelude
1721+
- st
17221722
- tailrec
17231723
- tuples
17241724
- unfoldable

spago.yaml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,8 @@
11
workspace:
22
lock: true
33
package_set:
4-
registry: 50.10.0
4+
registry: 59.0.0
55
extra_packages:
6-
codec-json: 1.2.0
76
dodo-printer:
87
repo: https://github.com/natefaubion/purescript-dodo-printer.git
98
version: v2.2.1

0 commit comments

Comments
 (0)