clashofclans.js 3.0.1-dev.e71b7fa → 3.0.2-dev.ff9b577

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
@@ -2,13 +2,14 @@
2
2
 
3
3
  All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
4
4
 
5
- ## 3.0.1 (11-01-2023)
5
+ ## 3.0.2 (15-01-2023)
6
6
 
7
7
  ### Bug Fixes
8
8
 
9
9
  - Conflict with the same name of builder base and home base troops. (#123)
10
10
  - Fix the issue with the `Client#getLeagueWar()` method.
11
11
  - Typings and documentation for clan capital.
12
+ - Fix the issue with the `Clan#clanCapital` property.
12
13
 
13
14
  ### Features
14
15
 
@@ -34,7 +34,8 @@ class Clan {
34
34
  this.warLeague = data.warLeague ? new WarLeague_1.WarLeague(data.warLeague) : null;
35
35
  this.memberCount = data.members;
36
36
  this.labels = data.labels.map((label) => new Label_1.Label(label));
37
- this.clanCapital = Object.keys(data.clanCapital).length > 0 ? new ClanCapital_1.ClanCapital(data.clanCapital) : null;
37
+ // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition
38
+ this.clanCapital = Object.keys(data.clanCapital ?? {}).length > 0 ? new ClanCapital_1.ClanCapital(data.clanCapital) : null;
38
39
  this.isFamilyFriendly = data.isFamilyFriendly;
39
40
  this.capitalPoints = data.clanCapitalPoints;
40
41
  this.capitalLeague = data.capitalLeague;
@@ -24,7 +24,7 @@ export interface APISeason {
24
24
  }
25
25
  /** /clans?name={name}&limit={limit} */
26
26
  export interface APIClanList {
27
- items: Omit<APIClan, 'memberList'>[];
27
+ items: Omit<APIClan, 'memberList' | 'clanCapital'>[];
28
28
  paging: APIPaging;
29
29
  }
30
30
  export interface APIChatLanguage {
@@ -28,7 +28,7 @@ export declare const PollingEvents: {
28
28
  readonly ClanLoopEnd: "clanLoopEnd";
29
29
  readonly PlayerLoopStart: "playerLoopStart";
30
30
  readonly PlayerLoopEnd: "playerLoopEnd";
31
- readonly WarLoopStart: "warLoopEnd";
31
+ readonly WarLoopStart: "warLoopStart";
32
32
  readonly WarLoopEnd: "warLoopEnd";
33
33
  readonly NewSeasonStart: "newSeasonStart";
34
34
  readonly MaintenanceStart: "maintenanceStart";
@@ -137,7 +137,7 @@ exports.PollingEvents = {
137
137
  ClanLoopEnd: 'clanLoopEnd',
138
138
  PlayerLoopStart: 'playerLoopStart',
139
139
  PlayerLoopEnd: 'playerLoopEnd',
140
- WarLoopStart: 'warLoopEnd',
140
+ WarLoopStart: 'warLoopStart',
141
141
  WarLoopEnd: 'warLoopEnd',
142
142
  NewSeasonStart: 'newSeasonStart',
143
143
  MaintenanceStart: 'maintenanceStart',
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "clashofclans.js",
3
- "version": "3.0.1-dev.e71b7fa",
3
+ "version": "3.0.2-dev.ff9b577",
4
4
  "description": "JavaScript library for interacting with the Clash of Clans API",
5
5
  "author": "SUVAJIT <suvajit.me@gmail.com>",
6
6
  "license": "MIT",