diff --git a/Dockerfile b/Dockerfile index 5d38f2b..8987f89 100644 --- a/Dockerfile +++ b/Dockerfile @@ -7,7 +7,7 @@ COPY src ./src COPY tsconfig.json tsconfig.json RUN yarn -RUN yarn build || true +RUN yarn build ############################################################### diff --git a/package.json b/package.json index 48dfc57..f5de87e 100644 --- a/package.json +++ b/package.json @@ -19,25 +19,26 @@ }, "homepage": "https://github.com/XVincentX/spectral-action#readme", "devDependencies": { - "@types/lodash": "^4.14.149", - "@types/node": "^13.7.7", - "@types/urijs": "^1.19.6", - "husky": "^4.2.3", - "prettier": "^1.19.1", + "@types/lodash": "^4.14.150", + "@types/node": "^13.13.4", + "@types/urijs": "^1.19.8", + "husky": "^4.2.5", + "prettier": "^2.0.5", "pretty-quick": "^2.0.1", "typescript": "^3.8.3" }, "dependencies": { - "@actions/core": "^1.2.3", + "@actions/core": "^1.2.4", "@actions/github": "^2.1.1", "@octokit/graphql": "^4.3.1", - "@octokit/request": "^5.3.2", + "@octokit/request": "^5.4.2", "@octokit/rest": "^16.35.0", - "@stoplight/json": "^3.5.1", + "@stoplight/json": "^3.7.1", "@stoplight/spectral": "^5.3.0", "fast-glob": "^3.2.2", - "fp-ts": "^2.5.3", - "io-ts": "^2.1.2", + "fp-ts": "^2.5.4", + "fp-ts-contrib": "^0.1.15", + "io-ts": "^2.2.1", "lodash": "^4.17.15", "tslib": "^1.11.1" }, diff --git a/src/.prettierrc.js b/src/.prettierrc.js new file mode 100644 index 0000000..cd21889 --- /dev/null +++ b/src/.prettierrc.js @@ -0,0 +1,6 @@ +module.exports = { + printWidth: 120, + singleQuote: true, + trailingComma: 'es5', + arrowParens: 'avoid', +}; diff --git a/src/config.ts b/src/config.ts index e559d10..85a91d4 100644 --- a/src/config.ts +++ b/src/config.ts @@ -1,12 +1,12 @@ -import * as t from 'io-ts'; +import * as D from 'io-ts/lib/Decoder'; -export const Config = t.strict({ - GITHUB_EVENT_PATH: t.string, - INPUT_REPO_TOKEN: t.string, - GITHUB_WORKSPACE: t.string, - INPUT_FILE_GLOB: t.string, - INPUT_EVENT_NAME: t.string, - INPUT_SPECTRAL_RULESET: t.string, +export const Config = D.type({ + GITHUB_EVENT_PATH: D.string, + INPUT_REPO_TOKEN: D.string, + GITHUB_WORKSPACE: D.string, + INPUT_FILE_GLOB: D.string, + INPUT_EVENT_NAME: D.string, + INPUT_SPECTRAL_RULESET: D.string, }); -export type Config = t.TypeOf; +export type Config = D.TypeOf; diff --git a/src/index.ts b/src/index.ts index 751573c..fe81502 100644 --- a/src/index.ts +++ b/src/index.ts @@ -1,7 +1,6 @@ import { join } from 'path'; import { DiagnosticSeverity } from '@stoplight/types'; import { warning } from '@actions/core'; -import { EOL } from 'os'; import { promises as fs } from 'fs'; import { array } from 'fp-ts/lib/Array'; import { flatten } from 'lodash'; @@ -16,7 +15,7 @@ import * as IO from 'fp-ts/lib/IO'; import * as TE from 'fp-ts/lib/TaskEither'; import * as T from 'fp-ts/lib/Task'; import * as E from 'fp-ts/lib/Either'; -import { failure } from 'io-ts/lib/PathReporter'; +import { draw } from 'io-ts/lib/Tree'; import { pipe } from 'fp-ts/lib/pipeable'; import { identity } from 'lodash'; import { ChecksUpdateParamsOutputAnnotations } from '@octokit/rest'; @@ -110,7 +109,7 @@ const getEnv = IO.of(process.env); const decodeConfig = (env: NodeJS.ProcessEnv) => pipe( Config.decode(env), - E.mapLeft(e => new Error(failure(e).join(EOL))) + E.mapLeft(e => new Error(draw(e))) ); const createConfigFromEnv = pipe( @@ -130,7 +129,7 @@ const program = pipe( INPUT_SPECTRAL_RULESET, }) => pipe( - getRepositoryInfoFromEvent(GITHUB_EVENT_PATH, INPUT_EVENT_NAME), + TE.fromEither(getRepositoryInfoFromEvent(GITHUB_EVENT_PATH, INPUT_EVENT_NAME)), TE.chain(event => pipe( createOctokitInstance(INPUT_REPO_TOKEN), diff --git a/src/octokit.ts b/src/octokit.ts index 5879a31..0dd6bbe 100644 --- a/src/octokit.ts +++ b/src/octokit.ts @@ -1,18 +1,23 @@ import { GitHub } from '@actions/github'; import * as TE from 'fp-ts/lib/TaskEither'; import * as E from 'fp-ts/lib/Either'; -import { pipe } from 'fp-ts/lib/pipeable'; +import * as D from 'io-ts/lib/Decoder'; +import { draw } from 'io-ts/lib/Tree'; +import { Do } from 'fp-ts-contrib/lib/Do'; import { ChecksCreateResponse, ChecksUpdateParamsOutputAnnotations, ChecksUpdateParams, Response } from '@octokit/rest'; +import { pipe } from 'fp-ts/lib/pipeable'; -type Event = { - after: string; - repository: { - name: string; - owner: { - login: string; - }; - }; -}; +const EventDecoder = D.type({ + after: D.string, + repository: D.type({ + name: D.string, + owner: D.type({ + login: D.string, + }), + }), +}); + +type Event = D.TypeOf; export const createOctokitInstance = (token: string) => TE.fromEither(E.tryCatch(() => new GitHub(token), E.toError)); @@ -36,22 +41,44 @@ export interface IRepositoryInfo { sha: string; } -export const getRepositoryInfoFromEvent = ( - eventPath: string, - eventName: string -): TE.TaskEither => +const extractSha = (eventName: string, event: any): E.Either => { + switch (eventName) { + case 'pull_request': + return E.right(event.pull_request.head.sha); + case 'push': + return E.right(event.after); + default: + return E.left(Error(`Unsupported event '${eventName}'`)); + } +}; + +function buildRepositoryInfoFrom(event: Event, eventName: string, sha: string): IRepositoryInfo { + const { repository } = event; + const { + owner: { login: owner }, + } = repository; + const { name: repo } = repository; + + return { owner, repo, eventName, sha }; +} + +const parseEventFile = (eventPath: string) => pipe( - TE.fromEither(E.tryCatch(() => require(eventPath), E.toError)), - TE.map(event => { - const { repository, after } = event; - const { - owner: { login: owner }, - } = repository; - const { name: repo } = repository; - return { owner, repo, eventName, sha: after }; - }) + E.tryCatch(() => require(eventPath), E.toError), + E.chain(event => + pipe( + EventDecoder.decode(event), + E.mapLeft(errors => new Error(draw(errors))) + ) + ) ); +export const getRepositoryInfoFromEvent = (eventPath: string, eventName: string): E.Either => + Do(E.either) + .bind('event', parseEventFile(eventPath)) + .bindL('sha', ({ event }) => extractSha(eventName, event)) + .return(({ event, sha }) => buildRepositoryInfoFrom(event, eventName, sha)); + export const updateGithubCheck = ( octokit: GitHub, check: Response, diff --git a/tsconfig.json b/tsconfig.json index bf8a3ee..9cddc6e 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -19,6 +19,7 @@ "noUnusedParameters": true, "noImplicitReturns": true, "noFallthroughCasesInSwitch": true, - "resolveJsonModule": true + "resolveJsonModule": true, + "skipLibCheck": true } } diff --git a/yarn.lock b/yarn.lock index 42746f6..15a5fa7 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2,10 +2,10 @@ # yarn lockfile v1 -"@actions/core@^1.2.3": - version "1.2.3" - resolved "https://registry.yarnpkg.com/@actions/core/-/core-1.2.3.tgz#e844b4fa0820e206075445079130868f95bfca95" - integrity sha512-Wp4xnyokakM45Uuj4WLUxdsa8fJjKVl1fDTsPbTEcTcuu0Nb26IPQbOtjmnfaCPGcaoPOOqId8H9NapZ8gii4w== +"@actions/core@^1.2.4": + version "1.2.4" + resolved "https://registry.yarnpkg.com/@actions/core/-/core-1.2.4.tgz#96179dbf9f8d951dd74b40a0dbd5c22555d186ab" + integrity sha512-YJCEq8BE3CdN8+7HPZ/4DxJjk/OkZV2FFIf+DlZTC/4iBlzYCD5yjRR6eiOS5llO11zbRltIRuKAjMKaWTE6cg== "@actions/github@^2.1.1": version "2.1.1" @@ -90,6 +90,15 @@ is-plain-object "^3.0.0" universal-user-agent "^4.0.0" +"@octokit/endpoint@^6.0.1": + version "6.0.1" + resolved "https://registry.yarnpkg.com/@octokit/endpoint/-/endpoint-6.0.1.tgz#16d5c0e7a83e3a644d1ddbe8cded6c3d038d31d7" + integrity sha512-pOPHaSz57SFT/m3R5P8MUu4wLPszokn5pXcB/pzavLTQf2jbU+6iayTvzaY6/BiotuRS0qyEUkx3QglT4U958A== + dependencies: + "@octokit/types" "^2.11.1" + is-plain-object "^3.0.0" + universal-user-agent "^5.0.0" + "@octokit/graphql@^4.3.1": version "4.3.1" resolved "https://registry.yarnpkg.com/@octokit/graphql/-/graphql-4.3.1.tgz#9ee840e04ed2906c7d6763807632de84cdecf418" @@ -127,6 +136,15 @@ deprecation "^2.0.0" once "^1.4.0" +"@octokit/request-error@^2.0.0": + version "2.0.0" + resolved "https://registry.yarnpkg.com/@octokit/request-error/-/request-error-2.0.0.tgz#94ca7293373654400fbb2995f377f9473e00834b" + integrity sha512-rtYicB4Absc60rUv74Rjpzek84UbVHGHJRu4fNVlZ1mCcyUPPuzFfG9Rn6sjHrd95DEsmjSt1Axlc699ZlbDkw== + dependencies: + "@octokit/types" "^2.0.0" + deprecation "^2.0.0" + once "^1.4.0" + "@octokit/request@^5.2.0", "@octokit/request@^5.3.0": version "5.3.1" resolved "https://registry.yarnpkg.com/@octokit/request/-/request-5.3.1.tgz#3a1ace45e6f88b1be4749c5da963b3a3b4a2f120" @@ -141,14 +159,14 @@ once "^1.4.0" universal-user-agent "^4.0.0" -"@octokit/request@^5.3.2": - version "5.3.2" - resolved "https://registry.yarnpkg.com/@octokit/request/-/request-5.3.2.tgz#1ca8b90a407772a1ee1ab758e7e0aced213b9883" - integrity sha512-7NPJpg19wVQy1cs2xqXjjRq/RmtSomja/VSWnptfYwuBxLdbYh2UjhGi0Wx7B1v5Iw5GKhfFDQL7jM7SSp7K2g== +"@octokit/request@^5.4.2": + version "5.4.2" + resolved "https://registry.yarnpkg.com/@octokit/request/-/request-5.4.2.tgz#74f8e5bbd39dc738a1b127629791f8ad1b3193ee" + integrity sha512-zKdnGuQ2TQ2vFk9VU8awFT4+EYf92Z/v3OlzRaSh4RIP0H6cvW1BFPXq4XYvNez+TPQjqN+0uSkCYnMFFhcFrw== dependencies: - "@octokit/endpoint" "^5.5.0" - "@octokit/request-error" "^1.0.1" - "@octokit/types" "^2.0.0" + "@octokit/endpoint" "^6.0.1" + "@octokit/request-error" "^2.0.0" + "@octokit/types" "^2.11.1" deprecation "^2.0.0" is-plain-object "^3.0.0" node-fetch "^2.3.0" @@ -209,6 +227,13 @@ dependencies: "@types/node" ">= 8" +"@octokit/types@^2.11.1": + version "2.12.2" + resolved "https://registry.yarnpkg.com/@octokit/types/-/types-2.12.2.tgz#e9fbffa294adb54140946d436da9f73bc94b169c" + integrity sha512-1GHLI/Jll3j6F0GbYyZPFTcHZMGjAiRfkTEoRUyaVVk2IWbDdwEiClAJvXzfXCDayuGSNCqAUH8lpjZtqW9GDw== + dependencies: + "@types/node" ">= 8" + "@stoplight/json-ref-readers@^1.1.1": version "1.1.1" resolved "https://registry.yarnpkg.com/@stoplight/json-ref-readers/-/json-ref-readers-1.1.1.tgz#7c6c7cce7ac01e840cf56eaee10f2476b6f4a644" @@ -242,17 +267,7 @@ lodash "^4.17.15" safe-stable-stringify "^1.1" -"@stoplight/json@^3.5.1": - version "3.5.1" - resolved "https://registry.yarnpkg.com/@stoplight/json/-/json-3.5.1.tgz#afc6ffcbe2ada8f9b16680fd7885688cf9beec7e" - integrity sha512-O5WUW2yfAvtrqeq60YrbxpTvk87Ti2IeJ5oVa2XNJ2s+IIxx0CM+j316QoOjSGs+twrRpwb3jT9CFPrq7Ghkzg== - dependencies: - "@stoplight/types" "^11.4.0" - jsonc-parser "~2.2.0" - lodash "^4.17.15" - safe-stable-stringify "^1.1" - -"@stoplight/json@^3.6.0": +"@stoplight/json@^3.6.0", "@stoplight/json@^3.7.1": version "3.7.1" resolved "https://registry.yarnpkg.com/@stoplight/json/-/json-3.7.1.tgz#3855478ed3e0baaee6a7627948957ce537e481ad" integrity sha512-5VUVZxO7Jg+yoyEPa+ymD+fz5Pij96Nv3ei8FpzkzJwZLqY0ycAe8pBTz1mMf9QDUB+7HZZnCrWGCqGtDLYZZA== @@ -341,10 +356,10 @@ resolved "https://registry.yarnpkg.com/@types/json-schema/-/json-schema-7.0.3.tgz#bdfd69d61e464dcc81b25159c270d75a73c1a636" integrity sha512-Il2DtDVRGDcqjDtE+rF8iqg1CArehSK84HZJCT7AMITlyXRBpuPhqGLDQMowraqqu1coEaimg4ZOqggt6L6L+A== -"@types/lodash@^4.14.149": - version "4.14.149" - resolved "https://registry.yarnpkg.com/@types/lodash/-/lodash-4.14.149.tgz#1342d63d948c6062838fbf961012f74d4e638440" - integrity sha512-ijGqzZt/b7BfzcK9vTrS6MFljQRPn5BFWOx8oE0GYxribu6uV+aA9zZuXI1zc/etK9E8nrgdoF2+LgUw7+9tJQ== +"@types/lodash@^4.14.150": + version "4.14.150" + resolved "https://registry.yarnpkg.com/@types/lodash/-/lodash-4.14.150.tgz#649fe44684c3f1fcb6164d943c5a61977e8cf0bd" + integrity sha512-kMNLM5JBcasgYscD9x/Gvr6lTAv2NVgsKtet/hm93qMyf/D1pt+7jeEZklKJKxMVmXjxbRVQQGfqDSfipYCO6w== "@types/minimatch@^3.0.3": version "3.0.3" @@ -356,21 +371,26 @@ resolved "https://registry.yarnpkg.com/@types/node/-/node-12.12.14.tgz#1c1d6e3c75dba466e0326948d56e8bd72a1903d2" integrity sha512-u/SJDyXwuihpwjXy7hOOghagLEV1KdAST6syfnOk6QZAMzZuWZqXy5aYYZbh8Jdpd4escVFP0MvftHNDb9pruA== -"@types/node@^13.7.7": - version "13.7.7" - resolved "https://registry.yarnpkg.com/@types/node/-/node-13.7.7.tgz#1628e6461ba8cc9b53196dfeaeec7b07fa6eea99" - integrity sha512-Uo4chgKbnPNlxQwoFmYIwctkQVkMMmsAoGGU4JKwLuvBefF0pCq4FybNSnfkfRCpC7ZW7kttcC/TrRtAJsvGtg== +"@types/node@^13.13.4": + version "13.13.4" + resolved "https://registry.yarnpkg.com/@types/node/-/node-13.13.4.tgz#1581d6c16e3d4803eb079c87d4ac893ee7501c2c" + integrity sha512-x26ur3dSXgv5AwKS0lNfbjpCakGIduWU1DU91Zz58ONRWrIKGunmZBNv4P7N+e27sJkiGDsw/3fT4AtsqQBrBA== "@types/parse-json@^4.0.0": version "4.0.0" resolved "https://registry.yarnpkg.com/@types/parse-json/-/parse-json-4.0.0.tgz#2f8bb441434d163b35fb8ffdccd7138927ffb8c0" integrity sha512-//oorEZjL6sbPcKUaCdIGlIUeH26mgzimjBB77G6XRgnDl/L5wOnpyBGRe/Mmf5CVW3PwEBE1NjiMZ/ssFh4wA== -"@types/urijs@^1.19", "@types/urijs@^1.19.6": +"@types/urijs@^1.19": version "1.19.6" resolved "https://registry.yarnpkg.com/@types/urijs/-/urijs-1.19.6.tgz#4cee39e4e5ad8d276d617d159ffcb423ca2fd9f1" integrity sha512-kdnK+JtEiUgnpB7r99SAZjjz9nhZ/7MWo/hxTSNfvslAa4r8jpDXDEJ2cQrjemes4eX2Y5Om3udmcc8QalPzOA== +"@types/urijs@^1.19.8": + version "1.19.8" + resolved "https://registry.yarnpkg.com/@types/urijs/-/urijs-1.19.8.tgz#a66b2fd8b1d3cf3ef5bae7ca093b7d1b50e48c0a" + integrity sha512-SVQd2Qq0oL+b8VtJbQyv0cMIdU7fbRDcg2JIpcBvv+GUayJ3c5Ll1K+iivZl6ifcI6NbYcwjqDjljDFSiSGOeA== + abort-controller@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/abort-controller/-/abort-controller-3.0.0.tgz#eaf54d53b62bae4138e809ca225c8439a6efb392" @@ -534,6 +554,14 @@ chalk@^3.0.0: ansi-styles "^4.1.0" supports-color "^7.1.0" +chalk@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/chalk/-/chalk-4.0.0.tgz#6e98081ed2d17faab615eb52ac66ec1fe6209e72" + integrity sha512-N9oWFcegS0sFr9oh1oz2d7Npos6vNoWW9HvtCg5N1KRFpUhaAhvTv5Y58g880fZaEYSNm3qDz8SU1UrGvp+n7A== + dependencies: + ansi-styles "^4.1.0" + supports-color "^7.1.0" + ci-info@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/ci-info/-/ci-info-2.0.0.tgz#67a9e964be31a51e15e5010d58e6f12834002f46" @@ -582,7 +610,7 @@ color-name@~1.1.4: resolved "https://registry.yarnpkg.com/color-name/-/color-name-1.1.4.tgz#c2a09a87acbde69543de6f63fa3995c826c536a2" integrity sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA== -compare-versions@^3.5.1: +compare-versions@^3.6.0: version "3.6.0" resolved "https://registry.yarnpkg.com/compare-versions/-/compare-versions-3.6.0.tgz#1a5689913685e5a87637b8d3ffca75514ec41d62" integrity sha512-W6Af2Iw1z4CB7q4uU4hv646dW9GQuBM+YpC0UvUCWSD8w90SJjp+ujJuXaEMtAXBtSqGfMPuFOVn4/+FlaqfBA== @@ -888,10 +916,15 @@ find-versions@^3.2.0: dependencies: semver-regex "^2.0.0" -fp-ts@^2.5.3: - version "2.5.3" - resolved "https://registry.yarnpkg.com/fp-ts/-/fp-ts-2.5.3.tgz#7f09cc7f3e09623c6ade303d98a2cccdb2cc861f" - integrity sha512-lQd+hahLd8cygNoXbEHDjH/cbF6XVWlEPb8h5GXXlozjCSDxWgclvkpOoTRfBA0P+r69l9VvW1nEsSGIJRQpWw== +fp-ts-contrib@^0.1.15: + version "0.1.15" + resolved "https://registry.yarnpkg.com/fp-ts-contrib/-/fp-ts-contrib-0.1.15.tgz#3b7225f7143f49b4a7719fa59bb9f04ff45bf634" + integrity sha512-aSuDUJAHN3QBlDf8PJ8M62l7mdUNeOWTGFFuIrK+A7tCLejGU43dDj2FM0c5dmz8CV/GXsRU3XPWCzaL5uIyvA== + +fp-ts@^2.5.4: + version "2.5.4" + resolved "https://registry.yarnpkg.com/fp-ts/-/fp-ts-2.5.4.tgz#f184079aaa78403ea66458517be7787e0d593429" + integrity sha512-cZlLeEneRYypc2dOzB9h8+bd9mQhJVyt2g0Dny2gKR7uWNgA4EmLSJyguLYsTU44nJSSG9EjurUalEc0wQqeKw== ftp@~0.3.10: version "0.3.10" @@ -981,14 +1014,14 @@ https-proxy-agent@^3.0.0: agent-base "^4.3.0" debug "^3.1.0" -husky@^4.2.3: - version "4.2.3" - resolved "https://registry.yarnpkg.com/husky/-/husky-4.2.3.tgz#3b18d2ee5febe99e27f2983500202daffbc3151e" - integrity sha512-VxTsSTRwYveKXN4SaH1/FefRJYCtx+wx04sSVcOpD7N2zjoHxa+cEJ07Qg5NmV3HAK+IRKOyNVpi2YBIVccIfQ== +husky@^4.2.5: + version "4.2.5" + resolved "https://registry.yarnpkg.com/husky/-/husky-4.2.5.tgz#2b4f7622673a71579f901d9885ed448394b5fa36" + integrity sha512-SYZ95AjKcX7goYVZtVZF2i6XiZcHknw50iXvY7b0MiGoj5RwdgRQNEHdb+gPDPCXKlzwrybjFjkL6FOj8uRhZQ== dependencies: - chalk "^3.0.0" + chalk "^4.0.0" ci-info "^2.0.0" - compare-versions "^3.5.1" + compare-versions "^3.6.0" cosmiconfig "^6.0.0" find-versions "^3.2.0" opencollective-postinstall "^2.0.2" @@ -1027,10 +1060,10 @@ inherits@2.0.4, inherits@~2.0.1, inherits@~2.0.3: resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.4.tgz#0fa2c64f932917c3433a0ded55363aae37416b7c" integrity sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ== -io-ts@^2.1.2: - version "2.1.2" - resolved "https://registry.yarnpkg.com/io-ts/-/io-ts-2.1.2.tgz#8ea4439c902c3d15cda343900bed7ee5a9977f42" - integrity sha512-whVRGaNBZSrkPrg1y+sSy/kv/fDjweQPP1UCLhKwJUHWGD6rFgbZ44FBF98JlY/FFzTA0MkhGeHWZ/aFhF42eA== +io-ts@^2.2.1: + version "2.2.1" + resolved "https://registry.yarnpkg.com/io-ts/-/io-ts-2.2.1.tgz#d8cb21a23cf8fbe697d78445a65bab42c0eb467f" + integrity sha512-RufppkTV58MfDKF2gXlHVBvi+WIyL7nUcAQMkJ1O3SiQcqwlxf6dBOJP/LV19UxHRkGKJZ6ImSj7LqYcELIejQ== ip@1.1.5, ip@^1.1.5: version "1.1.5" @@ -1455,10 +1488,10 @@ prelude-ls@~1.1.2: resolved "https://registry.yarnpkg.com/prelude-ls/-/prelude-ls-1.1.2.tgz#21932a549f5e52ffd9a827f570e04be62a97da54" integrity sha1-IZMqVJ9eUv/ZqCf1cOBL5iqX2lQ= -prettier@^1.19.1: - version "1.19.1" - resolved "https://registry.yarnpkg.com/prettier/-/prettier-1.19.1.tgz#f7d7f5ff8a9cd872a7be4ca142095956a60797cb" - integrity sha512-s7PoyDv/II1ObgQunCbB9PdLmUcBZcnWOcxDh7O0N/UwDEsHyqkW+Qh28jW+mVuCdx7gLB0BotYI1Y6uI9iyew== +prettier@^2.0.5: + version "2.0.5" + resolved "https://registry.yarnpkg.com/prettier/-/prettier-2.0.5.tgz#d6d56282455243f2f92cc1716692c08aa31522d4" + integrity sha512-7PtVymN48hGcO4fGjybyBSIWDsLU4H4XlvOHfq91pz9kkGlonzwTfYkaIEwiRg/dAJF9YlbsduBAgtYLi+8cFg== pretty-quick@^2.0.1: version "2.0.1"