Skip to content
Open
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
44 changes: 0 additions & 44 deletions .github/workflows/claude-code-review.yml

This file was deleted.

39 changes: 39 additions & 0 deletions .please/memory/session-summary.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
# Session Summary: TypeScript and Vitest Migration

## Feature Description
Migrate vercel-action from JavaScript to TypeScript with modern tooling:
1. Convert index.js to TypeScript (src/index.ts)
2. Replace Jest with Vitest for testing
3. Update @antfu/eslint-config for TypeScript support

## Requirements Summary
- TypeScript source files in `src/` directory
- Strict TypeScript mode enabled
- Delete deprecated `now.js` file
- Maintain backward compatibility with action inputs/outputs
- Keep dist/index.js as bundled output

## Constraints
- GitHub Action must remain functional
- Node 20 runtime requirement
- ncc bundling for dist/

## Current Phase: Codebase Exploration

## Key Decisions
- [x] Source directory: `src/`
- [x] TypeScript strict mode: enabled
- [x] Delete now.js: yes

## Files to Modify
- index.js → src/index.ts
- index.test.js → src/index.test.ts
- package.json (scripts, dependencies)
- eslint.config.mjs (TypeScript support)
- jest.config.js → vitest.config.ts
- action.yml (verify dist path)
- tsconfig.json (new)

## Progress
- [x] Phase 1: Discovery - Complete
- [ ] Phase 2: Codebase Exploration - In Progress
43 changes: 43 additions & 0 deletions .please/memory/tasklist.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
{
"session_id": "20251212-typescript-vitest-migration",
"feature_name": "TypeScript and Vitest Migration",
"created_at": "2025-12-12T00:00:00Z",
"updated_at": "2025-12-12T00:00:00Z",
"status": "in_progress",
"current_phase": 6,
"issue_number": 291,
"branch": "291-refactor-migrate-to-typescript-with-vitest-and-modern-tooling",
"phases": [
{ "number": 1, "name": "Discovery", "status": "completed", "started_at": "2025-12-12T00:00:00Z", "completed_at": "2025-12-12T00:01:00Z" },
{ "number": 2, "name": "Codebase Exploration", "status": "completed", "started_at": "2025-12-12T00:01:00Z", "completed_at": "2025-12-12T00:02:00Z" },
{ "number": 3, "name": "Clarifying Questions", "status": "completed", "completed_at": "2025-12-12T00:03:00Z" },
{ "number": 4, "name": "Architecture Design", "status": "completed", "completed_at": "2025-12-12T00:04:00Z" },
{ "number": 5, "name": "GitHub Issue & PR", "status": "completed", "completed_at": "2025-12-12T00:05:00Z" },
{ "number": 6, "name": "Implementation", "status": "completed", "completed_at": "2025-12-12T00:22:00Z" },
{ "number": 7, "name": "Quality Review", "status": "in_progress", "started_at": "2025-12-12T00:22:00Z" },
{ "number": 8, "name": "PR Finalization", "status": "pending" }
],
"tasks": [
{ "id": "T001", "title": "Create tsconfig.json with strict settings", "phase": 6, "status": "pending", "parallel": true, "dependencies": [] },
{ "id": "T002", "title": "Update package.json (add TypeScript, Vitest; remove Jest)", "phase": 6, "status": "pending", "parallel": true, "dependencies": [] },
{ "id": "T003", "title": "Update eslint.config.mjs for TypeScript + Vitest globals", "phase": 6, "status": "pending", "parallel": true, "dependencies": [] },
{ "id": "T004", "title": "Create vitest.config.ts", "phase": 6, "status": "pending", "parallel": true, "dependencies": [] },
{ "id": "T005", "title": "Create src/utils.ts with pure utility functions", "phase": 6, "status": "pending", "parallel": false, "dependencies": ["T001", "T002", "T003", "T004"] },
{ "id": "T006", "title": "Create src/__tests__/utils.test.ts with unit tests", "phase": 6, "status": "pending", "parallel": false, "dependencies": ["T005"] },
{ "id": "T007", "title": "Create src/index.ts with main action logic", "phase": 6, "status": "pending", "parallel": false, "dependencies": ["T005"] },
{ "id": "T008", "title": "Upgrade @actions/github to v6 and update API calls", "phase": 6, "status": "pending", "parallel": false, "dependencies": ["T007"] },
{ "id": "T009", "title": "Create src/__tests__/index.test.ts", "phase": 6, "status": "pending", "parallel": false, "dependencies": ["T007", "T008"] },
{ "id": "T010", "title": "Delete old files (index.js, index.test.js, jest.config.js, now.js)", "phase": 6, "status": "pending", "parallel": false, "dependencies": ["T007", "T009"] },
{ "id": "T011", "title": "Build and verify dist/index.js", "phase": 6, "status": "pending", "parallel": false, "dependencies": ["T010"] },
{ "id": "T012", "title": "Run all quality checks (lint, typecheck, test)", "phase": 6, "status": "pending", "parallel": false, "dependencies": ["T011"] }
],
"decisions": {
"source_directory": "src/",
"keep_now_js": false,
"typescript_strict": true,
"modularize": false,
"add_comprehensive_tests": true,
"upgrade_github_api": true,
"split_utils": true
}
}
4 changes: 4 additions & 0 deletions dist/config.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
import type { ActionConfig, OctokitClient } from './types';
export declare function getActionConfig(): ActionConfig;
export declare function createOctokitClient(githubToken: string): OctokitClient | undefined;
export declare function setVercelEnv(config: ActionConfig): void;
1 change: 1 addition & 0 deletions dist/config.d.ts.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions dist/github-comments.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
import type { ActionConfig, OctokitClient } from './types';
export declare function createCommentOnCommit(octokit: OctokitClient, config: ActionConfig, deploymentCommit: string, deploymentUrl: string, deploymentName: string): Promise<void>;
export declare function createCommentOnPullRequest(octokit: OctokitClient, config: ActionConfig, deploymentCommit: string, deploymentUrl: string, deploymentName: string): Promise<void>;
1 change: 1 addition & 0 deletions dist/github-comments.d.ts.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions dist/index.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export {};
1 change: 1 addition & 0 deletions dist/index.d.ts.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading
Loading