musicbrainz-api 0.7.2 → 0.8.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
@@ -94,13 +94,13 @@ Arguments:
94
94
  * MBID [(MusicBrainz identifier)](https://wiki.musicbrainz.org/MusicBrainz_Identifier)
95
95
 
96
96
  ```js
97
- const artist = await mbApi.getEntity('artist', {query: 'ab2528d9-719f-4261-8098-21849222a0f2'});
97
+ const artist = await mbApi.lookupEntity('artist', {query: 'ab2528d9-719f-4261-8098-21849222a0f2'});
98
98
  ```
99
99
 
100
100
  ### Lookup area
101
101
 
102
102
  ```js
103
- const area = await mbApi.getArea({query: 'ab2528d9-719f-4261-8098-21849222a0f2'});
103
+ const area = await mbApi.lookupArea({query: 'ab2528d9-719f-4261-8098-21849222a0f2'});
104
104
  ```
105
105
 
106
106
  ### Lookup artist
@@ -108,40 +108,61 @@ const area = await mbApi.getArea({query: 'ab2528d9-719f-4261-8098-21849222a0f2'}
108
108
  Lookup an `artist` and include their `releases`, `release-groups` and `aliases`
109
109
 
110
110
  ```js
111
- const artist = await mbApi.getArtist({query: 'ab2528d9-719f-4261-8098-21849222a0f2'});
111
+ const artist = await mbApi.lookupArtist({query: 'ab2528d9-719f-4261-8098-21849222a0f2'});
112
112
  ```
113
113
 
114
- or use the browse API:
114
+ ### Lookup instrument
115
+
116
+ Lookup an instrument
115
117
 
116
118
  ```js
117
- const artist = await mbApi.getArtist({artist: 'ab2528d9-719f-4261-8098-21849222a0f2'});
119
+ const artist = await mbApi.lookupInstrument({query: 'b3eac5f9-7859-4416-ac39-7154e2e8d348'});
120
+ ```
121
+
122
+ ### Lookup label
123
+
124
+ Lookup a label
125
+
126
+ ```js
127
+ const artist = await mbApi.lookupInstrument({query: '25dda9f9-f069-4898-82f0-59330a106c7f'});
128
+ ```
129
+
130
+ ### Lookup place
131
+
132
+ ```js
133
+ const artist = await mbApi.lookupPlace({query: 'e6cfb74d-d69b-44c3-b890-1b3f509816e4'});
118
134
  ```
119
135
 
120
136
  The second argument can be used to pass [subqueries](https://wiki.musicbrainz.org/Development/XML_Web_Service/Version_2#Subqueries), which will return more (nested) information:
121
137
  ```js
122
- const artist = await mbApi.getArtist('ab2528d9-719f-4261-8098-21849222a0f2', ['releases', 'recordings', 'url-rels']);
138
+ const artist = await mbApi.lookupArtist('ab2528d9-719f-4261-8098-21849222a0f2', ['releases', 'recordings', 'url-rels']);
123
139
  ```
124
140
 
125
141
  ### Lookup recording
126
142
 
127
143
  The second argument can be used to pass [subqueries](https://wiki.musicbrainz.org/Development/XML_Web_Service/Version_2#Subqueries):
128
144
  ```js
129
- const artist = await mbApi.getRecording({query: '16afa384-174e-435e-bfa3-5591accda31c'}, ['artists', 'url-rels']);
145
+ const artist = await mbApi.lookupRecording({query: '16afa384-174e-435e-bfa3-5591accda31c'}, ['artists', 'url-rels']);
130
146
  ```
131
147
 
132
148
  ### Lookup release
133
149
  ```js
134
- const release = await mbApi.getRelease({query: '976e0677-a480-4a5e-a177-6a86c1900bbf'}, ['artists', 'url-rels']);
150
+ const release = await mbApi.lookupRelease({query: '976e0677-a480-4a5e-a177-6a86c1900bbf'}, ['artists', 'url-rels']);
135
151
  ```
136
152
 
137
153
  ### Lookup release-group
138
154
  ```js
139
- const releaseGroup = await mbApi.getReleaseGroup({query: '19099ea5-3600-4154-b482-2ec68815883e'});
155
+ const releaseGroup = await mbApi.lookupReleaseGroup({query: '19099ea5-3600-4154-b482-2ec68815883e'});
140
156
  ```
141
157
 
142
158
  ### Lookup work
143
159
  ```js
144
- const work = await mbApi.getWork({query: 'b2aa02f4-6c95-43be-a426-aedb9f9a3805'});
160
+ const work = await mbApi.lookupWork({query: 'b2aa02f4-6c95-43be-a426-aedb9f9a3805'});
161
+ ```
162
+
163
+ ### Lookup URL
164
+ ```js
165
+ const url = await mbApi.lookupUrl({query: 'c69556a6-7ded-4c54-809c-afb45a1abe7d'});
145
166
  ```
146
167
 
147
168
  ## Search (query)
@@ -251,7 +272,7 @@ const mbid_Formidable = '16afa384-174e-435e-bfa3-5591accda31c';
251
272
  const isrc_Formidable = 'BET671300161';
252
273
 
253
274
 
254
- const recording = await mbApi.getRecording(mbid_Formidable);
275
+ const recording = await mbApi.lookupRecording(mbid_Formidable);
255
276
 
256
277
  // Authentication the http-session against MusicBrainz (as defined in config.baseUrl)
257
278
  const succeed = await mbApi.login();
@@ -264,7 +285,7 @@ await mbApi.addIsrc(recording, isrc_Formidable);
264
285
  ### Submit recording URL
265
286
 
266
287
  ```js
267
- const recording = await mbApi.getRecording('16afa384-174e-435e-bfa3-5591accda31c');
288
+ const recording = await mbApi.lookupRecording('16afa384-174e-435e-bfa3-5591accda31c');
268
289
 
269
290
  const succeed = await mbApi.login();
270
291
  assert.isTrue(succeed, 'Login successful');
@@ -277,7 +298,7 @@ await mbApi.addUrlToRecording(recording, {
277
298
 
278
299
  Actually a Spotify-track-ID can be submitted easier:
279
300
  ```js
280
- const recording = await mbApi.getRecording('16afa384-174e-435e-bfa3-5591accda31c');
301
+ const recording = await mbApi.lookupRecording('16afa384-174e-435e-bfa3-5591accda31c');
281
302
 
282
303
  const succeed = await mbApi.login();
283
304
  assert.isTrue(succeed, 'Login successful');
@@ -23,12 +23,7 @@ class DigestAuth {
23
23
  */
24
24
  static ha1Compute(algorithm, user, realm, pass, nonce, cnonce) {
25
25
  const ha1 = md5(user + ':' + realm + ':' + pass); // lgtm [js/insufficient-password-hash]
26
- if (algorithm && algorithm.toLowerCase() === 'md5-sess') {
27
- return md5(ha1 + ':' + nonce + ':' + cnonce);
28
- }
29
- else {
30
- return ha1;
31
- }
26
+ return algorithm && algorithm.toLowerCase() === 'md5-sess' ? md5(ha1 + ':' + nonce + ':' + cnonce) : ha1;
32
27
  }
33
28
  digest(method, path, authHeader) {
34
29
  // TODO: More complete implementation of RFC 2617.
@@ -58,48 +58,66 @@ export declare class MusicBrainzApi {
58
58
  * @param mbid
59
59
  * @param inc
60
60
  */
61
- getEntity<T>(entity: mb.EntityType, mbid: string, inc?: Includes[]): Promise<T>;
61
+ lookupEntity<T>(entity: mb.EntityType, mbid: string, inc?: Includes[]): Promise<T>;
62
62
  /**
63
63
  * Lookup area
64
64
  * @param areaId Area MBID
65
65
  * @param inc Sub-queries
66
66
  */
67
- getArea(areaId: string, inc?: Includes[]): Promise<mb.IArea>;
67
+ lookupArea(areaId: string, inc?: Includes[]): Promise<mb.IArea>;
68
68
  /**
69
69
  * Lookup artist
70
70
  * @param artistId Artist MBID
71
71
  * @param inc Sub-queries
72
72
  */
73
- getArtist(artistId: string, inc?: Includes[]): Promise<mb.IArtist>;
73
+ lookupArtist(artistId: string, inc?: Includes[]): Promise<mb.IArtist>;
74
+ /**
75
+ * Lookup instrument
76
+ * @param artistId Instrument MBID
77
+ * @param inc Sub-queries
78
+ */
79
+ lookupInstrument(instrumentId: string, inc?: Includes[]): Promise<mb.IInstrument>;
80
+ /**
81
+ * Lookup label
82
+ * @param labelId Area MBID
83
+ * @param inc Sub-queries
84
+ */
85
+ lookupLabel(labelId: string, inc?: Includes[]): Promise<mb.ILabel>;
86
+ /**
87
+ * Lookup place
88
+ * @param placeId Area MBID
89
+ * @param inc Sub-queries
90
+ */
91
+ lookupPlace(placeId: string, inc?: Includes[]): Promise<mb.IPlace>;
74
92
  /**
75
93
  * Lookup release
76
94
  * @param releaseId Release MBID
77
95
  * @param inc Include: artist-credits, labels, recordings, release-groups, media, discids, isrcs (with recordings)
78
96
  * ToDo: ['recordings', 'artists', 'artist-credits', 'isrcs', 'url-rels', 'release-groups']
79
97
  */
80
- getRelease(releaseId: string, inc?: Includes[]): Promise<mb.IRelease>;
98
+ lookupRelease(releaseId: string, inc?: Includes[]): Promise<mb.IRelease>;
81
99
  /**
82
100
  * Lookup release-group
83
101
  * @param releaseGroupId Release-group MBID
84
102
  * @param inc Include: ToDo
85
103
  */
86
- getReleaseGroup(releaseGroupId: string, inc?: Includes[]): Promise<mb.IReleaseGroup>;
104
+ lookupReleaseGroup(releaseGroupId: string, inc?: Includes[]): Promise<mb.IReleaseGroup>;
87
105
  /**
88
- * Lookup work
89
- * @param workId Work MBID
106
+ * Lookup recording
107
+ * @param recordingId Label MBID
108
+ * @param inc Include: artist-credits, isrcs
90
109
  */
91
- getWork(workId: string): Promise<mb.IWork>;
110
+ lookupRecording(recordingId: string, inc?: Includes[]): Promise<mb.IRecording>;
92
111
  /**
93
- * Lookup label
94
- * @param labelId Label MBID
112
+ * Lookup work
113
+ * @param workId Work MBID
95
114
  */
96
- getLabel(labelId: string): Promise<mb.ILabel>;
115
+ lookupWork(workId: string): Promise<mb.IWork>;
97
116
  /**
98
- * Lookup recording
99
- * @param recordingId Label MBID
100
- * @param inc Include: artist-credits, isrcs
117
+ * Lookup URL
118
+ * @param urlId URL MBID
101
119
  */
102
- getRecording(recordingId: string, inc?: Includes[]): Promise<mb.IRecording>;
120
+ lookupUrl(urlId: string): Promise<mb.IUrl>;
103
121
  postRecording(xmlMetadata: XmlMetadata): Promise<void>;
104
122
  post(entity: mb.EntityType, xmlMetadata: XmlMetadata): Promise<void>;
105
123
  login(): Promise<boolean>;
@@ -1,7 +1,11 @@
1
1
  "use strict";
2
2
  var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
3
  if (k2 === undefined) k2 = k;
4
- Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
5
9
  }) : (function(o, m, k, k2) {
6
10
  if (k2 === undefined) k2 = k;
7
11
  o[k2] = m[k];
@@ -134,7 +138,7 @@ class MusicBrainzApi {
134
138
  * @param mbid
135
139
  * @param inc
136
140
  */
137
- getEntity(entity, mbid, inc = []) {
141
+ lookupEntity(entity, mbid, inc = []) {
138
142
  return this.restGet(`/${entity}/${mbid}`, { inc: inc.join(' ') });
139
143
  }
140
144
  /**
@@ -142,16 +146,40 @@ class MusicBrainzApi {
142
146
  * @param areaId Area MBID
143
147
  * @param inc Sub-queries
144
148
  */
145
- getArea(areaId, inc = []) {
146
- return this.getEntity('area', areaId, inc);
149
+ lookupArea(areaId, inc = []) {
150
+ return this.lookupEntity('area', areaId, inc);
147
151
  }
148
152
  /**
149
153
  * Lookup artist
150
154
  * @param artistId Artist MBID
151
155
  * @param inc Sub-queries
152
156
  */
153
- getArtist(artistId, inc = []) {
154
- return this.getEntity('artist', artistId, inc);
157
+ lookupArtist(artistId, inc = []) {
158
+ return this.lookupEntity('artist', artistId, inc);
159
+ }
160
+ /**
161
+ * Lookup instrument
162
+ * @param artistId Instrument MBID
163
+ * @param inc Sub-queries
164
+ */
165
+ lookupInstrument(instrumentId, inc = []) {
166
+ return this.lookupEntity('instrument', instrumentId, inc);
167
+ }
168
+ /**
169
+ * Lookup label
170
+ * @param labelId Area MBID
171
+ * @param inc Sub-queries
172
+ */
173
+ lookupLabel(labelId, inc = []) {
174
+ return this.lookupEntity('label', labelId, inc);
175
+ }
176
+ /**
177
+ * Lookup place
178
+ * @param placeId Area MBID
179
+ * @param inc Sub-queries
180
+ */
181
+ lookupPlace(placeId, inc = []) {
182
+ return this.lookupEntity('place', placeId, inc);
155
183
  }
156
184
  /**
157
185
  * Lookup release
@@ -159,38 +187,38 @@ class MusicBrainzApi {
159
187
  * @param inc Include: artist-credits, labels, recordings, release-groups, media, discids, isrcs (with recordings)
160
188
  * ToDo: ['recordings', 'artists', 'artist-credits', 'isrcs', 'url-rels', 'release-groups']
161
189
  */
162
- getRelease(releaseId, inc = []) {
163
- return this.getEntity('release', releaseId, inc);
190
+ lookupRelease(releaseId, inc = []) {
191
+ return this.lookupEntity('release', releaseId, inc);
164
192
  }
165
193
  /**
166
194
  * Lookup release-group
167
195
  * @param releaseGroupId Release-group MBID
168
196
  * @param inc Include: ToDo
169
197
  */
170
- getReleaseGroup(releaseGroupId, inc = []) {
171
- return this.getEntity('release-group', releaseGroupId, inc);
198
+ lookupReleaseGroup(releaseGroupId, inc = []) {
199
+ return this.lookupEntity('release-group', releaseGroupId, inc);
172
200
  }
173
201
  /**
174
- * Lookup work
175
- * @param workId Work MBID
202
+ * Lookup recording
203
+ * @param recordingId Label MBID
204
+ * @param inc Include: artist-credits, isrcs
176
205
  */
177
- getWork(workId) {
178
- return this.getEntity('work', workId);
206
+ lookupRecording(recordingId, inc = []) {
207
+ return this.lookupEntity('recording', recordingId, inc);
179
208
  }
180
209
  /**
181
- * Lookup label
182
- * @param labelId Label MBID
210
+ * Lookup work
211
+ * @param workId Work MBID
183
212
  */
184
- getLabel(labelId) {
185
- return this.getEntity('label', labelId);
213
+ lookupWork(workId) {
214
+ return this.lookupEntity('work', workId);
186
215
  }
187
216
  /**
188
- * Lookup recording
189
- * @param recordingId Label MBID
190
- * @param inc Include: artist-credits, isrcs
217
+ * Lookup URL
218
+ * @param urlId URL MBID
191
219
  */
192
- getRecording(recordingId, inc = []) {
193
- return this.getEntity('recording', recordingId, inc);
220
+ lookupUrl(urlId) {
221
+ return this.lookupEntity('url', urlId);
194
222
  }
195
223
  async postRecording(xmlMetadata) {
196
224
  return this.post('recording', xmlMetadata);
@@ -5,14 +5,16 @@ export interface IPeriod {
5
5
  'ended': boolean;
6
6
  'end': string;
7
7
  }
8
- export interface IArea {
8
+ export interface IEntity {
9
9
  id: string;
10
+ }
11
+ export interface IArea extends IEntity {
10
12
  'iso-3166-1-codes': string[];
11
13
  name: string;
12
14
  'sort-name': string;
13
15
  disambiguation: string;
14
16
  }
15
- export interface IAlias {
17
+ export interface IAlias extends IEntity {
16
18
  name: string;
17
19
  'sort-name': string;
18
20
  ended: boolean;
@@ -26,8 +28,7 @@ export interface IAlias {
26
28
  export interface IMatch {
27
29
  score: number;
28
30
  }
29
- export interface IArtist {
30
- id: string;
31
+ export interface IArtist extends IEntity {
31
32
  name: string;
32
33
  disambiguation: string;
33
34
  'sort-name': string;
@@ -55,9 +56,25 @@ export interface IArtistCredit {
55
56
  joinphrase: string;
56
57
  name: string;
57
58
  }
59
+ export interface IEvent extends IEntity {
60
+ cancelled: boolean;
61
+ type: string;
62
+ 'life-span': IPeriod;
63
+ disambiguation: string;
64
+ 'type-id': string;
65
+ time: string;
66
+ setlist: string;
67
+ name: string;
68
+ }
69
+ export interface IInstrument extends IEntity {
70
+ disambiguation: string;
71
+ name: string;
72
+ 'type-id': string;
73
+ type: string;
74
+ description: string;
75
+ }
58
76
  export declare type ReleaseQuality = 'normal';
59
- export interface IRelease {
60
- id: string;
77
+ export interface IRelease extends IEntity {
61
78
  title: string;
62
79
  'text-representation': {
63
80
  'language': string;
@@ -85,23 +102,21 @@ export interface IReleaseEvent {
85
102
  date?: string;
86
103
  }
87
104
  export declare type MediaFormatType = 'Digital Media';
88
- export interface IRecording {
89
- id: string;
105
+ export interface IRecording extends IEntity {
90
106
  video: boolean;
91
107
  length: number;
92
108
  title: string;
93
109
  disambiguation: string;
94
110
  isrcs?: string[];
95
- releases?: IRelease;
111
+ releases?: IRelease[];
96
112
  relations?: IRelation[];
97
113
  'artist-credit'?: IArtistCredit[];
98
114
  aliases?: IAlias[];
99
115
  }
100
- export interface ITrack {
101
- id: string;
116
+ export interface ITrack extends IEntity {
102
117
  position: number;
103
118
  recording: IRecording;
104
- number: string;
119
+ 'number': string;
105
120
  length: number;
106
121
  title: string;
107
122
  'artist-credit'?: IArtistCredit[];
@@ -110,10 +125,10 @@ export interface IMedium {
110
125
  title: string;
111
126
  format?: string;
112
127
  'format-id': string;
113
- 'tracks': ITrack[];
128
+ tracks: ITrack[];
114
129
  'track-count': number;
115
130
  'track-offset': number;
116
- 'position': number;
131
+ position: number;
117
132
  }
118
133
  export interface ICoverArtArchive {
119
134
  count: number;
@@ -122,15 +137,16 @@ export interface ICoverArtArchive {
122
137
  artwork: boolean;
123
138
  back: boolean;
124
139
  }
125
- export interface IReleaseGroup {
126
- id: string;
140
+ export interface IReleaseGroup extends IEntity {
127
141
  count: number;
128
142
  title: string;
129
143
  'primary-type': string;
130
144
  'sort-name': string;
131
- 'artist-credit': [{
145
+ 'artist-credit': {
132
146
  artist: IArtist;
133
- }];
147
+ name: string;
148
+ joinphrase: string;
149
+ }[];
134
150
  releases?: IRelease[];
135
151
  }
136
152
  export interface IArtistMatch extends IArtist, IMatch {
@@ -163,7 +179,7 @@ export interface IUrlList extends ISearchResult {
163
179
  }
164
180
  export declare type RelationDirection = 'backward' | 'forward';
165
181
  export interface IRelation {
166
- 'attribute-ids': {};
182
+ 'attribute-ids': any;
167
183
  direction: RelationDirection;
168
184
  'target-credit': string;
169
185
  end: null | object;
@@ -175,35 +191,32 @@ export interface IRelation {
175
191
  begin?: null | object;
176
192
  'target-type'?: 'url';
177
193
  'type-id': string;
178
- url?: IURL;
194
+ url?: IUrl;
179
195
  release?: IRelease;
180
196
  }
181
- export interface IURL {
182
- id: string;
183
- resource: string;
184
- }
185
197
  export interface IRelationList {
186
198
  relations: IRelation[];
187
199
  }
188
- export interface IWork {
189
- id: string;
200
+ export interface IWork extends IEntity {
190
201
  title: string;
191
202
  }
192
- export interface ILabel {
193
- id: string;
203
+ export interface ILabel extends IEntity {
204
+ name: string;
205
+ }
206
+ export interface IPlace extends IEntity {
194
207
  name: string;
195
208
  }
196
- export interface IUrl {
209
+ export interface IUrl extends IEntity {
197
210
  id: string;
198
211
  resource: string;
199
- 'relation-list': IRelationList[];
212
+ 'relation-list'?: IRelationList[];
200
213
  }
201
214
  export interface IUrlMatch extends IMatch, IUrl {
202
215
  }
203
216
  export interface IUrlSearchResult extends ISearchResult {
204
217
  urls?: IUrlMatch[];
205
218
  }
206
- export interface IIsrcSearchResult {
219
+ export interface IIsrcSearchResult extends ISearchResult {
207
220
  'isrc': string;
208
221
  'recordings': IRecording[];
209
222
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "musicbrainz-api",
3
- "version": "0.7.2",
3
+ "version": "0.8.0",
4
4
  "description": "MusicBrainz API client for reading and submitting metadata",
5
5
  "main": "lib/musicbrainz-api",
6
6
  "types": "lib/musicbrainz-api",
@@ -24,21 +24,6 @@
24
24
  ],
25
25
  "license": "MIT",
26
26
  "private": false,
27
- "devDependencies": {
28
- "@types/chai": "^4.2.5",
29
- "@types/mocha": "^9.0.0",
30
- "@types/node": "^17.0.8",
31
- "chai": "^4.2.0",
32
- "coveralls": "^3.0.9",
33
- "del-cli": "^4.0.1",
34
- "mocha": "^9.0.1",
35
- "nyc": "^15.0.0",
36
- "remark-cli": "^10.0.1",
37
- "remark-preset-lint-recommended": "^6.1.2",
38
- "ts-node": "^10.0.0",
39
- "tslint": "^6.1.1",
40
- "typescript": "^4.0.2"
41
- },
42
27
  "engines": {
43
28
  "node": "*"
44
29
  },
@@ -63,14 +48,38 @@
63
48
  "tough-cookie": "^4.0.0",
64
49
  "uuid": "^8.3.2"
65
50
  },
51
+ "devDependencies": {
52
+ "@types/chai": "^4.3.0",
53
+ "@types/mocha": "^9.0.0",
54
+ "@types/node": "^17.0.8",
55
+ "@typescript-eslint/eslint-plugin": "^5.13.0",
56
+ "@typescript-eslint/parser": "^5.13.0",
57
+ "chai": "^4.2.0",
58
+ "coveralls": "^3.0.9",
59
+ "del-cli": "^4.0.1",
60
+ "eslint": "^8.10.0",
61
+ "eslint-config-prettier": "^8.4.0",
62
+ "eslint-import-resolver-typescript": "^2.5.0",
63
+ "eslint-plugin-import": "^2.25.4",
64
+ "eslint-plugin-jsdoc": "^37.9.5",
65
+ "eslint-plugin-node": "^11.1.0",
66
+ "eslint-plugin-unicorn": "^41.0.0",
67
+ "mocha": "^9.0.1",
68
+ "nyc": "^15.0.0",
69
+ "remark-cli": "^10.0.1",
70
+ "remark-preset-lint-recommended": "^6.1.2",
71
+ "ts-node": "^10.0.0",
72
+ "tslint": "^6.1.1",
73
+ "typescript": "^4.0.2"
74
+ },
66
75
  "scripts": {
67
- "clean": "del-cli lib/** src/**/*.js src/**/*.js.map src/**/*.d.ts test/**/*.js test/**/*.js.map",
76
+ "clean": "del-cli src/**/*.js src/**/*.js.map src/**/*.d.ts test/**/*.js test/**/*.js.map",
68
77
  "compile-src": "tsc -p src",
69
78
  "compile-test": "tsc -p test",
70
79
  "compile": "npm run compile-src && npm run compile-test",
71
- "lint-ts": "tslint 'src/**/*.ts' --exclude 'src/**/*.d.ts' 'test/**/*.ts' --exclude 'test/**/*.d.ts'",
80
+ "eslint": "eslint src/**/*.ts --ignore-pattern src/**/*.d.ts test/**/*.ts",
72
81
  "lint-md": "remark -u preset-lint-recommended .",
73
- "lint": "npm run lint-md && npm run lint-ts",
82
+ "lint": "npm run lint-md && npm run eslint",
74
83
  "test": "mocha --require ts-node/register --require source-map-support/register --full-trace test/test-*.ts",
75
84
  "build": "npm run clean && npm run compile",
76
85
  "start": "npm-run-all compile lint cover-test",
@@ -80,7 +89,6 @@
80
89
  },
81
90
  "nyc": {
82
91
  "exclude": [
83
- "lib/**",
84
92
  "test/**/*.ts",
85
93
  "src/**/*.js"
86
94
  ],