Skip to content

Commit

Permalink
Bump the effect group across 1 directory with 3 updates (#151)
Browse files Browse the repository at this point in the history
* Bump the effect group across 1 directory with 3 updates

Bumps the effect group with 3 updates in the / directory: [@effect/platform](https://github.com/effect-ts/effect/tree/HEAD/packages/platform), [@effect/schema](https://github.com/effect-ts/effect/tree/HEAD/packages/schema) and [effect](https://github.com/effect-ts/effect/tree/HEAD/packages/effect).


Updates `@effect/platform` from 0.48.29 to 0.49.3
- [Release notes](https://github.com/effect-ts/effect/releases)
- [Changelog](https://github.com/Effect-TS/effect/blob/main/packages/platform/CHANGELOG.md)
- [Commits](https://github.com/effect-ts/effect/commits/@effect/[email protected]/packages/platform)

Updates `@effect/schema` from 0.65.0 to 0.66.1
- [Release notes](https://github.com/effect-ts/effect/releases)
- [Changelog](https://github.com/Effect-TS/effect/blob/main/packages/schema/CHANGELOG.md)
- [Commits](https://github.com/effect-ts/effect/commits/@effect/[email protected]/packages/schema)

Updates `effect` from 2.4.19 to 3.0.1
- [Release notes](https://github.com/effect-ts/effect/releases)
- [Changelog](https://github.com/Effect-TS/effect/blob/main/packages/effect/CHANGELOG.md)
- [Commits](https://github.com/effect-ts/effect/commits/[email protected]/packages/effect)

---
updated-dependencies:
- dependency-name: "@effect/platform"
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: effect
- dependency-name: "@effect/schema"
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: effect
- dependency-name: effect
  dependency-type: direct:production
  update-type: version-update:semver-major
  dependency-group: effect
...

Signed-off-by: dependabot[bot] <[email protected]>

* Match changes

---------

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Chris Wilkinson <[email protected]>
  • Loading branch information
dependabot[bot] and thewilkybarkid authored Apr 19, 2024
1 parent 91f86ed commit b0e0c97
Show file tree
Hide file tree
Showing 6 changed files with 34 additions and 34 deletions.
30 changes: 15 additions & 15 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,12 +28,12 @@
"vitest": "^1.5.0"
},
"dependencies": {
"@effect/platform": "^0.48.29",
"@effect/schema": "^0.65.0",
"@effect/platform": "^0.49.3",
"@effect/schema": "^0.66.1",
"@js-temporal/polyfill": "^0.4.4",
"chalk": "^5.3.0",
"doi-regex": "^0.1.13",
"effect": "2.4.19",
"effect": "3.0.1",
"ioredis": "^5.3.2",
"orcid-utils": "^1.2.2"
}
Expand Down
22 changes: 11 additions & 11 deletions src/Program.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Effect, Match, Option, ReadonlyArray, Stream, flow } from 'effect'
import { Array, Effect, Match, Option, Stream, flow } from 'effect'
import * as Decision from './Decision.js'
import * as Doi from './Doi.js'
import * as Orcid from './Orcid.js'
Expand All @@ -10,13 +10,13 @@ import * as Zenodo from './Zenodo.js'
const getPeerReviewsForOrcidId = flow(
(user: Users.User) => Orcid.getPeerReviewsForOrcidId(user.orcidId),
Effect.flatMap(
ReadonlyArray.findFirst(
Array.findFirst(
(group): group is Orcid.PrereviewGroupSchema =>
group['external-ids']['external-id'][0]['external-id-value'] === 'orcid-generated:prereview',
),
),
Effect.map(group =>
ReadonlyArray.map(
Array.map(
group['peer-review-group'],
peerReview =>
({
Expand Down Expand Up @@ -80,12 +80,12 @@ const getPeerReviewsOnZenodoForOrcidId = flow(
}),
),
Effect.map(reviews =>
ReadonlyArray.map(
Array.map(
reviews.hits,
review =>
({
doi: review.doi,
preprintDoi: ReadonlyArray.findFirst(
preprintDoi: Array.findFirst(
review.metadata.related_identifiers,
relatedIdentifier => relatedIdentifier.relation === 'reviews' && relatedIdentifier.scheme === 'doi',
).pipe(
Expand Down Expand Up @@ -119,11 +119,11 @@ const makeDecisions = ({
zenodoReviews: ReadonlyArray<ZenodoReview>
orcidReviews: ReadonlyArray<OrcidReview>
}) =>
ReadonlyArray.union(
ReadonlyArray.filter(
Array.union(
Array.filter(
zenodoReviews,
zenodoReview =>
!ReadonlyArray.contains(
!Array.contains(
orcidReviews.map(review => review.doi),
zenodoReview.doi,
),
Expand All @@ -133,10 +133,10 @@ const makeDecisions = ({
...zenodoReview,
}),
),
ReadonlyArray.filter(
Array.filter(
orcidReviews,
orcidReview =>
!ReadonlyArray.contains(
!Array.contains(
zenodoReviews.map(review => review.doi),
orcidReview.doi,
),
Expand Down Expand Up @@ -165,7 +165,7 @@ const processUser = (user: Users.User) =>
),
)

if (ReadonlyArray.isEmptyArray(decisions)) {
if (Array.isEmptyArray(decisions)) {
return yield* _(Effect.logInfo('Nothing to do'))
}

Expand Down
4 changes: 2 additions & 2 deletions src/Users.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { type ParseResult, Schema } from '@effect/schema'
import { type Cause, Data, Effect, ReadonlyArray, Stream, String, flow } from 'effect'
import { Array, type Cause, Data, Effect, Stream, String, flow } from 'effect'
import * as OrcidId from './OrcidId.js'
import * as Redis from './Redis.js'

Expand All @@ -19,7 +19,7 @@ export const getUsers: Stream.Stream<
}).pipe(
Stream.flattenChunks,
Stream.map(String.split(':')),
Stream.map(ReadonlyArray.lastNonEmpty),
Stream.map(Array.lastNonEmpty),
Stream.flatMap(Schema.decodeEither(OrcidId.OrcidIdSchema)),
Stream.bindTo('orcidId'),
Stream.bind('accessToken', ({ orcidId }) => getAccessToken(orcidId)),
Expand Down
4 changes: 2 additions & 2 deletions src/Zenodo.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { HttpClient } from '@effect/platform'
import { type ParseResult, Schema } from '@effect/schema'
import { Context, Effect, type ReadonlyRecord } from 'effect'
import { Context, Effect, type Record } from 'effect'
import { DoiSchema } from './Doi.js'
import type * as OrcidId from './OrcidId.js'
import * as Temporal from './Temporal.js'
Expand All @@ -27,7 +27,7 @@ export const getReviewsByOrcidId = (orcid: OrcidId.OrcidId) =>
})

const getRecords = (
params: ReadonlyRecord.ReadonlyRecord<string, string>,
params: Record.ReadonlyRecord<string, string>,
): Effect.Effect<Records, GetRecordsForOrcidIdError, ZenodoConfig | HttpClient.client.Client.Default> =>
Effect.gen(function* (_) {
const client = yield* _(zenodoClient)
Expand Down
2 changes: 1 addition & 1 deletion src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ const HttpClientLive = Layer.succeed(
Effect.annotateLogs({ headers: HttpClient.headers.redact(request.headers, 'authorization') }),
),
),
Effect.zipRight(HttpClient.client.fetch()(request)),
Effect.zipRight(HttpClient.client.fetch(request)),
Effect.tap(response =>
Effect.logDebug('Received HTTP response').pipe(
Effect.annotateLogs({ status: response.status, headers: response.headers }),
Expand Down

0 comments on commit b0e0c97

Please sign in to comment.