Skip to content
This repository has been archived by the owner on Apr 11, 2024. It is now read-only.

Commit

Permalink
Merge pull request #1160 from Shopify/dependabot/npm_and_yarn/types/n…
Browse files Browse the repository at this point in the history
…ode-20.11.6

Bump @types/node from 16.18.61 to 20.11.6
  • Loading branch information
paulomarg authored Jan 24, 2024
2 parents 81bc22b + 0f0ffb8 commit 646e50d
Show file tree
Hide file tree
Showing 12 changed files with 82 additions and 27 deletions.
8 changes: 8 additions & 0 deletions .changeset/hungry-humans-lie.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
---
"@shopify/storefront-api-client": patch
"@shopify/admin-api-client": patch
"@shopify/graphql-client": patch
"@shopify/shopify-api": patch
---

Updated global fetch types to more closely match reality
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
"@babel/plugin-transform-async-to-generator": "^7.20.7",
"@babel/plugin-transform-runtime": "^7.21.0",
"@babel/preset-env": "^7.23.8",
"@babel/preset-typescript": "^7.21.0",
"@babel/preset-typescript": "^7.23.3",
"@changesets/changelog-github": "^0.5.0",
"@changesets/cli": "^2.22.0",
"@rollup/plugin-babel": "^6.0.3",
Expand Down
2 changes: 1 addition & 1 deletion packages/admin-api-client/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"declaration": true,
"declarationMap": true,
"target": "ES2022",
"lib": ["ESNext", "DOM"],
"lib": ["ESNext"],
"rootDir": "src",
"baseUrl": "src",
"strict": true,
Expand Down
2 changes: 1 addition & 1 deletion packages/graphql-client/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"declaration": true,
"declarationMap": true,
"target": "ES2022",
"lib": ["ESNext", "DOM"],
"lib": ["ESNext"],
"rootDir": "src",
"baseUrl": "src",
"strict": true,
Expand Down
3 changes: 2 additions & 1 deletion packages/shopify-api/lib/auth/oauth/oauth.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ import {
BeginParams,
CallbackParams,
AuthQuery,
AccessTokenResponse,
} from './types';
import {nonce} from './nonce';
import {safeCompare} from './safe-compare';
Expand Down Expand Up @@ -206,7 +207,7 @@ export function callback(config: ConfigInterface): OAuthCallback {
}

