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
11 changes: 8 additions & 3 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,14 +19,19 @@ jobs:
contents: read
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- name: Checkout repository
uses: actions/checkout@v6
- name: Install pnpm
uses: pnpm/action-setup@v4
with:
version: 10
- name: Install Node.js
uses: actions/setup-node@v6
with:
node-version: latest
cache: 'npm'
cache: 'pnpm'
- name: Install dependencies
run: npm ci --verbose
run: pnpm install --frozen-lockfile
- name: Setup Pages
id: pages
uses: actions/configure-pages@v5
Expand Down
48 changes: 31 additions & 17 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,15 +27,19 @@ jobs:
steps:
- name: Checkout repository
uses: actions/checkout@v6
- name: Install pnpm
uses: pnpm/action-setup@v4
with:
version: 10
- name: Install Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v6
with:
node-version: ${{ matrix.node-version }}
cache: 'npm'
cache: 'pnpm'
- name: Install dependencies
run: npm ci --verbose
run: pnpm install --frozen-lockfile
- name: Build packages
run: npm run build
run: pnpm run build

codequality:
name: codequality (${{ matrix.tool }})
Expand All @@ -45,39 +49,47 @@ jobs:
include:
- tool: oxfmt
tool-purpose: formatter
npm-script: fmt-ci
script: fmt-ci
- tool: oxlint
tool-purpose: linter
npm-script: lint
script: lint
steps:
- name: Checkout repository
uses: actions/checkout@v6
- name: Install pnpm
uses: pnpm/action-setup@v4
with:
version: 10
- name: Install Node.js
uses: actions/setup-node@v6
with:
node-version: latest
cache: 'npm'
cache: 'pnpm'
- name: Install dependencies
run: npm ci --verbose
run: pnpm install --frozen-lockfile
- name: Print environment info
run: npx ${{ matrix.tool }} --version
run: pnpx ${{ matrix.tool }} --version
- name: Run ${{ matrix.tool-purpose }} checks
run: npm run ${{ matrix.npm-script }}
run: pnpm run ${{ matrix.script }}

test:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v6
- name: Install pnpm
uses: pnpm/action-setup@v4
with:
version: 10
- name: Install Node.js
uses: actions/setup-node@v6
with:
node-version: latest
cache: 'npm'
cache: 'pnpm'
- name: Install dependencies
run: npm ci --verbose
run: pnpm install --frozen-lockfile
- name: Run tests
run: npm run test-ci
run: pnpm run test-ci
- name: Upload code coverage
uses: codecov/codecov-action@v5
with:
Expand All @@ -90,15 +102,17 @@ jobs:
steps:
- name: Checkout repository
uses: actions/checkout@v6
- name: Install pnpm
uses: pnpm/action-setup@v4
with:
version: 10
- name: Install Node.js
uses: actions/setup-node@v6
with:
node-version: latest
cache: 'npm'
cache: 'pnpm'
registry-url: 'https://registry.npmjs.org'
- name: Install dependencies
run: npm ci --verbose
- name: Auto-fix errors in package.json
run: npm pkg fix --workspaces
run: pnpm install --frozen-lockfile
- name: Check if publishable
run: npm publish --workspaces --access public --tag=latest --dry-run
run: pnpm publish --dry-run --recursive --no-git-checks
42 changes: 21 additions & 21 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,38 +44,38 @@ Using your text editor or IDE, find-and-replace the following placeholders:
cd packages/pkg1

# if package is non-scoped, e.g "hello-world"
npm publish
pnpm publish

# if package is scoped, e.g "@user123/hello-world"
npm publish --access public
pnpm publish --access public
```

## Configure

### NPM scripts

| Command | Description |
| -------------------- | ----------------------------------------- |
| `npm run build` | Build all packages |
| `npm run docs` | Generate documentation |
| `npm run docs-watch` | Generate documentation in watch mode |
| `npm run clean` | Remove all generated files |
| `npm run test` | Run unit tests |
| `npm run test-ci` | Run unit tests in CI mode |
| `npm run test-ui` | Run unit tests in UI/browser mode |
| `npm run test-html` | View test results in browser |
| `npm run test-json` | View test results in JSON format |
| `npm run fmt` | Apply formatting fixes |
| `npm run fmt-ci` | Check for formatting issues (used for CI) |
| `npm run lint` | Check for Oxlint issues |
| `npm run fix` | Apply Oxlint fixes |
| `npm run inspect` | Run node-modules-inspector server |
### PNPM scripts

| Command | Description |
| --------------------- | ----------------------------------------- |
| `pnpm run build` | Build all packages |
| `pnpm run docs` | Generate documentation |
| `pnpm run docs-watch` | Generate documentation in watch mode |
| `pnpm run clean` | Remove all generated files |
| `pnpm run test` | Run unit tests |
| `pnpm run test-ci` | Run unit tests in CI mode |
| `pnpm run test-ui` | Run unit tests in UI/browser mode |
| `pnpm run test-html` | View test results in browser |
| `pnpm run test-json` | View test results in JSON format |
| `pnpm run fmt` | Apply formatting fixes |
| `pnpm run fmt-ci` | Check for formatting issues (used for CI) |
| `pnpm run lint` | Check for Oxlint issues |
| `pnpm run fix` | Apply Oxlint fixes |
| `pnpm run inspect` | Run node-modules-inspector server |

### Developer tools

| Tool | File | Documentation |
| ---------- | -------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| NPM | [`package.json`](package.json), [`packages/*/package.json`](./packages/pkg1/package.json) | [docs](https://docs.npmjs.com/cli/v10/configuring-npm/package-json), [website](https://docs.npmjs.com/) |
| PNPM | [`package.json`](package.json), [`packages/*/package.json`](./packages/pkg1/package.json) | [docs](https://pnpm.io/package_json), [website](https://pnpm.io/) |
| TypeScript | [`tsconfig.json`](./tsconfig.json), [`packages/*/tsconfig.json`](packages/pkg1/tsconfig.json) | [docs](https://www.typescriptlang.org/tsconfig), [website](https://www.typescriptlang.org/) |
| TypeDoc | [`tsconfig.json`](tsconfig.json) (`typedocOptions`) | [docs](https://typedoc.org/options/configuration/), [website](https://typedoc.org/) |
| Oxfmt | [`.oxfmtrc.json`](./.oxfmtrc.json) | [docs](https://oxc.rs/docs/guide/usage/formatter.html), [website](https://oxc.rs) |
Expand Down
Loading