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

Commit

Permalink
Update faker to v6
Browse files Browse the repository at this point in the history
  • Loading branch information
BPScott committed Apr 6, 2022
1 parent fa5534f commit cc6f2ef
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 28 deletions.
14 changes: 8 additions & 6 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -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",
},
],
},
],
Expand Down Expand Up @@ -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)
Expand All @@ -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',
},
},
{
Expand Down
9 changes: 0 additions & 9 deletions config/typescript/modules.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
3 changes: 1 addition & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand All @@ -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",
Expand Down
3 changes: 1 addition & 2 deletions packages/graphql-fixtures/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
},
Expand Down
13 changes: 4 additions & 9 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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"
Expand Down

0 comments on commit cc6f2ef

Please sign in to comment.