diff --git a/.changeset/config.json b/.changeset/config.json index 67b4a918..22b480f9 100644 --- a/.changeset/config.json +++ b/.changeset/config.json @@ -1,15 +1,15 @@ { - "$schema": "https://unpkg.com/@changesets/config@2.3.0/schema.json", - "changelog": ["@changesets/changelog-github", { "repo": "t3-oss/t3-env" }], - "commit": false, - "access": "public", - "baseBranch": "main", - "updateInternalDependencies": "patch", - "fixed": [["@t3-oss/env-core", "@t3-oss/env-nextjs", "@t3-oss/env-nuxt"]], - "ignore": [ - "@examples/astro", - "@examples/nextjs", - "@examples/nuxt", - "@t3-env/docs" - ] + "$schema": "https://unpkg.com/@changesets/config@2.3.0/schema.json", + "changelog": ["@changesets/changelog-github", { "repo": "t3-oss/t3-env" }], + "commit": false, + "access": "public", + "baseBranch": "main", + "updateInternalDependencies": "patch", + "fixed": [["@t3-oss/env-core", "@t3-oss/env-nextjs", "@t3-oss/env-nuxt"]], + "ignore": [ + "@examples/astro", + "@examples/nextjs", + "@examples/nuxt", + "@t3-env/docs" + ] } diff --git a/.github/canary-version.js b/.github/canary-version.js index 1bbebd5e..84c159b3 100644 --- a/.github/canary-version.js +++ b/.github/canary-version.js @@ -2,39 +2,37 @@ import { exec } from "child_process"; import fs from "fs"; const pkgJsonPaths = [ - "packages/core/package.json", - "packages/nextjs/package.json", - "packages/nuxt/package.json", + "packages/core/package.json", + "packages/nextjs/package.json", + "packages/nuxt/package.json", ]; try { - exec("git rev-parse --short HEAD", (err, stdout) => { - if (err) { - console.log(err); - process.exit(1); - } - const commitHash = stdout.trim(); + exec("git rev-parse --short HEAD", (err, stdout) => { + if (err) { + console.log(err); + process.exit(1); + } + const commitHash = stdout.trim(); - for (const pkgJsonPath of pkgJsonPaths) { - const pkg = JSON.parse(fs.readFileSync(pkgJsonPath, "utf-8")); - const oldVersion = pkg.version; - const [major, minor, patch] = oldVersion.split(".").map(Number); - const newVersion = `${major}.${minor}.${ - patch + 1 - }-canary.${commitHash}`; + for (const pkgJsonPath of pkgJsonPaths) { + const pkg = JSON.parse(fs.readFileSync(pkgJsonPath, "utf-8")); + const oldVersion = pkg.version; + const [major, minor, patch] = oldVersion.split(".").map(Number); + const newVersion = `${major}.${minor}.${patch + 1}-canary.${commitHash}`; - pkg.version = newVersion; + pkg.version = newVersion; - const content = `${JSON.stringify(pkg, null, "\t")}\n`; - const newContent = content.replace( - new RegExp(`"@t3-oss/\\*": "${oldVersion}"`, "g"), - `"@t3-oss/*": "${newVersion}"`, - ); + const content = `${JSON.stringify(pkg, null, "\t")}\n`; + const newContent = content.replace( + new RegExp(`"@t3-oss/\\*": "${oldVersion}"`, "g"), + `"@t3-oss/*": "${newVersion}"`, + ); - fs.writeFileSync(pkgJsonPath, newContent); - } - }); + fs.writeFileSync(pkgJsonPath, newContent); + } + }); } catch (error) { - console.error(error); - process.exit(1); + console.error(error); + process.exit(1); } diff --git a/.vscode/settings.json b/.vscode/settings.json index 7dbc802e..092cd91e 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -1,5 +1,4 @@ { - "biome.lspBin": "node_modules/.bin/biome", "editor.codeActionsOnSave": { "quickfix.biome": "explicit", "source.organizeImports.biome": "explicit" diff --git a/biome.json b/biome.json index c714eb65..7cf22f20 100644 --- a/biome.json +++ b/biome.json @@ -1,42 +1,42 @@ { - "$schema": "https://biomejs.dev/schemas/1.5.3/schema.json", - "organizeImports": { - "enabled": true - }, - "formatter": { - "enabled": true, - "indentWidth": 4, - "indentStyle": "space" - }, - "linter": { - "enabled": true, + "$schema": "https://biomejs.dev/schemas/1.5.3/schema.json", + "organizeImports": { + "enabled": true + }, + "formatter": { + "enabled": true, + "indentWidth": 2, + "indentStyle": "space" + }, + "linter": { + "enabled": true, + "rules": { + "recommended": true, + "a11y": { + "noSvgWithoutTitle": "off", + "useButtonType": "off", + "useAltText": "off" + }, + "complexity": { + "noBannedTypes": "off" + } + } + }, + "overrides": [ + { + "include": ["**/*.test.ts"], + "linter": { "rules": { - "recommended": true, - "a11y": { - "noSvgWithoutTitle": "off", - "useButtonType": "off", - "useAltText": "off" - }, - "complexity": { - "noBannedTypes": "off" - } - } - }, - "overrides": [ - { - "include": ["**/*.test.ts"], - "linter": { - "rules": { - "suspicious": { - "noExplicitAny": "off" - } - } - } + "suspicious": { + "noExplicitAny": "off" + } } - ], - "vcs": { - "enabled": true, - "clientKind": "git", - "useIgnoreFile": true + } } + ], + "vcs": { + "enabled": true, + "clientKind": "git", + "useIgnoreFile": true + } } diff --git a/docs/mdx-components.tsx b/docs/mdx-components.tsx index e64c06ae..bd09ddd9 100644 --- a/docs/mdx-components.tsx +++ b/docs/mdx-components.tsx @@ -8,92 +8,92 @@ import { Codeblock } from "@/components/mdx/code-block"; // This file is required to use MDX in `app` directory. export function useMDXComponents(components: MDXComponents): MDXComponents { - return { - // Allows customizing built-in components, e.g. to add styling. - h1: ({ children, ...props }) => ( -

- {children} -

- ), - h2: ({ children, ...props }) => ( -

- - {children} - - -

- ), - h3: ({ children, ...props }) => ( -

- - {children} - - -

- ), - h4: ({ children, ...props }) => ( -

- - {children} - - -

- ), - p: (props) => ( -

- ), - a: ({ children, href }) => { - const isExternal = href?.startsWith("http"); - const Component = isExternal ? "a" : Link; - return ( - - {children} - - ); - }, - ul: (props) =>