@zweer/dev 1.2.0 → 2.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (125) hide show
  1. package/README.md +68 -467
  2. package/configs/_biome.json +38 -0
  3. package/configs/commitlint.config.ts +1 -0
  4. package/configs/editorconfig +16 -0
  5. package/configs/lefthook.yml +38 -0
  6. package/configs/lockfile-lintrc.json +6 -0
  7. package/configs/npmpackagejsonlintrc.json +34 -0
  8. package/configs/tsconfig.json +9 -0
  9. package/configs/tsdown.config.ts +8 -0
  10. package/configs/vitest.config.ts +12 -0
  11. package/dist/index.d.mts +1 -0
  12. package/dist/index.mjs +247 -0
  13. package/dist/index.mjs.map +1 -0
  14. package/kiro/agents/zweer-setup.json +38 -0
  15. package/kiro/prompts/zweer-setup.md +55 -0
  16. package/kiro/skills/agent-template/SKILL.md +22 -0
  17. package/kiro/skills/agent-template/references/base.json +38 -0
  18. package/kiro/skills/agent-template/references/example-monorepo-library.json +60 -0
  19. package/kiro/skills/agent-template/references/example-webapp-vercel.json +54 -0
  20. package/kiro/skills/prompt-template/SKILL.md +23 -0
  21. package/kiro/skills/prompt-template/references/example-library.md +56 -0
  22. package/kiro/skills/prompt-template/references/example-webapp.md +57 -0
  23. package/kiro/skills/skill-templates/SKILL.md +23 -0
  24. package/kiro/skills/skill-templates/references/new-package.md +72 -0
  25. package/kiro/skills/steering-templates/SKILL.md +31 -0
  26. package/kiro/skills/steering-templates/references/build-tooling.md +62 -0
  27. package/kiro/skills/steering-templates/references/code-style.md +83 -0
  28. package/kiro/skills/steering-templates/references/commit-conventions.md +58 -0
  29. package/kiro/skills/steering-templates/references/interaction.md +41 -0
  30. package/kiro/skills/steering-templates/references/testing.md +61 -0
  31. package/kiro/steering/build-tooling.md +62 -0
  32. package/kiro/steering/code-style.md +83 -0
  33. package/kiro/steering/commit-conventions.md +58 -0
  34. package/kiro/steering/interaction.md +41 -0
  35. package/kiro/steering/testing.md +61 -0
  36. package/package.json +42 -57
  37. package/templates/monorepo/CHANGELOG.md +5 -0
  38. package/templates/monorepo/README.md +22 -0
  39. package/templates/monorepo/package.json +30 -0
  40. package/templates/monorepo/packages/core/CHANGELOG.md +5 -0
  41. package/templates/monorepo/packages/core/README.md +21 -0
  42. package/templates/monorepo/packages/core/package.json +28 -0
  43. package/templates/monorepo/packages/core/src/index.ts +3 -0
  44. package/templates/monorepo/packages/core/test/index.test.ts +9 -0
  45. package/templates/monorepo/tsdown.config.ts +12 -0
  46. package/templates/monorepo/vitest.config.ts +12 -0
  47. package/templates/single/CHANGELOG.md +5 -0
  48. package/templates/single/README.md +30 -0
  49. package/templates/single/package.json +38 -0
  50. package/templates/single/src/index.ts +3 -0
  51. package/templates/single/test/index.test.ts +9 -0
  52. package/templates/single/tsdown.config.ts +11 -0
  53. package/workflows/base/ci.yml +24 -0
  54. package/workflows/base/dependabot-auto-merge.yml +43 -0
  55. package/workflows/base/dependabot-lockfile.yml +34 -0
  56. package/workflows/base/dependabot.yml +39 -0
  57. package/workflows/base/pr.yml +41 -0
  58. package/workflows/base/security.yml +25 -0
  59. package/workflows/docs/docs.yml +47 -0
  60. package/workflows/library/npm.yml +45 -0
  61. package/agents/data/zweer_data_engineer.md +0 -436
  62. package/agents/design/zweer_ui_designer.md +0 -171
  63. package/agents/design/zweer_ui_ux.md +0 -124
  64. package/agents/infrastructure/zweer_infra_cdk.md +0 -701
  65. package/agents/infrastructure/zweer_infra_devops.md +0 -148
  66. package/agents/infrastructure/zweer_infra_observability.md +0 -610
  67. package/agents/infrastructure/zweer_infra_terraform.md +0 -658
  68. package/agents/mobile/zweer_mobile_android.md +0 -636
  69. package/agents/mobile/zweer_mobile_flutter.md +0 -623
  70. package/agents/mobile/zweer_mobile_ionic.md +0 -550
  71. package/agents/mobile/zweer_mobile_ios.md +0 -504
  72. package/agents/mobile/zweer_mobile_react_native.md +0 -561
  73. package/agents/quality/zweer_qa_documentation.md +0 -202
  74. package/agents/quality/zweer_qa_performance.md +0 -160
  75. package/agents/quality/zweer_qa_security.md +0 -197
  76. package/agents/quality/zweer_qa_testing.md +0 -189
  77. package/agents/services/zweer_svc_api_gateway.md +0 -553
  78. package/agents/services/zweer_svc_containers.md +0 -575
  79. package/agents/services/zweer_svc_lambda.md +0 -373
  80. package/agents/services/zweer_svc_messaging.md +0 -543
  81. package/agents/services/zweer_svc_microservices.md +0 -502
  82. package/agents/web/zweer_web_api_integration.md +0 -500
  83. package/agents/web/zweer_web_backend.md +0 -358
  84. package/agents/web/zweer_web_database.md +0 -357
  85. package/agents/web/zweer_web_frontend.md +0 -375
  86. package/agents/web/zweer_web_reader.md +0 -229
  87. package/agents/write/zweer_write_content.md +0 -499
  88. package/agents/write/zweer_write_narrative.md +0 -409
  89. package/agents/write/zweer_write_style.md +0 -247
  90. package/agents/write/zweer_write_warmth.md +0 -282
  91. package/cli/commands/bootstrap.d.ts +0 -4
  92. package/cli/commands/bootstrap.js +0 -377
  93. package/cli/commands/cao/agent/create.d.ts +0 -17
  94. package/cli/commands/cao/agent/create.js +0 -89
  95. package/cli/commands/cao/agent/index.d.ts +0 -2
  96. package/cli/commands/cao/agent/index.js +0 -8
  97. package/cli/commands/cao/agent/list.d.ts +0 -3
  98. package/cli/commands/cao/agent/list.js +0 -29
  99. package/cli/commands/cao/agent/remove.d.ts +0 -5
  100. package/cli/commands/cao/agent/remove.js +0 -39
  101. package/cli/commands/cao/index.d.ts +0 -2
  102. package/cli/commands/cao/index.js +0 -18
  103. package/cli/commands/cao/init.d.ts +0 -15
  104. package/cli/commands/cao/init.js +0 -87
  105. package/cli/commands/cao/install.d.ts +0 -10
  106. package/cli/commands/cao/install.js +0 -59
  107. package/cli/commands/cao/launch.d.ts +0 -3
  108. package/cli/commands/cao/launch.js +0 -21
  109. package/cli/commands/cao/list.d.ts +0 -4
  110. package/cli/commands/cao/list.js +0 -28
  111. package/cli/commands/cao/server.d.ts +0 -3
  112. package/cli/commands/cao/server.js +0 -20
  113. package/cli/commands/cao/sync.d.ts +0 -6
  114. package/cli/commands/cao/sync.js +0 -52
  115. package/cli/commands/setup.d.ts +0 -4
  116. package/cli/commands/setup.js +0 -346
  117. package/cli/index.d.ts +0 -2
  118. package/cli/index.js +0 -13
  119. package/cli/utils/agents.d.ts +0 -8
  120. package/cli/utils/agents.js +0 -55
  121. package/cli/utils/cao.d.ts +0 -9
  122. package/cli/utils/cao.js +0 -40
  123. package/cli/utils/paths.d.ts +0 -5
  124. package/cli/utils/paths.js +0 -11
  125. package/templates/orchestrator.md +0 -190
