Skip to content
This repository has been archived by the owner on May 22, 2024. It is now read-only.

Commit

Permalink
fix: bump deps (#363)
Browse files Browse the repository at this point in the history
  • Loading branch information
mdonnalley authored Mar 11, 2024
1 parent be7c197 commit 4aeae41
Show file tree
Hide file tree
Showing 10 changed files with 564 additions and 161 deletions.
11 changes: 6 additions & 5 deletions .eslintrc.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
{
"extends": [
"oclif",
"oclif-typescript"
],
"extends": ["oclif", "oclif-typescript"],
"rules": {
"unicorn/no-array-reduce": "off",
"unicorn/prefer-object-from-entries": "off",
Expand All @@ -12,6 +9,10 @@
"valid-jsdoc": "off",
"unicorn/import-style": "off",
"@typescript-eslint/no-empty-function": "off",
"@typescript-eslint/interface-name-prefix": "off"
"@typescript-eslint/interface-name-prefix": "off",
"perfectionist/sort-objects": "off",
"@typescript-eslint/no-explicit-any": "off",
"perfectionist/sort-interfaces": "off",
"perfectionist/sort-object-types": "off"
}
}
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@
"chai": "^4.4.1",
"chalk": "^4.1.0",
"eslint": "^8.57.0",
"eslint-config-oclif": "^5.0.3",
"eslint-config-oclif-typescript": "^2.0.1",
"eslint-config-oclif": "^5.1.1",
"eslint-config-oclif-typescript": "^3.1.2",
"http-call": "^5.2.3",
"markdown-toc": "^1.2.0",
"mocha": "^10.2.0",
Expand Down
4 changes: 2 additions & 2 deletions src/catch.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import {isString, isRegExp} from 'lodash'
import {isRegExp, isString} from 'lodash'

import {expect} from './chai'

export default (arg: RegExp | string | ((err: Error) => any), opts: {raiseIfNotThrown?: boolean} = {}) => ({
export default (arg: ((err: Error) => any) | RegExp | string, opts: {raiseIfNotThrown?: boolean} = {}) => ({
run() {
if (opts.raiseIfNotThrown !== false) {
throw new Error('expected error to be thrown')
Expand Down
2 changes: 1 addition & 1 deletion src/env.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import {mapValues} from 'lodash'

import {EnvOptions} from './types'

export default (env: {[k: string]: string | null | undefined}, opts: EnvOptions = {}) => {
export default (env: {[k: string]: null | string | undefined}, opts: EnvOptions = {}) => {
const envs: (typeof process.env)[] = []
return {
run() {
Expand Down
1 change: 0 additions & 1 deletion src/index.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import base from './base'
import _catch from './catch'

import env from './env'
import * as Nock from './nock'
import {stderr, stdin, stdout} from './stdmock'
Expand Down
4 changes: 2 additions & 2 deletions src/nock.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import Nock = require('nock')

import {NockCallback, NockOptions} from './types'

import Nock = require('nock')

export function nock(host: string, options: NockCallback | NockOptions, cb?: NockCallback) {
if (typeof options === 'function') {
cb = options
Expand Down
2 changes: 1 addition & 1 deletion src/stdmock.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/* eslint-disable import/namespace */
import * as mock from 'stdout-stderr'

const create = <T extends 'stdout' | 'stderr'>(std: T) => (opts: {print?: boolean; stripColor?: boolean} = {}) => ({
const create = <T extends 'stderr' | 'stdout'>(std: T) => (opts: {print?: boolean; stripColor?: boolean} = {}) => ({
run(ctx: {readonly [P in T]: string}) {
mock[std].start()
mock[std].print = opts.print || process.env.TEST_OUTPUT === '1'
Expand Down
2 changes: 1 addition & 1 deletion src/stub.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import {SinonStub, SinonSandbox, createSandbox} from 'sinon'
import {SinonSandbox, SinonStub, createSandbox} from 'sinon'

/**
* mocks an object's property
Expand Down
2 changes: 1 addition & 1 deletion src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ export interface It<I> {
export type Base<I extends Context, T extends Plugins> = {
it: It<I>;
end: It<I>;
add<K extends string, O>(key: K, cb: ((context: I) => Promise<O> | O) | Promise<O> | O): Base<I & {[P in K]: O}, T>;
add<K extends string, O>(key: K, cb: ((context: I) => O | Promise<O>) | O | Promise<O>): Base<I & {[P in K]: O}, T>;
do<O>(cb: (context: I & O) => any): Base<O & I, T>;
finally(cb: (context: I) => any): Base<I, T>;
register<K extends string, O, A extends any[]>(key: K, plugin: (...args: A) => Plugin<O & I>): Base<I, T & {[P in K]: {output: O; args: A}}>;
Expand Down
Loading

0 comments on commit 4aeae41

Please sign in to comment.