Skip to content

Commit

Permalink
fix: update package to v2 minimums
Browse files Browse the repository at this point in the history
@W-10245155@
  • Loading branch information
peternhale committed Dec 2, 2021
1 parent ae751e7 commit 52115cf
Show file tree
Hide file tree
Showing 5 changed files with 801 additions and 424 deletions.
5 changes: 4 additions & 1 deletion .eslintrc
Expand Up @@ -3,5 +3,8 @@
"oclif",
"oclif-typescript"
],
"rules": {}
"rules": {
"unicorn/import-style": 1,
"unicorn/prefer-node-protocol": 0
}
}
14 changes: 7 additions & 7 deletions package.json
Expand Up @@ -5,19 +5,19 @@
"author": "Jeff Dickey @jdxcode",
"bugs": "https://github.com/oclif/test/issues",
"dependencies": {
"fancy-test": "^1.4.3"
"fancy-test": "^2.0.0"
},
"devDependencies": {
"@oclif/core": "^0.5.27",
"@oclif/core": "^1.0.5",
"@types/chai": "^4.1.7",
"@types/mocha": "^8.0.0",
"@types/mocha": "^9.0.0",
"@types/node": "^14.0.14",
"chai": "^4.2.0",
"eslint": "^7.3.1",
"eslint-config-oclif": "^3.1.0",
"eslint-config-oclif-typescript": "^0.2.0",
"eslint": "^7.32.0",
"eslint-config-oclif": "^4.0.0",
"eslint-config-oclif-typescript": "^1.0.2",
"globby": "^11.0.1",
"mocha": "^8.2.1",
"mocha": "^9",
"nock": "^13.0.1",
"shx": "^0.3.3",
"ts-node": "^9.0.0",
Expand Down
2 changes: 1 addition & 1 deletion src/hook.ts
Expand Up @@ -14,7 +14,7 @@ import {loadConfig} from './load-config'
* @param {string} event hook to run
* @param {object} hookOpts options to pass to hook. Config object will be passed automatically.
*/
export default (event: string, hookOpts: object = {}, options: loadConfig.Options = {}) => ({
export default (event: string, hookOpts: Record<string, unknown> = {}, options: loadConfig.Options = {}) => ({
async run(ctx: {config: Interfaces.Config; expectation: string}) {
if (!event) throw new Error('no hook provided')
// eslint-disable-next-line require-atomic-updates
Expand Down
5 changes: 2 additions & 3 deletions test/index.test.ts
Expand Up @@ -34,13 +34,12 @@ describe('stdout + stderr', () => {
})
})

const os = ['darwin', 'win32', 'linux']
os.forEach(os => {
for (const os of ['darwin', 'win32', 'linux']) {
describe(os, () => {
test
.stub(OS, 'platform', () => os)
.end('sets os', () => {
expect(OS.platform()).to.equal(os)
})
})
})
}

0 comments on commit 52115cf

Please sign in to comment.