@@ -0,0 +1,58 @@
1
+ # Commit Conventions
2
+
3
+ **IMPORTANT**: The agent NEVER commits, pushes, or creates tags. The developer handles all git operations manually.
4
+
5
+ ## Format
6
+
7
+ Use conventional commits with gitmoji as text (not emoji):
8
+
9
+ ```
10
+ type(scope): :emoji_code: short description
11
+
12
+ Detailed explanation of what changed and why.
13
+ Include multiple lines if needed to fully describe:
14
+ - What was changed
15
+ - Why it was changed
16
+ - Any breaking changes or important notes
17
+ ```
18
+
19
+ ## Types
20
+
21
+ - `feat` — New feature (`:sparkles:`)
22
+ - `fix` — Bug fix (`:bug:`)
23
+ - `perf` — Performance improvement (`:zap:`)
24
+ - `docs` — Documentation (`:memo:`)
25
+ - `chore` — Maintenance tasks (`:wrench:`, `:arrow_up:`, `:bookmark:`)
26
+ - `refactor` — Code refactoring (`:recycle:`)
27
+ - `test` — Tests (`:white_check_mark:`)
28
+ - `style` — Code formatting (`:art:`)
29
+ - `ci` — CI/CD changes (`:construction_worker:`)
30
+ - `build` — Build system (`:hammer:`)
31
+
32
+ ## Scope
33
+
34
+ Use only ONE scope per commit — typically the package, module, or component affected.
35
+
36
+ If `.vscode/settings.json` exists with `conventionalCommits.scopes`, use those values.
37
+ Scope is optional for cross-cutting changes.
38
+
39
+ ## Gitmoji
40
+
41
+ **Always use text codes** (`:sparkles:`), **never actual emoji** (✨).
42
+
43
+ ## Body
44
+
45
+ **Always include a detailed body** explaining:
46
+ 1. What was changed
47
+ 2. Why it was changed
48
+ 3. Any important context or side effects
49
+
50
+ ## Breaking Changes
51
+
52
+ Add `!` after the type/scope and include `BREAKING CHANGE:` in the body:
53
+
54
+ ```
55
+ feat(api)!: :boom: remove deprecated methods
56
+
57
+ BREAKING CHANGE: Removed old API methods deprecated in v0.5.
58
+ ```
@@ -0,0 +1,41 @@
1
+ # Interaction Patterns
2
+
3
+ ## Interview Before Implementing
4
+
5
+ For ambiguous or complex requests, ask clarifying questions BEFORE writing code:
6
+ - What's the expected behavior?
7
+ - Are there edge cases to consider?
8
+ - Does this affect existing features?
9
+ - What's the priority (quick fix vs proper solution)?
10
+
11
+ Skip the interview for clear, well-defined tasks.
12
+
13
+ ## Plan Mode
14
+
15
+ For multi-step tasks (new features, refactors, architecture changes):
16
+ 1. Write a short numbered plan first
17
+ 2. Wait for approval before implementing
18
+ 3. Adapt the plan if requirements change mid-execution
19
+
20
+ Skip planning for single-file fixes, small bug fixes, or simple questions.
21
+
22
+ ## ASCII Diagrams
23
+
24
+ Use ASCII diagrams when discussing:
25
+ - Architecture decisions
26
+ - Data flow between components
27
+ - New feature design involving multiple files
28
+ - Database schema relationships
29
+
30
+ ## Context Hygiene
31
+
32
+ - Keep each steering/spec file under ~200 lines
33
+ - Split files when they grow beyond that
34
+ - One concern per file (don't mix code style with testing rules)
35
+ - Update specs when features are completed or changed
36
+
37
+ ## Git Rules
38
+
39
+ - **NEVER commit, push, or create tags** — the developer handles all git operations
40
+ - Prepare changes and suggest a commit message
41
+ - The developer reviews and commits manually
@@ -0,0 +1,61 @@
1
+ # Testing Strategy
2
+
3
+ ## Test Framework
4
+
5
+ ### Vitest
6
+ - All tests use **Vitest** (NOT Jest, Mocha, or others)
7
+ - Configuration in `vitest.config.ts` at root
8
+ - v8 coverage provider
9
+ - Coverage reporters: text, json, json-summary
10
+
11
+ ## Test Structure
12
+
13
+ ### File Organization
14
+ ```
15
+ src/
16
+ └── feature.ts
17
+ test/
18
+ └── feature.test.ts
19
+ ```
20
+
21
+ ### Test Pattern (AAA)
22
+ ```typescript
23
+ import { describe, it, expect } from 'vitest';
24
+
25
+ describe('FeatureName', () => {
26
+ it('should do something specific', () => {
27
+ // Arrange
28
+ const input = 'test';
29
+
30
+ // Act
31
+ const result = doSomething(input);
32
+
33
+ // Assert
34
+ expect(result).toBe('expected');
35
+ });
36
+ });
37
+ ```
38
+
39
+ ## Mocking
40
+
41
+ ### When to Mock
42
+ - External APIs, file system, git commands, network requests
43
+
44
+ ### When NOT to Mock
45
+ - Internal functions, simple utilities, pure functions
46
+
47
+ ## Best Practices
48
+
49
+ ### Test Naming
50
+ - Use `should` in test names: "should throw error when input is invalid"
51
+
52
+ ### Independence
53
+ - Each test must be independent — no shared state
54
+ - Use `beforeEach` for setup
55
+
56
+ ### Edge Cases
57
+ - Empty arrays/strings, null/undefined, invalid input, boundary values
58
+
59
+ ### Coverage
60
+ - Exclude barrel re-exports (`index.ts`) and type files (`types.ts`)
61
+ - Include all source files in coverage
package/package.json CHANGED
@@ -1,87 +1,72 @@
1
1
  {
2
2
  "name": "@zweer/dev",
3
- "version": "1.2.0",
4
- "description": "Shared configurations & AI agents for software projects",
3
+ "version": "2.0.0",
4
+ "description": "Shared configurations, golden configs & Kiro AI templates for software projects",
5
5
  "keywords": [
6
- "ai",
7
- "agents",
8
- "cao",
9
6
  "cli",
10
- "development"
7
+ "development",
8
+ "kiro",
9
+ "configs",
10
+ "tooling"
11
11
  ],
12
12
  "homepage": "https://github.com/Zweer/dev#readme",
13
13
  "bugs": {
14
14
  "url": "https://github.com/Zweer/dev/issues"
15
15
  },
16
- "license": "MIT",
17
- "author": "Zweer <n.olivieriachille@gmail.com>",
18
- "files": [
19
- "cli/**/*.js",
20
- "cli/**/*.d.ts",
21
- "agents",
22
- "templates"
23
- ],
24
- "bin": "./cli/index.js",
25
- "release": {
26
- "plugins": [
27
- "@semantic-release/commit-analyzer",
28
- "@semantic-release/release-notes-generator",
29
- "@semantic-release/changelog",
30
- "@semantic-release/npm",
31
- "@semantic-release/github",
32
- "@semantic-release/git"
33
- ]
34
- },
35
16
  "repository": {
36
17
  "type": "git",
37
18
  "url": "git+https://github.com/Zweer/dev.git"
38
19
  },
20
+ "license": "MIT",
21
+ "author": "Zweer <n.olivieriachille@gmail.com>",
39
22
  "type": "module",
23
+ "bin": "./dist/index.js",
24
+ "files": [
25
+ "dist/**/*",
26
+ "configs/**/*",
27
+ "kiro/**/*",
28
+ "workflows/**/*",
29
+ "templates/**/*"
30
+ ],
40
31
  "scripts": {
32
+ "build": "tsdown",
33
+ "clean": "rimraf dist",
41
34
  "lint": "concurrently npm:lint:* --prefixColors auto",
42
- "lint:format": "biome check --write",
43
- "lint:lockfile": "lockfile-lint --path package-lock.json",
44
35
  "lint:engines": "ls-engines",
36
+ "lint:format": "biome check --write",
37
+ "lint:lockfile": "lockfile-lint",
45
38
  "lint:package": "npmPkgJsonLint .",
46
- "lint:publish": "publint --strict",
39
+ "lint:sort_package": "sort-package-json \"package.json\"",
40
+ "lint:typecheck": "tsc --noEmit",
41
+ "prepare": "lefthook install",
47
42
  "test": "vitest run",
48
- "test:coverage": "vitest run --coverage",
49
- "check": "npm run clean && npm run test:coverage && npm run build && npm run lint && npm run clean",
50
- "prepare": "[ \"$CI\" = \"true\" ] || [ \"$GITHUB_ACTIONS\" = \"true\" ] && echo 'Skipping husky' && exit 0 || husky",
51
- "clean": "rimraf --glob ./{cli,test}/**/*.{d.ts,js} ./vitest*.{d.ts,js}",
52
- "prebuild": "npm run clean",
53
- "build": "tsc",
54
- "release": "semantic-release"
43
+ "test:coverage": "vitest run --coverage"
55
44
  },
56
45
  "dependencies": {
57
- "@commander-js/extra-typings": "^12.1.0",
58
- "chalk": "^5.3.0",
59
- "commander": "^12.1.0",
60
- "inquirer": "^12.0.0",
61
- "ora": "^8.1.1"
46
+ "@commander-js/extra-typings": "^14.0.0",
47
+ "commander": "^14.0.3"
62
48
  },
63
49
  "devDependencies": {
64
- "@biomejs/biome": "^2.3.4",
65
- "@semantic-release/changelog": "^6.0.3",
66
- "@semantic-release/git": "^10.0.1",
67
- "@tsconfig/node22": "^22.0.2",
68
- "@types/node": "^24.10.0",
69
- "@vitest/coverage-v8": "^4.0.8",
50
+ "@biomejs/biome": "^2.4.8",
51
+ "@commitlint/cli": "^20.5.0",
52
+ "@commitlint/config-conventional": "^20.5.0",
53
+ "@tsconfig/node22": "^22.0.5",
54
+ "@types/node": "^25.5.0",
55
+ "@vitest/coverage-v8": "^4.1.0",
56
+ "bonvoy": "^0.13.1",
70
57
  "concurrently": "^9.2.1",
71
- "husky": "^9.1.7",
72
- "lint-staged": "^16.2.6",
73
- "lockfile-lint": "^4.14.1",
74
- "ls-engines": "^0.9.3",
75
- "npm-package-json-lint": "^9.0.0",
76
- "npm-package-json-lint-config-default": "^8.0.1",
77
- "publint": "^0.3.15",
78
- "rimraf": "^6.1.0",
79
- "semantic-release": "^25.0.2",
58
+ "lefthook": "^2.1.4",
59
+ "lockfile-lint": "^5.0.0",
60
+ "ls-engines": "^0.10.0",
61
+ "npm-package-json-lint": "^9.1.0",
62
+ "rimraf": "^6.1.3",
63
+ "sort-package-json": "^3.6.1",
64
+ "tsdown": "^0.21.4",
80
65
  "typescript": "^5.9.3",
81
- "vitest": "^4.0.8"
66
+ "vitest": "^4.1.0"
82
67
  },
83
68
  "engines": {
84
- "node": ">= 20.17"
69
+ "node": ">= 22"
85
70
  },
86
71
  "publishConfig": {
87
72
  "access": "public",
@@ -0,0 +1,5 @@
1
+ # Changelog
2
+
3
+ All notable changes to this project will be documented in this file.
4
+
5
+ ## [Unreleased]
@@ -0,0 +1,22 @@
1
+ # {{name}}
2
+
3
+ {{description}}
4
+
5
+ ## Packages
6
+
7
+ | Package | Description |
8
+ |---------|-------------|
9
+ | `{{scope}}/core` | Core package |
10
+
11
+ ## Development
12
+
13
+ ```bash
14
+ npm install
15
+ npm run build
16
+ npm test
17
+ npm run lint
18
+ ```
19
+
20
+ ## License
21
+
22
+ MIT
@@ -0,0 +1,30 @@
1
+ {
2
+ "name": "{{name}}",
3
+ "version": "0.0.0",
4
+ "description": "{{description}}",
5
+ "type": "module",
6
+ "workspaces": [
7
+ "packages/*"
8
+ ],
9
+ "scripts": {
10
+ "build": "tsdown",
11
+ "clean": "rimraf packages/*/dist",
12
+ "lint": "concurrently npm:lint:* --prefixColors auto",
13
+ "lint:engines": "ls-engines",
14
+ "lint:format": "biome check --write",
15
+ "lint:lockfile": "lockfile-lint",
16
+ "lint:package": "npmPkgJsonLint .",
17
+ "lint:sort_package": "sort-package-json \"package.json\" \"packages/*/package.json\"",
18
+ "lint:typecheck": "tsc --noEmit",
19
+ "prepare": "lefthook install",
20
+ "test": "vitest run",
21
+ "test:coverage": "vitest run --coverage"
22
+ },
23
+ "keywords": [],
24
+ "author": "{{author}}",
25
+ "license": "MIT",
26
+ "engines": {
27
+ "node": ">= 22"
28
+ },
29
+ "devDependencies": {}
30
+ }
@@ -0,0 +1,5 @@
1
+ # Changelog
2
+
3
+ All notable changes to this project will be documented in this file.
4
+
5
+ ## [Unreleased]
@@ -0,0 +1,21 @@
1
+ # {{scope}}/core
2
+
3
+ > Core package
4
+
5
+ ## Installation
6
+
7
+ ```bash
8
+ npm install {{scope}}/core
9
+ ```
10
+
11
+ ## Usage
12
+
13
+ ```typescript
14
+ import { hello } from '{{scope}}/core';
15
+
16
+ hello('World');
17
+ ```
18
+
19
+ ## License
20
+
21
+ MIT
@@ -0,0 +1,28 @@
1
+ {
2
+ "name": "{{scope}}/core",
3
+ "version": "0.0.0",
4
+ "description": "Core package",
5
+ "type": "module",
6
+ "exports": {
7
+ ".": "./dist/index.mjs",
8
+ "./package.json": "./package.json"
9
+ },
10
+ "files": [
11
+ "dist"
12
+ ],
13
+ "keywords": [],
14
+ "author": "{{author}}",
15
+ "license": "MIT",
16
+ "homepage": "{{homepage}}",
17
+ "bugs": {
18
+ "url": "{{bugs}}"
19
+ },
20
+ "repository": {
21
+ "type": "git",
22
+ "url": "{{repository}}",
23
+ "directory": "packages/core"
24
+ },
25
+ "engines": {
26
+ "node": ">= 22"
27
+ }
28
+ }
@@ -0,0 +1,3 @@
1
+ export function hello(name: string): string {
2
+ return `Hello, ${name}!`;
3
+ }
@@ -0,0 +1,9 @@
1
+ import { describe, expect, it } from 'vitest';
2
+
3
+ import { hello } from '../src/index.js';
4
+
5
+ describe('hello', () => {
6
+ it('should greet by name', () => {
7
+ expect(hello('World')).toBe('Hello, World!');
8
+ });
9
+ });
@@ -0,0 +1,12 @@
1
+ import { defineConfig } from 'tsdown';
2
+
3
+ export default defineConfig({
4
+ workspace: true,
5
+ entry: ['src/index.ts'],
6
+ dts: true,
7
+ sourcemap: true,
8
+ format: 'esm',
9
+ exports: true,
10
+ publint: 'ci-only',
11
+ attw: { enabled: 'ci-only', profile: 'esm-only' },
12
+ });
@@ -0,0 +1,12 @@
1
+ import { defineConfig } from 'vitest/config';
2
+
3
+ export default defineConfig({
4
+ test: {
5
+ coverage: {
6
+ provider: 'v8',
7
+ reporter: ['text', 'json', 'json-summary'],
8
+ include: ['packages/**/src/**/*.ts'],
9
+ exclude: ['**/index.ts', '**/types.ts'],
10
+ },
11
+ },
12
+ });
@@ -0,0 +1,5 @@
1
+ # Changelog
2
+
3
+ All notable changes to this project will be documented in this file.
4
+
5
+ ## [Unreleased]
@@ -0,0 +1,30 @@
1
+ # {{name}}
2
+
3
+ {{description}}
4
+
5
+ ## Installation
6
+
7
+ ```bash
8
+ npm install {{name}}
9
+ ```
10
+
11
+ ## Usage
12
+
13
+ ```typescript
14
+ import { hello } from '{{name}}';
15
+
16
+ hello('World');
17
+ ```
18
+
19
+ ## Development
20
+
21
+ ```bash
22
+ npm install
23
+ npm run build
24
+ npm test
25
+ npm run lint
26
+ ```
27
+
28
+ ## License
29
+
30
+ MIT
@@ -0,0 +1,38 @@
1
+ {
2
+ "name": "{{name}}",
3
+ "version": "0.0.0",
4
+ "description": "{{description}}",
5
+ "type": "module",
6
+ "exports": {
7
+ ".": "./dist/index.mjs",
8
+ "./package.json": "./package.json"
9
+ },
10
+ "files": [
11
+ "dist"
12
+ ],
13
+ "scripts": {
14
+ "build": "tsdown",
15
+ "clean": "rimraf dist",
16
+ "lint": "concurrently npm:lint:* --prefixColors auto",
17
+ "lint:engines": "ls-engines",
18
+ "lint:format": "biome check --write",
19
+ "lint:lockfile": "lockfile-lint",
20
+ "lint:package": "npmPkgJsonLint .",
21
+ "lint:sort_package": "sort-package-json \"package.json\"",
22
+ "lint:typecheck": "tsc --noEmit",
23
+ "prepare": "lefthook install",
24
+ "test": "vitest run",
25
+ "test:coverage": "vitest run --coverage"
26
+ },
27
+ "keywords": [],
28
+ "author": "{{author}}",
29
+ "license": "MIT",
30
+ "engines": {
31
+ "node": ">= 22"
32
+ },
33
+ "publishConfig": {
34
+ "access": "public",
35
+ "provenance": true
36
+ },
37
+ "devDependencies": {}
38
+ }
@@ -0,0 +1,3 @@
1
+ export function hello(name: string): string {
2
+ return `Hello, ${name}!`;
3
+ }
@@ -0,0 +1,9 @@
1
+ import { describe, expect, it } from 'vitest';
2
+
3
+ import { hello } from '../src/index.js';
4
+
5
+ describe('hello', () => {
6
+ it('should greet by name', () => {
7
+ expect(hello('World')).toBe('Hello, World!');
8
+ });
9
+ });
@@ -0,0 +1,11 @@
1
+ import { defineConfig } from 'tsdown';
2
+
3
+ export default defineConfig({
4
+ entry: ['src/index.ts'],
5
+ dts: true,
6
+ sourcemap: true,
7
+ format: 'esm',
8
+ exports: true,
9
+ publint: 'ci-only',
10
+ attw: { enabled: 'ci-only', profile: 'esm-only' },
11
+ });
@@ -0,0 +1,24 @@
1
+ name: CI
2
+
3
+ on:
4
+ workflow_call:
5
+
6
+ permissions:
7
+ contents: read
8
+
9
+ jobs:
10
+ test:
11
+ name: Test & Lint
12
+ runs-on: ubuntu-latest
13
+ steps:
14
+ - uses: actions/checkout@v6
15
+
16
+ - uses: actions/setup-node@v6
17
+ with:
18
+ node-version: lts/*
19
+ cache: npm
20
+
21
+ - run: npm ci
22
+ - run: npm run build
23
+ - run: npm run test:coverage
24
+ - run: npm run lint
@@ -0,0 +1,43 @@
1
+ name: Dependabot Auto-Merge
2
+
3
+ on:
4
+ pull_request:
5
+ types: [opened, synchronize, reopened]
6
+ check_suite:
7
+ types: [completed]
8
+
9
+ permissions:
10
+ contents: write
11
+ pull-requests: write
12
+
13
+ jobs:
14
+ auto-merge:
15
+ name: Auto-merge Dependabot PRs
16
+ runs-on: ubuntu-latest
17
+ if: |
18
+ github.actor == 'dependabot[bot]' &&
19
+ (github.event_name == 'pull_request' || github.event.check_suite.conclusion == 'success')
20
+ steps:
21
+ - name: Dependabot metadata
22
+ id: metadata
23
+ uses: dependabot/fetch-metadata@v2.5.0
24
+ with:
25
+ github-token: ${{ secrets.GITHUB_TOKEN }}
26
+
27
+ - name: Enable auto-merge for Dependabot PRs
28
+ if: |
29
+ steps.metadata.outputs.update-type == 'version-update:semver-patch' ||
30
+ steps.metadata.outputs.update-type == 'version-update:semver-minor'
31
+ run: gh pr merge --auto --squash "$PR_URL"
32
+ env:
33
+ PR_URL: ${{ github.event.pull_request.html_url }}
34
+ GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
35
+
36
+ - name: Approve PR
37
+ if: |
38
+ steps.metadata.outputs.update-type == 'version-update:semver-patch' ||
39
+ steps.metadata.outputs.update-type == 'version-update:semver-minor'
40
+ run: gh pr review --approve "$PR_URL"
41
+ env:
42
+ PR_URL: ${{ github.event.pull_request.html_url }}
43
+ GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
@@ -0,0 +1,34 @@
1
+ name: Dependabot Lockfile Fix
2
+
3
+ on:
4
+ pull_request:
5
+ paths:
6
+ - 'package.json'
7
+ - 'packages/*/package.json'
8
+
9
+ permissions:
10
+ contents: write
11
+
12
+ jobs:
13
+ fix-lockfile:
14
+ if: github.actor == 'dependabot[bot]'
15
+ runs-on: ubuntu-latest
16
+ steps:
17
+ - uses: actions/checkout@v6
18
+ with:
19
+ ref: ${{ github.head_ref }}
20
+ token: ${{ secrets.GITHUB_TOKEN }}
21
+
22
+ - uses: actions/setup-node@v6
23
+ with:
24
+ node-version: lts/*
25
+
26
+ - run: npm i --package-lock-only
27
+
28
+ - name: Commit updated lockfile
29
+ run: |
30
+ git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
31
+ git config user.name "github-actions[bot]"
32
+ git add package-lock.json
33
+ git diff --cached --quiet || git commit -m "fix: :lock: regenerate lockfile with Node 20"
34
+ git push