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
8 changes: 8 additions & 0 deletions .changeset/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# Changesets

Hello and welcome! This folder has been automatically generated by `@changesets/cli`, a build tool that works
with multi-package repos, or single-package repos to help you version and publish your code. You can
find the full documentation for it [in our repository](https://github.com/changesets/changesets)

We have a quick list of common questions to get you started engaging with this project in
[our documentation](https://github.com/changesets/changesets/blob/main/docs/common-questions.md)
16 changes: 16 additions & 0 deletions .changeset/config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
"$schema": "https://unpkg.com/@changesets/config@3.1.3/schema.json",
"changelog": [
"@changesets/changelog-github",
{
"repo": "marko-js/testing-library"
}
],
"commit": false,
"fixed": [],
"linked": [],
"access": "public",
"baseBranch": "main",
"updateInternalDependencies": "patch",
"ignore": []
}
5 changes: 5 additions & 0 deletions .changeset/sync-tooling.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@marko/testing-library": patch
---

Modernize tooling to match marko-js/prettier: ESLint flat config, Prettier 3, Husky 9, changesets, rolldown for bundling, and Vitest (jsdom + node projects via @marko/vite) for testing. Upgrade dependencies to latest (Marko 5, jsdom 29, @testing-library/jest-dom 6, TypeScript 6, etc.).
3 changes: 0 additions & 3 deletions .commitlintrc.json

This file was deleted.

6 changes: 0 additions & 6 deletions .eslintignore

This file was deleted.

32 changes: 0 additions & 32 deletions .eslintrc.json

This file was deleted.

3 changes: 0 additions & 3 deletions .fixpackrc

This file was deleted.

20 changes: 20 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
version: 2
updates:
- package-ecosystem: github-actions
directory: /
schedule:
interval: monthly
groups:
all:
patterns: ["*"]
- package-ecosystem: npm
directory: /
schedule:
interval: monthly
groups:
minor:
patterns: ["*"]
update-types: ["minor", "patch"]
major:
patterns: ["*"]
update-types: ["major"]
77 changes: 64 additions & 13 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,32 +2,83 @@ name: CI

on:
pull_request:
paths-ignore: ["**.md"]
types: [opened, synchronize]
push:
branches: ["main"]
paths-ignore: ["**.md"]
branches: [main]

concurrency:
group: "${{ github.workflow }}-${{ github.head_ref || github.ref }}"
cancel-in-progress: ${{ github.event_name == 'pull_request' }}

jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v6
- name: Install node
id: node
uses: actions/setup-node@v6
with:
node-version: lts/*
cache: npm
- name: Install packages (node@${{ steps.node.outputs.node-version }})
Comment thread
coderabbitai[bot] marked this conversation as resolved.
run: npm ci
- name: Run build
run: npm run @ci:build
- name: Run lint
run: npm run @ci:lint
test:
runs-on: ${{ matrix.os }}
name: "test: node ${{ matrix.node }} on ${{ matrix.os }}"
strategy:
fail-fast: false
matrix:
node: [20.x, 22.x, 24.x]
os: [ubuntu-latest, windows-latest]
node: [lts/*, lts/-1, lts/-2]
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Use node@${{ matrix.node }}
uses: actions/setup-node@v2
uses: actions/checkout@v6
- name: Install node
id: node
uses: actions/setup-node@v6
with:
node-version: ${{ matrix.node }}
- name: Install dependencies
cache: npm
- name: Install packages (node@${{ steps.node.outputs.node-version }})
run: npm ci
- name: Lint code
run: npm run lint
- name: Run tests
run: npm run ci:test
- name: Report code coverage
uses: codecov/codecov-action@v5
run: npm run @ci:test
- name: Report coverage
uses: codecov/codecov-action@v6
with:
token: ${{ secrets.CODECOV_TOKEN }}
slug: marko-js/testing-library
release:
runs-on: ubuntu-latest
needs: [build, test]
if: "${{ github.repository_owner == 'marko-js' && github.event_name == 'push' }}"
permissions:
id-token: write
contents: write
pull-requests: write
steps:
- name: Checkout code
uses: actions/checkout@v6
- name: Install node
id: node
uses: actions/setup-node@v6
with:
node-version: lts/*
cache: npm
- name: Install packages (node@${{ steps.node.outputs.node-version }})
run: npm ci
- name: Run release
uses: changesets/action@v1
with:
version: npm run @ci:version
publish: npm run @ci:release
commit: "[ci] release"
title: "[ci] release"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
18 changes: 4 additions & 14 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,18 +1,8 @@
# Editor
*.sublime*
.vscode

# OSX
*.actual*
*.DS_Store

# NPM
node_modules
npm-debug.log

# Build
dist
*.tsbuildinfo

# Coverage
coverage
.nyc_output
dist
node_modules
npm-debug.log
1 change: 0 additions & 1 deletion .husky/.gitignore

This file was deleted.

4 changes: 0 additions & 4 deletions .husky/commit-msg

This file was deleted.

5 changes: 1 addition & 4 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -1,4 +1 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"

npx --no-install lint-staged
npm exec lint-staged
2 changes: 1 addition & 1 deletion .lintstagedrc.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{
"*.ts": ["eslint -f codeframe --fix", "prettier --write"],
"*{.ts,.mjs}": ["eslint --fix", "prettier --write"],
"*{.js,.json,.md,.yml,rc}": ["prettier --write"]
}
7 changes: 1 addition & 6 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -1,9 +1,4 @@
.vscode
.nyc_output
package.json
package-lock.json
CHANGELOG.md
node_modules
coverage
dist
__snapshots__
__snapshots__
10 changes: 2 additions & 8 deletions .prettierrc.json
Original file line number Diff line number Diff line change
@@ -1,10 +1,4 @@
{
"overrides": [
{
"files": "*rc",
"options": {
"parser": "json"
}
}
]
"$schema": "https://json.schemastore.org/prettierrc",
"plugins": ["prettier-plugin-packagejson"]
}
Loading