diff --git a/.changeset/small-tools-carry.md b/.changeset/small-tools-carry.md new file mode 100644 index 0000000000..5e31667209 --- /dev/null +++ b/.changeset/small-tools-carry.md @@ -0,0 +1,10 @@ +--- +"@ultraviolet/illustrations": patch +"@ultraviolet/icons": patch +"@ultraviolet/form": patch +"@ultraviolet/plus": patch +"@ultraviolet/ui": patch +"@ultraviolet/themes": patch +--- + +Add turborepo diff --git a/.dockerignore b/.dockerignore index 36a775ebc8..5f681d2c85 100644 --- a/.dockerignore +++ b/.dockerignore @@ -1,7 +1,9 @@ .git # dependencies +node_modules **/node_modules +npm-debug.log # we are using pnpm here **/package-lock.json @@ -17,5 +19,3 @@ dist/ coverage # storybook-static .reports - - diff --git a/.github/workflows/changesets-renovate.yml b/.github/workflows/changesets-renovate.yml index 6006e6e3bb..4f0970e24c 100644 --- a/.github/workflows/changesets-renovate.yml +++ b/.github/workflows/changesets-renovate.yml @@ -15,7 +15,7 @@ jobs: - name: Checkout uses: actions/checkout@v4 with: - fetch-depth: 2 + fetch-depth: 10 ref: ${{ github.head_ref }} - name: Git Identity run: | diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 6b7d05f3ea..46773322c8 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -11,20 +11,26 @@ on: jobs: typecheck: runs-on: ubuntu-22.04 + env: + TURBO_TOKEN: ${{ secrets.TURBO_TOKEN }} + TURBO_REMOTE_ONLY: true steps: - - uses: actions/checkout@v4 # v4.1.4 + - uses: actions/checkout@v4 - uses: pnpm/action-setup@v4.0.0 - name: Use Node.js uses: actions/setup-node@v4.0.3 with: node-version: 20 cache: "pnpm" - - run: pnpm install - - run: pnpm run build - - run: pnpm install - - run: pnpm typecheck + - run: | + pnpm install + pnpm typecheck + lint: runs-on: ubuntu-22.04 + env: + TURBO_TOKEN: ${{ secrets.TURBO_TOKEN }} + TURBO_REMOTE_ONLY: true steps: - uses: actions/checkout@v4 - uses: pnpm/action-setup@v4.0.0 @@ -33,12 +39,16 @@ jobs: with: node-version: 20 cache: "pnpm" - - run: pnpm install - - run: pnpm run build - - run: pnpm install - - run: pnpm run lint + - run: | + pnpm install + pnpm build + pnpm run lint + format: runs-on: ubuntu-22.04 + env: + TURBO_TOKEN: ${{ secrets.TURBO_TOKEN }} + TURBO_REMOTE_ONLY: true steps: - uses: actions/checkout@v4 - uses: pnpm/action-setup@v4.0.0 @@ -47,12 +57,15 @@ jobs: with: node-version: 20 cache: "pnpm" - - run: pnpm install - - run: pnpm run build - - run: pnpm install - - run: pnpm run format:ci + - run: | + pnpm install + pnpm run format:ci + test: runs-on: ubuntu-22.04 + env: + TURBO_TOKEN: ${{ secrets.TURBO_TOKEN }} + TURBO_REMOTE_ONLY: true needs: [lint, typecheck, format] strategy: matrix: @@ -60,17 +73,16 @@ jobs: steps: - uses: actions/checkout@v4 with: - fetch-depth: "0" + fetch-depth: 10 - uses: pnpm/action-setup@v4.0.0 - name: Use Node.js uses: actions/setup-node@v4.0.3 with: node-version: ${{ matrix.node }} cache: "pnpm" - - run: pnpm install - - run: pnpm run build - - run: pnpm install - - run: pnpm run test:unit:coverage + - run: | + pnpm install + pnpm run test:unit:coverage - uses: codecov/codecov-action@v4.5.0 with: # files: packages/**/coverage/cobertura-coverage.xmls @@ -98,6 +110,9 @@ jobs: matrix: node: ["20"] runs-on: ubuntu-22.04 + env: + TURBO_TOKEN: ${{ secrets.TURBO_TOKEN }} + TURBO_REMOTE_ONLY: true needs: [lint, typecheck, format] steps: - uses: actions/checkout@v4 # v4.1.4 @@ -106,22 +121,6 @@ jobs: uses: actions/setup-node@v4.0.3 with: node-version: ${{ matrix.node }} - - run: pnpm install - - run: pnpm run build - build-examples: # This will build all projects in the examples folder, it assures that all examples are working - strategy: - matrix: - node: ["20"] - runs-on: ubuntu-22.04 - needs: [lint, test, format] - steps: - - uses: actions/checkout@v4 # v4.1.4 - - uses: pnpm/action-setup@v4.0.0 - - name: Use Node.js - uses: actions/setup-node@v4.0.3 - with: - node-version: ${{ matrix.node }} - - run: pnpm install - - run: pnpm build - - run: pnpm install - - run: pnpm run build:examples + - run: | + pnpm install + pnpm run build diff --git a/.github/workflows/deploy-storybook.yml b/.github/workflows/deploy-storybook.yml index cdde1eae03..03ba45301b 100644 --- a/.github/workflows/deploy-storybook.yml +++ b/.github/workflows/deploy-storybook.yml @@ -14,6 +14,8 @@ jobs: IMAGE_NAME: rg.fr-par.scw.cloud/ultraviolet/storybook DEPLOYMENT_NAME: "storybook" SCW_DNS: ${{ github.ref_name == 'main' && 'storybook.ultraviolet.scaleway.com' || '' }} + TURBO_TOKEN: ${{ secrets.TURBO_TOKEN }} + TURBO_REMOTE_ONLY: true steps: - uses: actions/checkout@v4 - name: Inject slug/short variables @@ -54,6 +56,7 @@ jobs: env: IMAGE: ${{ env.IMAGE_NAME }}:${{ env.BRANCH_SLUG }} SOURCE_DATE_EPOCH: 0 + TURBO_TOKEN: ${{ secrets.TURBO_TOKEN }} with: push: true tags: ${{ env.IMAGE }} @@ -79,13 +82,15 @@ jobs: echo "SCW_MIN_SCALE=0" >> $GITHUB_ENV fi - - name: Set scw_cpu_limit + - name: Set scw_limit id: set-cpu-limit run: | if [[ "${{ env.BRANCH_SLUG }}" == "main" ]]; then - echo "SCW_CPU_LIMIT=560" >> $GITHUB_ENV + echo "SCW_CPU_LIMIT=1120" >> $GITHUB_ENV + echo "SCW_MEMORY_LIMIT=1024" >> $GITHUB_ENV else echo "SCW_CPU_LIMIT=140" >> $GITHUB_ENV + echo "SCW_MEMORY_LIMIT=256" >> $GITHUB_ENV fi - name: Deploy Serverless Container Scaleway @@ -105,6 +110,7 @@ jobs: scw_cpu_limit: ${{ env.SCW_CPU_LIMIT }} scw_max_concurrency: ${{ env.SCW_MAX_CONCURRENCY }} scw_sandbox: "v2" + scw_memory_limit: ${{ env.SCW_MEMORY_LIMIT }} - name: Update deployment status uses: bobheadxi/deployments@v1.5.0 diff --git a/.github/workflows/pull_request_title.yml b/.github/workflows/pull_request_title.yml index b360afb5ee..68898a6d1c 100644 --- a/.github/workflows/pull_request_title.yml +++ b/.github/workflows/pull_request_title.yml @@ -7,14 +7,14 @@ jobs: check-title: runs-on: ubuntu-22.04 steps: - - uses: actions/checkout@v4 # v4.1.4 + - uses: actions/checkout@v4 - uses: pnpm/action-setup@v4.0.0 - name: Use Node.js uses: actions/setup-node@v4.0.3 with: node-version: 20 cache: "pnpm" - - run: pnpm install + - run: pnpm install --prod - name: Check PR title env: TITLE: ${{ github.event.pull_request.title }} diff --git a/.github/workflows/size-limit.yml b/.github/workflows/size-limit.yml index b09265c144..a559b2e20f 100644 --- a/.github/workflows/size-limit.yml +++ b/.github/workflows/size-limit.yml @@ -15,6 +15,8 @@ jobs: uses: actions/setup-node@v4.0.3 with: node-version: ${{ matrix.node }} - - run: pnpm install - - run: pnpm run build - - run: pnpm run size:packages + - run: | + pnpm install + pnpm run size + env: + TURBO_TOKEN: ${{ secrets.TURBO_TOKEN }} diff --git a/.gitignore b/.gitignore index 249ca39684..e67a454539 100644 --- a/.gitignore +++ b/.gitignore @@ -35,3 +35,10 @@ out #vite vite.config.ts.* vitest.config.ts.* + +# turbo +.turbo +!.turbo/config.json +examples/*/.turbo +packages/*/.turbo +tools/*/.turbo diff --git a/.jest/a11y.config.ts b/.jest/a11y.config.ts deleted file mode 100644 index 1a3c500114..0000000000 --- a/.jest/a11y.config.ts +++ /dev/null @@ -1,33 +0,0 @@ -/** - * TODO: Remove when apply new configuration of a11y - */ -// import type { Config } from '@jest/types' -// import * as path from 'path' - -// const config: Config.InitialOptions = { -// rootDir: path.join(__dirname, '..'), -// testEnvironment: 'jsdom', -// coverageReporters: ['text', 'cobertura'], -// reporters: [ -// 'default', -// [ -// 'jest-junit', -// { -// outputDirectory: '.reports', -// outputName: 'tests.xml', -// }, -// ], -// ], -// transformIgnorePatterns: ['node_modules/(?!@scaleway)/'], -// testPathIgnorePatterns: ['/nodes_modules/', 'src/components'], -// moduleNameMapper: { -// '\\.(jpg|jpeg|png|gif|eot|otf|webp|svg|ttf|woff|woff2|mp4|webm|wav|mp3|m4a|aac|oga)$': -// '/.jest/fileMock.ts', -// '\\.(css|less)$': 'identity-obj-proxy', -// '\\.(css\\?inline)$': 'identity-obj-proxy', -// }, -// setupFilesAfterEnv: ['@testing-library/jest-dom'], -// testMatch: ['**/a11y.test.tsx'], -// } - -// export default config diff --git a/.jest/fileMock.ts b/.jest/fileMock.ts deleted file mode 100644 index 2b9e53d970..0000000000 --- a/.jest/fileMock.ts +++ /dev/null @@ -1 +0,0 @@ -export default 'test-file-stub' diff --git a/.jest/svg.ts b/.jest/svg.ts deleted file mode 100644 index 13afca51d6..0000000000 --- a/.jest/svg.ts +++ /dev/null @@ -1,2 +0,0 @@ -export default 'SvgrURL' -export const ReactComponent = 'div' diff --git a/.turbo/config.json b/.turbo/config.json new file mode 100644 index 0000000000..6767d4b43e --- /dev/null +++ b/.turbo/config.json @@ -0,0 +1,4 @@ +{ + "teamid": "team_ultraviolet", + "apiurl": "https://turbopm2juoty-turbo.functions.fnc.fr-par.scw.cloud" +} diff --git a/Dockerfile b/Dockerfile index 809ff66eea..5fdb687d6c 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,11 +1,15 @@ FROM node:20.15.1-alpine WORKDIR /build +ARG TURBO_TOKEN=token + +ENV TURBO_TOKEN ${TURBO_TOKEN} + COPY . . RUN corepack enable RUN pnpm install --frozen-lockfile -RUN pnpm build:storybook:stats +RUN pnpm turbo run storybook:build --output-logs=hash-only RUN pnpm add serve -w diff --git a/package.json b/package.json index 01305bf156..505503b6d7 100644 --- a/package.json +++ b/package.json @@ -6,7 +6,7 @@ "examples/*", "utils/*" ], - "packageManager": "pnpm@9.4.0", + "packageManager": "pnpm@9.5.0", "engines": { "node": ">=18.x", "pnpm": ">=9.x" @@ -17,11 +17,14 @@ "linux" ], "scripts": { - "build": "pnpm --filter '@ultraviolet/*' recursive run build", - "build:example": "pnpm --filter '@examples/*' recursive run build", - "build:storybook": "pnpm run build && STORYBOOK_ENVIRONMENT=production storybook build", - "build:storybook:stats": "pnpm run build:storybook --webpack-stats-json", - "build:examples": "pnpm --filter '{examples/**}' recursive exec -- pnpm run build", + "build": "turbo run build", + "size": "turbo run size", + "typecheck": "turbo run typecheck", + "build:examples": "turbo run build --filter '@examples/*' ", + "storybook:build": "STORYBOOK_ENVIRONMENT=production storybook build", + "storybook:build:stats": "pnpm turbo storybook:build -- --webpack-stats-json", + "test:unit": "turbo run test:unit", + "test:unit:coverage": "turbo run test:unit:coverage", "check:deps": "npx depcheck . --skip-missing=true --ignores='bin,eslint,vite,jest,husky,@commitlint/*,@babel/*,babel-*'", "commit": "npx git-cz -a --disable-emoji", "start": "STORYBOOK_ENVIRONMENT=development storybook dev -p 6006", @@ -30,17 +33,11 @@ "format:ci": "biome ci .", "lint:fix": "pnpm run lint --fix", "lint": "eslint --report-unused-disable-directives --cache .", - "prebuild": "pnpm --filter '@ultraviolet/*' recursive run prebuild", - "test:unit": "pnpm --filter '@ultraviolet/*' recursive run test:unit", - "test:unit:coverage": "pnpm --filter '@ultraviolet/*' recursive run test:unit:coverage", "prepare": "husky", - "size": "pnpm run build && size-limit", - "size:packages": "pnpm --filter '@ultraviolet/*' recursive run size", "tokens:update": "node ./scripts/figma-synchronise-tokens.mjs && pnpm run format packages/themes/src/themes/console", "release": "pnpm build && pnpm changeset publish", "svg": "npx svgo --pretty --multipass", "svg:all": "pnpm run svg -r -f .", - "typecheck": "pnpm --filter '@ultraviolet/*' recursive run typecheck", "illustrations:update": "BUCKET_NAME=ultraviolet BUCKET_REGION=fr-par node utils/illustrations/uploadIllustrations.js && pnpm format packages/illustrations/src/" }, "lint-staged": { @@ -68,20 +65,6 @@ "@commitlint/config-conventional" ] }, - "size-limit": [ - { - "path": [ - "packages/*/dist/**/*.js", - "!packages/illustrations", - "!packages/plus", - "!packages/icons" - ], - "limit": "500 kB", - "webpack": false, - "brotli": true, - "running": false - } - ], "pnpm": { "overrides": { "vite": "$vite" @@ -179,6 +162,7 @@ "size-limit": "11.1.4", "storybook": "8.1.11", "timekeeper": "2.3.1", + "turbo": "2.0.6", "typescript": "5.5.3", "vite": "5.3.3", "vitest": "1.6.0", diff --git a/packages/form/package.json b/packages/form/package.json index 2ef94c7594..93b1410cf8 100644 --- a/packages/form/package.json +++ b/packages/form/package.json @@ -12,7 +12,7 @@ "build:profile": "npx vite-bundle-visualizer -c vite.config.ts", "build": "vite build --config vite.config.ts && pnpm run type:generate", "prebuild": "shx rm -rf dist", - "size": "pnpm run build && size-limit", + "size": "size-limit", "test:unit:coverage": "pnpm test:unit --coverage", "test:unit": "LC_ALL=en_US.UTF-8 pnpm vitest --run --config vite.config.ts", "type:generate": "tsc --declaration -p tsconfig.build.json", diff --git a/packages/icons/package.json b/packages/icons/package.json index 214210e6c0..bec9f5539b 100644 --- a/packages/icons/package.json +++ b/packages/icons/package.json @@ -16,7 +16,7 @@ "build": "vite build --config vite.config.ts && pnpm run type:generate", "build:profile": "npx vite-bundle-visualizer -c vite.config.ts", "typecheck": "tsc --noEmit", - "size": "pnpm run build && size-limit" + "size": "size-limit" }, "keywords": [ "react", diff --git a/packages/icons/turbo.json b/packages/icons/turbo.json new file mode 100644 index 0000000000..24399590cd --- /dev/null +++ b/packages/icons/turbo.json @@ -0,0 +1,11 @@ +{ + "extends": ["//"], + "tasks": { + "typecheck": { + "dependsOn": ["@ultraviolet/ui#build"] + }, + "size": { + "dependsOn": ["@ultraviolet/ui#build"] + } + } +} diff --git a/packages/illustrations/package.json b/packages/illustrations/package.json index 0e9f7602a6..f554502fcd 100644 --- a/packages/illustrations/package.json +++ b/packages/illustrations/package.json @@ -16,7 +16,7 @@ "build": "vite build --config vite.config.ts && pnpm run type:generate", "build:profile": "npx vite-bundle-visualizer -c vite.config.ts", "typecheck": "tsc --noEmit", - "size": "pnpm run build && size-limit", + "size": "size-limit", "test:unit": "LC_ALL=en_US.UTF-8 pnpm vitest --run --config vite.config.ts", "test:unit:coverage": "pnpm test:unit --coverage" }, diff --git a/packages/plus/package.json b/packages/plus/package.json index 26242e5e30..ecfb841826 100644 --- a/packages/plus/package.json +++ b/packages/plus/package.json @@ -16,7 +16,7 @@ "build": "vite build --config vite.config.ts && pnpm run type:generate", "build:profile": "npx vite-bundle-visualizer -c vite.config.ts", "typecheck": "tsc --noEmit", - "size": "pnpm run build && size-limit", + "size": "size-limit", "test:unit": "LC_ALL=en_US.UTF-8 pnpm vitest --run --config vite.config.ts", "test:unit:coverage": "pnpm test:unit --coverage" }, diff --git a/packages/ui/package.json b/packages/ui/package.json index 64a1cb540e..4e4c9d6bcc 100644 --- a/packages/ui/package.json +++ b/packages/ui/package.json @@ -16,7 +16,7 @@ "build": "vite build --config vite.config.ts && pnpm run type:generate", "build:profile": "npx vite-bundle-visualizer -c vite.config.ts", "typecheck": "tsc --noEmit", - "size": "pnpm run build && size-limit", + "size": "size-limit", "test:unit": "LC_ALL=en_US.UTF-8 pnpm vitest --run --config vite.config.ts", "test:unit:coverage": "pnpm test:unit --coverage" }, diff --git a/packages/ui/src/components/CheckboxGroup/__stories__/Required.stories.tsx b/packages/ui/src/components/CheckboxGroup/__stories__/Required.stories.tsx index 88ffd5cdea..87ce936de5 100644 --- a/packages/ui/src/components/CheckboxGroup/__stories__/Required.stories.tsx +++ b/packages/ui/src/components/CheckboxGroup/__stories__/Required.stories.tsx @@ -1,5 +1,5 @@ import type { StoryFn } from '@storybook/react' -import { Stack } from '@ultraviolet/ui' +import { Stack } from '../../Stack' import { CheckboxGroup } from '../index' export const Required: StoryFn = props => ( diff --git a/packages/ui/src/components/SearchInput/types.ts b/packages/ui/src/components/SearchInput/types.ts index e7a50f6931..6313bc133b 100644 --- a/packages/ui/src/components/SearchInput/types.ts +++ b/packages/ui/src/components/SearchInput/types.ts @@ -1,5 +1,6 @@ -import type { Popup, TextInputV2 } from '@ultraviolet/ui' import type { ComponentProps, DispatchWithoutAction, ReactNode } from 'react' +import type { Popup } from '../Popup' +import type { TextInputV2 } from '../TextInputV2' import type { KeyGroup } from './KeyGroup' type ChildrenProps = { diff --git a/packages/ui/tsconfig.json b/packages/ui/tsconfig.json index cd7e6e4eaa..469acdba3f 100644 --- a/packages/ui/tsconfig.json +++ b/packages/ui/tsconfig.json @@ -3,11 +3,6 @@ "compilerOptions": { "baseUrl": "." }, - "include": [ - "src", - "../../global.d.ts", - "src/emotion.d.ts", - "vitest.setup.ts" - ], + "include": ["src", "../../global.d.ts", "emotion.d.ts", "vitest.setup.ts"], "exclude": ["node_modules", "coverage", "dist"] } diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 0768a67a8c..4e9a2f9a89 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -266,6 +266,9 @@ importers: timekeeper: specifier: 2.3.1 version: 2.3.1 + turbo: + specifier: 2.0.6 + version: 2.0.6 typescript: specifier: 5.5.3 version: 5.5.3 @@ -8468,6 +8471,40 @@ packages: peerDependencies: typescript: '>=2.8.0 || >= 3.2.0-dev || >= 3.3.0-dev || >= 3.4.0-dev || >= 3.5.0-dev || >= 3.6.0-dev || >= 3.6.0-beta || >= 3.7.0-dev || >= 3.7.0-beta' + turbo-darwin-64@2.0.6: + resolution: {integrity: sha512-XpgBwWj3Ggmz/gQVqXdMKXHC1iFPMDiuwugLwSzE7Ih0O13JuNtYZKhQnopvbDQnFQCeRq2Vsm5OTWabg/oB/g==} + cpu: [x64] + os: [darwin] + + turbo-darwin-arm64@2.0.6: + resolution: {integrity: sha512-RfeZYXIAkiA21E8lsvfptGTqz/256YD+eI1x37fedfvnHFWuIMFZGAOwJxtZc6QasQunDZ9TRRREbJNI68tkIw==} + cpu: [arm64] + os: [darwin] + + turbo-linux-64@2.0.6: + resolution: {integrity: sha512-92UDa0xNQQbx0HdSp9ag3YSS3xPdavhc7q9q9mxIAcqyjjD6VElA4Y85m4F/DDGE5SolCrvBz2sQhVmkOd6Caw==} + cpu: [x64] + os: [linux] + + turbo-linux-arm64@2.0.6: + resolution: {integrity: sha512-eQKu6utCVUkIH2kqOzD8OS6E0ba6COjWm6PRDTNCHQRljZW503ycaTUIdMOiJrVg1MkEjDyOReUg8s8D18aJ4Q==} + cpu: [arm64] + os: [linux] + + turbo-windows-64@2.0.6: + resolution: {integrity: sha512-+9u4EPrpoeHYCQ46dRcou9kbkSoelhOelHNcbs2d86D6ruYD/oIAHK9qgYK8LeARRz0jxhZIA/dWYdYsxJJWkw==} + cpu: [x64] + os: [win32] + + turbo-windows-arm64@2.0.6: + resolution: {integrity: sha512-rdrKL+p+EjtdDVg0wQ/7yTbzkIYrnb0Pw4IKcjsy3M0RqUM9UcEi67b94XOAyTa5a0GqJL1+tUj2ebsFGPgZbg==} + cpu: [arm64] + os: [win32] + + turbo@2.0.6: + resolution: {integrity: sha512-/Ftmxd5Mq//a9yMonvmwENNUN65jOVTwhhBPQjEtNZutYT9YKyzydFGLyVM1nzhpLWahQSMamRc/RDBv5EapzA==} + hasBin: true + type-check@0.4.0: resolution: {integrity: sha512-XleUoc9uwGXqjWwXaUTZAmzMcFZ5858QA2vvx1Ur5xIcixXIP+8LnFDgRplU30us6teqdlskFfu+ae4K79Ooew==} engines: {node: '>= 0.8.0'} @@ -18930,6 +18967,33 @@ snapshots: tslib: 1.14.1 typescript: 5.5.3 + turbo-darwin-64@2.0.6: + optional: true + + turbo-darwin-arm64@2.0.6: + optional: true + + turbo-linux-64@2.0.6: + optional: true + + turbo-linux-arm64@2.0.6: + optional: true + + turbo-windows-64@2.0.6: + optional: true + + turbo-windows-arm64@2.0.6: + optional: true + + turbo@2.0.6: + optionalDependencies: + turbo-darwin-64: 2.0.6 + turbo-darwin-arm64: 2.0.6 + turbo-linux-64: 2.0.6 + turbo-linux-arm64: 2.0.6 + turbo-windows-64: 2.0.6 + turbo-windows-arm64: 2.0.6 + type-check@0.4.0: dependencies: prelude-ls: 1.2.1 diff --git a/tsconfig.json b/tsconfig.json index c16de7658f..c958a1dac5 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -1,7 +1,6 @@ { "extends": "@scaleway/tsconfig", "compilerOptions": { - // "baseUrl": ".", "target": "esnext", "module": "esnext", "jsxImportSource": "@emotion/react", @@ -14,8 +13,6 @@ "include": [ "**/*.ts", "**/*.tsx", - "**/.jest/*.ts", - "**/.jest/*.tsx", ".storybook/**/*.ts", ".storybook/**/*.tsx", "global.d.ts", diff --git a/turbo.json b/turbo.json new file mode 100644 index 0000000000..f6a31ac63b --- /dev/null +++ b/turbo.json @@ -0,0 +1,48 @@ +{ + "$schema": "https://turbo.build/schema.json", + "globalDependencies": ["tsconfig.json"], + "ui": "stream", + "globalEnv": ["STORYBOOK_ENVIRONMENT", "ENVIRONMENT"], + "tasks": { + "//#format": {}, + "//#lint:fix": { + "cache": false + }, + "//#storybook:build": { + "dependsOn": ["^build"], + "passThroughEnv": ["STORYBOOK_ENVIRONMENT"], + "outputs": ["build/**", "dist/**", "storybook-static/**"] + }, + "//#storybook:build:stats": { + "dependsOn": ["^build"], + "passThroughEnv": ["STORYBOOK_ENVIRONMENT"] + }, + "build": { + "dependsOn": ["^build"], + "inputs": ["$TURBO_DEFAULT$", "!**/*.stories.{tsx,jsx}"], + "outputs": [ + "build/**", + "dist/**", + ".next/**", + "!.next/cache/**", + "out/**", + "storybook-static/**" + ] + }, + "size": { + "dependsOn": ["build"] + }, + "typecheck": { + "dependsOn": ["build"], + "inputs": ["**/*.{ts,tsx}"] + }, + "test:unit": { + "dependsOn": ["build"], + "passThroughEnv": ["VITEST_*"] + }, + "test:unit:coverage": { + "dependsOn": ["build"], + "passThroughEnv": ["VITEST_*"] + } + } +}