Skip to content
Closed
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
33 changes: 12 additions & 21 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,31 +12,22 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v4
- uses: oven-sh/setup-bun@v2
with:
version: 9
- uses: actions/setup-node@v4
with:
node-version: 22
cache: pnpm
- run: pnpm install --frozen-lockfile
- run: pnpm build
- run: pnpm lint
bun-version: latest
- run: bun install --frozen-lockfile
- run: bun run build
- run: bun run lint

# Advisory: builds the non-shipped demo app. Not a merge gate (continue-on-error)
# until the playground's Astro 5 upgrade + demo fixes land (#15).
# Builds the non-shipped Vite demo app to catch demo regressions against the
# library's source-aliased entry points.
playground:
runs-on: ubuntu-latest
continue-on-error: true
steps:
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v4
with:
version: 9
- uses: actions/setup-node@v4
- uses: oven-sh/setup-bun@v2
with:
node-version: 22
cache: pnpm
- run: pnpm install --frozen-lockfile
- run: pnpm build
- run: pnpm --filter playground build
bun-version: latest
- run: bun install --frozen-lockfile
- run: bun run build
- run: bun --filter playground build
2 changes: 1 addition & 1 deletion biome.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
".vscode/**",
".husky/**",
".tldr/**",
"pnpm-lock.yaml",
"bun.lock",
"bun.lockb",
"**/*.md",
"**/*.mdx",
Expand Down
451 changes: 451 additions & 0 deletions bun.lock

Large diffs are not rendered by default.

33 changes: 13 additions & 20 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,23 +24,22 @@
"./dist/*": "./dist/*"
},
"scripts": {
"build": "pnpm build:core && pnpm build:all",
"build": "bun run build:core && bun run build:all",
"build:core": "tsup --config tsup.core.ts",
"build:all": "tsup",
"lint": "biome check packages",
"format": "biome format --write .",
"check": "biome check .",
"dev": "pnpm run -w --parallel /^dev:.*/",
"dev": "bun --filter playground dev",
"dev:build": "tsup --watch",
"dev:playground": "pnpm --filter playground dev",
"readme": "node ./scripts/update-readme.js",
"version:dev": "npm version prerelease --preid dev --force --no-git-tag-version",
"version:patch": "npm version patch --force --no-git-tag-version",
"version:minor": "npm version minor --force --no-git-tag-version",
"version:major": "npm version major --force --no-git-tag-version",
"postversion": "pnpm build && pnpm readme",
"publish:main": "npm publish",
"publish:dev": "npm publish --tag dev"
"version:dev": "bun pm version prerelease --preid dev --force --no-git-tag-version",
"version:patch": "bun pm version patch --force --no-git-tag-version",
"version:minor": "bun pm version minor --force --no-git-tag-version",
"version:major": "bun pm version major --force --no-git-tag-version",
"postversion": "bun run build && bun run readme",
"publish:main": "bun publish",
"publish:dev": "bun publish --tag dev"
},
"files": [
"dist"
Expand Down Expand Up @@ -81,14 +80,8 @@
"optional": true
}
},
"pnpm": {
"overrides": {
"esbuild": ">=0.25.0",
"rollup": ">=4.59.0",
"glob": ">=10.5.0",
"minimatch": ">=9.0.7",
"picomatch": ">=4.0.4",
"brace-expansion": ">=2.0.3"
}
}
"workspaces": [
"packages/*",
"playground"
]
}
1 change: 0 additions & 1 deletion packages/react/index.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
// This file serves as an entry point for the package
export * from './src/types'
export { useTempus } from './src/use-tempus'
export { ReactTempus } from './src/components'
2 changes: 1 addition & 1 deletion packages/react/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "tempus-react",
"type": "module",
"dependencies": {
"tempus": "workspace:tempus*"
"tempus": "workspace:*"
},
"devDependencies": {
"react": "^18.2.0",
Expand Down
Empty file removed packages/react/src/types.ts
Empty file.
1 change: 1 addition & 0 deletions playground/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
"tempus": "workspace:*"
},
"devDependencies": {
"@types/node": "^22.10.0",
"@types/react": "^18.3.4",
"@types/react-dom": "^18.3.0",
"@vitejs/plugin-react": "^4.3.4",
Expand Down
8 changes: 7 additions & 1 deletion playground/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,13 @@
"strict": true,
"skipLibCheck": true,
"noEmit": true,
"types": ["vite/client"]
"types": ["vite/client", "node"],
"baseUrl": ".",
"paths": {
"tempus/profiler": ["../packages/core/profiler.ts"],
"tempus/react": ["../packages/react/index.ts"],
"tempus": ["../packages/core/index.ts"]
}
},
"include": ["**/*.ts", "**/*.tsx", "vite.config.ts"],
"exclude": ["dist", "node_modules"]
Expand Down
4 changes: 4 additions & 0 deletions playground/vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,10 @@ export default defineConfig({
host: true,
},
build: {
// Dev playground — target modern browsers and skip downleveling. Avoids
// esbuild lowering destructuring-with-defaults (e.g. in profiler.ts) to a
// legacy target, which it can't always transform.
target: 'esnext',
rollupOptions: {
input: {
main: src('./index.html'),
Expand Down
Loading
Loading