@flowscripter/template-bun-library 1.0.1

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.
@@ -0,0 +1,11 @@
1
+ name: lint-pr-message
2
+ on:
3
+ pull_request_target:
4
+ types:
5
+ - opened
6
+ - edited
7
+ - synchronize
8
+ jobs:
9
+ call-lint-pr-message:
10
+ uses: flowscripter/.github/.github/workflows/lint-pr-message.yml@v1
11
+ secrets: inherit
@@ -0,0 +1,8 @@
1
+ name: release-bun-library
2
+ on:
3
+ push:
4
+ branches: [main]
5
+ jobs:
6
+ call-release-bun-library:
7
+ uses: flowscripter/.github/.github/workflows/release-bun-library.yml@v1
8
+ secrets: inherit
@@ -0,0 +1,8 @@
1
+ name: validate-bun-pr
2
+ on:
3
+ pull_request:
4
+ branches: [main]
5
+ jobs:
6
+ call-validate-bun-pr:
7
+ uses: flowscripter/.github/.github/workflows/validate-bun-pr.yml@v1
8
+ secrets: inherit
package/.releaserc ADDED
@@ -0,0 +1,13 @@
1
+ ---
2
+ branches:
3
+ - main
4
+ plugins:
5
+ - - "@semantic-release/commit-analyzer"
6
+ - preset: conventionalcommits
7
+ - - "@semantic-release/release-notes-generator"
8
+ - preset: conventionalcommits
9
+ - - "@semantic-release/github"
10
+ - - "@semantic-release/npm"
11
+ - - "@semantic-release/git"
12
+ - assets:
13
+ - package.json
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2025 Flowscripter
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,70 @@
1
+ # template-bun-library
2
+
3
+ [![version](https://img.shields.io/github/v/release/flowscripter/template-bun-library?sort=semver)](https://github.com/flowscripter/template-bun-library/releases)
4
+ [![build](https://img.shields.io/github/actions/workflow/status/flowscripter/template-bun-library/release-bun-library.yml)](https://github.com/flowscripter/template-bun-library/actions/workflows/release-bun-library.yml)
5
+ [![coverage](https://codecov.io/gh/flowscripter/template-bun-library/graph/badge.svg?token=uWK0oWsBjr)](https://codecov.io/gh/flowscripter/template-bun-library)
6
+ [![docs](https://img.shields.io/badge/docs-API-blue)](https://flowscripter.github.io/template-bun-library/index.html)
7
+ [![license: MIT](https://img.shields.io/github/license/flowscripter/template-bun-library)](https://github.com/flowscripter/template-bun-library/blob/main/LICENSE)
8
+
9
+ > Project template for a Bun library
10
+
11
+ ## Template Usage
12
+
13
+ Create a new Bun project using this as a template:
14
+
15
+ `bun create @flowscripter/template-bun-library`
16
+
17
+ ## Bun Module Usage
18
+
19
+ Add the module:
20
+
21
+ `bun add @flowscripter/template-bun-library`
22
+
23
+ Use the module:
24
+
25
+ ```typescript
26
+ import { world } from "@flowscripter/template-deno-library";
27
+
28
+ world();
29
+ ```
30
+
31
+ ## Development
32
+
33
+ Test:
34
+
35
+ `bun test`
36
+
37
+ **NOTE**: The following tasks use Deno as it excels at these and Bun does not currently provide such functionality:
38
+
39
+ Format:
40
+
41
+ `deno fmt index.ts src/ tests`
42
+
43
+ Lint:
44
+
45
+ `deno lint index.ts src/ tests/`
46
+
47
+ Generate HTML API Documentation:
48
+
49
+ `deno doc --html --name=template-bun-library index.ts`
50
+
51
+ ## Documentation
52
+
53
+ ### Overview
54
+
55
+ Sample mermaid diagram to test rendering in markdown:
56
+
57
+ ```mermaid
58
+ classDiagram
59
+ Foo <|-- Bar
60
+ ```
61
+
62
+ ### API
63
+
64
+ Link to auto-generated API docs for the library:
65
+
66
+ [API Documentation](https://jsr.io/@flowscripter/template-bun-library/doc)
67
+
68
+ ## License
69
+
70
+ MIT © Flowscripter
package/bun.lock ADDED
@@ -0,0 +1,27 @@
1
+ {
2
+ "lockfileVersion": 1,
3
+ "workspaces": {
4
+ "": {
5
+ "name": "template-bun-library",
6
+ "devDependencies": {
7
+ "@types/bun": "latest",
8
+ },
9
+ "peerDependencies": {
10
+ "typescript": "^5.0.0",
11
+ },
12
+ },
13
+ },
14
+ "packages": {
15
+ "@types/bun": ["@types/bun@1.2.2", "", { "dependencies": { "bun-types": "1.2.2" } }, "sha512-tr74gdku+AEDN5ergNiBnplr7hpDp3V1h7fqI2GcR/rsUaM39jpSeKH0TFibRvU0KwniRx5POgaYnaXbk0hU+w=="],
16
+
17
+ "@types/node": ["@types/node@22.13.1", "", { "dependencies": { "undici-types": "~6.20.0" } }, "sha512-jK8uzQlrvXqEU91UxiK5J7pKHyzgnI1Qnl0QDHIgVGuolJhRb9EEl28Cj9b3rGR8B2lhFCtvIm5os8lFnO/1Ew=="],
18
+
19
+ "@types/ws": ["@types/ws@8.5.14", "", { "dependencies": { "@types/node": "*" } }, "sha512-bd/YFLW+URhBzMXurx7lWByOu+xzU9+kb3RboOteXYDfW+tr+JZa99OyNmPINEGB/ahzKrEuc8rcv4gnpJmxTw=="],
20
+
21
+ "bun-types": ["bun-types@1.2.2", "", { "dependencies": { "@types/node": "*", "@types/ws": "~8.5.10" } }, "sha512-RCbMH5elr9gjgDGDhkTTugA21XtJAy/9jkKe/G3WR2q17VPGhcquf9Sir6uay9iW+7P/BV0CAHA1XlHXMAVKHg=="],
22
+
23
+ "typescript": ["typescript@5.7.3", "", { "bin": { "tsc": "bin/tsc", "tsserver": "bin/tsserver" } }, "sha512-84MVSjMEHP+FQRPy3pX9sTVV/INIex71s9TL2Gm5FG/WG1SqXeKyZ0k7/blY/4FdOzI12CBy1vGc4og/eus0fw=="],
24
+
25
+ "undici-types": ["undici-types@6.20.0", "", {}, "sha512-Ny6QZ2Nju20vw1SRHe3d9jVu6gJ+4e3+MMpqu7pqE5HT6WsTSlce++GQmK5UXS8mzV8DSYHrQH+Xrf2jVcuKNg=="],
26
+ }
27
+ }
package/index.ts ADDED
@@ -0,0 +1 @@
1
+ export * from "./src/world.ts";
package/package.json ADDED
@@ -0,0 +1,15 @@
1
+ {
2
+ "name": "@flowscripter/template-bun-library",
3
+ "module": "index.ts",
4
+ "type": "module",
5
+ "version": "1.0.1",
6
+ "publishConfig": {
7
+ "access": "public"
8
+ },
9
+ "devDependencies": {
10
+ "@types/bun": "latest"
11
+ },
12
+ "peerDependencies": {
13
+ "typescript": "^5.0.0"
14
+ }
15
+ }
package/src/world.ts ADDED
@@ -0,0 +1,6 @@
1
+ /**
2
+ * Logs out `World`.
3
+ */
4
+ export function world(): void {
5
+ console.info("World");
6
+ }
@@ -0,0 +1,9 @@
1
+ import { describe, expect, test } from "bun:test";
2
+ import { world } from "../src/world.ts";
3
+
4
+ describe("World Tests", () => {
5
+ test("Simple Test", () => {
6
+ world();
7
+ expect(true);
8
+ });
9
+ });
package/tsconfig.json ADDED
@@ -0,0 +1,27 @@
1
+ {
2
+ "compilerOptions": {
3
+ // Enable latest features
4
+ "lib": ["ESNext", "DOM"],
5
+ "target": "ESNext",
6
+ "module": "ESNext",
7
+ "moduleDetection": "force",
8
+ "jsx": "react-jsx",
9
+ "allowJs": true,
10
+
11
+ // Bundler mode
12
+ "moduleResolution": "bundler",
13
+ "allowImportingTsExtensions": true,
14
+ "verbatimModuleSyntax": true,
15
+ "noEmit": true,
16
+
17
+ // Best practices
18
+ "strict": true,
19
+ "skipLibCheck": true,
20
+ "noFallthroughCasesInSwitch": true,
21
+
22
+ // Some stricter flags (disabled by default)
23
+ "noUnusedLocals": false,
24
+ "noUnusedParameters": false,
25
+ "noPropertyAccessFromIndexSignature": false
26
+ }
27
+ }