const session: Session = createSession({
accessTokenResponse: await postResponse.json(),
accessTokenResponse: await postResponse.json<AccessTokenResponse>(),
shop: cleanShop,
state: stateFromCookie,
config,
Expand Down
3 changes: 2 additions & 1 deletion packages/shopify-api/lib/auth/oauth/token-exchange.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import {abstractFetch} from '../../../runtime';
import {DataType} from '../../clients/types';

import {createSession} from './create-session';
import {AccessTokenResponse} from './types';

export enum RequestedTokenType {
OnlineAccessToken = 'urn:shopify:params:oauth:token-type:online-access-token',
Expand Down Expand Up @@ -64,7 +65,7 @@ export function tokenExchange(config: ConfigInterface): TokenExchange {

return {
session: createSession({
accessTokenResponse: await postResponse.json(),
accessTokenResponse: await postResponse.json<AccessTokenResponse>(),
shop: cleanShop,
// We need to keep this as an empty string as our template DB schemas have this required
state: '',
Expand Down
3 changes: 1 addition & 2 deletions packages/shopify-api/lib/clients/common.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ import {LIBRARY_NAME} from '../types';
import {ConfigInterface} from '../base-types';
import {SHOPIFY_API_LIBRARY_VERSION} from '../version';
import {
AbstractFetchFunc,
abstractRuntimeString,
canonicalizeHeaders,
getHeader,
Expand Down Expand Up @@ -59,7 +58,7 @@ export function clientLoggerFactory(config: ConfigInterface) {

export function throwFailedRequest(
body: any,
response: Awaited<ReturnType<AbstractFetchFunc>>,
response: Response,
atMaxRetries: boolean,
): never {
const responseHeaders = canonicalizeHeaders(
Expand Down
4 changes: 2 additions & 2 deletions packages/shopify-api/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -84,8 +84,8 @@
"@cloudflare/workers-types": "^4.20230404.0",
"@swc/core": "^1.3.100",
"@types/express": "^4.17.13",
"@types/node": "^16.0.0",
"@types/node-fetch": "^2.5.7",
"@types/node": "^20.11.6",
"@types/node-fetch": "^2.6.11",
"@types/supertest": "^2.0.10",
"@types/uuid": "^9.0.0",
"express": "^4.17.13",
Expand Down
4 changes: 3 additions & 1 deletion packages/shopify-api/runtime/http/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,9 @@ export interface AdapterArgs {
rawResponse?: AdapterResponse;
}

export type AbstractFetchFunc = typeof fetch;
export type AbstractFetchFunc = (
...params: Parameters<typeof fetch>
) => Promise<Response>;

export type AbstractConvertRequestFunc = (
adapterArgs: AdapterArgs,
Expand Down
1 change: 0 additions & 1 deletion packages/shopify-api/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
"baseUrl": ".",
"rootDir": ".",
"lib": [
"dom",
"dom.iterable",
"es2015",
"es2016",
Expand Down
2 changes: 1 addition & 1 deletion packages/storefront-api-client/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"declaration": true,
"declarationMap": true,
"target": "ES2022",
"lib": ["ESNext", "DOM"],
"lib": ["ESNext"],
"rootDir": "src",
"baseUrl": "src",
"strict": true,
Expand Down
75 changes: 60 additions & 15 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,21 @@
"@babel/helper-split-export-declaration" "^7.22.6"
semver "^6.3.1"

"@babel/helper-create-class-features-plugin@^7.23.6":
version "7.23.7"
resolved "https://registry.yarnpkg.com/@babel/helper-create-class-features-plugin/-/helper-create-class-features-plugin-7.23.7.tgz#b2e6826e0e20d337143655198b79d58fdc9bd43d"
integrity sha512-xCoqR/8+BoNnXOY7RVSgv6X+o7pmT5q1d+gGcRlXYkI+9B31glE4jeejhKVpA04O1AtzOt7OSQ6VYKP5FcRl9g==
dependencies:
"@babel/helper-annotate-as-pure" "^7.22.5"
"@babel/helper-environment-visitor" "^7.22.20"
"@babel/helper-function-name" "^7.23.0"
"@babel/helper-member-expression-to-functions" "^7.23.0"
"@babel/helper-optimise-call-expression" "^7.22.5"
"@babel/helper-replace-supers" "^7.22.20"
"@babel/helper-skip-transparent-expression-wrappers" "^7.22.5"
"@babel/helper-split-export-declaration" "^7.22.6"
semver "^6.3.1"

"@babel/helper-create-regexp-features-plugin@^7.18.6", "@babel/helper-create-regexp-features-plugin@^7.22.15", "@babel/helper-create-regexp-features-plugin@^7.22.5":
version "7.22.15"
resolved "https://registry.yarnpkg.com/@babel/helper-create-regexp-features-plugin/-/helper-create-regexp-features-plugin-7.22.15.tgz#5ee90093914ea09639b01c711db0d6775e558be1"
Expand Down Expand Up @@ -185,7 +200,7 @@
dependencies:
"@babel/types" "^7.22.5"

"@babel/helper-member-expression-to-functions@^7.22.15":
"@babel/helper-member-expression-to-functions@^7.22.15", "@babel/helper-member-expression-to-functions@^7.23.0":
version "7.23.0"
resolved "https://registry.yarnpkg.com/@babel/helper-member-expression-to-functions/-/helper-member-expression-to-functions-7.23.0.tgz#9263e88cc5e41d39ec18c9a3e0eced59a3e7d366"
integrity sha512-6gfrPwh7OuT6gZyJZvd6WbTfrqAo7vm4xCzAXOusKqq/vWdKXphTpj5klHKNmRUU6/QRGlBsyU9mAIPaWHlqJA==
Expand Down Expand Up @@ -499,6 +514,13 @@
dependencies:
"@babel/helper-plugin-utils" "^7.22.5"

"@babel/plugin-syntax-jsx@^7.23.3":
version "7.23.3"
resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-jsx/-/plugin-syntax-jsx-7.23.3.tgz#8f2e4f8a9b5f9aa16067e142c1ac9cd9f810f473"
integrity sha512-EB2MELswq55OHUoRZLGg/zC7QWUKfNLpE57m/S2yr1uEneIgsTgrSzXP3NXEsMkVn76OlaVVnzN+ugObuYGwhg==
dependencies:
"@babel/helper-plugin-utils" "^7.22.5"

"@babel/plugin-syntax-logical-assignment-operators@^7.10.4", "@babel/plugin-syntax-logical-assignment-operators@^7.8.3":
version "7.10.4"
resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-logical-assignment-operators/-/plugin-syntax-logical-assignment-operators-7.10.4.tgz#ca91ef46303530448b906652bac2e9fe9941f699"
Expand Down Expand Up @@ -562,6 +584,13 @@
dependencies:
"@babel/helper-plugin-utils" "^7.22.5"

"@babel/plugin-syntax-typescript@^7.23.3":
version "7.23.3"
resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-typescript/-/plugin-syntax-typescript-7.23.3.tgz#24f460c85dbbc983cd2b9c4994178bcc01df958f"
integrity sha512-9EiNjVJOMwCO+43TqoTrgQ8jMwcAd0sWyXi9RPfIsLTj4R2MADDDQXELhffaUx/uJv2AYcxBgPwH6j4TIA4ytQ==
dependencies:
"@babel/helper-plugin-utils" "^7.22.5"

"@babel/plugin-syntax-unicode-sets-regex@^7.18.6":
version "7.18.6"
resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-unicode-sets-regex/-/plugin-syntax-unicode-sets-regex-7.18.6.tgz#d49a3b3e6b52e5be6740022317580234a6a47357"
Expand Down Expand Up @@ -997,6 +1026,16 @@
"@babel/helper-plugin-utils" "^7.22.5"
"@babel/plugin-syntax-typescript" "^7.22.5"

"@babel/plugin-transform-typescript@^7.23.3":
version "7.23.6"
resolved "https://registry.yarnpkg.com/@babel/plugin-transform-typescript/-/plugin-transform-typescript-7.23.6.tgz#aa36a94e5da8d94339ae3a4e22d40ed287feb34c"
integrity sha512-6cBG5mBvUu4VUD04OHKnYzbuHNP8huDsD3EDqqpIpsswTDoqHCjLoHb6+QgsV1WsT2nipRqCPgxD3LXnEO7XfA==
dependencies:
"@babel/helper-annotate-as-pure" "^7.22.5"
"@babel/helper-create-class-features-plugin" "^7.23.6"
"@babel/helper-plugin-utils" "^7.22.5"
"@babel/plugin-syntax-typescript" "^7.23.3"

"@babel/plugin-transform-unicode-escapes@^7.23.3":
version "7.23.3"
resolved "https://registry.yarnpkg.com/@babel/plugin-transform-unicode-escapes/-/plugin-transform-unicode-escapes-7.23.3.tgz#1f66d16cab01fab98d784867d24f70c1ca65b925"
Expand Down Expand Up @@ -1135,7 +1174,7 @@
"@babel/plugin-transform-react-jsx-development" "^7.22.5"
"@babel/plugin-transform-react-pure-annotations" "^7.22.5"

"@babel/preset-typescript@^7.16.0", "@babel/preset-typescript@^7.21.0":
"@babel/preset-typescript@^7.16.0":
version "7.23.2"
resolved "https://registry.yarnpkg.com/@babel/preset-typescript/-/preset-typescript-7.23.2.tgz#c8de488130b7081f7e1482936ad3de5b018beef4"
integrity sha512-u4UJc1XsS1GhIGteM8rnGiIvf9rJpiVgMEeCnwlLA7WJPC+jcXWJAGxYmeqs5hOZD8BbAfnV5ezBOxQbb4OUxA==
Expand All @@ -1146,6 +1185,17 @@
"@babel/plugin-transform-modules-commonjs" "^7.23.0"
"@babel/plugin-transform-typescript" "^7.22.15"

"@babel/preset-typescript@^7.23.3":
version "7.23.3"
resolved "https://registry.yarnpkg.com/@babel/preset-typescript/-/preset-typescript-7.23.3.tgz#14534b34ed5b6d435aa05f1ae1c5e7adcc01d913"
integrity sha512-17oIGVlqz6CchO9RFYn5U6ZpWRZIngayYCtrPRSgANSwC2V1Jb+iP74nVxzzXJte8b8BYxrL1yY96xfhTBrNNQ==
dependencies:
"@babel/helper-plugin-utils" "^7.22.5"
"@babel/helper-validator-option" "^7.22.15"
"@babel/plugin-syntax-jsx" "^7.23.3"
"@babel/plugin-transform-modules-commonjs" "^7.23.3"
"@babel/plugin-transform-typescript" "^7.23.3"

"@babel/regjsgen@^0.8.0":
version "0.8.0"
resolved "https://registry.yarnpkg.com/@babel/regjsgen/-/regjsgen-0.8.0.tgz#f0ba69b075e1f05fb2825b7fad991e7adbb18310"
Expand Down Expand Up @@ -3091,10 +3141,10 @@
resolved "https://registry.yarnpkg.com/@types/minimist/-/minimist-1.2.5.tgz#ec10755e871497bcd83efe927e43ec46e8c0747e"
integrity sha512-hov8bUuiLiyFPGyFPE1lwWhmzYbirOXQNNo40+y3zow8aFVTeyn3VWL0VFFfdNddA8S4Vf0Tc062rzyNr7Paag==

"@types/node-fetch@^2.5.7":
version "2.6.9"
resolved "https://registry.yarnpkg.com/@types/node-fetch/-/node-fetch-2.6.9.tgz#15f529d247f1ede1824f7e7acdaa192d5f28071e"
integrity sha512-bQVlnMLFJ2d35DkPNjEPmd9ueO/rh5EiaZt2bhqiSarPjZIuIV6bPQVqcrEyvNo+AfTrRGVazle1tl597w3gfA==
"@types/node-fetch@^2.6.11":
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"
Expand All @@ -3106,10 +3156,10 @@
dependencies:
"@types/node" "*"

"@types/node@*":
version "20.9.0"
resolved "https://registry.yarnpkg.com/@types/node/-/node-20.9.0.tgz#bfcdc230583aeb891cf51e73cfdaacdd8deae298"
integrity sha512-nekiGu2NDb1BcVofVcEKMIwzlx4NjHlcjhoxxKBNLtz15Y1z7MYf549DFvkHSId02Ax6kGwWntIBPC3l/JZcmw==
"@types/node@*", "@types/node@^20.11.6":
version "20.11.6"
resolved "https://registry.yarnpkg.com/@types/node/-/node-20.11.6.tgz#6adf4241460e28be53836529c033a41985f85b6e"
integrity sha512-+EOokTnksGVgip2PbYbr3xnR7kZigh4LbybAfBAw5BpnQ+FqBYUsvCEjYd70IXKlbohQ64mzEYmMtlWUY8q//Q==
dependencies:
undici-types "~5.26.4"

Expand All @@ -3118,11 +3168,6 @@
resolved "https://registry.yarnpkg.com/@types/node/-/node-12.20.55.tgz#c329cbd434c42164f846b909bd6f85b5537f6240"
integrity sha512-J8xLz7q2OFulZ2cyGTLE1TbbZcjpno7FaN6zdJNrgAdrJ+DZzh/uFR6YrTb4C+nXakvud8Q4+rbhoIWlYQbUFQ==

"@types/node@^16.0.0":
version "16.18.61"
resolved "https://registry.yarnpkg.com/@types/node/-/node-16.18.61.tgz#5ea47e3018348bf3bbbe646b396ba5e720310be1"
integrity sha512-k0N7BqGhJoJzdh6MuQg1V1ragJiXTh8VUBAZTWjJ9cUq23SG0F0xavOwZbhiP4J3y20xd6jxKx+xNUhkMAi76Q==

"@types/normalize-package-data@^2.4.0":
version "2.4.4"
resolved "https://registry.yarnpkg.com/@types/normalize-package-data/-/normalize-package-data-2.4.4.tgz#56e2cc26c397c038fab0e3a917a12d5c5909e901"
Expand Down

0 comments on commit 646e50d

Please sign in to comment.