Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Switch to PNPM #2

Open
wants to merge 15 commits into
base: main
Choose a base branch
from
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
33 changes: 21 additions & 12 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,35 +18,44 @@ jobs:

steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Use PNPM
uses: pnpm/action-setup@v3
with:
version: 8

- name: Use Node.js
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version: 18
cache: 'npm'
node-version: 20
cache: 'pnpm'

- name: Restore
run: npm ci
run: |
set -e
pnpm install --frozen-lockfile
pnpm install --global wurk

- name: Build
run: |
set -e
npm run build
npx @werk/cli publish --no-build --to-archive
wurk build
wurk publish --to-archive

- name: Test
run: |
set -e
npm run lint -- --max-warnings=0
npx @werk/cli depcheck
npx @werk/cli vitest run --no-build
wurk eslint -- --max-warnings=0
wurk depcheck
wurk vitest run

- name: Publish
run: |
npm config set //registry.npmjs.org/:_authToken '${NPM_TOKEN}'
npx @werk/cli publish --from-archive
set -e
pnpm config set //registry.npmjs.org/:_authToken '${NPM_TOKEN}'
wurk publish --from-archive
env:
NPM_TOKEN: ${{secrets.NPM_TOKEN}}
32 changes: 21 additions & 11 deletions .github/workflows/validate.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,31 +20,41 @@ jobs:

steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Use PNPM
uses: pnpm/action-setup@v3
with:
version: 8

- name: Use Node.js
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version: 18
cache: 'npm'
node-version: 20
cache: 'pnpm'

- name: Restore
run: npm ci
run: |
set -e
pnpm install --frozen-lockfile
pnpm install --global wurk

- name: Build
run: |
set -e
npm run build
npx @werk/cli publish --no-build --to-archive
wurk build
wurk publish --to-archive

- name: Test
run: |
set -e
npm run lint -- --max-warnings=0
npx @werk/cli depcheck
npx @werk/cli vitest run --no-build
wurk eslint -- --max-warnings=0
wurk depcheck
wurk vitest run

- name: Publish (Dry Run)
run: npx @werk/cli publish --from-archive --dry-run
run: |
set -e
wurk publish --from-archive --dry-run
11 changes: 7 additions & 4 deletions eslint.config.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
import dreamauth from '@dreamauth/eslint-plugin';
import rational from 'eslint-config-rational';
import { rational } from 'eslint-config-rational';

export default rational({
ignores: ['**/{.git,node_modules,out,lib,dist}'],
override: [...dreamauth.configs.recommended],
customRestricted: [
{
message: 'Use a strongly typed `raise(code)` function instead of throwing new errors.',
selector: 'ThrowStatement[argument.type!="Identifier"]',
},
],
});
Loading