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
3 changes: 3 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,6 @@ trim_trailing_whitespace = true
[*.md]
indent_style = space
trim_trailing_whitespace = false

[*.yaml]
indent_style = space
38 changes: 38 additions & 0 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
name: ci
on:
push:
branches: ["main"]
pull_request:
branches: ["*"]
paths-ignore:
- "docs/**"
- ".vscode/**"
- "README.md"
- ".gitignore"
- "LICENSE"

jobs:
coverage:
name: "Coverage"
runs-on: ubuntu-latest
needs: [main]
steps:
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v4
with:
version: 10
- run: pnpm install
- run: pnpm run test:coverage

main:
name: "Main"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v4
with:
version: 10
- run: pnpm install
- run: pnpm run build
- run: pnpm run lint
- run: pnpm run format
8 changes: 7 additions & 1 deletion biome.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,13 @@
{
"$schema": "https://biomejs.dev/schemas/1.9.4/schema.json",
"files": {
"ignore": ["coverage/**", "dist/**", "node_modules/**"]
"ignore": [
"coverage/**",
"dist/**",
"examples/iife/snowflake.min.js",
"examples/worker/snowflake.min.js",
"node_modules/**"
]
},
"formatter": {
"enabled": true,
Expand Down
18 changes: 9 additions & 9 deletions examples/browser/tsconfig.node.json
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
{
"compilerOptions": {
"composite": true,
"skipLibCheck": true,
"module": "ESNext",
"moduleResolution": "bundler",
"allowSyntheticDefaultImports": true
},
"include": ["vite.config.ts"]
}
"compilerOptions": {
"composite": true,
"skipLibCheck": true,
"module": "ESNext",
"moduleResolution": "bundler",
"allowSyntheticDefaultImports": true
},
"include": ["vite.config.ts"]
}
13 changes: 2 additions & 11 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,7 @@
"name": "@tknf/snowflake",
"version": "1.0.1",
"description": "A zero-dependency TypeScript library for generating sortable unique IDs for distributed systems",
"keywords": [
"id",
"snowflake",
"distributed",
"typescript",
"uuid",
"generator"
],
"keywords": ["id", "snowflake", "distributed", "typescript", "uuid", "generator"],
"repository": {
"type": "git",
"url": "https://github.com/tknf/snowflake.git"
Expand Down Expand Up @@ -40,9 +33,7 @@
"require": "./dist/browser.cjs"
}
},
"files": [
"dist"
],
"files": ["dist"],
"unpkg": "./dist/snowflake.min.js",
"jsdelivr": "./dist/snowflake.min.js",
"scripts": {
Expand Down