From b69100b7dc883eed7f50cea33c0a34ea8c3f987b Mon Sep 17 00:00:00 2001 From: Rise Erpelding Date: Mon, 4 Nov 2024 20:35:32 -0600 Subject: [PATCH] chore: remove faker --- .storybook/decorators/language.js | 9 --------- .storybook/package.json | 1 - yarn.lock | 8 -------- 3 files changed, 18 deletions(-) diff --git a/.storybook/decorators/language.js b/.storybook/decorators/language.js index 97c16114d94..3ae9a83db9c 100644 --- a/.storybook/decorators/language.js +++ b/.storybook/decorators/language.js @@ -1,6 +1,4 @@ -import { allFakers } from "@faker-js/faker"; import { makeDecorator, useEffect } from '@storybook/preview-api'; -import { capitalize } from "lodash-es"; import { fetchContainers } from "./helpers"; /* global Typekit */ @@ -22,13 +20,6 @@ export const withLanguageWrapper = makeDecorator({ const isNotEnglish = lang && lang !== "en-US"; const isRTL = ["ar", "fa", "he"].includes(lang); - // @todo: this can't be used for VRT because the strings are random - // Attach the generator tool to the parameters for use in the story - context.generator = allFakers?.[lang]; - - // Add a custom generator for titles - context.generator.lorem.title = (count) => capitalize(context.generator.lorem.words(count)); - // Add a textDirection property to the globals for use in the story context.globals.textDirection = isRTL ? "rtl" : "ltr"; diff --git a/.storybook/package.json b/.storybook/package.json index a9c435cc4fb..479e0719544 100644 --- a/.storybook/package.json +++ b/.storybook/package.json @@ -41,7 +41,6 @@ "@etchteam/storybook-addon-status": "^5.0.0", "@storybook/addon-a11y": "^8.4.1", "@storybook/addon-actions": "^8.4.1", - "@faker-js/faker": "^8.4.1", "@storybook/addon-console": "^3.0.0", "@storybook/addon-designs": "^8.0.4", "@storybook/addon-docs": "^8.4.1", diff --git a/yarn.lock b/yarn.lock index 85d01f4d871..ec6edc95dd0 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1934,13 +1934,6 @@ __metadata: languageName: node linkType: hard -"@faker-js/faker@npm:^8.4.1": - version: 8.4.1 - resolution: "@faker-js/faker@npm:8.4.1" - checksum: 10c0/4f2aecddcfdc2cc8b50b2d15d1e37302a7c7a5bbd184ae910a9d271bc11248533ca74dcdd4a9ccbe20410553e7af0f6a4d334c5b955635e09a32ddf4a64942d4 - languageName: node - linkType: hard - "@fastify/busboy@npm:^2.0.0": version: 2.1.1 resolution: "@fastify/busboy@npm:2.1.1" @@ -3834,7 +3827,6 @@ __metadata: "@babel/core": "npm:^7.26.0" "@chromaui/addon-visual-tests": "npm:^1.0.0" "@etchteam/storybook-addon-status": "npm:^5.0.0" - "@faker-js/faker": "npm:^8.4.1" "@spectrum-css/table": "workspace:^" "@spectrum-css/tokens": "workspace:^" "@spectrum-css/typography": "workspace:^"