Skip to content

Commit c4fb04c

Browse files
Merge pull request #1 from sergeyshmakov/initial
Initial commit of package
2 parents 531e156 + 7677834 commit c4fb04c

30 files changed

Lines changed: 11204 additions & 0 deletions

.github/dependabot.yml

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
version: 2
2+
3+
updates:
4+
- package-ecosystem: "npm"
5+
directory: "/"
6+
schedule:
7+
interval: "monthly"
8+
day: "monday"
9+
time: "06:00"
10+
timezone: "UTC"
11+
open-pull-requests-limit: 5
12+
labels:
13+
- "dependencies"
14+
groups:
15+
npm-production:
16+
dependency-type: "production"
17+
npm-development:
18+
dependency-type: "development"
19+
ignore:
20+
- dependency-name: "@types/node*"
21+
versions: [ ">=24" ]

.github/workflows/pr.yml

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
name: PR Check
2+
on:
3+
pull_request:
4+
branches:
5+
- main
6+
7+
jobs:
8+
validate:
9+
runs-on: ubuntu-latest
10+
steps:
11+
- uses: actions/checkout@v4
12+
- uses: actions/setup-node@v4
13+
with:
14+
node-version: 'lts/*'
15+
16+
- name: Install dependencies
17+
run: npm ci
18+
19+
- name: Check Formatting & Linting
20+
run: npm run lint
21+
22+
- name: Run Tests
23+
run: npm run test
24+
25+
- name: Test Build
26+
run: npm run build

.github/workflows/publish.yml

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
name: Publish Package
2+
on:
3+
push:
4+
branches:
5+
- main
6+
7+
jobs:
8+
publish:
9+
runs-on: ubuntu-latest
10+
permissions:
11+
contents: write
12+
issues: write
13+
pull-requests: write
14+
id-token: write
15+
steps:
16+
- uses: actions/checkout@v4
17+
with:
18+
fetch-depth: 0
19+
fetch-tags: true
20+
- uses: actions/setup-node@v4
21+
with:
22+
node-version: 'lts/*'
23+
24+
- name: Install dependencies
25+
run: npm ci
26+
27+
- name: Check Formatting & Linting
28+
run: npm run lint
29+
30+
- name: Build
31+
run: npm run build
32+
33+
- name: Run Tests
34+
run: npm run test
35+
36+
- name: Semantic Release
37+
env:
38+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
39+
NPM_CONFIG_PROVENANCE: true
40+
run: npx semantic-release

.gitignore

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
node_modules
2+
.vscode
3+
.idea
4+
.DS_Store
5+
*.tgz
6+
dist
7+
playwright-report
8+
test-results
9+
tsconfig.tsbuildinfo

.husky/commit-msg

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
npx --no -- commitlint --edit $1

.husky/pre-commit

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
npm test
2+
npx @biomejs/biome check --write --staged --no-errors-on-unmatched

.npmrc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
registry=https://registry.npmjs.org/

CONTRIBUTING.md

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
# Contributing to `playwright-page-object`
2+
3+
First off, thank you for being here! 🎉
4+
5+
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.
6+
7+
## 💡 The Golden Rule: Let's talk first!
8+
9+
**Bugs & Typos:** Did you find a bug, a typo, or something broken? Feel free to open a Pull Request directly! No need to ask.
10+
11+
**New Features & Big Changes:** Before you spend your valuable time writing code for a new feature, **please open an Issue first to discuss it.**
12+
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!
13+
14+
## 🛠️ Local Development
15+
16+
Setting up the project is super simple. We don't have a massive web of tools—just install and build!
17+
18+
1. **Fork & Clone** the repository.
19+
2. **Install dependencies:**
20+
```bash
21+
npm ci
22+
```
23+
3. **Run the dev watcher:**
24+
```bash
25+
npm run dev
26+
```
27+
*This uses `tsup` to instantly rebuild the MCP server whenever you save a file.*
28+
29+
## 🎨 Code Style (Zero Config!)
30+
31+
You don't need to configure your editor, set up ESLint, or worry about formatting rules. We use **Biome**.
32+
33+
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.
34+
35+
If you want to run it manually before committing:
36+
```bash
37+
npm run lint:fix
38+
```
39+
40+
## 📦 Committing & Publishing
41+
42+
We use automated releases, which means your commit messages dictate the version numbers and the changelog.
43+
44+
When you run `git commit`, you must use **Conventional Commits**:
45+
* `feat: added a new tool` (Triggers a Minor release, e.g., 1.1.0)
46+
* `fix: resolved crash on startup` (Triggers a Patch release, e.g., 1.0.1)
47+
* `docs: updated readme` (No release triggered)
48+
49+
*(Don't worry, if you format it wrong, the terminal will kindly reject the commit and ask you to fix it!)*
50+
51+
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`.

LICENSE

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
MIT License
2+
3+
Copyright (c) 2026 Sergei Shmakov
4+
https://github.com/sergeyshmakov
5+
6+
Permission is hereby granted, free of charge, to any person obtaining a copy
7+
of this software and associated documentation files (the "Software"), to deal
8+
in the Software without restriction, including without limitation the rights
9+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10+
copies of the Software, and to permit persons to whom the Software is
11+
furnished to do so, subject to the following conditions:
12+
13+
The above copyright notice and this permission notice shall be included in all
14+
copies or substantial portions of the Software.
15+
16+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
22+
SOFTWARE.

0 commit comments

Comments
 (0)