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
4 changes: 3 additions & 1 deletion .github/workflows/fresh-deps.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,4 +23,6 @@ jobs:
node-version: ${{ matrix.node }}
- run: rm package-lock.json
- run: npm i
- run: npm run check
- run: npm test
- run: npm run coverage
- run: npm run test:pack
4 changes: 3 additions & 1 deletion .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,6 @@ jobs:
node-version: ${{ matrix.node }}
cache: npm
- run: npm ci
- run: npm run check
- run: npm test
- run: npm run coverage
- run: npm run test:pack
2 changes: 1 addition & 1 deletion biome.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"$schema": "https://biomejs.dev/schemas/2.5.0/schema.json",
"vcs": { "enabled": true, "clientKind": "git", "useIgnoreFile": true },
"files": { "includes": ["src/**", "*.json"] },
"files": { "includes": ["src/**", "test/**"] },
"formatter": { "enabled": true, "indentStyle": "space", "indentWidth": 2, "lineWidth": 100 },
"javascript": {
"formatter": { "quoteStyle": "single", "semicolons": "asNeeded", "trailingCommas": "none" }
Expand Down
13 changes: 7 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -56,18 +56,19 @@
"url": "git+https://github.com/ungoldman/hyperaxe.git"
},
"scripts": {
"build": "rm -rf dist && tsc -p tsconfig.build.json",
"check": "npm run lint && npm run typecheck && npm test && npx publint && npm run test:pack",
"build": "tsc",
"coverage": "node --test --experimental-test-coverage --import=tsx --test-coverage-exclude='test/**' --test-coverage-lines=100 --test-coverage-branches=100 --test-coverage-functions=100 test/*.test.ts",
"format": "biome check --write .",
"lint": "biome check .",
"postrelease": "git push --follow-tags && npm publish",
"prebuild": "rm -rf dist",
"prepare": "npm run build",
"prerelease": "git fetch --tags && npm run check",
"prerelease": "git fetch --tags && npm test && npm run test:pack",
"release": "npm version patch",
"test": "node --test --import=tsx src/**/*.spec.ts",
"test": "npm run lint && npm run typecheck && npm run build && node --test --import=tsx test/*.test.ts",
"test:pack": "bash scripts/test-pack.sh",
"test:watch": "node --test --watch --import=tsx src/**/*.spec.ts",
"typecheck": "tsc --noEmit"
"test:watch": "node --test --watch --import=tsx test/*.test.ts",
"typecheck": "tsc -p tsconfig.test.json"
},
"type": "module",
"types": "dist/index.d.ts"
Expand Down
6 changes: 3 additions & 3 deletions src/index.spec.ts → test/index.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ import { strict as assert } from 'node:assert'
import { describe, test } from 'node:test'
import tags from 'html-tags'
import h from 'hyperscript'
import type { CreateElementFunction } from './factory.js'
import * as namedExports from './index.js'
import hyperaxe, { getFactory, varTag } from './index.js'
import type { CreateElementFunction } from '../src/factory.js'
import * as namedExports from '../src/index.js'
import hyperaxe, { getFactory, varTag } from '../src/index.js'

describe('Hyperaxe Factory', () => {
test('factory function signature', () => {
Expand Down
7 changes: 0 additions & 7 deletions tsconfig.build.json

This file was deleted.

4 changes: 1 addition & 3 deletions tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,8 @@
"outDir": "dist",
"rootDir": "src",
"declaration": true,
"noEmit": true,
"strict": true,
"esModuleInterop": true,
"types": ["node"],
"skipLibCheck": true,
"noUnusedLocals": true,
"noUnusedParameters": true,
Expand All @@ -22,5 +20,5 @@
"forceConsistentCasingInFileNames": true,
"resolveJsonModule": true
},
"include": ["src/**/*"]
"include": ["src"]
}
9 changes: 9 additions & 0 deletions tsconfig.test.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"extends": "./tsconfig.json",
"compilerOptions": {
"noEmit": true,
"rootDir": ".",
"types": ["node"]
},
"include": ["src", "test"]
}