Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(deps): bump #732

Closed
wants to merge 5 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions __tests__/cmds/openapi/index.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -679,7 +679,7 @@ describe('rdme openapi', () => {
.put('/api/v1/api-specification/spec1', { registryUUID })
.delayConnection(1000)
.basicAuth({ user: key })
.reply(function (uri, rBody, cb) {
.reply(function reply(uri, rBody, cb) {
expect(this.req.headers['x-readme-version']).toBeUndefined();
return cb(null, [201, { _id: 1 }, { location: exampleRefLocation }]);
});
Expand Down Expand Up @@ -730,7 +730,7 @@ describe('rdme openapi', () => {
.reply(200, [])
.post('/api/v1/api-specification', { registryUUID })
.basicAuth({ user: key })
.reply(function (uri, rBody, cb) {
.reply(function reply(uri, rBody, cb) {
expect(this.req.headers['x-readme-version'][0]).toBe(version);
return cb(null, [201, { _id: 1 }, { location: exampleRefLocation }]);
});
Expand Down Expand Up @@ -766,7 +766,7 @@ describe('rdme openapi', () => {
.reply(200, [])
.post('/api/v1/api-specification', { registryUUID })
.basicAuth({ user: key })
.reply(function (uri, rBody, cb) {
.reply(function reply(uri, rBody, cb) {
expect(this.req.headers['x-readme-version'][0]).toBe(specVersion);
return cb(null, [201, { _id: 1 }, { location: exampleRefLocation }]);
});
Expand Down Expand Up @@ -805,7 +805,7 @@ describe('rdme openapi', () => {
.reply(200, [])
.post('/api/v1/api-specification', { registryUUID })
.basicAuth({ user: key })
.reply(function (uri, rBody, cb) {
.reply(function reply(uri, rBody, cb) {
expect(this.req.headers['x-readme-version']).toBeUndefined();
return cb(null, [201, { _id: 1 }, { location: exampleRefLocation }]);
});
Expand Down
12 changes: 4 additions & 8 deletions __tests__/lib/fetch.test.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* eslint-disable @typescript-eslint/ban-ts-comment */
/* eslint-disable @typescript-eslint/ban-ts-comment, no-console */
import config from 'config';
import { Headers } from 'node-fetch';

Expand Down Expand Up @@ -42,7 +42,7 @@ describe('#fetch()', () => {
const mock = getAPIMock()
.get('/api/v1')
.basicAuth({ user: key })
.reply(200, function () {
.reply(200, function reply() {
return this.req.headers;
});

Expand All @@ -68,7 +68,7 @@ describe('#fetch()', () => {
const mock = getAPIMock()
.get('/api/v1')
.basicAuth({ user: key })
.reply(200, function () {
.reply(200, function reply() {
return this.req.headers;
});

Expand All @@ -90,7 +90,7 @@ describe('#fetch()', () => {
it('should make fetch call if no other request options are provided', async () => {
const mock = getAPIMock()
.get('/api/v1/doesnt-need-auth')
.reply(200, function () {
.reply(200, function reply() {
return this.req.headers;
});

Expand Down Expand Up @@ -128,7 +128,6 @@ describe('#fetch()', () => {

await fetch(`${config.get('host')}/api/v1/some-warning`);

// eslint-disable-next-line no-console
expect(console.warn).toHaveBeenCalledTimes(0);
expect(getWarningCommandOutput()).toBe('');

Expand All @@ -142,7 +141,6 @@ describe('#fetch()', () => {

await fetch(`${config.get('host')}/api/v1/some-warning`);

// eslint-disable-next-line no-console
expect(console.warn).toHaveBeenCalledTimes(1);
expect(getWarningCommandOutput()).toBe('⚠️ ReadMe API Warning: some error');

Expand All @@ -156,7 +154,6 @@ describe('#fetch()', () => {

await fetch(`${config.get('host')}/api/v1/some-warning`);

// eslint-disable-next-line no-console
expect(console.warn).toHaveBeenCalledTimes(2);
expect(getWarningCommandOutput()).toBe(
'⚠️ ReadMe API Warning: some error\n\n⚠️ ReadMe API Warning: another error'
Expand All @@ -172,7 +169,6 @@ describe('#fetch()', () => {

await fetch(`${config.get('host')}/api/v1/some-warning`);

// eslint-disable-next-line no-console
expect(console.warn).toHaveBeenCalledTimes(1);
expect(getWarningCommandOutput()).toBe('⚠️ ReadMe API Warning: some garbage error');

Expand Down
4 changes: 1 addition & 3 deletions bin/set-major-version-tag.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
#! /usr/bin/env node
/* eslint-disable no-console */
const { exec } = require('child_process');

const semverParse = require('semver/functions/parse');
Expand All @@ -14,18 +15,15 @@ async function setMajorVersionTag() {
const parsedVersion = semverParse(pkg.version);

if (parsedVersion.prerelease.length) {
// eslint-disable-next-line no-console
console.warn('Pre-release version, not setting major version tag');
return;
}

exec(`git tag v${parsedVersion.major} -f -m 'Top-level tag pointing to ${parsedVersion.version}'`, (err, stdout) => {
if (err) {
// eslint-disable-next-line no-console
console.error(err);
process.exit(1);
}
// eslint-disable-next-line no-console
if (stdout) console.log(stdout);
});
}
Expand Down
Loading