@ansango/lastfm-api 3.1.3
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 +323 -0
- package/LICENSE +21 -0
- package/README.md +470 -0
- package/dist/__tests__/utils.test.d.ts +2 -0
- package/dist/__tests__/utils.test.d.ts.map +1 -0
- package/dist/__tests__/utils.test.js +86 -0
- package/dist/__tests__/utils.test.js.map +1 -0
- package/dist/client.d.ts +52 -0
- package/dist/client.d.ts.map +1 -0
- package/dist/client.js +68 -0
- package/dist/client.js.map +1 -0
- package/dist/config.d.ts +23 -0
- package/dist/config.d.ts.map +1 -0
- package/dist/config.js +59 -0
- package/dist/config.js.map +1 -0
- package/dist/entrypoints/album.d.ts +4 -0
- package/dist/entrypoints/album.d.ts.map +1 -0
- package/dist/entrypoints/album.js +3 -0
- package/dist/entrypoints/album.js.map +1 -0
- package/dist/entrypoints/album.schemas.d.ts +2 -0
- package/dist/entrypoints/album.schemas.d.ts.map +1 -0
- package/dist/entrypoints/album.schemas.js +3 -0
- package/dist/entrypoints/album.schemas.js.map +1 -0
- package/dist/entrypoints/artist.d.ts +4 -0
- package/dist/entrypoints/artist.d.ts.map +1 -0
- package/dist/entrypoints/artist.js +3 -0
- package/dist/entrypoints/artist.js.map +1 -0
- package/dist/entrypoints/artist.schemas.d.ts +2 -0
- package/dist/entrypoints/artist.schemas.d.ts.map +1 -0
- package/dist/entrypoints/artist.schemas.js +3 -0
- package/dist/entrypoints/artist.schemas.js.map +1 -0
- package/dist/entrypoints/auth.d.ts +4 -0
- package/dist/entrypoints/auth.d.ts.map +1 -0
- package/dist/entrypoints/auth.js +3 -0
- package/dist/entrypoints/auth.js.map +1 -0
- package/dist/entrypoints/auth.schemas.d.ts +2 -0
- package/dist/entrypoints/auth.schemas.d.ts.map +1 -0
- package/dist/entrypoints/auth.schemas.js +3 -0
- package/dist/entrypoints/auth.schemas.js.map +1 -0
- package/dist/entrypoints/base.schemas.d.ts +2 -0
- package/dist/entrypoints/base.schemas.d.ts.map +1 -0
- package/dist/entrypoints/base.schemas.js +3 -0
- package/dist/entrypoints/base.schemas.js.map +1 -0
- package/dist/entrypoints/chart.d.ts +4 -0
- package/dist/entrypoints/chart.d.ts.map +1 -0
- package/dist/entrypoints/chart.js +3 -0
- package/dist/entrypoints/chart.js.map +1 -0
- package/dist/entrypoints/chart.schemas.d.ts +2 -0
- package/dist/entrypoints/chart.schemas.d.ts.map +1 -0
- package/dist/entrypoints/chart.schemas.js +3 -0
- package/dist/entrypoints/chart.schemas.js.map +1 -0
- package/dist/entrypoints/geo.d.ts +4 -0
- package/dist/entrypoints/geo.d.ts.map +1 -0
- package/dist/entrypoints/geo.js +3 -0
- package/dist/entrypoints/geo.js.map +1 -0
- package/dist/entrypoints/geo.schemas.d.ts +2 -0
- package/dist/entrypoints/geo.schemas.d.ts.map +1 -0
- package/dist/entrypoints/geo.schemas.js +3 -0
- package/dist/entrypoints/geo.schemas.js.map +1 -0
- package/dist/entrypoints/library.d.ts +4 -0
- package/dist/entrypoints/library.d.ts.map +1 -0
- package/dist/entrypoints/library.js +3 -0
- package/dist/entrypoints/library.js.map +1 -0
- package/dist/entrypoints/library.schemas.d.ts +2 -0
- package/dist/entrypoints/library.schemas.d.ts.map +1 -0
- package/dist/entrypoints/library.schemas.js +3 -0
- package/dist/entrypoints/library.schemas.js.map +1 -0
- package/dist/entrypoints/tag.d.ts +4 -0
- package/dist/entrypoints/tag.d.ts.map +1 -0
- package/dist/entrypoints/tag.js +3 -0
- package/dist/entrypoints/tag.js.map +1 -0
- package/dist/entrypoints/tag.schemas.d.ts +2 -0
- package/dist/entrypoints/tag.schemas.d.ts.map +1 -0
- package/dist/entrypoints/tag.schemas.js +3 -0
- package/dist/entrypoints/tag.schemas.js.map +1 -0
- package/dist/entrypoints/track.d.ts +4 -0
- package/dist/entrypoints/track.d.ts.map +1 -0
- package/dist/entrypoints/track.js +3 -0
- package/dist/entrypoints/track.js.map +1 -0
- package/dist/entrypoints/track.schemas.d.ts +2 -0
- package/dist/entrypoints/track.schemas.d.ts.map +1 -0
- package/dist/entrypoints/track.schemas.js +3 -0
- package/dist/entrypoints/track.schemas.js.map +1 -0
- package/dist/entrypoints/user.d.ts +4 -0
- package/dist/entrypoints/user.d.ts.map +1 -0
- package/dist/entrypoints/user.js +3 -0
- package/dist/entrypoints/user.js.map +1 -0
- package/dist/entrypoints/user.schemas.d.ts +2 -0
- package/dist/entrypoints/user.schemas.d.ts.map +1 -0
- package/dist/entrypoints/user.schemas.js +3 -0
- package/dist/entrypoints/user.schemas.js.map +1 -0
- package/dist/index.d.ts +26 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +20 -0
- package/dist/index.js.map +1 -0
- package/dist/services/album.d.ts +38 -0
- package/dist/services/album.d.ts.map +1 -0
- package/dist/services/album.js +10 -0
- package/dist/services/album.js.map +1 -0
- package/dist/services/album.schemas.d.ts +171 -0
- package/dist/services/album.schemas.d.ts.map +1 -0
- package/dist/services/album.schemas.js +128 -0
- package/dist/services/album.schemas.js.map +1 -0
- package/dist/services/artist.d.ts +62 -0
- package/dist/services/artist.d.ts.map +1 -0
- package/dist/services/artist.js +13 -0
- package/dist/services/artist.js.map +1 -0
- package/dist/services/artist.schemas.d.ts +306 -0
- package/dist/services/artist.schemas.d.ts.map +1 -0
- package/dist/services/artist.schemas.js +199 -0
- package/dist/services/artist.schemas.js.map +1 -0
- package/dist/services/auth.d.ts +14 -0
- package/dist/services/auth.d.ts.map +1 -0
- package/dist/services/auth.js +7 -0
- package/dist/services/auth.js.map +1 -0
- package/dist/services/auth.schemas.d.ts +20 -0
- package/dist/services/auth.schemas.d.ts.map +1 -0
- package/dist/services/auth.schemas.js +16 -0
- package/dist/services/auth.schemas.js.map +1 -0
- package/dist/services/chart.d.ts +30 -0
- package/dist/services/chart.d.ts.map +1 -0
- package/dist/services/chart.js +9 -0
- package/dist/services/chart.js.map +1 -0
- package/dist/services/chart.schemas.d.ts +84 -0
- package/dist/services/chart.schemas.d.ts.map +1 -0
- package/dist/services/chart.schemas.js +73 -0
- package/dist/services/chart.schemas.js.map +1 -0
- package/dist/services/geo.d.ts +22 -0
- package/dist/services/geo.d.ts.map +1 -0
- package/dist/services/geo.js +8 -0
- package/dist/services/geo.js.map +1 -0
- package/dist/services/geo.schemas.d.ts +68 -0
- package/dist/services/geo.schemas.d.ts.map +1 -0
- package/dist/services/geo.schemas.js +59 -0
- package/dist/services/geo.schemas.js.map +1 -0
- package/dist/services/index.d.ts +20 -0
- package/dist/services/index.d.ts.map +1 -0
- package/dist/services/index.js +21 -0
- package/dist/services/index.js.map +1 -0
- package/dist/services/library.d.ts +14 -0
- package/dist/services/library.d.ts.map +1 -0
- package/dist/services/library.js +7 -0
- package/dist/services/library.js.map +1 -0
- package/dist/services/library.schemas.d.ts +31 -0
- package/dist/services/library.schemas.d.ts.map +1 -0
- package/dist/services/library.schemas.js +27 -0
- package/dist/services/library.schemas.js.map +1 -0
- package/dist/services/schemas/base.entities.schemas.d.ts +12 -0
- package/dist/services/schemas/base.entities.schemas.d.ts.map +1 -0
- package/dist/services/schemas/base.entities.schemas.js +18 -0
- package/dist/services/schemas/base.entities.schemas.js.map +1 -0
- package/dist/services/schemas/base.entity-names.schemas.d.ts +12 -0
- package/dist/services/schemas/base.entity-names.schemas.d.ts.map +1 -0
- package/dist/services/schemas/base.entity-names.schemas.js +8 -0
- package/dist/services/schemas/base.entity-names.schemas.js.map +1 -0
- package/dist/services/schemas/base.metadata.schemas.d.ts +26 -0
- package/dist/services/schemas/base.metadata.schemas.d.ts.map +1 -0
- package/dist/services/schemas/base.metadata.schemas.js +17 -0
- package/dist/services/schemas/base.metadata.schemas.js.map +1 -0
- package/dist/services/schemas/base.pagination.schemas.d.ts +18 -0
- package/dist/services/schemas/base.pagination.schemas.d.ts.map +1 -0
- package/dist/services/schemas/base.pagination.schemas.js +12 -0
- package/dist/services/schemas/base.pagination.schemas.js.map +1 -0
- package/dist/services/schemas/base.primitives.schemas.d.ts +50 -0
- package/dist/services/schemas/base.primitives.schemas.d.ts.map +1 -0
- package/dist/services/schemas/base.primitives.schemas.js +36 -0
- package/dist/services/schemas/base.primitives.schemas.js.map +1 -0
- package/dist/services/schemas/index.d.ts +6 -0
- package/dist/services/schemas/index.d.ts.map +1 -0
- package/dist/services/schemas/index.js +7 -0
- package/dist/services/schemas/index.js.map +1 -0
- package/dist/services/tag.d.ts +62 -0
- package/dist/services/tag.d.ts.map +1 -0
- package/dist/services/tag.js +13 -0
- package/dist/services/tag.js.map +1 -0
- package/dist/services/tag.schemas.d.ts +192 -0
- package/dist/services/tag.schemas.d.ts.map +1 -0
- package/dist/services/tag.schemas.js +156 -0
- package/dist/services/tag.schemas.js.map +1 -0
- package/dist/services/track.d.ts +74 -0
- package/dist/services/track.d.ts.map +1 -0
- package/dist/services/track.js +25 -0
- package/dist/services/track.js.map +1 -0
- package/dist/services/track.schemas.d.ts +284 -0
- package/dist/services/track.schemas.d.ts.map +1 -0
- package/dist/services/track.schemas.js +191 -0
- package/dist/services/track.schemas.js.map +1 -0
- package/dist/services/track.utils.d.ts +10 -0
- package/dist/services/track.utils.d.ts.map +1 -0
- package/dist/services/track.utils.js +56 -0
- package/dist/services/track.utils.js.map +1 -0
- package/dist/services/user.d.ts +102 -0
- package/dist/services/user.d.ts.map +1 -0
- package/dist/services/user.js +18 -0
- package/dist/services/user.js.map +1 -0
- package/dist/services/user.schemas.d.ts +609 -0
- package/dist/services/user.schemas.d.ts.map +1 -0
- package/dist/services/user.schemas.js +321 -0
- package/dist/services/user.schemas.js.map +1 -0
- package/dist/utils.d.ts +39 -0
- package/dist/utils.d.ts.map +1 -0
- package/dist/utils.js +125 -0
- package/dist/utils.js.map +1 -0
- package/package.json +156 -0
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,323 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
All notable changes to this project will be documented in this file.
|
|
4
|
+
|
|
5
|
+
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
|
6
|
+
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
7
|
+
|
|
8
|
+
> **Package rename:** The project is now published as `@ansango/lastfm-api` from
|
|
9
|
+
> [ansango/lastfm-api](https://github.com/ansango/lastfm-api). Entries below preserve the
|
|
10
|
+
> historical package and repository names used by their original releases.
|
|
11
|
+
|
|
12
|
+
## [3.1.3] - 2026-08-02
|
|
13
|
+
|
|
14
|
+
### 📚 Documentation
|
|
15
|
+
|
|
16
|
+
- update README for #59 #60 #61 ([bd1d51b](https://github.com/ansango/lastfm-client-ts/commit/bd1d51b))
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
## [3.1.2] - 2026-08-02
|
|
20
|
+
|
|
21
|
+
### 🐛 Bug Fixes
|
|
22
|
+
|
|
23
|
+
- **auth**: drop required api_key from authGetSessionRequestSchema (#62) ([f1158de](https://github.com/ansango/lastfm-client-ts/commit/f1158de))
|
|
24
|
+
- **errors**: normalize API errors via LastFmApiError (#61) ([143bede](https://github.com/ansango/lastfm-client-ts/commit/143bede))
|
|
25
|
+
- **track**: auto-inject sessionKey from config for scrobble calls (#60) ([b2c3599](https://github.com/ansango/lastfm-client-ts/commit/b2c3599))
|
|
26
|
+
- **track**: rename scrobble methods to canonical Last.fm names (#59) ([c997868](https://github.com/ansango/lastfm-client-ts/commit/c997868))
|
|
27
|
+
- default baseUrl in buildUrl and buildAuthUrl (#58) ([c6e45e6](https://github.com/ansango/lastfm-client-ts/commit/c6e45e6))
|
|
28
|
+
|
|
29
|
+
### 🔧 Chores
|
|
30
|
+
|
|
31
|
+
- rebuild dist before release ([ba62a5a](https://github.com/ansango/lastfm-client-ts/commit/ba62a5a))
|
|
32
|
+
|
|
33
|
+
|
|
34
|
+
## [3.1.1] - 2025-11-07
|
|
35
|
+
|
|
36
|
+
### 🔧 Chores
|
|
37
|
+
|
|
38
|
+
- update chore deps ([543dd25](https://github.com/ansango/lastfm-client-ts/commit/543dd25))
|
|
39
|
+
- remove unused dependencies and files ([8a3d5e2](https://github.com/ansango/lastfm-client-ts/commit/8a3d5e2))
|
|
40
|
+
|
|
41
|
+
|
|
42
|
+
## [3.1.0] - 2025-11-07
|
|
43
|
+
|
|
44
|
+
### ✨ Features
|
|
45
|
+
|
|
46
|
+
- export Zod schemas in addition to inferred types ([213ad43](https://github.com/ansango/lastfm-client-ts/commit/213ad43))
|
|
47
|
+
|
|
48
|
+
|
|
49
|
+
## [3.0.0] - 2025-11-07
|
|
50
|
+
|
|
51
|
+
### ♻️ Code Refactoring
|
|
52
|
+
|
|
53
|
+
- convert all types to Zod schemas with inferred types ([484478d](https://github.com/ansango/lastfm-client-ts/commit/484478d))
|
|
54
|
+
|
|
55
|
+
|
|
56
|
+
## [2.2.1] - 2025-11-07
|
|
57
|
+
|
|
58
|
+
### 🐛 Bug Fixes
|
|
59
|
+
|
|
60
|
+
- add files field to package.json to ensure all dist files are published ([30e5cc4](https://github.com/ansango/lastfm-client-ts/commit/30e5cc4))
|
|
61
|
+
|
|
62
|
+
|
|
63
|
+
## [2.2.0] - 2025-11-07
|
|
64
|
+
|
|
65
|
+
### ✨ Features
|
|
66
|
+
|
|
67
|
+
- add zod schema validation support ([f0caf4a](https://github.com/ansango/lastfm-client-ts/commit/f0caf4a))
|
|
68
|
+
|
|
69
|
+
### 🔧 Chores
|
|
70
|
+
|
|
71
|
+
- update gitignore for generated files and examples ([cde4af1](https://github.com/ansango/lastfm-client-ts/commit/cde4af1))
|
|
72
|
+
|
|
73
|
+
|
|
74
|
+
## [2.1.0] - 2025-11-05
|
|
75
|
+
|
|
76
|
+
### ✨ Features
|
|
77
|
+
|
|
78
|
+
- **release**: add automated release workflow, scripts and docs ([cd85827](https://github.com/ansango/lastfm-client-ts/commit/cd85827))
|
|
79
|
+
- **rewrite**: complete v2.0.0-alpha.1 refactor — universal ESM Last.fm client ([bc6d43b](https://github.com/ansango/lastfm-client-ts/commit/bc6d43b))
|
|
80
|
+
- **readme**: contributing ([5d4559e](https://github.com/ansango/lastfm-client-ts/commit/5d4559e))
|
|
81
|
+
- **pkg**: up pkg ([0d0ef42](https://github.com/ansango/lastfm-client-ts/commit/0d0ef42))
|
|
82
|
+
- **readme**: adding dotenv ([65b130f](https://github.com/ansango/lastfm-client-ts/commit/65b130f))
|
|
83
|
+
- **readme**: basic readme ([cb467cb](https://github.com/ansango/lastfm-client-ts/commit/cb467cb))
|
|
84
|
+
- **pkg**: update package ([5f80e0f](https://github.com/ansango/lastfm-client-ts/commit/5f80e0f))
|
|
85
|
+
- **chart**: service and types ([8d3f612](https://github.com/ansango/lastfm-client-ts/commit/8d3f612))
|
|
86
|
+
- **build**: build geo ([9f98f98](https://github.com/ansango/lastfm-client-ts/commit/9f98f98))
|
|
87
|
+
- **geo**: service and types ([eadebaa](https://github.com/ansango/lastfm-client-ts/commit/eadebaa))
|
|
88
|
+
- **library**: service and type library ([1a89551](https://github.com/ansango/lastfm-client-ts/commit/1a89551))
|
|
89
|
+
- **tag**: tag service and types ([3d6de29](https://github.com/ansango/lastfm-client-ts/commit/3d6de29))
|
|
90
|
+
- **tag**: service tag added ([87de559](https://github.com/ansango/lastfm-client-ts/commit/87de559))
|
|
91
|
+
- **track**: track types and services ([f5e6363](https://github.com/ansango/lastfm-client-ts/commit/f5e6363))
|
|
92
|
+
- **track**: track service ([62f342c](https://github.com/ansango/lastfm-client-ts/commit/62f342c))
|
|
93
|
+
- **artist**: done artist ([59de841](https://github.com/ansango/lastfm-client-ts/commit/59de841))
|
|
94
|
+
- **typed**: fix types ([0738393](https://github.com/ansango/lastfm-client-ts/commit/0738393))
|
|
95
|
+
- **build**: artist service build ([a8bf981](https://github.com/ansango/lastfm-client-ts/commit/a8bf981))
|
|
96
|
+
- **artist**: service constructor ([02c1db0](https://github.com/ansango/lastfm-client-ts/commit/02c1db0))
|
|
97
|
+
- **types**: split api types ([5a90a8d](https://github.com/ansango/lastfm-client-ts/commit/5a90a8d))
|
|
98
|
+
- **dist**: build album done ([50ec5cb](https://github.com/ansango/lastfm-client-ts/commit/50ec5cb))
|
|
99
|
+
- **album**: services album ([bd509d2](https://github.com/ansango/lastfm-client-ts/commit/bd509d2))
|
|
100
|
+
- **primitives**: refactor primitives ([3d8a5d3](https://github.com/ansango/lastfm-client-ts/commit/3d8a5d3))
|
|
101
|
+
- **refactor types**: refator types user and base types ([e9d17b8](https://github.com/ansango/lastfm-client-ts/commit/e9d17b8))
|
|
102
|
+
- **album**: album services ([4ab012f](https://github.com/ansango/lastfm-client-ts/commit/4ab012f))
|
|
103
|
+
- **dist**: build dist ([c0e434e](https://github.com/ansango/lastfm-client-ts/commit/c0e434e))
|
|
104
|
+
- **config**: config api modules ([19bc7d9](https://github.com/ansango/lastfm-client-ts/commit/19bc7d9))
|
|
105
|
+
- **docs**: functions ([0896be4](https://github.com/ansango/lastfm-client-ts/commit/0896be4))
|
|
106
|
+
- **docs**: user docs generated ([e47c4c5](https://github.com/ansango/lastfm-client-ts/commit/e47c4c5))
|
|
107
|
+
- **package pub**: pub package dem ([c9d6b1d](https://github.com/ansango/lastfm-client-ts/commit/c9d6b1d))
|
|
108
|
+
- **reset**: reset version npm ([1f0a23f](https://github.com/ansango/lastfm-client-ts/commit/1f0a23f))
|
|
109
|
+
- **ignore**: npm ignore ([2d08998](https://github.com/ansango/lastfm-client-ts/commit/2d08998))
|
|
110
|
+
- **dist**: added dist ([329d2fb](https://github.com/ansango/lastfm-client-ts/commit/329d2fb))
|
|
111
|
+
- **lock**: yarn lock ([6854da4](https://github.com/ansango/lastfm-client-ts/commit/6854da4))
|
|
112
|
+
- **typed**: split types ([1249635](https://github.com/ansango/lastfm-client-ts/commit/1249635))
|
|
113
|
+
- **config**: dist and test ([c34b106](https://github.com/ansango/lastfm-client-ts/commit/c34b106))
|
|
114
|
+
- **fetcher**: fetcher and types req res ([be94106](https://github.com/ansango/lastfm-client-ts/commit/be94106))
|
|
115
|
+
- **config**: added config and method endpoints ([ac9921e](https://github.com/ansango/lastfm-client-ts/commit/ac9921e))
|
|
116
|
+
- **ts**: config typescript ([c1edaa4](https://github.com/ansango/lastfm-client-ts/commit/c1edaa4))
|
|
117
|
+
- **readme**: minimal readme added ([5264665](https://github.com/ansango/lastfm-client-ts/commit/5264665))
|
|
118
|
+
- **pkg**: init with package ([9f12384](https://github.com/ansango/lastfm-client-ts/commit/9f12384))
|
|
119
|
+
|
|
120
|
+
### 🐛 Bug Fixes
|
|
121
|
+
|
|
122
|
+
- **build**: fix not published ([6e26de1](https://github.com/ansango/lastfm-client-ts/commit/6e26de1))
|
|
123
|
+
- **fix album tag**: fix album tag type with correct api definition ([e46598c](https://github.com/ansango/lastfm-client-ts/commit/e46598c))
|
|
124
|
+
- **track**: user recent track, isnowplaying ([fc03f5e](https://github.com/ansango/lastfm-client-ts/commit/fc03f5e))
|
|
125
|
+
- **user**: user recent track type fixed ([cd0be82](https://github.com/ansango/lastfm-client-ts/commit/cd0be82))
|
|
126
|
+
- **readme**: list ([3b84393](https://github.com/ansango/lastfm-client-ts/commit/3b84393))
|
|
127
|
+
- **readme**: fix readme ([66b22bd](https://github.com/ansango/lastfm-client-ts/commit/66b22bd))
|
|
128
|
+
- **fetcher**: fetcher and types ([4eb2aad](https://github.com/ansango/lastfm-client-ts/commit/4eb2aad))
|
|
129
|
+
|
|
130
|
+
### ⚡ Performance Improvements
|
|
131
|
+
|
|
132
|
+
- **build**: build client ([c30c9d0](https://github.com/ansango/lastfm-client-ts/commit/c30c9d0))
|
|
133
|
+
|
|
134
|
+
|
|
135
|
+
## [2.0.0-alpha.1] - 2025-11-05
|
|
136
|
+
|
|
137
|
+
### ✨ Features
|
|
138
|
+
|
|
139
|
+
- **rewrite**: complete v2.0.0-alpha.1 refactor — universal ESM Last.fm client ([bc6d43b](https://github.com/ansango/lastfm-client-ts/commit/bc6d43b))
|
|
140
|
+
- **readme**: contributing ([5d4559e](https://github.com/ansango/lastfm-client-ts/commit/5d4559e))
|
|
141
|
+
- **pkg**: up pkg ([0d0ef42](https://github.com/ansango/lastfm-client-ts/commit/0d0ef42))
|
|
142
|
+
- **readme**: adding dotenv ([65b130f](https://github.com/ansango/lastfm-client-ts/commit/65b130f))
|
|
143
|
+
- **readme**: basic readme ([cb467cb](https://github.com/ansango/lastfm-client-ts/commit/cb467cb))
|
|
144
|
+
- **pkg**: update package ([5f80e0f](https://github.com/ansango/lastfm-client-ts/commit/5f80e0f))
|
|
145
|
+
- **chart**: service and types ([8d3f612](https://github.com/ansango/lastfm-client-ts/commit/8d3f612))
|
|
146
|
+
- **build**: build geo ([9f98f98](https://github.com/ansango/lastfm-client-ts/commit/9f98f98))
|
|
147
|
+
- **geo**: service and types ([eadebaa](https://github.com/ansango/lastfm-client-ts/commit/eadebaa))
|
|
148
|
+
- **library**: service and type library ([1a89551](https://github.com/ansango/lastfm-client-ts/commit/1a89551))
|
|
149
|
+
- **tag**: tag service and types ([3d6de29](https://github.com/ansango/lastfm-client-ts/commit/3d6de29))
|
|
150
|
+
- **tag**: service tag added ([87de559](https://github.com/ansango/lastfm-client-ts/commit/87de559))
|
|
151
|
+
- **track**: track types and services ([f5e6363](https://github.com/ansango/lastfm-client-ts/commit/f5e6363))
|
|
152
|
+
- **track**: track service ([62f342c](https://github.com/ansango/lastfm-client-ts/commit/62f342c))
|
|
153
|
+
- **artist**: done artist ([59de841](https://github.com/ansango/lastfm-client-ts/commit/59de841))
|
|
154
|
+
- **typed**: fix types ([0738393](https://github.com/ansango/lastfm-client-ts/commit/0738393))
|
|
155
|
+
- **build**: artist service build ([a8bf981](https://github.com/ansango/lastfm-client-ts/commit/a8bf981))
|
|
156
|
+
- **artist**: service constructor ([02c1db0](https://github.com/ansango/lastfm-client-ts/commit/02c1db0))
|
|
157
|
+
- **types**: split api types ([5a90a8d](https://github.com/ansango/lastfm-client-ts/commit/5a90a8d))
|
|
158
|
+
- **dist**: build album done ([50ec5cb](https://github.com/ansango/lastfm-client-ts/commit/50ec5cb))
|
|
159
|
+
- **album**: services album ([bd509d2](https://github.com/ansango/lastfm-client-ts/commit/bd509d2))
|
|
160
|
+
- **primitives**: refactor primitives ([3d8a5d3](https://github.com/ansango/lastfm-client-ts/commit/3d8a5d3))
|
|
161
|
+
- **refactor types**: refator types user and base types ([e9d17b8](https://github.com/ansango/lastfm-client-ts/commit/e9d17b8))
|
|
162
|
+
- **album**: album services ([4ab012f](https://github.com/ansango/lastfm-client-ts/commit/4ab012f))
|
|
163
|
+
- **dist**: build dist ([c0e434e](https://github.com/ansango/lastfm-client-ts/commit/c0e434e))
|
|
164
|
+
- **config**: config api modules ([19bc7d9](https://github.com/ansango/lastfm-client-ts/commit/19bc7d9))
|
|
165
|
+
- **docs**: functions ([0896be4](https://github.com/ansango/lastfm-client-ts/commit/0896be4))
|
|
166
|
+
- **docs**: user docs generated ([e47c4c5](https://github.com/ansango/lastfm-client-ts/commit/e47c4c5))
|
|
167
|
+
- **package pub**: pub package dem ([c9d6b1d](https://github.com/ansango/lastfm-client-ts/commit/c9d6b1d))
|
|
168
|
+
- **reset**: reset version npm ([1f0a23f](https://github.com/ansango/lastfm-client-ts/commit/1f0a23f))
|
|
169
|
+
- **ignore**: npm ignore ([2d08998](https://github.com/ansango/lastfm-client-ts/commit/2d08998))
|
|
170
|
+
- **dist**: added dist ([329d2fb](https://github.com/ansango/lastfm-client-ts/commit/329d2fb))
|
|
171
|
+
- **lock**: yarn lock ([6854da4](https://github.com/ansango/lastfm-client-ts/commit/6854da4))
|
|
172
|
+
- **typed**: split types ([1249635](https://github.com/ansango/lastfm-client-ts/commit/1249635))
|
|
173
|
+
- **config**: dist and test ([c34b106](https://github.com/ansango/lastfm-client-ts/commit/c34b106))
|
|
174
|
+
- **fetcher**: fetcher and types req res ([be94106](https://github.com/ansango/lastfm-client-ts/commit/be94106))
|
|
175
|
+
- **config**: added config and method endpoints ([ac9921e](https://github.com/ansango/lastfm-client-ts/commit/ac9921e))
|
|
176
|
+
- **ts**: config typescript ([c1edaa4](https://github.com/ansango/lastfm-client-ts/commit/c1edaa4))
|
|
177
|
+
- **readme**: minimal readme added ([5264665](https://github.com/ansango/lastfm-client-ts/commit/5264665))
|
|
178
|
+
- **pkg**: init with package ([9f12384](https://github.com/ansango/lastfm-client-ts/commit/9f12384))
|
|
179
|
+
|
|
180
|
+
### 🐛 Bug Fixes
|
|
181
|
+
|
|
182
|
+
- **build**: fix not published ([6e26de1](https://github.com/ansango/lastfm-client-ts/commit/6e26de1))
|
|
183
|
+
- **fix album tag**: fix album tag type with correct api definition ([e46598c](https://github.com/ansango/lastfm-client-ts/commit/e46598c))
|
|
184
|
+
- **track**: user recent track, isnowplaying ([fc03f5e](https://github.com/ansango/lastfm-client-ts/commit/fc03f5e))
|
|
185
|
+
- **user**: user recent track type fixed ([cd0be82](https://github.com/ansango/lastfm-client-ts/commit/cd0be82))
|
|
186
|
+
- **readme**: list ([3b84393](https://github.com/ansango/lastfm-client-ts/commit/3b84393))
|
|
187
|
+
- **readme**: fix readme ([66b22bd](https://github.com/ansango/lastfm-client-ts/commit/66b22bd))
|
|
188
|
+
- **fetcher**: fetcher and types ([4eb2aad](https://github.com/ansango/lastfm-client-ts/commit/4eb2aad))
|
|
189
|
+
|
|
190
|
+
### ⚡ Performance Improvements
|
|
191
|
+
|
|
192
|
+
- **build**: build client ([c30c9d0](https://github.com/ansango/lastfm-client-ts/commit/c30c9d0))
|
|
193
|
+
|
|
194
|
+
|
|
195
|
+
## [2.0.0-alpha.1] - 2025-11-05
|
|
196
|
+
|
|
197
|
+
### 🚀 Major Refactoring
|
|
198
|
+
|
|
199
|
+
Complete rewrite of the library to be a universal, framework-agnostic Last.fm API client.
|
|
200
|
+
|
|
201
|
+
### ✨ Added
|
|
202
|
+
|
|
203
|
+
- **Universal support**: Works in both Node.js (≥20.0.0) and browser environments
|
|
204
|
+
- **ESM modules**: Full ES module support with proper exports
|
|
205
|
+
- **Class-based architecture**: New `LastFmClient` class for easier usage
|
|
206
|
+
- **Factory pattern**: All services are now factory functions with dependency injection
|
|
207
|
+
- **Global configuration**: Support for both global and per-instance configuration
|
|
208
|
+
- **Modular imports**: Tree-shakable imports for individual services
|
|
209
|
+
- **Type safety**: Comprehensive TypeScript types for all services
|
|
210
|
+
- **Configuration validation**: Strict API key validation with helpful error messages
|
|
211
|
+
- **Entry points**: Dedicated entry points for each service (`lastfm-client-ts/user`, etc.)
|
|
212
|
+
- **Native fetch**: Uses native fetch API (Node.js 18+) instead of polyfills
|
|
213
|
+
|
|
214
|
+
### 🔄 Changed
|
|
215
|
+
|
|
216
|
+
- **BREAKING**: Migrated from CommonJS to ESM
|
|
217
|
+
- **BREAKING**: Changed from static service exports to factory functions
|
|
218
|
+
- **BREAKING**: Removed SvelteKit-specific dependencies (`$lib/utils`, `$env/static/private`)
|
|
219
|
+
- **BREAKING**: Configuration now requires explicit API key (no more hardcoded defaults)
|
|
220
|
+
- **BREAKING**: Service interfaces renamed (e.g., `UserApiMethods` → `UserService`)
|
|
221
|
+
- **BREAKING**: Minimum Node.js version is now 20.0.0
|
|
222
|
+
- Updated all dependencies to latest stable versions:
|
|
223
|
+
- TypeScript: 4.9.5 → 5.9.3
|
|
224
|
+
- @types/node: 18.14.6 → 24.10.0
|
|
225
|
+
- rimraf: 4.3.1 → 6.1.0
|
|
226
|
+
- dotenv: 16.0.3 → 17.2.3
|
|
227
|
+
|
|
228
|
+
### 🗑️ Removed
|
|
229
|
+
|
|
230
|
+
- **BREAKING**: Removed `cross-fetch` dependency (uses native fetch)
|
|
231
|
+
- **BREAKING**: Removed `method` constant exports
|
|
232
|
+
- **BREAKING**: Removed `buildUrl` from main exports (moved to utilities)
|
|
233
|
+
- **BREAKING**: Removed peer dependencies
|
|
234
|
+
- Removed all SvelteKit-specific code
|
|
235
|
+
|
|
236
|
+
### 📦 Dependencies
|
|
237
|
+
|
|
238
|
+
- Added: `js-md5@0.8.3` (for API signatures)
|
|
239
|
+
- Removed: `cross-fetch` (no longer needed)
|
|
240
|
+
- Moved `dotenv` to devDependencies (only needed for development)
|
|
241
|
+
|
|
242
|
+
### 📚 Documentation
|
|
243
|
+
|
|
244
|
+
- Complete rewrite of README with modern examples
|
|
245
|
+
- Added comprehensive API documentation
|
|
246
|
+
- Added usage examples for all import patterns
|
|
247
|
+
- Added TypeScript usage examples
|
|
248
|
+
- Created example.ts with multiple usage scenarios
|
|
249
|
+
- Updated .env.example with new variable names
|
|
250
|
+
|
|
251
|
+
### 🔧 Configuration
|
|
252
|
+
|
|
253
|
+
- New configuration system with `createConfig()`, `setGlobalConfig()`, `getGlobalConfig()`
|
|
254
|
+
- Configuration now loaded from environment variables in Node.js
|
|
255
|
+
- Support for custom base URL
|
|
256
|
+
- Support for shared secret and session key
|
|
257
|
+
|
|
258
|
+
### 🏗️ Architecture
|
|
259
|
+
|
|
260
|
+
New file structure:
|
|
261
|
+
```
|
|
262
|
+
src/
|
|
263
|
+
├── client.ts # LastFmClient class
|
|
264
|
+
├── config.ts # Configuration system
|
|
265
|
+
├── utils.ts # Universal utilities
|
|
266
|
+
├── index.ts # Main entry point
|
|
267
|
+
├── services/ # Service implementations
|
|
268
|
+
│ ├── user.ts
|
|
269
|
+
│ ├── album.ts
|
|
270
|
+
│ ├── artist.ts
|
|
271
|
+
│ ├── track.ts
|
|
272
|
+
│ ├── tag.ts
|
|
273
|
+
│ ├── chart.ts
|
|
274
|
+
│ ├── geo.ts
|
|
275
|
+
│ ├── library.ts
|
|
276
|
+
│ ├── auth.ts # Now properly exported
|
|
277
|
+
│ └── *.types.ts # Type definitions
|
|
278
|
+
└── entrypoints/ # Modular entry points
|
|
279
|
+
├── user.ts
|
|
280
|
+
├── album.ts
|
|
281
|
+
└── ...
|
|
282
|
+
```
|
|
283
|
+
|
|
284
|
+
### 🐛 Fixed
|
|
285
|
+
|
|
286
|
+
- Auth service is now properly exported
|
|
287
|
+
- Fixed missing `generateSignature` implementation
|
|
288
|
+
- Fixed all import paths to use `.js` extensions for ESM
|
|
289
|
+
- Fixed configuration to work in both Node.js and browser
|
|
290
|
+
|
|
291
|
+
### 🔒 Security
|
|
292
|
+
|
|
293
|
+
- API key is now required and validated
|
|
294
|
+
- No hardcoded credentials
|
|
295
|
+
- Proper environment variable handling
|
|
296
|
+
|
|
297
|
+
### 📝 Migration Guide
|
|
298
|
+
|
|
299
|
+
If you're upgrading from 1.x, here's what you need to know:
|
|
300
|
+
|
|
301
|
+
**Before (1.x):**
|
|
302
|
+
```typescript
|
|
303
|
+
import { userApiMethods } from 'lastfm-client-ts';
|
|
304
|
+
const info = await userApiMethods.getInfo({ user: 'rj' });
|
|
305
|
+
```
|
|
306
|
+
|
|
307
|
+
**After (2.0):**
|
|
308
|
+
```typescript
|
|
309
|
+
import { LastFmClient } from 'lastfm-client-ts';
|
|
310
|
+
const client = new LastFmClient({ apiKey: 'YOUR_KEY' });
|
|
311
|
+
const info = await client.user.getInfo({ user: 'rj' });
|
|
312
|
+
```
|
|
313
|
+
|
|
314
|
+
Or with individual services:
|
|
315
|
+
```typescript
|
|
316
|
+
import { createUserService } from 'lastfm-client-ts/user';
|
|
317
|
+
const userService = createUserService({ apiKey: 'YOUR_KEY' });
|
|
318
|
+
const info = await userService.getInfo({ user: 'rj' });
|
|
319
|
+
```
|
|
320
|
+
|
|
321
|
+
## [1.0.4-alpha.2] - Previous version
|
|
322
|
+
|
|
323
|
+
See git history for older changes.
|
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Anibal Santos
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|