Skip to content

Commit 2c050e3

Browse files
committed
chore: release v1.25.0 with updated setup script, improved templates folder for all skills, agents, cursor-rules folders, and claude.md file
1 parent 4839c2e commit 2c050e3

29 files changed

Lines changed: 1533 additions & 208 deletions

.claude/agents

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
../agents
1+
../templates/agents
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
../../skills/vasu-playwright-utils
1+
../../templates/skills/vasu-playwright-utils
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
../../cursor-rules/playwright-agents.mdc
1+
../../templates/cursor-rules/playwright-agents.mdc

.cursor/rules/project.mdc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
../../cursor-rules/project.mdc
1+
../../templates/cursor-rules/project.mdc
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
../../cursor-rules/vasu-playwright-utils.mdc
1+
../../templates/cursor-rules/vasu-playwright-utils.mdc

CHANGELOG.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,22 @@
11
# Changelog
22

3+
## [1.25.0] - 2026-03-23
4+
5+
### Added
6+
7+
- **`templates/` directory:** All distributable assets (skills, agents, cursor rules, CLAUDE.md) consolidated under `templates/` for reliable npm publishing — no root-level `skills/`, `agents/`, or `cursor-rules/` directories needed.
8+
- **`templates/skills/playwright-cli/`:** Playwright CLI skill bundled in the package (SKILL.md + references: request-mocking, running-code, session-management, storage-state, test-generation, tracing, video-recording). Consumers no longer need a separate `npx @playwright/cli install --skills` step.
9+
- **`scripts/setup.js`:** Setup script moved from `bin/setup.js` to `scripts/setup.js`. New implementation copies all assets from `templates/` with no path rewriting at install time — cursor rule `@file` paths are pre-baked as `.claude/` paths in templates.
10+
- **`--force-claude` flag:** `npx vasu-pw-setup --force-claude` overwrites `CLAUDE.md` independently of `--force`, preserving customised project instructions by default.
11+
- **`sync:playwright-cli-skill` script:** `npm run sync:playwright-cli-skill` wipes and copies `.claude/skills/playwright-cli``templates/skills/playwright-cli` for maintainers to sync upstream skill updates before publishing.
12+
13+
### Changed
14+
15+
- **Cursor rules in `templates/`:** `@file` directives use `.claude/` paths directly, so no runtime path rewriting is needed during install.
16+
- **`templates/cursor-rules/playwright-agents.mdc`:** Updated inline locator reference from `` `skills/vasu-playwright-utils/references/locators.md` `` to `` `.claude/skills/vasu-playwright-utils/references/locators.md` ``.
17+
- **Dev symlinks:** `.claude/agents`, `.claude/skills/vasu-playwright-utils`, and all `.cursor/rules/*.mdc` symlinks updated to point into `templates/` instead of the former root-level directories.
18+
- **README:** Contributor symlink table updated to reflect `templates/` as source of truth; `--force-claude` flag documented; `sync:playwright-cli-skill` usage added.
19+
320
## [1.24.2] - 2026-03-18
421

522
### Added

README.md

