From cc8607610330677a7cc3282fd57a45c474d3e701 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?N=C3=A9stor?= Date: Tue, 6 Oct 2026 17:24:06 +0200 Subject: [PATCH] build: set up Turborepo monorepo for vinext - Move the publishable package into `packages/vinext` - Configure workspace tasks, caching, and package release workflows --- .github/workflows/ci.yml | 6 + .github/workflows/e2e-test.yml | 5 + .github/workflows/pkg-pr-new.yml | 2 +- .github/workflows/release.yml | 14 +- .gitignore | 2 + AGENTS.md | 11 ++ README.md | 89 +++--------- apps/host/package.json | 3 +- apps/island/package.json | 3 +- apps/remote/package.json | 3 +- docs/releasing.md | 9 +- package.json | 67 ++------- packages/vinext/LICENSE | 21 +++ packages/vinext/README.md | 65 +++++++++ packages/vinext/package.json | 54 ++++++++ {src => packages/vinext/src}/index.ts | 0 .../vinext/test}/package.test.js | 0 .../vinext/tsconfig.json | 0 playwright.config.mjs | 2 + pnpm-lock.yaml | 131 ++++++++++++------ pnpm-workspace.yaml | 2 +- turbo.json | 31 +++++ 22 files changed, 349 insertions(+), 171 deletions(-) create mode 100644 packages/vinext/LICENSE create mode 100644 packages/vinext/README.md create mode 100644 packages/vinext/package.json rename {src => packages/vinext/src}/index.ts (100%) rename {test => packages/vinext/test}/package.test.js (100%) rename tsconfig.json => packages/vinext/tsconfig.json (100%) create mode 100644 turbo.json diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 1cdfd53..2bfbdb2 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -13,6 +13,11 @@ concurrency: group: ci-${{ github.workflow }}-${{ github.ref }} cancel-in-progress: true +env: + # Optional Turborepo remote cache; tasks run with the local cache when unset. + TURBO_TOKEN: ${{ secrets.TURBO_TOKEN }} + TURBO_TEAM: ${{ vars.TURBO_TEAM }} + jobs: check: name: Check @@ -39,4 +44,5 @@ jobs: run: pnpm run check - name: Inspect package contents + working-directory: packages/vinext run: pnpm pack --dry-run diff --git a/.github/workflows/e2e-test.yml b/.github/workflows/e2e-test.yml index dc86701..22d7644 100644 --- a/.github/workflows/e2e-test.yml +++ b/.github/workflows/e2e-test.yml @@ -15,6 +15,11 @@ concurrency: permissions: contents: read +env: + # Optional Turborepo remote cache; tasks run with the local cache when unset. + TURBO_TOKEN: ${{ secrets.TURBO_TOKEN }} + TURBO_TEAM: ${{ vars.TURBO_TEAM }} + jobs: playwright: name: Playwright Tests diff --git a/.github/workflows/pkg-pr-new.yml b/.github/workflows/pkg-pr-new.yml index 9d1f519..a21bf2c 100644 --- a/.github/workflows/pkg-pr-new.yml +++ b/.github/workflows/pkg-pr-new.yml @@ -28,4 +28,4 @@ jobs: - name: Build run: pnpm build:package - - run: pnpm dlx pkg-pr-new publish --compact '.' + - run: pnpm dlx pkg-pr-new publish --compact './packages/vinext' diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 6d97228..e25d7b3 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -28,6 +28,7 @@ concurrency: env: PACKAGE_NAME: "@module-federation/vinext" + PACKAGE_DIR: packages/vinext jobs: publish: @@ -91,6 +92,7 @@ jobs: if: github.event_name == 'workflow_dispatch' && github.event.inputs.version == 'next' run: | pnpm exec changeset version --snapshot next + cd "$PACKAGE_DIR" SNAPSHOT_VERSION="$(node -p "require('./package.json').version")" BASE_VERSION="${SNAPSHOT_VERSION%%-*}" NEXT_VERSION="${BASE_VERSION}-next.${GITHUB_RUN_ID}" @@ -99,6 +101,7 @@ jobs: - name: Verify tag matches package version if: github.event_name == 'release' + working-directory: ${{ env.PACKAGE_DIR }} env: RELEASE_TAG: ${{ github.event.release.tag_name }} run: | @@ -120,6 +123,7 @@ jobs: - name: Set deterministic prerelease version if: github.event_name == 'release' && github.event.release.prerelease + working-directory: ${{ env.PACKAGE_DIR }} run: | CURRENT_VERSION="$(node -p "require('./package.json').version")" BASE_VERSION="${CURRENT_VERSION%%-*}" @@ -133,8 +137,10 @@ jobs: - name: Check formatting run: pnpm run fmt.check - - name: Inspect package contents - run: pnpm pack --dry-run + - name: Pack package + working-directory: ${{ env.PACKAGE_DIR }} + # pnpm pack resolves catalog: and workspace: specifiers; npm publish does not. + run: pnpm pack --pack-destination "$RUNNER_TEMP/package" - name: Compute npm dist-tag id: dist @@ -155,6 +161,7 @@ jobs: echo "dist_tag=$DIST_TAG" >> "$GITHUB_OUTPUT" - name: Resolve publish action + working-directory: ${{ env.PACKAGE_DIR }} id: publish_action env: DIST_TAG: ${{ steps.dist.outputs.dist_tag }} @@ -198,7 +205,7 @@ jobs: if: steps.publish_action.outputs.action == 'publish' env: DIST_TAG: ${{ steps.dist.outputs.dist_tag }} - run: npm publish --provenance --tag "$DIST_TAG" --access public + run: npm publish "$RUNNER_TEMP"/package/*.tgz --provenance --tag "$DIST_TAG" --access public - name: Skip npm publish if: steps.publish_action.outputs.action == 'skip' @@ -210,6 +217,7 @@ jobs: - name: Post summary if: always() + working-directory: ${{ env.PACKAGE_DIR }} continue-on-error: true env: SOURCE_REF: ${{ github.event.release.tag_name || github.event.inputs.branch }} diff --git a/.gitignore b/.gitignore index b8383a2..aa23a1b 100644 --- a/.gitignore +++ b/.gitignore @@ -6,3 +6,5 @@ dist/ *.log reports/ .DS_Store +.turbo/ +*.tsbuildinfo diff --git a/AGENTS.md b/AGENTS.md index a402c45..1278742 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -20,3 +20,14 @@ PR titles are validated by `.github/workflows/pr.yml` and must follow - Titles starting with `Release ` are reserved for the PR generated by the **Release Pull Request** workflow and skip validation. Don't use that prefix for anything else. + + + +# This is NOT the Turborepo you know + +Turborepo configuration, task behavior, and CLI commands can vary between installed versions and may differ from your training data. Resolve the `turbo` package from this file's directory or relevant workspace; in monorepos, it may not be visible from the repository root. For example, run `node -p "require.resolve('turbo/package.json')"` from a workspace that depends on `turbo`. + +Read `docs/README.md` inside that installed package first, then read the relevant pages from its `docs/` directory before changing Turborepo configuration or commands. Heed deprecation notices. These bundled docs match the installed package version and are available without network access. + +This block is written and re-added by `turbo` before repository-scoped commands when an AI agent is detected. In the Turborepo source repository, its template is defined in `crates/turborepo-cli/src/cli/agent_guidance.rs`. Removing the managed block while updates are enabled means a later qualifying invocation will add it again. Set `"agentGuidance": false` in the root `turbo.json` or `turbo.jsonc` to opt out; this does not remove an existing block. Keep the block committed with your work to avoid an uncommitted change on the next agent invocation. + diff --git a/README.md b/README.md index 77d8db7..32f768d 100644 --- a/README.md +++ b/README.md @@ -1,81 +1,38 @@ -# @module-federation/vinext +# vinext Module Federation -Thin Module Federation wrapper for vinext, built on -`@module-federation/vite`. +Monorepo for [`@module-federation/vinext`](packages/vinext), a thin Module +Federation wrapper for vinext built on `@module-federation/vite`. -## Install +See the [package README](packages/vinext/README.md) for installation and +configuration. -```sh -pnpm add @module-federation/vinext -``` - -## Configure - -Register federation before `vinext()` in `vite.config.ts`: - -```ts -import { federation } from "@module-federation/vinext"; -import { defineConfig } from "vite"; -import vinext from "vinext"; - -export default defineConfig({ - plugins: [ - federation({ - name: "host", - remotes: { - catalog: { - type: "module", - name: "catalog", - entry: "https://catalog.example.com/remoteEntry.js", - entryGlobalName: "catalog", - shareScope: "default", - }, - }, - }), - vinext(), - ], -}); -``` - -Remote example: +## Repository layout -```ts -federation({ - name: "catalog", - exposes: { - "./ProductCard": "./app/product-card.tsx", - }, -}); -``` - -The wrapper defaults `filename` to `remoteEntry.js`, injects host startup into -the entry (vinext has no conventional HTML entry), and shares `react` and -`react-dom` as singletons. Explicit options override every default. All -`@module-federation/vite` options remain available. - -The default export and `withModuleFederation` are aliases of `federation`. - -## Example applications +| Path | Description | +| ------------------------------------ | ------------------------------------------------ | +| [`packages/vinext`](packages/vinext) | `@module-federation/vinext`, published to npm | +| [`apps/host`](apps/host) | Vinext/React 19 host, port 4173 | +| [`apps/remote`](apps/remote) | React 19 remote shared with the host, port 4174 | +| [`apps/island`](apps/island) | Isolated React 18 SSR island, port 4175 | +| [`e2e`](e2e) | Playwright tests against the production previews | -- Vinext host: `apps/host`, port 4173 -- Shared React remote: `apps/remote`, port 4174 -- Isolated React 18 island: `apps/island`, port 4175 - -```sh -pnpm dev -pnpm preview -``` +Tasks run through [Turborepo](https://turborepo.com), which builds workspace +dependencies first and caches results in `.turbo/`. ## Development ```sh pnpm install -pnpm run check -pnpm run build:package -pnpm run build -pnpm run test:e2e +pnpm dev # watch the package and run every app in dev mode +pnpm build # build the package and all apps +pnpm preview # build, then serve the production apps +pnpm check # typecheck, unit tests, and builds +pnpm test:e2e # Playwright against `pnpm preview` ``` +Scope a task to one workspace with a filter, e.g. +`pnpm turbo run dev --filter=vinext-host` or `pnpm build:package`. + ## Release See [docs/releasing.md](docs/releasing.md). diff --git a/apps/host/package.json b/apps/host/package.json index 3b42e89..80a4922 100644 --- a/apps/host/package.json +++ b/apps/host/package.json @@ -6,7 +6,8 @@ "scripts": { "dev": "vite dev --port 4173", "build": "vite build", - "preview": "vite preview --port 4173" + "preview": "vite preview --port 4173", + "typecheck": "tsc --noEmit" }, "dependencies": { "next": "16.1.6", diff --git a/apps/island/package.json b/apps/island/package.json index 757061e..e9ae5cd 100644 --- a/apps/island/package.json +++ b/apps/island/package.json @@ -6,7 +6,8 @@ "scripts": { "dev": "vite dev --port 4175", "build": "vite build", - "preview": "vite preview --port 4175" + "preview": "vite preview --port 4175", + "typecheck": "tsc --noEmit" }, "dependencies": { "react": "18.3.1", diff --git a/apps/remote/package.json b/apps/remote/package.json index 1256d9a..2aaf983 100644 --- a/apps/remote/package.json +++ b/apps/remote/package.json @@ -6,7 +6,8 @@ "scripts": { "dev": "vite dev --port 4174", "build": "vite build", - "preview": "vite preview --port 4174" + "preview": "vite preview --port 4174", + "typecheck": "tsc --noEmit" }, "dependencies": { "react": "19.2.8", diff --git a/docs/releasing.md b/docs/releasing.md index 92f2685..b5de097 100644 --- a/docs/releasing.md +++ b/docs/releasing.md @@ -28,11 +28,12 @@ request. 3. Review the version bump and changelog in the generated `Release vX.Y.Z` pull request, then merge it. 4. Create a GitHub release from `main` with the tag `X.Y.Z` (no leading `v`), - matching the version in `package.json`, and publish it. + matching the version in `packages/vinext/package.json`, and publish it. Publishing the GitHub release runs the **Release** workflow, which checks that -the tag matches `package.json`, runs the full checks, and publishes to npm with -the `latest` tag. +the tag matches `packages/vinext/package.json`, runs the full checks, packs the +package with pnpm (resolving `catalog:` versions), and publishes the tarball to +npm with the `latest` tag. ## Publish a prerelease @@ -58,3 +59,5 @@ Neither changes `main` or the next stable version. - npm Trusted Publishing for `@module-federation/vinext`, pointing at this repository, the `release.yml` workflow, and the `Publish` environment. No npm token is needed. +- Optional: secret `TURBO_TOKEN` and variable `TURBO_TEAM` enable the Turborepo + remote cache in the **CI** and **E2E Tests** workflows. diff --git a/package.json b/package.json index 23aba1b..6cab039 100644 --- a/package.json +++ b/package.json @@ -1,67 +1,30 @@ { - "name": "@module-federation/vinext", - "version": "0.0.0", - "description": "Module Federation integration for vinext", - "homepage": "https://github.com/module-federation/vinext#readme", - "bugs": { - "url": "https://github.com/module-federation/vinext/issues" - }, - "license": "MIT", - "repository": { - "type": "git", - "url": "git+https://github.com/module-federation/vinext.git" - }, - "files": [ - "dist", - "README.md", - "LICENSE" - ], + "name": "@module-federation/vinext-monorepo", + "private": true, "type": "module", - "sideEffects": false, - "main": "./dist/index.js", - "types": "./dist/index.d.ts", - "exports": { - ".": { - "types": "./dist/index.d.ts", - "import": "./dist/index.js", - "default": "./dist/index.js" - } - }, - "publishConfig": { - "access": "public", - "registry": "https://registry.npmjs.org" - }, "scripts": { "prepare": "husky install", + "build": "turbo run build", + "build:package": "turbo run build --filter=@module-federation/vinext", + "check": "turbo run typecheck test build", + "dev": "turbo run dev", + "dev:host": "turbo run dev --filter=vinext-host", + "dev:island": "turbo run dev --filter=vinext-island", + "dev:remote": "turbo run dev --filter=vinext-remote", + "preview": "turbo run preview", + "test": "turbo run test", + "test:e2e": "playwright test --config=playwright.config.mjs", + "typecheck": "turbo run typecheck", "fmt": "oxfmt *", "fmt.check": "oxfmt --check *", - "build": "pnpm run build:apps", - "build:package": "tsc -p tsconfig.json", - "build:apps": "pnpm run build:package && pnpm --filter 'vinext-*' build", - "changeset": "changeset", - "check": "pnpm run typecheck && pnpm test && pnpm run build:apps", - "dev": "pnpm run build:package && pnpm --filter 'vinext-*' --parallel dev", - "dev:host": "pnpm run build:package && pnpm --filter vinext-host dev", - "dev:island": "pnpm --filter vinext-island dev", - "dev:remote": "pnpm --filter vinext-remote dev", - "preview": "pnpm run build:apps && pnpm --filter 'vinext-*' --parallel preview", - "test": "pnpm run build:package && node --test", - "test:e2e": "playwright test --config=playwright.config.mjs", - "typecheck": "tsc -p tsconfig.json --noEmit", - "prepack": "pnpm run build:package" - }, - "dependencies": { - "@module-federation/vite": "catalog:" + "changeset": "changeset" }, "devDependencies": { "@changesets/cli": "^2.31.1", "@playwright/test": "1.62.0", "husky": "9.1.7", "oxfmt": "0.63.0", - "typescript": "^7.0.2" - }, - "peerDependencies": { - "vinext": ">=1.0.0-beta.3" + "turbo": "2.11.7" }, "engines": { "node": ">=22.22.2" diff --git a/packages/vinext/LICENSE b/packages/vinext/LICENSE new file mode 100644 index 0000000..b0cebd8 --- /dev/null +++ b/packages/vinext/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2026 Module Federation + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/packages/vinext/README.md b/packages/vinext/README.md new file mode 100644 index 0000000..fa96042 --- /dev/null +++ b/packages/vinext/README.md @@ -0,0 +1,65 @@ +# @module-federation/vinext + +Thin Module Federation wrapper for vinext, built on +`@module-federation/vite`. + +## Install + +```sh +pnpm add @module-federation/vinext +``` + +## Configure + +Register federation before `vinext()` in `vite.config.ts`: + +```ts +import { federation } from "@module-federation/vinext"; +import { defineConfig } from "vite"; +import vinext from "vinext"; + +export default defineConfig({ + plugins: [ + federation({ + name: "host", + remotes: { + catalog: { + type: "module", + name: "catalog", + entry: "https://catalog.example.com/remoteEntry.js", + entryGlobalName: "catalog", + shareScope: "default", + }, + }, + }), + vinext(), + ], +}); +``` + +Remote example: + +```ts +federation({ + name: "catalog", + exposes: { + "./ProductCard": "./app/product-card.tsx", + }, +}); +``` + +The wrapper defaults `filename` to `remoteEntry.js`, injects host startup into +the entry (vinext has no conventional HTML entry), and shares `react` and +`react-dom` as singletons. Explicit options override every default. All +`@module-federation/vite` options remain available. + +The default export and `withModuleFederation` are aliases of `federation`. + +## Examples + +Runnable host, remote, and island applications live in +[`apps/`](https://github.com/module-federation/vinext/tree/main/apps). + +## License + +MIT diff --git a/packages/vinext/package.json b/packages/vinext/package.json new file mode 100644 index 0000000..853fe71 --- /dev/null +++ b/packages/vinext/package.json @@ -0,0 +1,54 @@ +{ + "name": "@module-federation/vinext", + "version": "0.0.0", + "description": "Module Federation integration for vinext", + "homepage": "https://github.com/module-federation/vinext/tree/main/packages/vinext#readme", + "bugs": { + "url": "https://github.com/module-federation/vinext/issues" + }, + "license": "MIT", + "repository": { + "type": "git", + "url": "git+https://github.com/module-federation/vinext.git", + "directory": "packages/vinext" + }, + "files": [ + "dist", + "README.md", + "LICENSE" + ], + "type": "module", + "sideEffects": false, + "main": "./dist/index.js", + "types": "./dist/index.d.ts", + "exports": { + ".": { + "types": "./dist/index.d.ts", + "import": "./dist/index.js", + "default": "./dist/index.js" + } + }, + "publishConfig": { + "access": "public", + "registry": "https://registry.npmjs.org" + }, + "scripts": { + "build": "tsc -p tsconfig.json", + "dev": "tsc -p tsconfig.json --watch --preserveWatchOutput", + "test": "node --test", + "typecheck": "tsc -p tsconfig.json --noEmit", + "prepack": "pnpm run build" + }, + "dependencies": { + "@module-federation/vite": "catalog:" + }, + "devDependencies": { + "typescript": "^7.0.2" + }, + "peerDependencies": { + "vinext": ">=1.0.0-beta.3" + }, + "engines": { + "node": ">=22.22.2" + } +} diff --git a/src/index.ts b/packages/vinext/src/index.ts similarity index 100% rename from src/index.ts rename to packages/vinext/src/index.ts diff --git a/test/package.test.js b/packages/vinext/test/package.test.js similarity index 100% rename from test/package.test.js rename to packages/vinext/test/package.test.js diff --git a/tsconfig.json b/packages/vinext/tsconfig.json similarity index 100% rename from tsconfig.json rename to packages/vinext/tsconfig.json diff --git a/playwright.config.mjs b/playwright.config.mjs index 053deb1..dbdde7e 100644 --- a/playwright.config.mjs +++ b/playwright.config.mjs @@ -17,5 +17,7 @@ export default defineConfig({ url: "http://localhost:4173", reuseExistingServer: !process.env.CI, timeout: 120_000, + // turbo runs each app in its own process group; SIGTERM lets it stop them. + gracefulShutdown: { signal: "SIGTERM", timeout: 10_000 }, }, }); diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 2a2aba6..fe6ac0b 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -13,13 +13,6 @@ catalogs: importers: .: - dependencies: - '@module-federation/vite': - specifier: 'catalog:' - version: 1.20.7(typescript@7.0.2)(vite@8.2.0(@types/node@20.19.43)(terser@5.49.0)) - vinext: - specifier: '>=1.0.0-beta.3' - version: 1.0.0-beta.4(@vitejs/plugin-react@6.0.5(vite@8.2.0(@types/node@20.19.43)(terser@5.49.0)))(@vitejs/plugin-rsc@0.5.29(react-dom@19.2.8(react@19.2.8))(react-server-dom-webpack@19.2.8(react-dom@19.2.8(react@19.2.8))(react@19.2.8)(webpack@5.109.2))(react@19.2.8)(vite@8.2.0(@types/node@20.19.43)(terser@5.49.0)))(next@16.1.6(@playwright/test@1.62.0)(react-dom@19.2.8(react@19.2.8))(react@19.2.8))(react-dom@19.2.8(react@19.2.8))(react-server-dom-webpack@19.2.8(react-dom@19.2.8(react@19.2.8))(react@19.2.8)(webpack@5.109.2))(react@19.2.8)(vite@8.2.0(@types/node@20.19.43)(terser@5.49.0)) devDependencies: '@changesets/cli': specifier: ^2.31.1 @@ -33,9 +26,9 @@ importers: oxfmt: specifier: 0.63.0 version: 0.63.0 - typescript: - specifier: ^7.0.2 - version: 7.0.2 + turbo: + specifier: 2.11.7 + version: 2.11.7 apps/host: dependencies: @@ -51,7 +44,7 @@ importers: devDependencies: '@module-federation/vinext': specifier: workspace:* - version: link:../.. + version: link:../../packages/vinext '@types/node': specifier: '20' version: 20.19.43 @@ -116,7 +109,7 @@ importers: devDependencies: '@module-federation/vinext': specifier: workspace:* - version: link:../.. + version: link:../../packages/vinext '@types/react': specifier: '19' version: 19.2.17 @@ -136,6 +129,19 @@ importers: specifier: 8.1.0 version: 8.1.0(@types/node@20.19.43)(terser@5.49.0) + packages/vinext: + dependencies: + '@module-federation/vite': + specifier: 'catalog:' + version: 1.20.7(typescript@7.0.2)(vite@8.2.0(@types/node@20.19.43)(terser@5.49.0)) + vinext: + specifier: '>=1.0.0-beta.3' + version: 1.0.0-beta.5(@vitejs/plugin-react@6.0.5(vite@8.2.0(@types/node@20.19.43)(terser@5.49.0)))(@vitejs/plugin-rsc@0.5.29(react-dom@19.2.8(react@19.2.8))(react-server-dom-webpack@19.2.8(react-dom@19.2.8(react@19.2.8))(react@19.2.8)(webpack@5.109.2))(react@19.2.8)(vite@8.2.0(@types/node@20.19.43)(terser@5.49.0)))(next@16.1.6(@playwright/test@1.62.0)(react-dom@19.2.8(react@19.2.8))(react@19.2.8))(react-dom@19.2.8(react@19.2.8))(react-server-dom-webpack@19.2.8(react-dom@19.2.8(react@19.2.8))(react@19.2.8)(webpack@5.109.2))(react@19.2.8)(vite@8.2.0(@types/node@20.19.43)(terser@5.49.0)) + devDependencies: + typescript: + specifier: ^7.0.2 + version: 7.0.2 + packages: '@babel/runtime@7.29.7': @@ -849,6 +855,36 @@ packages: '@swc/helpers@0.5.15': resolution: {integrity: sha512-JQ5TuMi45Owi4/BIMAJBoSQoOJu12oOk/gADqlcUL9JEdHB8vyjUSsxqeNXnmXHjYKMi2WcYtezGEEhqUI/E2g==} + '@turbo/darwin-64@2.11.7': + resolution: {integrity: sha512-Z2LFOxwbiJueD1miByXJS/BrW21vv6YaQXZustty5jEX4vQYw6zyh101Sz1QO7WG0mqBzKagZ/DoAeeujI0/Sw==} + cpu: [x64] + os: [darwin] + + '@turbo/darwin-arm64@2.11.7': + resolution: {integrity: sha512-Vhv8ybgIflosNDSSRD9fNXHlCFA60dsGyTqQmc7l28SEX5jOaweCCD4BBYNd8/p0WGkw3e7tZbfA9w6FsujGvw==} + cpu: [arm64] + os: [darwin] + + '@turbo/linux-64@2.11.7': + resolution: {integrity: sha512-rAqRp3blQKk1+ylMGlZHAW0eJjVNuuGUm4ZrC6RU1Im8tLryvaO4a2zLQ/FQi1TRlmKqKV9YXBki2YeytlLbXA==} + cpu: [x64] + os: [android, linux] + + '@turbo/linux-arm64@2.11.7': + resolution: {integrity: sha512-thVYGov7S+llXAxrl3kBb/efalav0xhrjl5NHCR6AfKx14JkbqaetvbVwyss4FvZ9rt+Pv3xsTb+8SIYix8DTg==} + cpu: [arm64] + os: [android, linux] + + '@turbo/windows-64@2.11.7': + resolution: {integrity: sha512-ZIoKT7J7KutgYl4bGxmmgeUQjG+7E0nY8BF9dxUOiMH2vdTsM4JQ2uSwTYFkTR2Llbg6ghGjSmuZ8LQtkLEYjg==} + cpu: [x64] + os: [win32] + + '@turbo/windows-arm64@2.11.7': + resolution: {integrity: sha512-88Xv2f7SLGVJ68lRRx8o375dKmnZYNdDtvlKcPA0kZpcF93eAQd8l96BKQ0/AMHG0bMJA0Z5QqoqtetxzNsC+g==} + cpu: [arm64] + os: [win32] + '@tybys/wasm-util@0.10.3': resolution: {integrity: sha512-F3fo1MYrRJYL3zER0OUOmkutjr1Vp23m7OsSgp7nq4SP6OqX6C/56XFIPAl5bt3zaBRjmW7SGz3u/6LwFpYcOg==} @@ -1923,6 +1959,10 @@ packages: turbo-stream@3.2.0: resolution: {integrity: sha512-EK+bZ9UVrVh7JLslVFOV0GEMsociOqVOvEMTAd4ixMyffN5YNIEdLZWXUx5PJqDbTxSIBWw04HS9gCY4frYQDQ==} + turbo@2.11.7: + resolution: {integrity: sha512-RhXHbqfvY6o3xt/zSHCwSNwLrZlXiqHzewi4eAj9PtZ1T1CqgMJ2yIDb7SKPTG9IikTm925mfzL6hldQVdyNWw==} + hasBin: true + typescript@5.9.3: resolution: {integrity: sha512-jl1vZzPDinLr9eUt3J/t7V6FgNEw9QjvBPdysz9KfQDD41fQrC2Y4vKQdiaUpFT4bXlb1RHhLpp8wtm6M5TgSw==} engines: {node: '>=14.17'} @@ -1956,26 +1996,6 @@ packages: peerDependencies: browserslist: '>= 4.21.0' - vinext@1.0.0-beta.4: - resolution: {integrity: sha512-2931dmPdXHTCnM4cliTxmJWnXXqoLKgU68qzjeD0lkqvv7cLO3IIvz/azrdBRmAXdhX2e6bmnpuw/9YaIxW7Eg==} - engines: {node: '>=22'} - hasBin: true - peerDependencies: - '@mdx-js/rollup': ^3.0.0 - '@vitejs/plugin-react': ^5.1.4 || ^6.0.0 - '@vitejs/plugin-rsc': ^0.5.26 - react: ^19.2.6 - react-dom: ^19.2.6 - react-server-dom-webpack: ^19.2.6 - vite: ^8.0.0 - peerDependenciesMeta: - '@mdx-js/rollup': - optional: true - '@vitejs/plugin-rsc': - optional: true - react-server-dom-webpack: - optional: true - vinext@1.0.0-beta.5: resolution: {integrity: sha512-c0I1UB70/pGwD9y4/iXWrGfz/LnowSbkQpUw+lK9t08tes5WHX7Vl0sZAY4MIzGaVCyvrD4/xZo7HWpMje6SwA==} engines: {node: '>=22'} @@ -2765,6 +2785,24 @@ snapshots: dependencies: tslib: 2.8.1 + '@turbo/darwin-64@2.11.7': + optional: true + + '@turbo/darwin-arm64@2.11.7': + optional: true + + '@turbo/linux-64@2.11.7': + optional: true + + '@turbo/linux-arm64@2.11.7': + optional: true + + '@turbo/windows-64@2.11.7': + optional: true + + '@turbo/windows-arm64@2.11.7': + optional: true + '@tybys/wasm-util@0.10.3': dependencies: tslib: 2.8.1 @@ -3720,6 +3758,15 @@ snapshots: turbo-stream@3.2.0: {} + turbo@2.11.7: + optionalDependencies: + '@turbo/darwin-64': 2.11.7 + '@turbo/darwin-arm64': 2.11.7 + '@turbo/linux-64': 2.11.7 + '@turbo/linux-arm64': 2.11.7 + '@turbo/windows-64': 2.11.7 + '@turbo/windows-arm64': 2.11.7 + typescript@5.9.3: {} typescript@7.0.2: @@ -3764,32 +3811,32 @@ snapshots: escalade: 3.2.0 picocolors: 1.1.1 - vinext@1.0.0-beta.4(@vitejs/plugin-react@6.0.5(vite@8.2.0(@types/node@20.19.43)(terser@5.49.0)))(@vitejs/plugin-rsc@0.5.29(react-dom@19.2.8(react@19.2.8))(react-server-dom-webpack@19.2.8(react-dom@19.2.8(react@19.2.8))(react@19.2.8)(webpack@5.109.2))(react@19.2.8)(vite@8.2.0(@types/node@20.19.43)(terser@5.49.0)))(next@16.1.6(@playwright/test@1.62.0)(react-dom@19.2.8(react@19.2.8))(react@19.2.8))(react-dom@19.2.8(react@19.2.8))(react-server-dom-webpack@19.2.8(react-dom@19.2.8(react@19.2.8))(react@19.2.8)(webpack@5.109.2))(react@19.2.8)(vite@8.2.0(@types/node@20.19.43)(terser@5.49.0)): + vinext@1.0.0-beta.5(@vitejs/plugin-react@6.0.0(vite@8.1.0(@types/node@20.19.43)(terser@5.49.0)))(@vitejs/plugin-rsc@0.5.29(react-dom@19.2.8(react@19.2.8))(react-server-dom-webpack@19.2.8(react-dom@19.2.8(react@19.2.8))(react@19.2.8)(webpack@5.109.2))(react@19.2.8)(vite@8.1.0(@types/node@20.19.43)(terser@5.49.0)))(next@16.1.6(@playwright/test@1.62.0)(react-dom@19.2.8(react@19.2.8))(react@19.2.8))(react-dom@19.2.8(react@19.2.8))(react-server-dom-webpack@19.2.8(react-dom@19.2.8(react@19.2.8))(react@19.2.8)(webpack@5.109.2))(react@19.2.8)(vite@8.1.0(@types/node@20.19.43)(terser@5.49.0)): dependencies: '@unpic/react': 1.0.2(next@16.1.6(@playwright/test@1.62.0)(react-dom@19.2.8(react@19.2.8))(react@19.2.8))(react-dom@19.2.8(react@19.2.8))(react@19.2.8) '@vercel/og': 0.8.6 '@vinext/types': 1.0.0-beta.2 - '@vitejs/plugin-react': 6.0.5(vite@8.2.0(@types/node@20.19.43)(terser@5.49.0)) + '@vitejs/plugin-react': 6.0.0(vite@8.1.0(@types/node@20.19.43)(terser@5.49.0)) image-size: 2.0.2 ipaddr.js: 2.4.0 magic-string: 0.30.21 react: 19.2.8 react-dom: 19.2.8(react@19.2.8) - vite: 8.2.0(@types/node@20.19.43)(terser@5.49.0) + vite: 8.1.0(@types/node@20.19.43)(terser@5.49.0) vite-plugin-commonjs: 0.10.4 web-vitals: 4.2.4 optionalDependencies: - '@vitejs/plugin-rsc': 0.5.29(react-dom@19.2.8(react@19.2.8))(react-server-dom-webpack@19.2.8(react-dom@19.2.8(react@19.2.8))(react@19.2.8)(webpack@5.109.2))(react@19.2.8)(vite@8.2.0(@types/node@20.19.43)(terser@5.49.0)) + '@vitejs/plugin-rsc': 0.5.29(react-dom@19.2.8(react@19.2.8))(react-server-dom-webpack@19.2.8(react-dom@19.2.8(react@19.2.8))(react@19.2.8)(webpack@5.109.2))(react@19.2.8)(vite@8.1.0(@types/node@20.19.43)(terser@5.49.0)) react-server-dom-webpack: 19.2.8(react-dom@19.2.8(react@19.2.8))(react@19.2.8)(webpack@5.109.2) transitivePeerDependencies: - next - vinext@1.0.0-beta.5(@vitejs/plugin-react@6.0.0(vite@8.1.0(@types/node@20.19.43)(terser@5.49.0)))(@vitejs/plugin-rsc@0.5.29(react-dom@19.2.8(react@19.2.8))(react-server-dom-webpack@19.2.8(react-dom@19.2.8(react@19.2.8))(react@19.2.8)(webpack@5.109.2))(react@19.2.8)(vite@8.1.0(@types/node@20.19.43)(terser@5.49.0)))(next@16.1.6(@playwright/test@1.62.0)(react-dom@19.2.8(react@19.2.8))(react@19.2.8))(react-dom@19.2.8(react@19.2.8))(react-server-dom-webpack@19.2.8(react-dom@19.2.8(react@19.2.8))(react@19.2.8)(webpack@5.109.2))(react@19.2.8)(vite@8.1.0(@types/node@20.19.43)(terser@5.49.0)): + vinext@1.0.0-beta.5(@vitejs/plugin-react@6.0.5(vite@8.1.0(@types/node@20.19.43)(terser@5.49.0)))(@vitejs/plugin-rsc@0.5.29(react-dom@19.2.8(react@19.2.8))(react-server-dom-webpack@19.2.8(react-dom@19.2.8(react@19.2.8))(react@19.2.8)(webpack@5.109.2))(react@19.2.8)(vite@8.1.0(@types/node@20.19.43)(terser@5.49.0)))(next@16.1.6(@playwright/test@1.62.0)(react-dom@19.2.8(react@19.2.8))(react@19.2.8))(react-dom@19.2.8(react@19.2.8))(react-server-dom-webpack@19.2.8(react-dom@19.2.8(react@19.2.8))(react@19.2.8)(webpack@5.109.2))(react@19.2.8)(vite@8.1.0(@types/node@20.19.43)(terser@5.49.0)): dependencies: '@unpic/react': 1.0.2(next@16.1.6(@playwright/test@1.62.0)(react-dom@19.2.8(react@19.2.8))(react@19.2.8))(react-dom@19.2.8(react@19.2.8))(react@19.2.8) '@vercel/og': 0.8.6 '@vinext/types': 1.0.0-beta.2 - '@vitejs/plugin-react': 6.0.0(vite@8.1.0(@types/node@20.19.43)(terser@5.49.0)) + '@vitejs/plugin-react': 6.0.5(vite@8.1.0(@types/node@20.19.43)(terser@5.49.0)) image-size: 2.0.2 ipaddr.js: 2.4.0 magic-string: 0.30.21 @@ -3804,22 +3851,22 @@ snapshots: transitivePeerDependencies: - next - vinext@1.0.0-beta.5(@vitejs/plugin-react@6.0.5(vite@8.1.0(@types/node@20.19.43)(terser@5.49.0)))(@vitejs/plugin-rsc@0.5.29(react-dom@19.2.8(react@19.2.8))(react-server-dom-webpack@19.2.8(react-dom@19.2.8(react@19.2.8))(react@19.2.8)(webpack@5.109.2))(react@19.2.8)(vite@8.1.0(@types/node@20.19.43)(terser@5.49.0)))(next@16.1.6(@playwright/test@1.62.0)(react-dom@19.2.8(react@19.2.8))(react@19.2.8))(react-dom@19.2.8(react@19.2.8))(react-server-dom-webpack@19.2.8(react-dom@19.2.8(react@19.2.8))(react@19.2.8)(webpack@5.109.2))(react@19.2.8)(vite@8.1.0(@types/node@20.19.43)(terser@5.49.0)): + vinext@1.0.0-beta.5(@vitejs/plugin-react@6.0.5(vite@8.2.0(@types/node@20.19.43)(terser@5.49.0)))(@vitejs/plugin-rsc@0.5.29(react-dom@19.2.8(react@19.2.8))(react-server-dom-webpack@19.2.8(react-dom@19.2.8(react@19.2.8))(react@19.2.8)(webpack@5.109.2))(react@19.2.8)(vite@8.2.0(@types/node@20.19.43)(terser@5.49.0)))(next@16.1.6(@playwright/test@1.62.0)(react-dom@19.2.8(react@19.2.8))(react@19.2.8))(react-dom@19.2.8(react@19.2.8))(react-server-dom-webpack@19.2.8(react-dom@19.2.8(react@19.2.8))(react@19.2.8)(webpack@5.109.2))(react@19.2.8)(vite@8.2.0(@types/node@20.19.43)(terser@5.49.0)): dependencies: '@unpic/react': 1.0.2(next@16.1.6(@playwright/test@1.62.0)(react-dom@19.2.8(react@19.2.8))(react@19.2.8))(react-dom@19.2.8(react@19.2.8))(react@19.2.8) '@vercel/og': 0.8.6 '@vinext/types': 1.0.0-beta.2 - '@vitejs/plugin-react': 6.0.5(vite@8.1.0(@types/node@20.19.43)(terser@5.49.0)) + '@vitejs/plugin-react': 6.0.5(vite@8.2.0(@types/node@20.19.43)(terser@5.49.0)) image-size: 2.0.2 ipaddr.js: 2.4.0 magic-string: 0.30.21 react: 19.2.8 react-dom: 19.2.8(react@19.2.8) - vite: 8.1.0(@types/node@20.19.43)(terser@5.49.0) + vite: 8.2.0(@types/node@20.19.43)(terser@5.49.0) vite-plugin-commonjs: 0.10.4 web-vitals: 4.2.4 optionalDependencies: - '@vitejs/plugin-rsc': 0.5.29(react-dom@19.2.8(react@19.2.8))(react-server-dom-webpack@19.2.8(react-dom@19.2.8(react@19.2.8))(react@19.2.8)(webpack@5.109.2))(react@19.2.8)(vite@8.1.0(@types/node@20.19.43)(terser@5.49.0)) + '@vitejs/plugin-rsc': 0.5.29(react-dom@19.2.8(react@19.2.8))(react-server-dom-webpack@19.2.8(react-dom@19.2.8(react@19.2.8))(react@19.2.8)(webpack@5.109.2))(react@19.2.8)(vite@8.2.0(@types/node@20.19.43)(terser@5.49.0)) react-server-dom-webpack: 19.2.8(react-dom@19.2.8(react@19.2.8))(react@19.2.8)(webpack@5.109.2) transitivePeerDependencies: - next diff --git a/pnpm-workspace.yaml b/pnpm-workspace.yaml index f1628dd..9ea8d3b 100644 --- a/pnpm-workspace.yaml +++ b/pnpm-workspace.yaml @@ -1,5 +1,5 @@ packages: - - "." + - "packages/*" - "apps/*" catalog: diff --git a/turbo.json b/turbo.json new file mode 100644 index 0000000..43b4ad0 --- /dev/null +++ b/turbo.json @@ -0,0 +1,31 @@ +{ + "$schema": "./node_modules/turbo/schema.json", + "ui": "stream", + "tasks": { + "build": { + "dependsOn": ["^build"], + "inputs": ["$TURBO_DEFAULT$", "!**/*.md", "!test/**"], + "outputs": ["dist/**", ".next/types/**"], + "outputLogs": "new-only" + }, + "typecheck": { + "dependsOn": ["^build"], + "inputs": ["$TURBO_DEFAULT$", "!**/*.md"], + "outputLogs": "errors-only" + }, + "test": { + "dependsOn": ["build"], + "outputLogs": "new-only" + }, + "dev": { + "dependsOn": ["^build"], + "cache": false, + "persistent": true + }, + "preview": { + "dependsOn": ["build"], + "cache": false, + "persistent": true + } + } +}