Skip to content

Commit

Permalink
Chore: Preparation to Upgrade Oclif to Version 3 (#1140)
Browse files Browse the repository at this point in the history
* chore: upgrade and remove unused dependencies

* chore: call bats directly without npx

* refactor: follows https://github.com/oclif/core/blob/main/guides/V3_MIGRATION.md#bin-scripts-for-esmcjs-interoperability

* test: fix test

* revert: revert oclif to version 2

* fix: remove license

* test: add response time assertion
  • Loading branch information
haricnugraha authored Oct 23, 2023
1 parent 91517c1 commit 3d528ef
Show file tree
Hide file tree
Showing 17 changed files with 2,500 additions and 2,217 deletions.
2 changes: 1 addition & 1 deletion .eslintignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
/lib
/bin/run
/bin
docs/
30 changes: 29 additions & 1 deletion .eslintrc
Original file line number Diff line number Diff line change
@@ -1,8 +1,36 @@
{
"extends": ["oclif", "oclif-typescript", "prettier"],
"rules": {
"@typescript-eslint/no-explicit-any": "warn",
"arrow-body-style": "warn",
"no-bitwise": "warn",
"no-constant-binary-expression": "warn",
"no-restricted-imports": "warn",
"no-use-before-define": ["warn", "nofunc"],
"unicorn/prefer-node-protocol": "off"
"object-shorthand": "warn",
"perfectionist/sort-classes": "warn",
"perfectionist/sort-enums": "warn",
"perfectionist/sort-imports": "warn",
"perfectionist/sort-interfaces": "warn",
"perfectionist/sort-named-exports": "warn",
"perfectionist/sort-named-imports": "warn",
"perfectionist/sort-object-types": "warn",
"perfectionist/sort-objects": "warn",
"perfectionist/sort-union-types": "warn",
"prefer-arrow-callback": "warn",
"prefer-destructuring": "warn",
"unicorn/no-await-expression-member": "warn",
"unicorn/no-empty-file": "warn",
"unicorn/no-useless-promise-resolve-reject": "warn",
"unicorn/prefer-at": "warn",
"unicorn/prefer-code-point": "warn",
"unicorn/prefer-event-target": "warn",
"unicorn/prefer-export-from": "warn",
"unicorn/prefer-logical-operator-over-ternary": "warn",
"unicorn/prefer-node-protocol": "warn",
"unicorn/prefer-top-level-await": "warn",
"unicorn/switch-case-braces": "warn",
"unicorn/text-encoding-identifier-case": "warn"
},
"overrides": [
{
Expand Down
1 change: 1 addition & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,4 @@ docs/.next
docs/.cache
docs/node_modules
oclif.manifest.json
bin
42 changes: 0 additions & 42 deletions .vscode/launch.json

This file was deleted.

6 changes: 3 additions & 3 deletions bin/dev.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/usr/bin/env node
// eslint-disable-next-line node/shebang
;(async () => {
(async () => {
const oclif = await import('@oclif/core')
await oclif.execute({ type: 'cjs', development: true, dir: __dirname })
})()
await oclif.execute({type: 'cjs', development: true, dir: __dirname})
})()
3 changes: 0 additions & 3 deletions bin/run

This file was deleted.

29 changes: 0 additions & 29 deletions bin/run-dev

This file was deleted.

2 changes: 1 addition & 1 deletion bin/run.cmd
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
@echo off

node "%~dp0\run" %*
node "%~dp0\run" %*
3 changes: 3 additions & 0 deletions bin/run.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#!/usr/bin/env node

require('../lib').run().catch(require('@oclif/core/handle'))
2 changes: 1 addition & 1 deletion monika.example.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
"message": "response status message"
},
{
"assertion": "response.time > 150",
"assertion": "response.time > 30000",
"message": "response time message"
}
]
Expand Down
Loading

0 comments on commit 3d528ef

Please sign in to comment.