diff --git a/apps/docs/app/page.tsx b/apps/docs/app/page.tsx index fdc7efa..bf0d782 100644 --- a/apps/docs/app/page.tsx +++ b/apps/docs/app/page.tsx @@ -1,166 +1,148 @@ import { Code } from "bright"; import { StarIcon } from "lucide-react"; import type { Metadata } from "next"; -import { - Blockquote, - H1, - H2, - InlineCode, - Link, - P, - UnorderedList, -} from "~/components/typography"; +import { Blockquote, H1, H2, InlineCode, Link, P, UnorderedList } from "~/components/typography"; import { Button } from "~/components/ui/button"; import { Tabs, TabsContent, TabsList, TabsTrigger } from "~/components/ui/tabs"; export const metadata: Metadata = { - title: "One Version - A strict dependency conformance tool for monorepos!", - description: - "One Version is a strict dependency conformance tool for monorepos, managing dependencies across repos has never been easier!", - authors: [ - { - name: "Matt Hamlin", - url: "https://matthamlin.me", - }, - ], + title: "One Version - A strict dependency conformance tool for monorepos!", + description: + "One Version is a strict dependency conformance tool for monorepos, managing dependencies across repos has never been easier!", + authors: [ + { + name: "Matt Hamlin", + url: "https://matthamlin.me", + }, + ], }; Code.theme = { - dark: "github-dark", - light: "github-light", - lightSelector: "html.light", - darkSelector: "html.dark", + dark: "github-dark", + light: "github-light", + lightSelector: "html.light", + darkSelector: "html.dark", }; const sectionClasses = - "py-10 px-4 sm:px-6 md:px-8 lg:px-10 xl:px-12 2xl:px-14 max-w-[75ch] mx-auto min-h-[40vh] flex flex-col justify-center"; + "py-10 px-4 sm:px-6 md:px-8 lg:px-10 xl:px-12 2xl:px-14 max-w-[75ch] mx-auto min-h-[40vh] flex flex-col justify-center"; export default function Home() { - return ( -
-
-

One Version

-

- One Version is a strict dependency conformance tool for monorepos, - managing dependencies across repos has never been easier! -

-

- This tool ensures that all workspaces in your monorepo are using the - same version of a dependency, and also an (opt-in) strict versioning - strategy to ensure that all dependencies are pinned to an exact - version. -

+ return ( +
+
+

One Version

+

+ One Version is a strict dependency conformance tool for monorepos, managing dependencies across repos has + never been easier! +

+

+ This tool ensures that all workspaces in your monorepo are using the same version of a dependency, and also an + (opt-in) strict versioning strategy to ensure that all dependencies are pinned to an exact version. +

-
- - -
-
-
-

Installation

-

- Install one-version via your favorite package - manager: -

-
- - - Bun - Yarn - pnpm - npm - -
- - bun install one-version - - - yarn add one-version - - - pnpm install one-version - - - npm install one-version - -
-
-
-
-

- Notably! one-version should be installed at - the root of your monorepo. -

-
-
-
-

Usage:

-

- Once you've installed one-version, you - can add a one-version:check script in your - root package.json: -

- - {`{ + +
+
+

Installation

+

+ Install one-version via your favorite package manager: +

+
+ + + Bun + Yarn + pnpm + npm + +
+ + bun install one-version + + + yarn add one-version + + + pnpm install one-version + + + npm install one-version + +
+
+
+
+

+ Notably! one-version should be installed at the root of your monorepo. +

+
+
+
+

Usage:

+

+ Once you've installed one-version, you can add a{" "} + one-version:check script in your root package.json: +

+ + {`{ "scripts": { "one-version:check": "one-version check" } }`} - -

- You can now run bun run one-version:check (or - use whatever package manager you have setup) to check for version - conformance! -

-
-
-

Configuration:

-

- one-version can work out of the box without - any configuration at all, however if you'd like to allow specific - workspaces to use different versions of a dependency, you'll need - to add a configuration file. -

-

- one-version currently supports the following - package managers: -

- -
  • - bun -
  • -
  • - pnpm -
  • -
  • - npm - Greater than version 7.x -
  • -
  • - yarn-classic - Yarn version 1.x -
  • -
  • - yarn-berry - Yarn version 2.x, 3.x, 4.x -
  • -
  • - deno - When using{" "} - package.json -
  • -
    -

    - You can configure one-version via either a{" "} - one-version.config.jsonc or{" "} - one-version.config.json file. An example - configuration is provided below: -

    +
    +

    + You can now run bun run one-version:check{" "} + (or use whatever package manager you have setup) to check for version conformance! +

    +
    +
    +

    Configuration:

    +

    + one-version{" "} + can work out of the box without any configuration at all, however if you'd like to allow specific + workspaces to use different versions of a dependency, you'll need to add a configuration file. +

    +

    + one-version currently supports the following package managers: +

    + +
  • + bun +
  • +
  • + pnpm +
  • +
  • + npm - Greater than version 7.x +
  • +
  • + yarn-classic - Yarn version 1.x +
  • +
  • + yarn-berry - Yarn version 2.x, 3.x, 4.x +
  • +
  • + deno - When using package.json +
  • +
    +

    + You can configure one-version via either a{" "} + one-version.config.jsonc or one-version.config.json{" "} + file. An example configuration is provided below: +

    - - {`{ + + {`{ "$schema": "https://one-version.vercel.app/schema.json", // one of: "bun", "yarn-berry", "yarn-classic", "pnpm", "npm" // by default it will try to detect the package manager based on the presence of a lockfile @@ -178,62 +160,59 @@ export default function Home() { // meaning no ranges (\`^\`, \`~\`, \`.x\`, etc.) are allowed "versionStrategy": "pin" }`} - -
    -
    -

    Background and Inspiration:

    -

    - This package is a spiritual fork of the{" "} - - @wayfair/one-version - {" "} - package which I had contributed to while at Wayfair. -

    -

    - That package still works fine, but hasn't been maintained in some - time - and also doesn't support either{" "} - bun or npm. -

    -

    - Both this package and the original implement a version of - Google's One-Version Rule: -

    -
    -

    - For every dependency in [a] repository, there must be only one - version of that dependency to choose - - 1 - -

    -
    -

    - [1] -{" "} - - Software Engineering At Google - {" "} - - Winters, Manshreck and Wright, 2020, p. 341 -

    -
    - -
    - ); + + +
    +

    Background and Inspiration:

    +

    + This package is a spiritual fork of the{" "} + + @wayfair/one-version + {" "} + package which I had contributed to while at Wayfair. +

    +

    + That package still works fine, but hasn't been maintained in some time - and also doesn't support + either bun or npm. +

    +

    + Both this package and the original implement a version of Google's{" "} + One-Version Rule: +

    +
    +

    + For every dependency in [a] repository, there must be only one version of that dependency to choose + + 1 + +

    +
    +

    + [1] -{" "} + + Software Engineering At Google + {" "} + - Winters, Manshreck and Wright, 2020, p. 341 +

    +
    + + + ); }