@tyleretters/discography 2.1.11 → 3.0.0

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 CHANGED
@@ -11,12 +11,14 @@
11
11
 
12
12
  ## Setup
13
13
 
14
- - `cd discography`
15
- - `npm i`
16
- - `cd src`
17
- - `python3 -m venv venv`
18
- - `source venv/bin/activate`
19
- - `pip install -r requirements.txt`
14
+ ```zsh
15
+ cd discography
16
+ npm i
17
+ cd src
18
+ python3 -m venv venv
19
+ source venv/bin/activate
20
+ pip install -r requirements.txt
21
+ ```
20
22
 
21
23
  ## Adding a Compilation
22
24
 
@@ -31,24 +33,46 @@ python3 scrape_bandcamp.py <bandcamp_url> \
31
33
 
32
34
  Review the prepended entry in `src/discography.yml`, then build and publish as normal.
33
35
 
34
- ## Updating & Publishing
36
+ ## Build
37
+
38
+ ```zsh
39
+ npm run build
40
+ ```
41
+
42
+ This runs the full pipeline: Python converter (YAML to TS), Vite bundler (ESM + UMD), TypeScript compiler (type declarations), and copies the source YAML to `dist/`.
43
+
44
+ `dist/` is gitignored — built artifacts are not committed. The `"files"` field in `package.json` ensures `dist/` is always included in the npm tarball.
35
45
 
36
- ### One Shot
46
+ ## Test
37
47
 
38
48
  ```zsh
39
- cd src && python3 -m venv venv && source venv/bin/activate && pip install -r requirements.txt && cd ../ && npm run build && git add . && git commit -m "++" && git push origin main && npm version patch && npm publish
49
+ source src/venv/bin/activate
50
+ pytest tests/
40
51
  ```
41
52
 
42
- ### Sequential
53
+ ## Lint
54
+
55
+ ```zsh
56
+ npm run lint
57
+ ```
43
58
 
44
- - Update `./src/discography.yml`
45
- - `npm run build` (convert yml to ts & build dist ready js)
46
- - `git add . && git commit -m "++" && git push origin main`
47
- - QA: [https://github.com/tyleretters/discography](https://github.com/tyleretters/discography)
48
- - `npm version patch`
49
- - `npm publish`
59
+ ## Publishing
60
+
61
+ After updating `src/discography.yml`:
62
+
63
+ ```zsh
64
+ git add . && git commit -m "++" && git push origin main
65
+ npm version patch && npm publish
66
+ ```
67
+
68
+ `npm publish` automatically runs `npm run build` via the `prepublishOnly` hook, so there's no need to build manually before publishing.
50
69
 
51
70
  ## Downstream Implementations
52
71
 
53
- - `npm i @tyleretters/discography`
54
- - `import discography from '@tyleretters/discography'`
72
+ ```zsh
73
+ npm i @tyleretters/discography
74
+ ```
75
+
76
+ ```typescript
77
+ import discography from '@tyleretters/discography'
78
+ ```
@@ -32,6 +32,7 @@ export declare const discography: ({
32
32
  mp3_url: string;
33
33
  wav_url: string;
34
34
  id: string;
35
+ runtime: string;
35
36
  monospaceNotes?: undefined;
36
37
  } | {
37
38
  title: string;
@@ -65,6 +66,7 @@ export declare const discography: ({
65
66
  mp3_url: string;
66
67
  wav_url: string;
67
68
  id: string;
69
+ runtime: string;
68
70
  slug?: undefined;
69
71
  monospaceNotes?: undefined;
70
72
  } | {
@@ -98,6 +100,7 @@ export declare const discography: ({
98
100
  mp3_url: string;
99
101
  wav_url: string;
100
102
  id: string;
103
+ runtime: string;
101
104
  slug?: undefined;
102
105
  trackIds?: undefined;
103
106
  monospaceNotes?: undefined;
@@ -134,6 +137,7 @@ export declare const discography: ({
134
137
  mp3_url: string;
135
138
  wav_url: string;
136
139
  id: string;
140
+ runtime: string;
137
141
  monospaceNotes?: undefined;
138
142
  } | {
139
143
  title: string;
@@ -165,6 +169,7 @@ export declare const discography: ({
165
169
  cover_url: string;
166
170
  mp3_url: string;
167
171
  id: string;
172
+ runtime: string;
168
173
  slug?: undefined;
169
174
  wav_url?: undefined;
170
175
  monospaceNotes?: undefined;
@@ -195,6 +200,7 @@ export declare const discography: ({
195
200
  release_slug: string;
196
201
  cover_url: string;
197
202
  id: string;
203
+ runtime: string;
198
204
  slug?: undefined;
199
205
  trackIds?: undefined;
200
206
  mp3_url?: undefined;
@@ -233,6 +239,7 @@ export declare const discography: ({
233
239
  mp3_url: string;
234
240
  wav_url: string;
235
241
  id: string;
242
+ runtime: string;
236
243
  slug?: undefined;
237
244
  trackIds?: undefined;
238
245
  monospaceNotes?: undefined;
@@ -265,6 +272,7 @@ export declare const discography: ({
265
272
  cover_url: string;
266
273
  mp3_url: string;
267
274
  id: string;
275
+ runtime: string;
268
276
  slug?: undefined;
269
277
  trackIds?: undefined;
270
278
  wav_url?: undefined;
@@ -291,6 +299,7 @@ export declare const discography: ({
291
299
  release_slug: string;
292
300
  cover_url: string;
293
301
  id: string;
302
+ runtime: string;
294
303
  slug?: undefined;
295
304
  trackIds?: undefined;
296
305
  streams?: undefined;
@@ -323,6 +332,7 @@ export declare const discography: ({
323
332
  mp3_url: string;
324
333
  wav_url: string;
325
334
  id: string;
335
+ runtime: string;
326
336
  slug?: undefined;
327
337
  trackIds?: undefined;
328
338
  streams?: undefined;
@@ -359,6 +369,7 @@ export declare const discography: ({
359
369
  mp3_url: string;
360
370
  wav_url: string;
361
371
  id: string;
372
+ runtime: string;
362
373
  slug?: undefined;
363
374
  trackIds?: undefined;
364
375
  } | {
@@ -393,6 +404,7 @@ export declare const discography: ({
393
404
  mp3_url: string;
394
405
  wav_url: string;
395
406
  id: string;
407
+ runtime: string;
396
408
  slug?: undefined;
397
409
  trackIds?: undefined;
398
410
  monospaceNotes?: undefined;