Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 16 additions & 11 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,10 @@ jobs:
docs: ${{ steps.filter.outputs.docs }}
steps:
- name: Checkout
uses: actions/checkout@v4
uses: actions/checkout@v5

- name: Check for file changes
uses: dorny/paths-filter@v3
uses: dorny/paths-filter@v4
id: filter
with:
filters: |
Expand All @@ -44,7 +44,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
uses: actions/checkout@v5

- name: Setup Bun
uses: oven-sh/setup-bun@v2
Expand All @@ -64,7 +64,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
uses: actions/checkout@v5

- name: Setup Bun
uses: oven-sh/setup-bun@v2
Expand Down Expand Up @@ -101,7 +101,7 @@ jobs:

- name: Upload artifacts
if: needs.changes.outputs.core == 'true'
uses: actions/upload-artifact@v4
uses: actions/upload-artifact@v6
with:
name: dist
path: packages/core/dist/
Expand All @@ -114,7 +114,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
uses: actions/checkout@v5

- name: Setup Bun
uses: oven-sh/setup-bun@v2
Expand All @@ -139,7 +139,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
uses: actions/checkout@v5

- name: Setup Bun
uses: oven-sh/setup-bun@v2
Expand All @@ -162,7 +162,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
uses: actions/checkout@v5

- name: Build test image
run: docker build -f Dockerfile.test -t shift-css-test .
Expand All @@ -186,7 +186,7 @@ jobs:

- name: Upload test artifacts
if: failure()
uses: actions/upload-artifact@v4
uses: actions/upload-artifact@v6
with:
name: playwright-report
path: packages/core/playwright-report/
Expand All @@ -199,7 +199,12 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
uses: actions/checkout@v5

- name: Setup Node.js
uses: actions/setup-node@v5
with:
node-version: '22'

- name: Setup Bun
uses: oven-sh/setup-bun@v2
Expand All @@ -223,7 +228,7 @@ jobs:

- name: Upload test artifacts
if: failure()
uses: actions/upload-artifact@v4
uses: actions/upload-artifact@v6
with:
name: docs-a11y-report
path: apps/docs/playwright-report/
Expand Down
11 changes: 10 additions & 1 deletion .github/workflows/deploy-docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,10 @@ on:
- "packages/core/tokens/**"
workflow_dispatch:

# Opt into Node.js 24 for actions that don't have native support yet
env:
FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: true

permissions:
contents: read
pages: write
Expand All @@ -24,7 +28,12 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
uses: actions/checkout@v5

- name: Setup Node.js
uses: actions/setup-node@v5
with:
node-version: '22'

- name: Setup Bun
uses: oven-sh/setup-bun@v2
Expand Down
12 changes: 8 additions & 4 deletions .github/workflows/release-please.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,10 @@ on:
- 'packages/cli/**'
workflow_dispatch:

# Opt into Node.js 24 for actions that don't have native support yet
env:
FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: true

permissions:
contents: write
pull-requests: write
Expand Down Expand Up @@ -39,15 +43,15 @@ jobs:
id-token: write # Required for OIDC
steps:
- name: Checkout
uses: actions/checkout@v4
uses: actions/checkout@v5

- name: Setup Bun
uses: oven-sh/setup-bun@v2
with:
bun-version: latest

- name: Setup Node.js
uses: actions/setup-node@v4
uses: actions/setup-node@v5
with:
node-version: '24'
registry-url: "https://registry.npmjs.org"
Expand Down Expand Up @@ -81,15 +85,15 @@ jobs:
id-token: write # Required for OIDC
steps:
- name: Checkout
uses: actions/checkout@v4
uses: actions/checkout@v5

- name: Setup Bun
uses: oven-sh/setup-bun@v2
with:
bun-version: latest

- name: Setup Node.js
uses: actions/setup-node@v4
uses: actions/setup-node@v5
with:
node-version: '24'
registry-url: "https://registry.npmjs.org"
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile.test
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM mcr.microsoft.com/playwright:v1.57.0-jammy
FROM mcr.microsoft.com/playwright:v1.58.2-jammy