Lines changed: 23 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -123,6 +123,12 @@ To update after upgrading the library, run the command again with `--force`:
123123
npx vasu-pw-setup --force
124124
```
125125

126+
`--force` overwrites skills, agents, and cursor rules. To also overwrite `CLAUDE.md` (which is normally preserved), add `--force-claude`:
127+
128+
```bash
129+
npx vasu-pw-setup --force --force-claude
130+
```
131+
126132
### How skills and agents are invoked
127133

128134
- **Claude Code** auto-discovers `.claude/skills/` and `.claude/agents/`. `CLAUDE.md` instructs the agent to use `playwright-cli` and `vasu-playwright-utils` skills when writing tests, and to follow agent workflows (Planner / Generator / Healer) when asked to plan, generate, or fix tests.
@@ -132,17 +138,27 @@ To test: ask the agent to "write a test case to login for https://example.com" (
132138

133139
### For contributors
134140

135-
Skills, agents, and cursor rules are pre-installed via symlinks — edit the source directories and changes are reflected everywhere:
141+
All distributable assets live under `templates/`. Symlinks make them available to Claude Code and Cursor during local development — edit the source in `templates/` and changes are reflected everywhere:
136142

137-
| Symlink | Source of truth |
138-
| ----------------------------------------- | ---------------------------------------- |
139-
| `.claude/skills/vasu-playwright-utils` | `skills/vasu-playwright-utils/` |
140-
| `.claude/agents` | `agents/` |
141-
| `.cursor/rules/playwright-agents.mdc` | `cursor-rules/playwright-agents.mdc` |
142-
| `.cursor/rules/vasu-playwright-utils.mdc` | `cursor-rules/vasu-playwright-utils.mdc` |
143+
| Symlink | Source of truth |
144+
| ----------------------------------------- | -------------------------------------------------- |
145+
| `.claude/skills/vasu-playwright-utils` | `templates/skills/vasu-playwright-utils/` |
146+
| `.claude/skills/playwright-cli` | `templates/skills/playwright-cli/` |
147+
| `.claude/agents` | `templates/agents/` |
148+
| `.cursor/rules/playwright-agents.mdc` | `templates/cursor-rules/playwright-agents.mdc` |
149+
| `.cursor/rules/vasu-playwright-utils.mdc` | `templates/cursor-rules/vasu-playwright-utils.mdc` |
150+
| `.cursor/rules/project.mdc` | `templates/cursor-rules/project.mdc` |
143151

144152
`.cursor/rules/project.mdc` loads `CLAUDE.md` into Cursor so both Claude Code and Cursor share the same project instructions.
145153

154+
#### Syncing `playwright-cli` skill into `templates/`
155+
156+
After refreshing the skill locally (e.g. `npx skills update microsoft/playwright-cli --skill playwright-cli -a claude-code` so `.claude/skills/playwright-cli` is current), sync it into templates and commit:
157+
158+
```bash
159+
npm run sync:playwright-cli-skill
160+
```
161+
146162
## Issues and Feedback
147163

148164
If you encounter any issues or have feedback, please [Raise an Issue](https://github.com/vasu31dev/playwright-ts-lib/issues) on GitHub.

bin/setup.js

Lines changed: 0 additions & 173 deletions
This file was deleted.

package.json

Lines changed: 9 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "vasu-playwright-utils",
3-
"version": "1.24.2",
3+
"version": "1.25.0",
44
"description": "Playwright Typescript Library with reusable utilities",
55
"main": "./dist/src/vasu-playwright-lib/index.js",
66
"types": "./dist/src/vasu-playwright-lib/index.d.ts",
@@ -40,27 +40,23 @@
4040
"access": "public"
4141
},
4242
"bin": {
43-
"vasu-pw-setup": "./bin/setup.js"
43+
"vasu-pw-setup": "scripts/setup.js"
4444
},
4545
"files": [
4646
"dist",
4747
"src",
4848
"eslint.config.base.mjs",
49-
"skills",
50-
"agents",
51-
"cursor-rules",
52-
"bin",
49+
"scripts",
5350
"templates"
5451
],
5552
"engines": {
5653
"node": ">=20.0.0"
5754
},
5855
"dependencies": {
5956
"@eslint/js": "^9.39.4",
60-
"@playwright/cli": "^0.1.1",
6157
"@types/node": "^25.5.0",
62-
"@typescript-eslint/eslint-plugin": "^8.57.1",
63-
"@typescript-eslint/parser": "^8.57.1",
58+
"@typescript-eslint/eslint-plugin": "^8.57.2",
59+
"@typescript-eslint/parser": "^8.57.2",
6460
"cross-env": "^10.1.0",
6561
"dotenv": "^17.3.1",
6662
"eslint": "^9.39.4",
@@ -81,12 +77,9 @@
8177
"peerDependencies": {
8278
"@playwright/test": ">=1.58.2"
8379
},
84-
"overrides": {
85-
"playwright": "^1.58.2"
86-
},
8780
"scripts": {
88-
"ncu:check": "npx npm-check-updates --reject \"eslint,@eslint/js\" --dep prod,dev,optional,peer && npx npm-check-updates \"eslint,@eslint/js\" --target minor --deep peer",
89-
"ncu:update": "npx npm-check-updates --reject \"eslint,@eslint/js\" --dep prod,dev,optional,peer -u && npx npm-check-updates \"eslint,@eslint/js\" --target minor --deep peer -u",
81+
"ncu:check": "npx npm-check-updates --reject \"eslint,@eslint/js,typescript\" --dep prod,dev,optional,peer && npx npm-check-updates \"eslint,@eslint/js\" --target minor --deep peer && npx npm-check-updates typescript --target minor",
82+
"ncu:update": "npx npm-check-updates --reject \"eslint,@eslint/js,typescript\" --dep prod,dev,optional,peer -u && npx npm-check-updates \"eslint,@eslint/js\" --target minor --deep peer -u && npx npm-check-updates typescript --target minor -u",
9083
"clean": "rimraf dist",
9184
"prebuild": "npm run clean",
9285
"build": "tsc -p tsconfig.build.json",
@@ -110,7 +103,8 @@
110103
"prepare": "husky",
111104
"format": "cross-env prettier --write 'src/**/*.ts' 'tests/**/*.ts' 'test-setup/**/*.ts' 'playwright.config.ts' '**/*.json' '**/*.md' '!package-lock.json' '!dist/**/*' '!build/**/*'",
112105
"postinstall": "playwright install chromium",
113-
"setup": "node bin/setup.js"
106+
"setup": "node scripts/setup.js",
107+
"sync:playwright-cli-skill": "rm -rf templates/skills/playwright-cli && cp -r .claude/skills/playwright-cli templates/skills/playwright-cli"
114108
},
115109
"husky": {
116110
"hooks": {

0 commit comments

Comments
 (0)