@temir.ra/create-ts-lib 0.2.5 → 0.2.7-pre.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.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,14 @@
1
1
  # Version 0
2
2
 
3
+ ## 0.2.7-pre.1
4
+
5
+ 1. Changed `filter` property in `cdnRewritePlugin` in `scripts/build-lib-bundle.ts` to take import identifiers into account that do not have file extensions.
6
+
7
+ ## 0.2.6
8
+
9
+ 1. Minor ToC and typo fixes in both README.md files (root and template).
10
+ 2. Revised the Publish section in both README.md files.
11
+
3
12
  ## 0.2.5
4
13
 
5
14
  1. Minor README updates.
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. [Build](#build)
27
- 2. [Change Management](#change-management)
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
 
@@ -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
- ⚠️ Authenticate first: run `npm login` or configure `~/.npmrc` or `bunfig.toml` with an auth token.
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.5+8056892
1
+ 0.2.7-pre.1+1fa806e
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@temir.ra/create-ts-lib",
3
- "version": "0.2.5",
3
+ "version": "0.2.7-pre.1",
4
4
  "description": "Typescript library template",
5
5
  "author": "temir.ra",
6
6
  "license": "MIT",
@@ -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
- ⚠️ Authenticate first: run `npm login` or configure `~/.npmrc` or `bunfig.toml` with an auth token.
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
  ```
@@ -99,7 +99,7 @@ const cdnRewritePlugin = {
99
99
  console.log(`[cdn-rewrite] '${importSpecifier}' → '${url}'`);
100
100
  }
101
101
 
102
- build.onResolve({ filter: /.*/ }, (args: any) => {
102
+ build.onResolve({ filter: /\*/ }, (args: any) => {
103
103
  const url = resolved.get(args.path);
104
104
  if (url) return { path: url, external: true };
105
105
  });