# Install dependencies for Bun
RUN apt-get update && apt-get install -y unzip && rm -rf /var/lib/apt/lists/*
Expand Down
12 changes: 2 additions & 10 deletions apps/docs/astro.config.mjs
Original file line number Diff line number Diff line change
@@ -1,20 +1,12 @@
import mdx from '@astrojs/mdx';
import sitemap from '@astrojs/sitemap';
import critters from '@critters-rs/astro';
import { defineConfig } from 'astro/config';
import critters from 'astro-critters';

export default defineConfig({
site: 'https://getshiftcss.com',
base: '/',
integrations: [
mdx(),
sitemap(),
critters({
// Inline critical CSS for faster FCP
preload: 'swap', // Preload non-critical CSS with font-display swap
pruneSource: true, // Remove inlined CSS from external stylesheets
}),
],
integrations: [mdx(), sitemap(), critters()],
markdown: {
shikiConfig: {
theme: 'css-variables',
Expand Down
12 changes: 6 additions & 6 deletions apps/docs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,16 +11,16 @@
"test:a11y": "playwright test"
},
"dependencies": {
"@astrojs/mdx": "^4.2.6",
"@astrojs/mdx": "^5.0.3",
"@astrojs/sitemap": "^3.7.0",
"@shift-css/core": "workspace:*",
"astro": "^5.16.11"
"astro": "^6.1.1"
},
"devDependencies": {
"@astrojs/check": "^0.9.6",
"@axe-core/playwright": "^4.10.1",
"@playwright/test": "^1.49.1",
"astro-critters": "^2.2.1",
"@astrojs/check": "^0.9.8",
"@axe-core/playwright": "^4.11.1",
"@playwright/test": "^1.58.2",
"@critters-rs/astro": "^1.2.0",
"pagefind": "^1.4.0",
"typescript": "^5.9.3"
}
Expand Down
2 changes: 1 addition & 1 deletion apps/docs/src/components/BundleSize.astro
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ const cssPath = resolve(__dirname, '../../../../packages/core/dist', file);
let sizeKB = '?';
try {
const css = readFileSync(cssPath);
const gzipped = gzipSync(css);
const gzipped = gzipSync(Uint8Array.from(css));
const kb = gzipped.length / 1024;
sizeKB = kb < 10 ? `~${kb.toFixed(1)}KB` : `~${Math.round(kb)}KB`;
} catch (e) {
Expand Down
3 changes: 2 additions & 1 deletion apps/docs/src/content.config.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import { defineCollection, z } from 'astro:content';
import { defineCollection } from 'astro:content';
import { glob } from 'astro/loaders';
import { z } from 'astro/zod';

const docs = defineCollection({
loader: glob({ pattern: '**/*.mdx', base: './src/content/docs' }),
Expand Down
4 changes: 2 additions & 2 deletions apps/docs/src/pages/showcase/article.astro
Original file line number Diff line number Diff line change
Expand Up @@ -416,8 +416,8 @@ color: oklch(

/* Inline code styling */
code:not(pre code) {
background: light-dark(var(--s-neutral-100), var(--s-neutral-800));
color: var(--s-text-primary);
background: light-dark(var(--s-neutral-200), var(--s-neutral-800));
color: light-dark(var(--s-neutral-900), var(--s-neutral-100));
padding: 0.125em 0.375em;
border-radius: var(--s-radius-sm);
font-size: 0.9em;
Expand Down
2 changes: 1 addition & 1 deletion apps/docs/tests/accessibility.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* Crawls the documentation site and tests each page for WCAG 2.1 AA compliance.
*/

import AxeBuilder from '@axe-core/playwright';
import { AxeBuilder } from '@axe-core/playwright';
import { expect, test } from '@playwright/test';

interface PageResult {
Expand Down
2 changes: 1 addition & 1 deletion biome.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"$schema": "https://biomejs.dev/schemas/2.3.11/schema.json",
"$schema": "https://biomejs.dev/schemas/2.4.9/schema.json",
"assist": {
"actions": {
"source": {
Expand Down
Loading