@doikayt/typescript-build-config 0.1.37 → 0.1.39
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.
- package/README.md +41 -2
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -32,6 +32,7 @@ Shared build configuration presets for TypeScript-based projects.
|
|
|
32
32
|
- [For Maintainers](#for-maintainers)
|
|
33
33
|
- [Clone and install](#clone-and-install)
|
|
34
34
|
- [Run the full CI suite](#run-the-full-ci-suite)
|
|
35
|
+
- [Test the shell aliases](#test-the-shell-aliases)
|
|
35
36
|
- [License](#license)
|
|
36
37
|
<!-- TOC:END -->
|
|
37
38
|
|
|
@@ -537,6 +538,10 @@ On `npm update`, the behavior per file is:
|
|
|
537
538
|
This means local customisations are never silently overwritten, but you are
|
|
538
539
|
notified when your copy has drifted from the upstream version.
|
|
539
540
|
|
|
541
|
+
**Where to see pipeline runs:** Codeberg's repository page has no GitHub-style "Actions" tab.
|
|
542
|
+
Runs are listed on Woodpecker at `https://ci.codeberg.org/repos/<repo-id>`; see
|
|
543
|
+
[Finding `<repo-id>` and `<org-id>`](CODEBERG_HOW_TO_ARTICLE/onboarding-a-new-user.md#finding-repo-id-and-org-id).
|
|
544
|
+
|
|
540
545
|
The release pipeline requires `NPM` and `CODEBERG_TOKEN` secrets in Woodpecker.
|
|
541
546
|
|
|
542
547
|
## Conventions Every Project Must Adhere To
|
|
@@ -663,11 +668,12 @@ Installed by [Quick start](#quick-start) step 1 (or manually: add
|
|
|
663
668
|
|
|
664
669
|
| Alias | What it does |
|
|
665
670
|
| --- | --- |
|
|
666
|
-
| `mkrepo <name>` | Create a public repo in the `doikayt` org (guards against duplicates). |
|
|
671
|
+
| `mkrepo <name>` | Create a public repo in the `doikayt` org (guards against duplicates). Needs a team with **Create repositories**; see [Teams](CODEBERG_HOW_TO_ARTICLE/orgs-teams-and-members.md#teams). |
|
|
672
|
+
| `rmrepo <name>` | Permanently delete a repo from the `doikayt` org. Shows what it found, then makes you type the full `owner/name` to confirm; there is no flag to skip that. |
|
|
667
673
|
| `addpush [name]` | Wire up the current directory to an existing Codeberg repo (create it first with `mkrepo`) and push. Defaults `name` to the current directory. |
|
|
668
674
|
| `dk-new` | `npm init -y` + `@doikayt` scope. |
|
|
669
675
|
| `dk-init` | Scaffold the build config into the current project. |
|
|
670
|
-
| `dk-scaffold <name>\|. [lib\|app] [--local] [-q]` | Create the repo, scaffold, and push — one command (defaults to app). Pass `.` to scaffold in the current directory, using its leaf name as `@doikayt/<package-name>`. `--local` skips the repo and push; `-q` hides the auto-answered-prompts note. |
|
|
676
|
+
| `dk-scaffold <name>\|. [lib\|app] [--local] [-q]` | Create the repo, scaffold, and push — one command (defaults to app). Pass `.` to scaffold in the current directory, using its leaf name as `@doikayt/<package-name>`. `--local` skips the repo and push; `-q` hides the auto-answered-prompts note. Without `--local` it needs a team with **Create repositories**; see [Teams](CODEBERG_HOW_TO_ARTICLE/orgs-teams-and-members.md#teams). |
|
|
671
677
|
| `gp` | Pull with rebase, then push the current branch. The everyday git sync command — requires the branch to already track a remote. |
|
|
672
678
|
| `gpu` | First push of a new local branch: sets it up to track `origin` and pushes (or just wires up tracking if `origin` already has a same-named branch). |
|
|
673
679
|
| `trackify` | Set the upstream tracking branch for the current branch to the same-named branch on `origin`, without pushing. Fails if that remote branch doesn't exist yet. |
|
|
@@ -707,6 +713,39 @@ To auto-fix formatting before verifying:
|
|
|
707
713
|
npm run update-all-format && npm run ci
|
|
708
714
|
```
|
|
709
715
|
|
|
716
|
+
### Test the shell aliases
|
|
717
|
+
|
|
718
|
+
The tests for `assets/shell/aliases.sh` live in `tests/aliases.test.js`. Most of them run
|
|
719
|
+
the aliases in a bash subprocess with `curl` replaced by a stub, so they make no network
|
|
720
|
+
calls and can't touch Codeberg. `npm test` and `npm run ci` run them with everything else.
|
|
721
|
+
|
|
722
|
+
**When to run them:** after any change to `aliases.sh`, and before a release that touches
|
|
723
|
+
`mkrepo`, `rmrepo`, or `dk-scaffold`.
|
|
724
|
+
|
|
725
|
+
To run only the `rmrepo` tests:
|
|
726
|
+
|
|
727
|
+
```bash
|
|
728
|
+
node --test --test-name-pattern='rmrepo' tests/aliases.test.js
|
|
729
|
+
```
|
|
730
|
+
|
|
731
|
+
**Live test (opt-in).** One test, `live: mkrepo then rmrepo round trip`, calls the real
|
|
732
|
+
Codeberg API. It creates a repo named `tbc-livetest-<timestamp>` in your org and deletes it
|
|
733
|
+
again, with a cleanup in a `finally` block if something fails partway. It is skipped
|
|
734
|
+
unless `RUN_LIVE_CODEBERG_TESTS=1`, `CODEBERG_TOKEN` and `REPO_OWNER` are all set, so
|
|
735
|
+
`npm test` never runs it. Run it once, by hand, after changing `mkrepo` or `rmrepo`:
|
|
736
|
+
|
|
737
|
+
```bash
|
|
738
|
+
export CODEBERG_TOKEN=<your token>
|
|
739
|
+
export REPO_OWNER=doikayt
|
|
740
|
+
NO_COLOR=1 RUN_LIVE_CODEBERG_TESTS=1 node --test --test-name-pattern='live' tests/aliases.test.js
|
|
741
|
+
```
|
|
742
|
+
|
|
743
|
+
- The token needs `repository` and `organization` Read and write, and your account must be
|
|
744
|
+
on a team with **Create repositories** (see
|
|
745
|
+
[access-tokens.md](CODEBERG_HOW_TO_ARTICLE/access-tokens.md)).
|
|
746
|
+
- `NO_COLOR=1` keeps the summary lines readable on terminals that render Node's grey
|
|
747
|
+
"bright black" as near-invisible. It is optional.
|
|
748
|
+
|
|
710
749
|
To verify end-to-end that `init` scaffolds and ships both a library and an app —
|
|
711
750
|
by hand, with what to look for at each step — follow
|
|
712
751
|
[docs/verification-runbook.md](docs/verification-runbook.md).
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@doikayt/typescript-build-config",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.39",
|
|
4
4
|
"description": "Shared build configuration for TypeScript projects — ESLint, Prettier, tsconfig, and Playwright presets",
|
|
5
5
|
"_comments": {
|
|
6
6
|
"exports": "This block lists the config files that will be extended by files in in src/toplevel - which are copied to consuming project root folder. An example: eslint.config.js imports from '@doikayt/typescript-build-config/eslint'.",
|