diff --git a/.eslintrc.js b/.eslintrc.js index fea728e722..ecc689dde8 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -40,10 +40,6 @@ module.exports = { name: '@faker-js/faker', message: "Please use '@faker-js/faker/locale/en' instead", }, - { - name: 'faker', - message: "Please use 'faker/locale/en' instead", - }, ], }, ], @@ -78,7 +74,13 @@ module.exports = { }, }, { - files: ['**/tests/**/*.ts', '**/tests/**/*.tsx', '**/loom.config.ts', '**/*.test-d.ts', '**/*.test-d.tsx'], + files: [ + '**/tests/**/*.ts', + '**/tests/**/*.tsx', + '**/loom.config.ts', + '**/*.test-d.ts', + '**/*.test-d.tsx', + ], rules: { // We disable `import/no-extraneous-dependencies` for test files because it // would force releases of `@shopify/react-testing` (and similar devDependencies) @@ -87,7 +89,7 @@ module.exports = { 'import/no-extraneous-dependencies': 'off', 'react/jsx-no-constructed-context-values': 'off', 'react/jsx-key': 'off', - '@shopify/react-require-autocomplete': 'off' + '@shopify/react-require-autocomplete': 'off', }, }, { diff --git a/config/typescript/modules.d.ts b/config/typescript/modules.d.ts index f88a1634b8..79e07ae516 100644 --- a/config/typescript/modules.d.ts +++ b/config/typescript/modules.d.ts @@ -22,12 +22,3 @@ declare module 'browserslist-useragent' { export function matchesUA(ua: string, options?: Options): boolean; } - -// Necessary for @faker-js/faker v5.x -// Once we upgrade to faker 6, this can likely be removed -// because the library will be rewritten into TypeScript. -declare module '@faker-js/faker/locale/en' { - import faker from 'faker/locale/en'; - - export default faker; -} diff --git a/package.json b/package.json index 79f333b292..4120ce3e37 100644 --- a/package.json +++ b/package.json @@ -37,7 +37,7 @@ "@apollo/react-common": "^3.1.3", "@apollo/react-hooks": "^3.1.3", "@babel/core": "^7.14.6", - "@faker-js/faker": "^5.5.3", + "@faker-js/faker": "^6.1.2", "@shopify/app-bridge": "^2.0.3", "@shopify/babel-preset": "^24.1.4", "@shopify/browserslist-config": "^2.2.4", @@ -48,7 +48,6 @@ "@shopify/loom-plugin-eslint": "^2.0.0", "@shopify/loom-plugin-prettier": "^2.0.0", "@shopify/typescript-configs": "^5.0.0", - "@types/faker": "^5.5.9", "@types/react": "^17.0.13", "@types/react-dom": "^17.0.8", "apollo-cache-inmemory": "^1.3.6", diff --git a/packages/graphql-fixtures/package.json b/packages/graphql-fixtures/package.json index 4298fcc27c..3f5d865d66 100644 --- a/packages/graphql-fixtures/package.json +++ b/packages/graphql-fixtures/package.json @@ -24,9 +24,8 @@ "node": ">=12.14.0" }, "dependencies": { - "@faker-js/faker": "^5.5.3", + "@faker-js/faker": "^6.1.2", "@shopify/useful-types": "^4.0.2", - "@types/faker": "^5.5.9", "graphql": ">=14.5.0 <16.0.0", "graphql-tool-utilities": "^2.1.6" }, diff --git a/yarn.lock b/yarn.lock index a0bd2c4aae..3003ed6845 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1336,10 +1336,10 @@ minimatch "^3.0.4" strip-json-comments "^3.1.1" -"@faker-js/faker@^5.5.3": - version "5.5.3" - resolved "https://registry.yarnpkg.com/@faker-js/faker/-/faker-5.5.3.tgz#18e3af6b8eae7984072bbeb0c0858474d7c4cefe" - integrity sha512-R11tGE6yIFwqpaIqcfkcg7AICXzFg14+5h5v0TfF/9+RMDL6jhzCy/pxHVOfbALGdtVYdt6JdR21tuxEgl34dw== +"@faker-js/faker@^6.1.2": + version "6.1.2" + resolved "https://registry.yarnpkg.com/@faker-js/faker/-/faker-6.1.2.tgz#7093ea65e6d78eae388918a46968c083366bd621" + integrity sha512-QSvmexHCxeRUk1/yKmoEDaWB5Hohjvtim5g2JJwy8S/l0L4b3y/GxSpE6vN4SBoVGGahEQW21uqyRr7EofI35A== "@graphql-tools/batch-execute@^7.1.0": version "7.1.0" @@ -3218,11 +3218,6 @@ "@types/express-serve-static-core" "*" "@types/serve-static" "*" -"@types/faker@^5.5.9": - version "5.5.9" - resolved "https://registry.yarnpkg.com/@types/faker/-/faker-5.5.9.tgz#588ede92186dc557bff8341d294335d50d255f0c" - integrity sha512-uCx6mP3UY5SIO14XlspxsGjgaemrxpssJI0Ol+GfhxtcKpv9pgRZYsS4eeKeHVLje6Qtc8lGszuBI461+gVZBA== - "@types/fetch-mock@^7.3.3": version "7.3.3" resolved "https://registry.yarnpkg.com/@types/fetch-mock/-/fetch-mock-7.3.3.tgz#255511d70087b9ae8866704c782c88cc96a0b45b"