@temir.ra/create-ts-lib 0.2.4 → 0.2.6
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/CHANGELOG.md +11 -0
- package/README.md +19 -8
- package/buildinfo.txt +1 -1
- package/package.json +1 -1
- package/template/README.md +18 -4
- package/template/tests/buildinfo.test.ts +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,16 @@
|
|
|
1
1
|
# Version 0
|
|
2
2
|
|
|
3
|
+
## 0.2.6
|
|
4
|
+
|
|
5
|
+
1. Minor ToC and typo fixes in both README.md files (root and template).
|
|
6
|
+
2. Revised the Publish section in both README.md files.
|
|
7
|
+
|
|
8
|
+
## 0.2.5
|
|
9
|
+
|
|
10
|
+
1. Minor README updates.
|
|
11
|
+
2. Fixed `buildinfo.txt` in published package.
|
|
12
|
+
3. Fixed `buildinfo.test.ts` regex to accept semver prerelease identifiers.
|
|
13
|
+
|
|
3
14
|
## 0.2.4
|
|
4
15
|
|
|
5
16
|
1. Documented template caching in the Quick Start section with commands to pin the version or clear the cache.
|
package/README.md
CHANGED
|
@@ -23,9 +23,8 @@ A template for TypeScript libraries distributed via npm-compatible registries. P
|
|
|
23
23
|
8. [`src/dev.ts`](#srcdevts)
|
|
24
24
|
9. [`CLAUDE.md` / `AGENTS.md`](#claudemd--agentsmd)
|
|
25
25
|
3. [DevOps](#devops)
|
|
26
|
-
1. [
|
|
27
|
-
2. [
|
|
28
|
-
3. [Publish](#publish)
|
|
26
|
+
1. [Change Management](#change-management)
|
|
27
|
+
2. [Publish](#publish)
|
|
29
28
|
1. [npmjs.org](#npmjsorg)
|
|
30
29
|
2. [Custom registry](#custom-registry)
|
|
31
30
|
|
|
@@ -57,7 +56,7 @@ bun install
|
|
|
57
56
|
|
|
58
57
|
# Documentation
|
|
59
58
|
|
|
60
|
-
The following sections explain the configurations and conventions baked into the generated package. Useful when adapting the
|
|
59
|
+
The following sections explain the configurations and conventions baked into the generated package. Useful when adapting the generated package to fit a specific library's needs.
|
|
61
60
|
|
|
62
61
|
## `tsconfig.json` and `tsconfig.build.json`
|
|
63
62
|
|
|
@@ -453,15 +452,25 @@ bun run dist/cli.bundle.js -- example
|
|
|
453
452
|
4. Add an entry for the new version in [`CHANGELOG.md`](CHANGELOG.md).
|
|
454
453
|
5. Pull request the branch.
|
|
455
454
|
6. After merge, run `bun run build`.
|
|
456
|
-
7. Publish
|
|
455
|
+
7. Publish.
|
|
457
456
|
|
|
458
457
|
## Publish
|
|
459
458
|
|
|
459
|
+
See the following sources to configure the target registry and authentication.
|
|
460
|
+
|
|
461
|
+
- [Configuring npm - `npmrc`](https://docs.npmjs.com/cli/v10/configuring-npm/npmrc)
|
|
462
|
+
- [Bun package manager - `install.registry`](https://bun.com/docs/runtime/bunfig#install-scopes)
|
|
463
|
+
|
|
464
|
+
⚠️ Package Scope and the authentication for the target registry must be aligned.
|
|
465
|
+
|
|
460
466
|
### `npmjs.org`
|
|
461
467
|
|
|
462
|
-
|
|
468
|
+
Publish to the public npm registry.
|
|
463
469
|
|
|
464
470
|
```powershell
|
|
471
|
+
# authenticate
|
|
472
|
+
npm login
|
|
473
|
+
# publish
|
|
465
474
|
bun publish --registry https://registry.npmjs.org/ --access public
|
|
466
475
|
```
|
|
467
476
|
|
|
@@ -474,14 +483,16 @@ bun publish --registry https://registry.npmjs.org/ --access public
|
|
|
474
483
|
# <BUN_PUBLISH_AUTH_TOKEN: <BUN_PUBLISH_AUTH_TOKEN>
|
|
475
484
|
```
|
|
476
485
|
|
|
477
|
-
`bunfig.toml`:
|
|
486
|
+
`~/.bunfig.toml` or `bunfig.toml`:
|
|
478
487
|
|
|
479
488
|
```toml
|
|
480
489
|
[install.scopes]
|
|
481
|
-
<SCOPE_WITHOUT_AT> = { url = "<REGISTRY_URL>", token = "$BUN_PUBLISH_AUTH_TOKEN" }
|
|
490
|
+
"<SCOPE_WITHOUT_AT>" = { url = "<REGISTRY_URL>", token = "$BUN_PUBLISH_AUTH_TOKEN" }
|
|
482
491
|
```
|
|
483
492
|
|
|
484
493
|
```powershell
|
|
494
|
+
# authenticate
|
|
485
495
|
$env:BUN_PUBLISH_AUTH_TOKEN = "<BUN_PUBLISH_AUTH_TOKEN>"
|
|
496
|
+
# publish
|
|
486
497
|
bun publish
|
|
487
498
|
```
|
package/buildinfo.txt
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
0.2.
|
|
1
|
+
0.2.6+2fc6757
|
package/package.json
CHANGED
package/template/README.md
CHANGED
|
@@ -9,6 +9,8 @@
|
|
|
9
9
|
3. [DevOps](#devops)
|
|
10
10
|
1. [Change Management](#change-management)
|
|
11
11
|
2. [Publish](#publish)
|
|
12
|
+
1. [npmjs.org](#npmjsorg)
|
|
13
|
+
2. [Custom registry](#custom-registry)
|
|
12
14
|
|
|
13
15
|
# Quick Start
|
|
14
16
|
|
|
@@ -60,15 +62,25 @@ Copy `node_modules/@scope/lib-name/assets/` into your build output alongside the
|
|
|
60
62
|
4. Add an entry for the new version in [`CHANGELOG.md`](CHANGELOG.md).
|
|
61
63
|
5. Pull request the branch.
|
|
62
64
|
6. After merge, run `bun run build`.
|
|
63
|
-
7. Publish
|
|
65
|
+
7. Publish.
|
|
64
66
|
|
|
65
67
|
## Publish
|
|
66
68
|
|
|
69
|
+
See the following sources to configure the target registry and authentication.
|
|
70
|
+
|
|
71
|
+
- [Configuring npm - `npmrc`](https://docs.npmjs.com/cli/v10/configuring-npm/npmrc)
|
|
72
|
+
- [Bun package manager - `install.registry`](https://bun.com/docs/runtime/bunfig#install-scopes)
|
|
73
|
+
|
|
74
|
+
⚠️ Package Scope and the authentication for the target registry must be aligned.
|
|
75
|
+
|
|
67
76
|
### `npmjs.org`
|
|
68
77
|
|
|
69
|
-
|
|
78
|
+
Publish to the public npm registry.
|
|
70
79
|
|
|
71
80
|
```powershell
|
|
81
|
+
# authenticate
|
|
82
|
+
npm login
|
|
83
|
+
# publish
|
|
72
84
|
bun publish --registry https://registry.npmjs.org/ --access public
|
|
73
85
|
```
|
|
74
86
|
|
|
@@ -81,14 +93,16 @@ bun publish --registry https://registry.npmjs.org/ --access public
|
|
|
81
93
|
# <BUN_PUBLISH_AUTH_TOKEN: <BUN_PUBLISH_AUTH_TOKEN>
|
|
82
94
|
```
|
|
83
95
|
|
|
84
|
-
`bunfig.toml`:
|
|
96
|
+
`~/.bunfig.toml` or `bunfig.toml`:
|
|
85
97
|
|
|
86
98
|
```toml
|
|
87
99
|
[install.scopes]
|
|
88
|
-
<SCOPE_WITHOUT_AT> = { url = "<REGISTRY_URL>", token = "$BUN_PUBLISH_AUTH_TOKEN" }
|
|
100
|
+
"<SCOPE_WITHOUT_AT>" = { url = "<REGISTRY_URL>", token = "$BUN_PUBLISH_AUTH_TOKEN" }
|
|
89
101
|
```
|
|
90
102
|
|
|
91
103
|
```powershell
|
|
104
|
+
# authenticate
|
|
92
105
|
$env:BUN_PUBLISH_AUTH_TOKEN = "<BUN_PUBLISH_AUTH_TOKEN>"
|
|
106
|
+
# publish
|
|
93
107
|
bun publish
|
|
94
108
|
```
|
|
@@ -10,7 +10,7 @@ describe('buildInfo', () => {
|
|
|
10
10
|
it('should follow semantic versioning format with optional commit hash', () => {
|
|
11
11
|
const buildinfoPath = fileURLToPath(buildinfoUrl);
|
|
12
12
|
const buildinfo = readFileSync(buildinfoPath, 'utf-8').trim();
|
|
13
|
-
expect(buildinfo).toMatch(/^\d+\.\d+\.\d+(\+[
|
|
13
|
+
expect(buildinfo).toMatch(/^\d+\.\d+\.\d+(-[a-zA-Z0-9.-]+)?(\+[a-zA-Z0-9.-]+)?$/);
|
|
14
14
|
});
|
|
15
15
|
|
|
16
16
|
it('should not contain whitespace', () => {
|