Skip to content

Commit

Permalink
Update Dependencies (#284)
Browse files Browse the repository at this point in the history
* chore: update actions

* chore: upgrade dependencies, cleanup

* run prettier

* chore: remove tailwindFunctions

* bump bundlesize
  • Loading branch information
joe-bell committed Apr 22, 2024
1 parent 1b1616a commit bfe6955
Show file tree
Hide file tree
Showing 27 changed files with 9,812 additions and 6,691 deletions.
37 changes: 35 additions & 2 deletions .config/.syncpackrc
Original file line number Diff line number Diff line change
@@ -1,13 +1,46 @@
{
"workspace": false,
"peer": false,
"$schema": "https://unpkg.com/syncpack@12.3.1/dist/schema.json",
"lintFormatting": false,
"lintSemverRanges": false,
"versionGroups": [
{
"label": "Use `workspace:*` protocol for local packages",
"packages": [
"docs-*",
"cva",
"class-variance-authority",
"@cva/**"
],
"dependencies": [
"cva",
"class-variance-authority"
],
"dependencyTypes": [
"!local"
],
"pinVersion": "workspace:*"
},
{
"label": "Use `latest` for examples",
"packages": [
"example-*"
],
"dependencies": [
"cva",
"class-variance-authority"
],
"dependencyTypes": [
"!local"
],
"pinVersion": "latest"
},
{
"label": "Keep all other dependencies in sync",
"packages": [
"**"
],
"dependencyTypes": [
"!peer"
]
}
]
Expand Down
3 changes: 3 additions & 0 deletions .config/vitest.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,8 @@ import { defineConfig } from "vitest/config";
export default defineConfig({
test: {
globals: true,
coverage: {
include: ["packages/**/src/**"],
},
},
});
6 changes: 2 additions & 4 deletions .github/actions/install/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@ description: "Common installation for Node.js and PNPM"
runs:
using: composite
steps:
- uses: pnpm/action-setup@v2
- uses: pnpm/action-setup@v3
with:
run_install: false

- uses: actions/setup-node@v3
- uses: actions/setup-node@v4
with:
cache: "pnpm"
node-version-file: ".nvmrc"
Expand All @@ -19,6 +19,4 @@ runs:

- name: Install dependencies
shell: bash
env:
SKIP_INSTALL_HUSKY: 1
run: pnpm i --frozen-lockfile
3 changes: 3 additions & 0 deletions .github/hooks/pre-commit
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#!/bin/sh

pnpm lint-staged
16 changes: 8 additions & 8 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: ./.github/actions/install
Expand All @@ -21,15 +21,15 @@ jobs:
bundlesize:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: ./.github/actions/install
- run: pnpm bundlesize
check:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: ./.github/actions/install
Expand All @@ -40,7 +40,7 @@ jobs:
pull-requests: write
if: github.event_name == 'pull_request' && github.actor_id == '7349341'
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: ./.github/actions/install
Expand All @@ -66,31 +66,31 @@ jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: ./.github/actions/install
- run: pnpm lint
prettier:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: ./.github/actions/install
- run: pnpm prettier --check .
syncpack:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: ./.github/actions/install
- run: pnpm syncpack
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: ./.github/actions/install
Expand Down
1 change: 0 additions & 1 deletion .husky/.gitignore

This file was deleted.

4 changes: 0 additions & 4 deletions .husky/pre-commit

This file was deleted.

2 changes: 1 addition & 1 deletion .nvmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
18.14.1
20.12.2
15 changes: 15 additions & 0 deletions .prettierrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
module.exports = {
plugins: [
"prettier-plugin-astro",
"prettier-plugin-packagejson",
"prettier-plugin-tailwindcss",
],
overrides: [
{
files: "*.astro",
options: {
parser: "astro",
},
},
],
};
16 changes: 0 additions & 16 deletions .prettierrc.json

This file was deleted.

21 changes: 11 additions & 10 deletions docs/beta/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,16 +11,17 @@
"start": "astro dev"
},
"dependencies": {
"@astrojs/check": "^0.2.1",
"@astrojs/starlight": "^0.11.1",
"@astrojs/starlight-tailwind": "^2.0.0",
"@astrojs/tailwind": "^5.0.2",
"@astrojs/vercel": "^5.0.2",
"astro": "^3.3.3",
"@astrojs/check": "^0.5.10",
"@astrojs/starlight": "^0.21.5",
"@astrojs/starlight-tailwind": "^2.0.2",
"@astrojs/tailwind": "^5.1.0",
"@astrojs/ts-plugin": "^1.6.1",
"@astrojs/vercel": "^7.5.3",
"astro": "^4.6.3",
"cva": "workspace:*",
"date-fns": "2.30.0",
"sharp": "^0.32.3",
"tailwindcss": "^3.3.3",
"typescript": "5.1.3"
"date-fns": "3.6.0",
"sharp": "^0.33.2",
"tailwindcss": "^3.4.3",
"typescript": "5.4.5"
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ const box = cva({
});

const root = cva({
base: "card border-solid border-slate-300 rounded",
base: "card rounded border-solid border-slate-300",
variants: {
shadow: {
md: "drop-shadow-md",
Expand Down
10 changes: 5 additions & 5 deletions docs/beta/src/content/docs/getting-started/variants.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -24,24 +24,24 @@ Use of Tailwind CSS is optional
import { cva } from "cva";

const button = cva({
base: "font-semibold border rounded",
base: "rounded border font-semibold",
// **or**
// base: ["font-semibold", "border", "rounded"],
variants: {
intent: {
primary: "bg-blue-500 text-white border-transparent hover:bg-blue-600",
primary: "border-transparent bg-blue-500 text-white hover:bg-blue-600",
// **or**
// primary: [
// "bg-blue-500",
// "text-white",
// "border-transparent",
// "hover:bg-blue-600",
// ],
secondary: "bg-white text-gray-800 border-gray-400 hover:bg-gray-100",
secondary: "border-gray-400 bg-white text-gray-800 hover:bg-gray-100",
},
size: {
small: "text-sm py-1 px-2",
medium: "text-base py-2 px-4",
small: "px-2 py-1 text-sm",
medium: "px-4 py-2 text-base",
},
},
compoundVariants: [
Expand Down
7 changes: 6 additions & 1 deletion docs/beta/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,12 @@
{
"extends": "astro/tsconfigs/strictest",
"compilerOptions": {
"skipLibCheck": true
"skipLibCheck": true,
"plugins": [
{
"name": "@astrojs/ts-plugin"
}
]
},
"include": ["src"],
"exclude": ["node_modules"]
Expand Down
6 changes: 3 additions & 3 deletions docs/latest/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@
"tiny-invariant": "1.3.1"
},
"devDependencies": {
"@types/node": "18.11.18",
"@types/react": "18.0.12",
"typescript": "5.1.3"
"@types/node": "20.12.7",
"@types/react": "18.2.79",
"typescript": "5.4.5"
}
}
11 changes: 6 additions & 5 deletions examples/astro-with-tailwindcss/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,15 @@
"start": "astro dev"
},
"dependencies": {
"@astrojs/check": "^0.2.1",
"@astrojs/tailwind": "^5.0.2",
"astro": "^3.3.3",
"@astrojs/check": "^0.5.10",
"@astrojs/tailwind": "^5.1.0",
"@astrojs/ts-plugin": "^1.6.1",
"astro": "^4.6.3",
"class-variance-authority": "latest",
"npm-run-all": "4.1.5",
"tailwindcss": "^3.3.3"
"tailwindcss": "^3.4.3"
},
"devDependencies": {
"typescript": "5.1.3"
"typescript": "5.4.5"
}
}
4 changes: 2 additions & 2 deletions examples/astro-with-tailwindcss/src/pages/index.astro
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ const sizes = [undefined, "medium", "small"] as const;
<table
class:list={[
"relative",
"w-max h-max",
"justify-self-center self-center",
"h-max w-max",
"self-center justify-self-center",
"[&_:where(th,td)]:p-2",
]}
>
Expand Down
9 changes: 8 additions & 1 deletion examples/astro-with-tailwindcss/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
{
"extends": "astro/tsconfigs/strictest"
"extends": "astro/tsconfigs/strictest",
"compilerOptions": {
"plugins": [
{
"name": "@astrojs/ts-plugin"
}
]
}
}
10 changes: 5 additions & 5 deletions examples/react-with-css-modules/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,10 @@
"react-dom": "18.2.0"
},
"devDependencies": {
"@types/react": "18.0.12",
"@types/react-dom": "18.0.5",
"@vitejs/plugin-react": "^3.1.0",
"typescript": "5.1.3",
"vite": "^4.1.0"
"@types/react": "18.2.79",
"@types/react-dom": "18.2.25",
"@vitejs/plugin-react": "^4.2.1",
"typescript": "5.4.5",
"vite": "^5.2.10"
}
}
16 changes: 8 additions & 8 deletions examples/react-with-tailwindcss/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,13 @@
"react-dom": "18.2.0"
},
"devDependencies": {
"@types/react": "18.0.12",
"@types/react-dom": "18.0.5",
"@vitejs/plugin-react": "^3.1.0",
"autoprefixer": "^10.4.13",
"postcss": "^8.4.21",
"tailwindcss": "^3.3.3",
"typescript": "5.1.3",
"vite": "^4.1.0"
"@types/react": "18.2.79",
"@types/react-dom": "18.2.25",
"@vitejs/plugin-react": "^4.2.1",
"autoprefixer": "^10.4.19",
"postcss": "^8.4.38",
"tailwindcss": "^3.4.3",
"typescript": "5.4.5",
"vite": "^5.2.10"
}
}
14 changes: 7 additions & 7 deletions examples/svelte/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,13 @@
"preview": "vite preview"
},
"devDependencies": {
"@sveltejs/vite-plugin-svelte": "^2.0.2",
"@tsconfig/svelte": "^4.0.1",
"@sveltejs/vite-plugin-svelte": "^3.1.0",
"@tsconfig/svelte": "^5.0.4",
"class-variance-authority": "latest",
"svelte": "^3.59.1",
"svelte-check": "^3.3.2",
"tslib": "^2.5.0",
"typescript": "5.1.3",
"vite": "^4.1.0"
"svelte": "^4.2.15",
"svelte-check": "^3.6.9",
"tslib": "^2.6.2",
"typescript": "5.4.5",
"vite": "^5.2.10"
}
}
Loading

0 comments on commit bfe6955

Please sign in to comment.