Skip to content

Commit

Permalink
chore(deps-dev): bump xo from 0.30.0 to 0.32.0 (#39)
Browse files Browse the repository at this point in the history
* chore(deps-dev): bump xo from 0.30.0 to 0.32.0

Bumps [xo](https://github.com/xojs/xo) from 0.30.0 to 0.32.0.
- [Release notes](https://github.com/xojs/xo/releases)
- [Commits](xojs/xo@v0.30.0...v0.32.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>

* fix lint

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
Co-authored-by: Hugo Di Francesco <HugoDF@users.noreply.github.com>
  • Loading branch information
dependabot-preview[bot] and HugoDF authored Jun 4, 2020
1 parent c8073d2 commit a90879b
Show file tree
Hide file tree
Showing 11 changed files with 182 additions and 204 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
"microbundle": "^0.12.0",
"nock": "^12.0.3",
"np": "^6.2.1",
"xo": "^0.30.0"
"xo": "^0.32.0"
},
"xo": {
"prettier": true,
Expand Down
2 changes: 1 addition & 1 deletion src/drafts.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ export async function list(page = 1): Promise<DraftList> {
}

export async function create(fields: DraftEditableFields): Promise<void> {
return client.request<void>(VERBS.POST, RESOURCES.DRAFTS, {payload: fields});
return client.request(VERBS.POST, RESOURCES.DRAFTS, {payload: fields});
}

export async function get(id: string): Promise<DraftRecord> {
Expand Down
2 changes: 1 addition & 1 deletion src/emails.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ export async function create(fields: EmailCreateFields): Promise<void> {
'buttondown.emails.create() - body and subject are required'
);

return client.request<void>(VERBS.POST, RESOURCES.EMAILS, {payload: fields});
return client.request(VERBS.POST, RESOURCES.EMAILS, {payload: fields});
}

export async function get(id: string): Promise<EmailRecord> {
Expand Down
2 changes: 1 addition & 1 deletion src/images.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ export async function create(fields: ImageCreateFields): Promise<void> {
'buttondown.image.create() - image is required'
);

return client.notImplemented<void>(VERBS.POST, RESOURCES.IMAGES, {
return client.notImplemented(VERBS.POST, RESOURCES.IMAGES, {
payload: fields
});
}
Expand Down
1 change: 0 additions & 1 deletion src/lib/validate.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
/* eslint-disable @typescript-eslint/prefer-readonly-parameter-types */
import {HTTPPayload} from './types';

export function validatePresence(
Expand Down
4 changes: 3 additions & 1 deletion src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import * as subscribers from './subscribers';
import * as tags from './tags';
import * as unsubscribers from './unsubscribers';

export default {
const buttondown = {
// Kinda just exporting for tests :shrug:
Client,
// Alias from client instance
Expand All @@ -26,3 +26,5 @@ export default {
tags,
unsubscribers
};

export default buttondown;
2 changes: 1 addition & 1 deletion src/newsletters.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ export async function create(fields: NewsletterEditableFields): Promise<void> {
REQUIRED_FIELDS,
'buttondown.newsletters.create() - username, name and description are required'
);
return client.request<void>(VERBS.POST, RESOURCES.NEWSLETTERS, {
return client.request(VERBS.POST, RESOURCES.NEWSLETTERS, {
payload: fields
});
}
Expand Down
2 changes: 1 addition & 1 deletion src/scheduled-emails.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ export async function create(
'buttondown.scheduled-emails.create() - body, subject and publish_date are required'
);

return client.request<void>(VERBS.POST, RESOURCES.SCHEDULED_EMAILS, {
return client.request(VERBS.POST, RESOURCES.SCHEDULED_EMAILS, {
payload: fields
});
}
Expand Down
5 changes: 2 additions & 3 deletions src/subscribers.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
/* eslint-disable @typescript-eslint/prefer-readonly-parameter-types */
import client, {VERBS, RESOURCES} from './lib/client';
import {validateNonEmptyObject, validatePresence} from './lib/validate';
import {ViewSetResponse} from './lib/types';
Expand Down Expand Up @@ -64,7 +63,7 @@ export async function create(fields: SubscriberCreateFields): Promise<void> {
REQUIRED_FIELDS,
'buttondown.subscribers.create() - email is required'
);
return client.request<void>(VERBS.POST, RESOURCES.SUBSCRIBERS, {
return client.request(VERBS.POST, RESOURCES.SUBSCRIBERS, {
payload: fields
});
}
Expand Down Expand Up @@ -136,7 +135,7 @@ export async function remove(
query.tags = filters.tags.join(',');
}

return client.request<void>(VERBS.DELETE, RESOURCES.SUBSCRIBERS, {
return client.request(VERBS.DELETE, RESOURCES.SUBSCRIBERS, {
resourcePath: id,
query
});
Expand Down
2 changes: 1 addition & 1 deletion src/tags.ts
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ export async function remove(
'buttondown.tags.remove() - name is required'
);

return client.request<void>(VERBS.DELETE, RESOURCES.TAGS, {
return client.request(VERBS.DELETE, RESOURCES.TAGS, {
resourcePath: id,
query: filters
});
Expand Down
Loading

0 comments on commit a90879b

Please sign in to comment.