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
21 changes: 21 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
version: 2

updates:
- package-ecosystem: "npm"
directory: "/"
schedule:
interval: "monthly"
day: "monday"
time: "06:00"
timezone: "UTC"
open-pull-requests-limit: 5
labels:
- "dependencies"
groups:
npm-production:
dependency-type: "production"
npm-development:
dependency-type: "development"
ignore:
- dependency-name: "@types/node*"
versions: [ ">=24" ]
26 changes: 26 additions & 0 deletions .github/workflows/pr.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: PR Check
on:
pull_request:
branches:
- main

jobs:
validate:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 'lts/*'

- name: Install dependencies
run: npm ci

- name: Check Formatting & Linting
run: npm run lint

- name: Run Tests
run: npm run test

- name: Test Build
run: npm run build
40 changes: 40 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
name: Publish Package
on:
push:
branches:
- main

jobs:
publish:
runs-on: ubuntu-latest
permissions:
contents: write
issues: write
pull-requests: write
id-token: write
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
fetch-tags: true
- uses: actions/setup-node@v4
with:
node-version: 'lts/*'

- name: Install dependencies
run: npm ci

- name: Check Formatting & Linting
run: npm run lint

- name: Build
run: npm run build

- name: Run Tests
run: npm run test

- name: Semantic Release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_CONFIG_PROVENANCE: true
run: npx semantic-release
9 changes: 9 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
node_modules
.vscode
.idea
.DS_Store
*.tgz
dist
playwright-report
test-results
tsconfig.tsbuildinfo
1 change: 1 addition & 0 deletions .husky/commit-msg
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
npx --no -- commitlint --edit $1
2 changes: 2 additions & 0 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
npm test
npx @biomejs/biome check --write --staged --no-errors-on-unmatched
1 change: 1 addition & 0 deletions .npmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
registry=https://registry.npmjs.org/
51 changes: 51 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
# Contributing to `playwright-page-object`

First off, thank you for being here! 🎉

I'm a solo maintainer working on this project in my free time, and I am thrilled that you want to help make it better. To keep things moving smoothly and respect everyone's time, I just have a few simple guidelines.

## 💡 The Golden Rule: Let's talk first!

**Bugs & Typos:** Did you find a bug, a typo, or something broken? Feel free to open a Pull Request directly! No need to ask.

**New Features & Big Changes:** Before you spend your valuable time writing code for a new feature, **please open an Issue first to discuss it.**
Why? Because I want to make sure your idea fits the vision of the project, doesn't duplicate ongoing work, and uses an architecture we agree on. I would hate to reject a massive PR that you spent hours on just because we didn't chat first!

## 🛠️ Local Development

Setting up the project is super simple. We don't have a massive web of tools—just install and build!

1. **Fork & Clone** the repository.
2. **Install dependencies:**
```bash
npm ci
```
3. **Run the dev watcher:**
```bash
npm run dev
```
*This uses `tsup` to instantly rebuild the MCP server whenever you save a file.*

## 🎨 Code Style (Zero Config!)

You don't need to configure your editor, set up ESLint, or worry about formatting rules. We use **Biome**.

Just write your code naturally. When you are ready to commit, our Husky pre-commit hook will automatically format your files and fix any basic linting errors in milliseconds.

If you want to run it manually before committing:
```bash
npm run lint:fix
```

## 📦 Committing & Publishing

We use automated releases, which means your commit messages dictate the version numbers and the changelog.

When you run `git commit`, you must use **Conventional Commits**:
* `feat: added a new tool` (Triggers a Minor release, e.g., 1.1.0)
* `fix: resolved crash on startup` (Triggers a Patch release, e.g., 1.0.1)
* `docs: updated readme` (No release triggered)

*(Don't worry, if you format it wrong, the terminal will kindly reject the commit and ask you to fix it!)*

Once your PR is merged into `main`, GitHub Actions will automatically compile the code, write the release notes, and publish the new version to NPM. You don't need to bump any version numbers in `package.json`.
22 changes: 22 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
MIT License

Copyright (c) 2026 Sergei Shmakov
https://github.com/sergeyshmakov

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
Loading