build(deps): update latest
All checks were successful
Chromatic / chromatic (push) Successful in 2m11s
CI / ci (push) Successful in 3m20s
CI / commitlint (push) Successful in 17s

This commit is contained in:
Théo LUDWIG 2024-07-29 19:38:21 +02:00
parent ccd44c10fa
commit 89ec7443a0
Signed by: theoludwig
GPG Key ID: ADFE5A563D718F3B
20 changed files with 1179 additions and 1089 deletions

View File

@ -17,7 +17,7 @@
},
"dependencies": {
"@repo/wikipedia-game-solver": "workspace:*",
"@repo/constants": "workspace:*",
"@repo/utils": "workspace:*",
"tsx": "catalog:"
},
"devDependencies": {

View File

@ -2,7 +2,7 @@
import { add } from "#abc/def/add.js"
import { VERSION } from "@repo/constants"
import { VERSION } from "@repo/utils/constants"
import { sum } from "@repo/wikipedia-game-solver/wikipedia-api"
console.log("Hello, world!")

View File

@ -1,5 +1,5 @@
import "@repo/config-tailwind/styles.css"
import { VERSION } from "@repo/constants"
import { VERSION } from "@repo/utils/constants"
import type { Locale, LocaleProps } from "@repo/i18n/config"
import { LOCALES } from "@repo/i18n/config"
import { Footer } from "@repo/ui/Footer"

View File

@ -15,7 +15,7 @@
},
"dependencies": {
"@repo/config-tailwind": "workspace:*",
"@repo/constants": "workspace:*",
"@repo/utils": "workspace:*",
"@repo/i18n": "workspace:*",
"@repo/ui": "workspace:*",
"@repo/wikipedia-game-solver": "workspace:*",

View File

@ -2,11 +2,7 @@ import sharedConfig from "@repo/config-tailwind"
/** @type {Pick<import('tailwindcss').Config, "presets" | "content">} */
const config = {
content: [
"./**/*.tsx",
"../../packages/ui/**/*.tsx",
"../../packages/wikipedia-game-solver/**/*.tsx",
],
content: ["./**/*.tsx", "../../packages/**/*.tsx"],
presets: [sharedConfig],
}

View File

@ -1,17 +0,0 @@
{
"name": "@repo/constants",
"version": "1.0.0-staging.1",
"private": true,
"type": "module",
"exports": {
".": "./version.ts"
},
"scripts": {
"lint:typescript": "tsc --noEmit"
},
"devDependencies": {
"@repo/config-typescript": "workspace:*",
"@types/node": "catalog:",
"typescript": "catalog:"
}
}

View File

@ -19,7 +19,7 @@
},
"dependencies": {
"@repo/config-tailwind": "workspace:*",
"@repo/constants": "workspace:*",
"@repo/utils": "workspace:*",
"@repo/i18n": "workspace:*",
"@repo/react-hooks": "workspace:*",
"cva": "catalog:",

View File

@ -1,6 +1,6 @@
import { useTranslations } from "next-intl"
import { GIT_REPO_LINK } from "@repo/constants"
import { GIT_REPO_LINK } from "@repo/utils/constants"
import { Link } from "../design/Link/Link"
export interface FooterProps {

View File

@ -0,0 +1,14 @@
{
"root": true,
"extends": ["@repo/eslint-config"],
"overrides": [
{
"files": ["*.ts", "*.tsx"],
"plugins": ["@typescript-eslint"],
"parser": "@typescript-eslint/parser",
"parserOptions": {
"project": true
}
}
]
}

View File

@ -0,0 +1,28 @@
{
"name": "@repo/utils",
"version": "3.3.2",
"private": true,
"type": "module",
"exports": {
"./constants": "./src/constants.ts",
"./dates": "./src/dates.ts",
"./strings": "./src/strings.ts"
},
"scripts": {
"lint:eslint": "eslint src --max-warnings 0 --report-unused-disable-directives",
"lint:typescript": "tsc --noEmit",
"test": "vitest run",
"test:ui": "vitest --ui --no-open"
},
"devDependencies": {
"@repo/eslint-config": "workspace:*",
"@repo/config-typescript": "workspace:*",
"@types/node": "catalog:",
"@total-typescript/ts-reset": "catalog:",
"@vitest/coverage-istanbul": "catalog:",
"@vitest/ui": "catalog:",
"eslint": "catalog:",
"typescript": "catalog:",
"vitest": "catalog:"
}
}

View File

@ -1,4 +1,4 @@
import packageJSON from "./package.json"
import packageJSON from "../package.json"
export const VERSION =
process.env["NODE_ENV"] === "development"

View File

@ -0,0 +1,10 @@
/**
* Returns a date as a string value in ISO format (without time information).
*
* @param date
* @returns
* @example getISODate(new Date("2012-05-23")) // "2012-05-23"
*/
export const getISODate = (date: Date): string => {
return date.toISOString().slice(0, 10)
}

View File

@ -0,0 +1,3 @@
export const capitalize = (string: string): string => {
return string.charAt(0).toUpperCase() + string.slice(1)
}

View File

@ -0,0 +1,17 @@
import { describe, expect, it } from "vitest"
import { getISODate } from "../dates.js"
describe("getISODate", () => {
it("should return the correct date in ISO format (e.g: 2012-05-23)", () => {
// Arrange - Given
const input = new Date("2012-05-23")
// Act - When
const output = getISODate(input)
// Assert - Then
const expected = "2012-05-23"
expect(output).toEqual(expected)
})
})

View File

@ -0,0 +1,41 @@
import { describe, expect, it } from "vitest"
import { capitalize } from "../strings.js"
describe("capitalize", () => {
it("should capitalize the first letter of a string", () => {
// Arrange - Given
const input = "hello, world!"
// Act - When
const output = capitalize(input)
// Assert - Then
const expected = "Hello, world!"
expect(output).toEqual(expected)
})
it("should return an empty string when the input is an empty string", () => {
// Arrange - Given
const input = ""
// Act - When
const output = capitalize(input)
// Assert - Then
const expected = ""
expect(output).toEqual(expected)
})
it("should return the same string when the first letter is already capitalized", () => {
// Arrange - Given
const input = "Hello, world!"
// Act - When
const output = capitalize(input)
// Assert - Then
const expected = "Hello, world!"
expect(output).toEqual(expected)
})
})

View File

@ -2,9 +2,12 @@
"extends": "@repo/config-typescript/tsconfig.json",
"compilerOptions": {
"target": "ESNext",
"module": "ESNext",
"moduleResolution": "Bundler",
"module": "NodeNext",
"moduleResolution": "NodeNext",
"resolveJsonModule": true,
"lib": ["ESNext"],
"types": ["@types/node", "@total-typescript/ts-reset"],
"noEmit": true
}
}

View File

@ -0,0 +1,11 @@
import { defineConfig } from "vitest/config"
export default defineConfig({
test: {
coverage: {
enabled: true,
provider: "istanbul",
all: false,
},
},
})

View File

@ -2,7 +2,7 @@ import { describe, expect, it } from "vitest"
import { sum } from "../wikipedia-api"
describe("wikipedia-game-solver", () => {
describe("sum", () => {
it("adds 1 + 2 to equal 3", () => {
expect(sum(1, 2)).toBe(3)
})

2058
pnpm-lock.yaml generated

File diff suppressed because it is too large Load Diff

View File

@ -20,49 +20,49 @@ catalog:
# TypeScript
"typescript": "5.5.4"
"@total-typescript/ts-reset": "0.5.1"
"@types/node": "20.14.12"
"@types/node": "22.0.0"
"tsx": "4.16.2"
# ESLint
"@typescript-eslint/eslint-plugin": "7.17.0"
"@typescript-eslint/parser": "7.17.0"
"@typescript-eslint/eslint-plugin": "7.18.0"
"@typescript-eslint/parser": "7.18.0"
"eslint": "8.57.0"
"eslint-config-conventions": "14.3.0"
"eslint-plugin-promise": "6.5.1"
"eslint-plugin-unicorn": "54.0.0"
"eslint-config-conventions": "14.4.0"
"eslint-plugin-promise": "7.0.0"
"eslint-plugin-unicorn": "55.0.0"
"eslint-config-next": "14.2.5"
"eslint-plugin-storybook": "0.8.0"
"eslint-plugin-tailwindcss": "3.17.4"
# Storybook
"@chromatic-com/storybook": "1.6.1"
"@storybook/addon-a11y": "8.2.5"
"@storybook/addon-essentials": "8.2.5"
"@storybook/addon-interactions": "8.2.5"
"@storybook/addon-links": "8.2.5"
"@storybook/addon-storysource": "8.2.5"
"@storybook/addon-themes": "8.2.5"
"@storybook/blocks": "8.2.5"
"@storybook/nextjs": "8.2.5"
"@storybook/react": "8.2.5"
"@storybook/test": "8.2.5"
"@storybook/addon-a11y": "8.2.6"
"@storybook/addon-essentials": "8.2.6"
"@storybook/addon-interactions": "8.2.6"
"@storybook/addon-links": "8.2.6"
"@storybook/addon-storysource": "8.2.6"
"@storybook/addon-themes": "8.2.6"
"@storybook/blocks": "8.2.6"
"@storybook/nextjs": "8.2.6"
"@storybook/react": "8.2.6"
"@storybook/test": "8.2.6"
"@storybook/test-runner": "0.19.1"
"chromatic": "11.5.6"
"http-server": "14.1.1"
"storybook": "8.2.5"
"storybook": "8.2.6"
"storybook-dark-mode": "4.0.2"
# Testing
"@playwright/test": "1.45.3"
"axe-playwright": "2.0.1"
"start-server-and-test": "2.0.4"
"start-server-and-test": "2.0.5"
"@vitest/coverage-istanbul": "2.0.4"
"@vitest/ui": "2.0.4"
"vitest": "2.0.4"
# CSS
"postcss": "8.4.39"
"tailwindcss": "3.4.6"
"postcss": "8.4.40"
"tailwindcss": "3.4.7"
"@fontsource/montserrat": "5.0.18"
"clsx": "2.1.0"
"cva": "1.0.0-beta.1"