Skip to content

Commit

Permalink
Add tsc script and remove node-fetch(?)
Browse files Browse the repository at this point in the history
  • Loading branch information
rcantin-w committed Oct 3, 2024
1 parent 9cfb06c commit d02da81
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 43 deletions.
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,8 @@
},
"scripts": {
"prepare": "husky install",
"lint": "eslint \"**/*.{js,ts}\" --noEmit"
"lint": "eslint \"**/*.{js,ts}\"",
"tsc": "yarn workspaces run tsc --noEmit --skipLibCheck"
},
"devDependencies": {
"@babel/eslint-parser": "^7.22.9",
Expand All @@ -36,8 +37,7 @@
"eslint-plugin-n": "^15.7.0",
"eslint-plugin-standard": "^5.0.0",
"lint-staged": "^13.1.2",
"prettier": "^3.3.3",
"typescript": "^5.6.2"
"prettier": "^3.3.3"
},
"lint-staged": {
"**/*": "prettier --write --ignore-unknown"
Expand Down
2 changes: 0 additions & 2 deletions pipeline/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
"dependencies": {
"@prismicio/client": "^7.3.1",
"@weco/content-common": "*",
"node-fetch": "^2.6.1",
"parse-duration": "^1.0.3",
"rxjs": "^7.8.0"
},
Expand All @@ -24,7 +23,6 @@
"@types/aws-lambda": "^8.10.114",
"@types/jest": "^29.5.0",
"@types/node": "^20.16.5",
"@types/node-fetch": "^2.6.2",
"esbuild": "^0.17.17",
"jest": "^29.5.0",
"jest-extended": "^3.2.4",
Expand Down
6 changes: 1 addition & 5 deletions pipeline/src/services/prismic.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,4 @@
// Worth noting that we can't update node-fetch to its latest version (v3)
// as its currently unsupported by Prismic.
// As we're going to move away from this later on, we'll be using v2.
import * as prismic from '@prismicio/client';
import fetch from 'node-fetch';

export const createPrismicClient = (): prismic.Client => {
// We use an access token for Prismic in prod to avoid certain classes of
Expand Down Expand Up @@ -31,7 +27,7 @@ export const createPrismicClient = (): prismic.Client => {
}

const endpoint = prismic.getRepositoryEndpoint('wellcomecollection');
const client = prismic.createClient(endpoint, { fetch, accessToken });
const client = prismic.createClient(endpoint, { accessToken });

return client;
};
33 changes: 0 additions & 33 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2033,14 +2033,6 @@
dependencies:
"@types/node" "*"

"@types/node-fetch@^2.6.2":
version "2.6.11"
resolved "https://registry.yarnpkg.com/@types/node-fetch/-/node-fetch-2.6.11.tgz#9b39b78665dae0e82a08f02f4967d62c66f95d24"
integrity sha512-24xFj9R5+rfQJLRyM56qh+wnVSYhyXC2tkoBndtY0U+vubqNsYXGjufB2nn8Q6gt0LrARwL6UBtMCSVCwl4B1g==
dependencies:
"@types/node" "*"
form-data "^4.0.0"

"@types/node@*":
version "22.7.4"
resolved "https://registry.yarnpkg.com/@types/node/-/node-22.7.4.tgz#e35d6f48dca3255ce44256ddc05dee1c23353fcc"
Expand Down Expand Up @@ -5252,13 +5244,6 @@ next-line@^1.1.0:
resolved "https://registry.yarnpkg.com/next-line/-/next-line-1.1.0.tgz#fcae57853052b6a9bae8208e40dd7d3c2d304603"
integrity sha512-+I10J3wKNoKddNxn0CNpoZ3eTZuqxjNM3b1GImVx22+ePI+Y15P8g/j3WsbP0fhzzrFzrtjOAoq5NCCucswXOQ==

node-fetch@^2.6.1:
version "2.7.0"
resolved "https://registry.yarnpkg.com/node-fetch/-/node-fetch-2.7.0.tgz#d0f0fa6e3e2dc1d27efcd8ad99d550bda94d187d"
integrity sha512-c4FRfUm/dbcWZ7U+1Wq0AwCyFL+3nt2bEw05wfxSz+DWpWsitgmSgYmy2dQdWyKC1694ELPqMs/YzUSNozLt8A==
dependencies:
whatwg-url "^5.0.0"

node-int64@^0.4.0:
version "0.4.0"
resolved "https://registry.yarnpkg.com/node-int64/-/node-int64-0.4.0.tgz#87a9065cdb355d3182d8f94ce11188b825c68a3b"
Expand Down Expand Up @@ -6292,11 +6277,6 @@ tr46@^1.0.1:
dependencies:
punycode "^2.1.0"

tr46@~0.0.3:
version "0.0.3"
resolved "https://registry.yarnpkg.com/tr46/-/tr46-0.0.3.tgz#8184fd347dac9cdc185992f3a6622e14b9d9ab6a"
integrity sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw==

triple-beam@^1.3.0:
version "1.4.1"
resolved "https://registry.yarnpkg.com/triple-beam/-/triple-beam-1.4.1.tgz#6fde70271dc6e5d73ca0c3b24e2d92afb7441984"
Expand Down Expand Up @@ -6533,24 +6513,11 @@ walker@^1.0.8:
dependencies:
makeerror "1.0.12"

webidl-conversions@^3.0.0:
version "3.0.1"
resolved "https://registry.yarnpkg.com/webidl-conversions/-/webidl-conversions-3.0.1.tgz#24534275e2a7bc6be7bc86611cc16ae0a5654871"
integrity sha512-2JAn3z8AR6rjK8Sm8orRC0h/bcl/DqL7tRPdGZ4I1CjdF+EaMLmYxBHyXuKL849eucPFhvBoxMsflfOb8kxaeQ==

webidl-conversions@^4.0.2:
version "4.0.2"
resolved "https://registry.yarnpkg.com/webidl-conversions/-/webidl-conversions-4.0.2.tgz#a855980b1f0b6b359ba1d5d9fb39ae941faa63ad"
integrity sha512-YQ+BmxuTgd6UXZW3+ICGfyqRyHXVlD5GtQr5+qjiNW7bF0cqrzX500HVXPBOvgXb5YnzDd+h0zqyv61KUD7+Sg==

whatwg-url@^5.0.0:
version "5.0.0"
resolved "https://registry.yarnpkg.com/whatwg-url/-/whatwg-url-5.0.0.tgz#966454e8765462e37644d3626f6742ce8b70965d"
integrity sha512-saE57nupxk6v3HY35+jzBwYa0rKSy0XR8JSxZPwgLr7ys0IBzhGviA1/TUGJLmSVqs8pb9AnvICXEuOHLprYTw==
dependencies:
tr46 "~0.0.3"
webidl-conversions "^3.0.0"

whatwg-url@^7.0.0:
version "7.1.0"
resolved "https://registry.yarnpkg.com/whatwg-url/-/whatwg-url-7.1.0.tgz#c2c492f1eca612988efd3d2266be1b9fc6170d06"
Expand Down

0 comments on commit d02da81

Please sign in to comment.