Fixes #1
-8
.gitattributes
-8
.gitattributes
···
1
1
# Auto detect text files and perform LF normalization
2
2
* text=auto
3
-
4
-
# Linguist overrides
5
-
# - Recognize TSConfig file variants as JSONC (e.g: tsconfig.base.json)
6
-
# - Recognize oxfmt + oxlint config files as JSONC
7
-
Dockerfile -linguist-detectable
8
-
tsconfig.*.json linguist-language=JSON-with-Comments
9
-
.oxfmtrc.json linguist-language=JSON-with-Comments
10
-
.oxlintrc.json linguist-language=JSON-with-Comments
-47
.github/dependabot.yml
-47
.github/dependabot.yml
···
1
-
# To get started with Dependabot version updates, you'll need to specify which
2
-
# package ecosystems to update and where the package manifests are located.
3
-
# Please see the documentation for all configuration options:
4
-
# https://docs.github.com/github/administering-a-repository/configuration-options-for-dependency-updates
5
-
6
-
version: 2
7
-
updates:
8
-
- package-ecosystem: 'npm'
9
-
directory: '/'
10
-
schedule:
11
-
interval: 'monthly'
12
-
commit-message:
13
-
prefix: 'deps(npm):'
14
-
groups:
15
-
typescript:
16
-
patterns:
17
-
- 'node-modules-inspector'
18
-
- 'typescript'
19
-
- 'typedoc'
20
-
- '@types/*'
21
-
voidzero:
22
-
patterns:
23
-
- 'oxfmt'
24
-
- 'oxlint'
25
-
- 'oxlint-tsgolint'
26
-
- 'rolldown'
27
-
- 'rolldown-vite'
28
-
- 'rolldown-plugin-*'
29
-
- 'tsdown'
30
-
- 'vite'
31
-
- 'vite-plugin-*'
32
-
- 'vitest'
33
-
- '@vitest/*'
34
-
open-pull-requests-limit: 4
35
-
36
-
- package-ecosystem: 'github-actions'
37
-
directory: '/'
38
-
schedule:
39
-
interval: 'daily'
40
-
commit-message:
41
-
prefix: 'deps(gha):'
42
-
groups:
43
-
github:
44
-
patterns:
45
-
- 'github/*'
46
-
- 'actions/*'
47
-
open-pull-requests-limit: 4
-62
.github/workflows/codeql.yml
-62
.github/workflows/codeql.yml
···
1
-
name: CodeQL
2
-
3
-
on:
4
-
schedule:
5
-
# Run once a week on Monday at 00:00 (12:00AM or Midnight, UTC)
6
-
# - See visualization: https://crontab.guru/#0_0_*_*_1
7
-
# - GitHub Docs: https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#onschedule
8
-
- cron: '0 0 * * 1'
9
-
10
-
jobs:
11
-
analyze:
12
-
name: Analyze
13
-
runs-on: ${{ (matrix.language == 'swift' && 'macos-latest') || 'ubuntu-latest' }}
14
-
permissions:
15
-
actions: read
16
-
contents: read
17
-
security-events: write
18
-
19
-
strategy:
20
-
fail-fast: false
21
-
matrix:
22
-
language: ['javascript']
23
-
# CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python', 'ruby' ]
24
-
# Use only 'java' to analyze code written in Java, Kotlin or both
25
-
# Use only 'javascript' to analyze code written in JavaScript, TypeScript or both
26
-
# Learn more about CodeQL language support at https://aka.ms/codeql-docs/language-support
27
-
28
-
steps:
29
-
- name: Checkout repository
30
-
uses: actions/checkout@v6
31
-
32
-
# Initializes the CodeQL tools for scanning.
33
-
- name: Initialize CodeQL
34
-
uses: github/codeql-action/init@v4
35
-
with:
36
-
languages: ${{ matrix.language }}
37
-
# If you wish to specify custom queries, you can do so here or in a config file.
38
-
# By default, queries listed here will override any specified in a config file.
39
-
# Prefix the list here with "+" to use these queries and those in the config file.
40
-
41
-
# For more details on CodeQL's query packs, refer to: https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-code-scanning#using-queries-in-ql-packs
42
-
# queries: security-extended,security-and-quality
43
-
44
-
# Autobuild attempts to build any compiled languages (C/C++, C#, Go, or Java).
45
-
# If this step fails, then you should remove it and run the build manually (see below)
46
-
- name: Autobuild
47
-
uses: github/codeql-action/autobuild@v4
48
-
49
-
# ℹ️ Command-line programs to run using the OS shell.
50
-
# 📚 See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun
51
-
52
-
# If the Autobuild fails above, remove it and uncomment the following three lines.
53
-
# modify them (or add more) to build your code if your project, please refer to the EXAMPLE below for guidance.
54
-
55
-
# - run: |
56
-
# echo "Run, Build Application using script"
57
-
# ./location_of_script_within_repo/buildscript.sh
58
-
59
-
- name: Perform CodeQL Analysis
60
-
uses: github/codeql-action/analyze@v4
61
-
with:
62
-
category: '/language:${{matrix.language}}'
-58
.github/workflows/docs.yml
-58
.github/workflows/docs.yml
···
1
-
name: Documentation
2
-
3
-
on:
4
-
push:
5
-
branches:
6
-
- main
7
-
pull_request:
8
-
branches:
9
-
- main
10
-
workflow_dispatch:
11
-
12
-
concurrency:
13
-
group: 'pages'
14
-
cancel-in-progress: false
15
-
16
-
jobs:
17
-
build:
18
-
permissions:
19
-
contents: read
20
-
runs-on: ubuntu-latest
21
-
steps:
22
-
- name: Checkout repository
23
-
uses: actions/checkout@v6
24
-
- name: Install pnpm
25
-
uses: pnpm/action-setup@v4
26
-
with:
27
-
version: 10
28
-
- name: Install Node.js
29
-
uses: actions/setup-node@v6
30
-
with:
31
-
node-version: latest
32
-
cache: 'pnpm'
33
-
- name: Install dependencies
34
-
run: pnpm install --frozen-lockfile
35
-
- name: Setup Pages
36
-
id: pages
37
-
uses: actions/configure-pages@v5
38
-
- name: Build documentation
39
-
run: npm run docs
40
-
- name: Upload artifact
41
-
uses: actions/upload-pages-artifact@v4
42
-
with:
43
-
path: ./dist/typedoc
44
-
45
-
deploy:
46
-
permissions:
47
-
pages: write
48
-
id-token: write
49
-
environment:
50
-
name: github-pages
51
-
url: ${{ steps.deployment.outputs.page_url }}
52
-
runs-on: ubuntu-latest
53
-
needs: build
54
-
if: github.event_name != 'pull_request'
55
-
steps:
56
-
- name: Deploy to GitHub Pages
57
-
id: deployment
58
-
uses: actions/deploy-pages@v4
-118
.github/workflows/main.yml
-118
.github/workflows/main.yml
···
1
-
name: Node.js CI
2
-
3
-
on:
4
-
push:
5
-
branches:
6
-
- main
7
-
pull_request:
8
-
branches:
9
-
- main
10
-
workflow_dispatch:
11
-
12
-
concurrency:
13
-
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
14
-
cancel-in-progress: true
15
-
16
-
jobs:
17
-
build:
18
-
name: build (Node @${{ matrix.label }})
19
-
runs-on: ubuntu-latest
20
-
strategy:
21
-
matrix:
22
-
include:
23
-
- node-version: lts/*
24
-
label: LTS
25
-
- node-version: latest
26
-
label: Latest
27
-
steps:
28
-
- name: Checkout repository
29
-
uses: actions/checkout@v6
30
-
- name: Install pnpm
31
-
uses: pnpm/action-setup@v4
32
-
with:
33
-
version: 10
34
-
- name: Install Node.js ${{ matrix.node-version }}
35
-
uses: actions/setup-node@v6
36
-
with:
37
-
node-version: ${{ matrix.node-version }}
38
-
cache: 'pnpm'
39
-
- name: Install dependencies
40
-
run: pnpm install --frozen-lockfile
41
-
- name: Build packages
42
-
run: pnpm run build
43
-
44
-
codequality:
45
-
name: codequality (${{ matrix.tool }})
46
-
runs-on: ubuntu-latest
47
-
strategy:
48
-
matrix:
49
-
include:
50
-
- tool: oxfmt
51
-
tool-purpose: formatter
52
-
script: fmt-ci
53
-
- tool: oxlint
54
-
tool-purpose: linter
55
-
script: lint
56
-
steps:
57
-
- name: Checkout repository
58
-
uses: actions/checkout@v6
59
-
- name: Install pnpm
60
-
uses: pnpm/action-setup@v4
61
-
with:
62
-
version: 10
63
-
- name: Install Node.js
64
-
uses: actions/setup-node@v6
65
-
with:
66
-
node-version: latest
67
-
cache: 'pnpm'
68
-
- name: Install dependencies
69
-
run: pnpm install --frozen-lockfile
70
-
- name: Print environment info
71
-
run: pnpx ${{ matrix.tool }} --version
72
-
- name: Run ${{ matrix.tool-purpose }} checks
73
-
run: pnpm run ${{ matrix.script }}
74
-
75
-
test:
76
-
runs-on: ubuntu-latest
77
-
steps:
78
-
- name: Checkout repository
79
-
uses: actions/checkout@v6
80
-
- name: Install pnpm
81
-
uses: pnpm/action-setup@v4
82
-
with:
83
-
version: 10
84
-
- name: Install Node.js
85
-
uses: actions/setup-node@v6
86
-
with:
87
-
node-version: latest
88
-
cache: 'pnpm'
89
-
- name: Install dependencies
90
-
run: pnpm install --frozen-lockfile
91
-
- name: Run tests
92
-
run: pnpm run test-ci
93
-
- name: Upload code coverage
94
-
uses: codecov/codecov-action@v5
95
-
with:
96
-
token: ${{ secrets.CODECOV_TOKEN }}
97
-
verbose: true
98
-
directory: dist/vitest/coverage
99
-
100
-
publish-dry-run:
101
-
runs-on: ubuntu-latest
102
-
steps:
103
-
- name: Checkout repository
104
-
uses: actions/checkout@v6
105
-
- name: Install pnpm
106
-
uses: pnpm/action-setup@v4
107
-
with:
108
-
version: 10
109
-
- name: Install Node.js
110
-
uses: actions/setup-node@v6
111
-
with:
112
-
node-version: latest
113
-
cache: 'pnpm'
114
-
registry-url: 'https://registry.npmjs.org'
115
-
- name: Install dependencies
116
-
run: pnpm install --frozen-lockfile
117
-
- name: Check if publishable
118
-
run: pnpm publish --dry-run --recursive --no-git-checks
+19
.tangled/workflows/build.yml
+19
.tangled/workflows/build.yml
···
1
+
when:
2
+
- event: ["pull_request"]
3
+
branch: ["main"]
4
+
5
+
engine:
6
+
- nixery
7
+
8
+
dependencies:
9
+
nixpkgs:
10
+
- nodejs_24
11
+
- pnpm
12
+
13
+
steps:
14
+
- name: Install dependencies
15
+
command: pnpm install --frozen-lockfile
16
+
- name: Build packages
17
+
command: pnpm run build
18
+
- name: Run tests
19
+
command: pnpm run test
+17
.tangled/workflows/codeqa-fmt.yml
+17
.tangled/workflows/codeqa-fmt.yml
···
1
+
when:
2
+
- event: ["pull_request"]
3
+
branch: ["main"]
4
+
5
+
engine:
6
+
- nixery
7
+
8
+
dependencies:
9
+
nixpkgs:
10
+
- nodejs_24
11
+
- pnpm
12
+
13
+
steps:
14
+
- name: Install dependencies
15
+
command: pnpm install --frozen-lockfile
16
+
- name: Run formatter checks
17
+
command: npm run fmt-check
+17
.tangled/workflows/codeqa-lint.yml
+17
.tangled/workflows/codeqa-lint.yml
···
1
+
when:
2
+
- event: ["pull_request"]
3
+
branch: ["main"]
4
+
5
+
engine:
6
+
- nixery
7
+
8
+
dependencies:
9
+
nixpkgs:
10
+
- nodejs_24
11
+
- pnpm
12
+
13
+
steps:
14
+
- name: Install dependencies
15
+
command: pnpm install --frozen-lockfile
16
+
- name: Run linter checks
17
+
command: npm run lint
+1
-1
LICENSE
+1
-1
LICENSE
+4
-10
README.md
+4
-10
README.md
···
6
6
7
7
- [x] ESM support (ECMAScript modules)
8
8
- [x] [TypeDoc](https://typedoc.org/) for generating API documentation
9
-
- [x] [GitHub Actions](https://github.com/features/actions) for continuous integration
9
+
- [x] [Spindle](https://docs.tangled.org/spindles.html) for continuous integration
10
10
- [x] [Dependabot](https://github.com/dependabot) for updating dependencies
11
11
- [x] [node-modules-inspector](https://github.com/antfu/node-modules-inspector) for deep insights on dependency graph
12
12
- [x] Uses the [VoidZero](https://voidzero.dev)-based JS toolchain
···
17
17
## Getting started
18
18
19
19
### Create a new repository
20
-
21
-
Choose a method:
22
-
23
-
- **GitHub UI**: Press the "Use this template" button in the top-right corner of this page.
24
-
- **GitHub CLI**: Install [GitHub CLI](https://cli.github.com). Then run one of the following:
25
-
```shell
26
-
gh repo create --template neoncitylights/node --public --clone _repository_ # clone as public
27
-
gh repo create --template neoncitylights/node --private --clone _repository_ # clone as private
28
-
```
20
+
1. Clone this repository template
21
+
1. In the repository directory, remove `.git` folder with `rm -rf .git`
22
+
1. In the repository directory, Initialize git repository with `git init .`
29
23
30
24
### Replace placeholders
31
25
-6
packages/pkg1/README.md
-6
packages/pkg1/README.md
···
1
1
# @author/package
2
2
3
3
[![License: MIT][license-badge]][license-url]
4
-
[![Documentation deployments][doc-deploy-badge]][doc-deploy-url]
5
-
[![Node.js workflow][ci-badge]][ci-url]
6
4
7
5
[license-badge]: https://img.shields.io/badge/License-MIT-blue.svg?style=flat-square
8
6
[license-url]: #license
9
-
[doc-deploy-badge]: https://img.shields.io/github/deployments/_username_/_repository_/github-pages?label=deploy&style=flat-square
10
-
[doc-deploy-url]: https://github.com/_username_/_repository_/deployments/activity_log?environment=github-pages
11
-
[ci-badge]: https://img.shields.io/github/actions/workflow/status/_username_/_repository_/.github/workflows/main.yml?style=flat-square
12
-
[ci-url]: https://github.com/_username_/_repository_/actions/workflows/main.yml
13
7
14
8
_desc_
15
9
+3
-3
packages/pkg1/package.json
+3
-3
packages/pkg1/package.json
···
5
5
"keywords": [
6
6
"typescript"
7
7
],
8
-
"bugs": "https://github.com/_username_/_repository_/issues",
8
+
"bugs": "https://tangled.org/_username_/_repository_/issues",
9
9
"license": "MIT",
10
10
"author": {
11
11
"name": "_author_",
12
-
"url": "https://github.com/_username_"
12
+
"url": "https://tangled.org/_username_"
13
13
},
14
14
"repository": {
15
15
"type": "git",
16
-
"url": "git+https://github.com/_username_/_repository_.git",
16
+
"url": "git+https://tangled.org/_username_/_repository_.git",
17
17
"directory": "packages/pkg1"
18
18
},
19
19
"files": [