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
32 changes: 32 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: Bug Report
description: Report a bug or unexpected behavior
labels: [bug]
body:
- type: markdown
attributes:
value: Thanks for taking the time to fill out this bug report!
- type: textarea
id: description
attributes:
label: Description
description: A clear and concise description of the bug
validations:
required: true
- type: textarea
id: reproduction
attributes:
label: Reproduction
description: Steps or code to reproduce the behavior
validations:
required: true
- type: textarea
id: expected
attributes:
label: Expected behavior
description: What you expected to happen
- type: textarea
id: environment
attributes:
label: Environment
description: Node version, OS, browser (if applicable)
placeholder: Node 20, Ubuntu, Chrome 120
26 changes: 26 additions & 0 deletions .github/ISSUE_TEMPLATE/feature_request.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: Feature Request
description: Suggest an idea for this project
labels: [enhancement]
body:
- type: markdown
attributes:
value: Thanks for suggesting a feature!
- type: textarea
id: problem
attributes:
label: Problem
description: What problem does this feature solve?
validations:
required: true
- type: textarea
id: solution
attributes:
label: Proposed solution
description: How would you like this to work?
validations:
required: true
- type: textarea
id: alternatives
attributes:
label: Alternatives considered
description: What alternatives have you considered?
18 changes: 18 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
## Description

<!-- Briefly describe what this PR does -->

## Type

- [ ] Bug fix
- [ ] New feature
- [ ] Refactor
- [ ] Documentation
- [ ] CI/CD

## Checklist

- [ ] Tests pass (`npm test`)
- [ ] Lint passes (`npm run lint`)
- [ ] Typecheck passes (`npm run typecheck`)
- [ ] Build passes (`npm run build`)
49 changes: 49 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
name: CI

on:
push:
branches: ["main"]
pull_request:
branches: ["main"]

permissions:
contents: read

jobs:
test:
runs-on: ubuntu-latest

strategy:
matrix:
node-version: [20, 22, 24, 26]

steps:
- name: Checkout
uses: actions/checkout@v4

- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
cache: 'npm'
cache-dependency-path: Build/package-lock.json

- name: Install dependencies
working-directory: Build
run: npm ci

- name: Type check
working-directory: Build
run: npm run typecheck

- name: Lint
working-directory: Build
run: npm run lint

- name: Run tests
working-directory: Build
run: npm test

- name: Build
working-directory: Build
run: npm run build
2 changes: 1 addition & 1 deletion .github/workflows/pages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ jobs:
cp -r Build/dist/* gh-pages-root/playground/dist/

- name: Deploy all assets to gh-pages
uses: peaceiris/actions-gh-pages@v3
uses: peaceiris/actions-gh-pages@v4
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: gh-pages-root
Expand Down
1 change: 1 addition & 0 deletions .nvmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
20
2 changes: 2 additions & 0 deletions Build/README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# Sazami

[![CI](https://github.com/Nisoku/Sazami/actions/workflows/ci.yml/badge.svg)](https://github.com/Nisoku/Sazami/actions/workflows/ci.yml)
[![Deploy](https://github.com/Nisoku/Sazami/actions/workflows/pages.yml/badge.svg)](https://github.com/Nisoku/Sazami/actions/workflows/pages.yml)
[![npm version](https://img.shields.io/npm/v/@nisoku/sazami.svg)](https://www.npmjs.com/package/@nisoku/sazami)
[![License: Apache-2.0](https://img.shields.io/badge/License-Apache--2.0-blue.svg)](LICENSE)

Expand Down
31 changes: 31 additions & 0 deletions Build/eslint.config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
import eslint from "@eslint/js";
import tseslint from "typescript-eslint";

export default tseslint.config(
eslint.configs.recommended,
...tseslint.configs.recommended,
{
ignores: ["dist/**", "node_modules/**", "coverage/**"],
},
{
rules: {
"@typescript-eslint/no-unused-vars": ["warn", { argsIgnorePattern: "^_", varsIgnorePattern: "^_" }],
"@typescript-eslint/ban-ts-comment": ["error", { "ts-expect-error": "allow-with-description" }],
},
},
{
files: ["**/*.js", "**/*.mjs", "**/*.cjs"],
rules: {
"no-undef": "off",
"@typescript-eslint/no-require-imports": "off",
},
},
{
files: ["**/tests/**", "**/*.test.ts", "**/*.spec.ts", "**/__mocks__/**"],
rules: {
"@typescript-eslint/no-explicit-any": "off",
"@typescript-eslint/no-require-imports": "off",
"prefer-const": "off",
},
},
);
15 changes: 14 additions & 1 deletion Build/jest.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,24 @@ module.exports = {
strict: true,
esModuleInterop: true,
skipLibCheck: true,
moduleResolution: "node",
moduleResolution: "node16",
isolatedModules: true,
},
}],
},
collectCoverageFrom: [
'src/**/*.ts',
'!src/**/*.d.ts',
],
coverageDirectory: 'coverage',
coverageThreshold: {
global: {
branches: 70,
functions: 70,
lines: 70,
statements: 70
}
},
moduleNameMapper: {
"^.*icons/index.*$": "<rootDir>/tests/__mocks__/icons.js",
},
Expand Down
Loading
Loading