Skip to content

Commit

Permalink
feat: migrate to oclif/core v4 and oclif/test v4
Browse files Browse the repository at this point in the history
  • Loading branch information
pviti committed Aug 20, 2024
1 parent 7424f77 commit 94dabae
Show file tree
Hide file tree
Showing 33 changed files with 1,952 additions and 2,148 deletions.
16 changes: 8 additions & 8 deletions gen/templates/spec.tpl
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import { expect, test } from '@oclif/test'
import { expect } from 'chai'
import { runCommand } from '@oclif/test'


describe('orders:##__ACTION_ID__##', () => {
test
.timeout(##__SPEC_TIMEOUT__##)
.stdout()
.command(['orders:noc'])
.it('runs NoC', ctx => {
expect(ctx.stdout).to.contain('-= NoC =-')
})
it('runs NoC', async () => {
const { stdout } = await runCommand<{ name: string }>(['orders:noc'])
expect(stdout).to.contain('-= NoC =-')
}).timeout(##__SPEC_TIMEOUT__##)
})

30 changes: 15 additions & 15 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -56,32 +56,32 @@
"devDependencies": {
"@commercelayer/cli-dev": "^3.0.5",
"@commercelayer/eslint-config-ts": "^1.4.5",
"@oclif/plugin-help": "^6.0.22",
"@oclif/test": "^3.2.15",
"@oclif/plugin-help": "^6.2.8",
"@oclif/test": "^4.0.8",
"@semantic-release/changelog": "^6.0.3",
"@semantic-release/git": "^10.0.1",
"@types/chai": "^4.3.16",
"@types/chai": "^4.3.17",
"@types/inquirer": "^8.2.10",
"@types/lodash.snakecase": "^4.1.9",
"@types/mocha": "^10.0.6",
"@types/node": "^20.12.13",
"chai": "^4.4.1",
"@types/mocha": "^10.0.7",
"@types/node": "^22.4.1",
"chai": "^4.5.0",
"eslint": "^8.57.0",
"inflector-js": "^1.0.1",
"lodash.snakecase": "^4.1.1",
"mocha": "^10.4.0",
"mocha": "^10.7.3",
"nyc": "^15.1.0",
"oclif": "^4.11.3",
"semantic-release": "^23.1.1",
"tsx": "^4.11.0",
"typescript": "5.3.3"
"oclif": "^4.14.22",
"semantic-release": "^24.1.0",
"tsx": "^4.17.0",
"typescript": "5.5.4"
},
"dependencies": {
"@commercelayer/cli-core": "^5.0.4",
"@commercelayer/sdk": "^6.4.0",
"@oclif/core": "^3.26.6",
"@commercelayer/cli-core": "beta",
"@commercelayer/sdk": "^6.13.0",
"@oclif/core": "^4.0.17",
"inquirer": "^8.2.6",
"tslib": "^2.6.2"
"tslib": "^2.6.3"
},
"publishConfig": {
"access": "public"
Expand Down
3,574 changes: 1,689 additions & 1,885 deletions pnpm-lock.yaml

Large diffs are not rendered by default.

16 changes: 8 additions & 8 deletions test/commands/orders/approve.test.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import { expect, test } from '@oclif/test'
import { expect } from 'chai'
import { runCommand } from '@oclif/test'


describe('orders:approve', () => {
test
.timeout(30000)
.stdout()
.command(['orders:noc'])
.it('runs NoC', ctx => {
expect(ctx.stdout).to.contain('-= NoC =-')
})
it('runs NoC', async () => {
const { stdout } = await runCommand<{ name: string }>(['orders:noc'])
expect(stdout).to.contain('-= NoC =-')
}).timeout(30000)
})

16 changes: 8 additions & 8 deletions test/commands/orders/approve_and_capture.test.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import { expect, test } from '@oclif/test'
import { expect } from 'chai'
import { runCommand } from '@oclif/test'


describe('orders:approve_and_capture', () => {
test
.timeout(30000)
.stdout()
.command(['orders:noc'])
.it('runs NoC', ctx => {
expect(ctx.stdout).to.contain('-= NoC =-')
})
it('runs NoC', async () => {
const { stdout } = await runCommand<{ name: string }>(['orders:noc'])
expect(stdout).to.contain('-= NoC =-')
}).timeout(30000)
})

16 changes: 8 additions & 8 deletions test/commands/orders/archive.test.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import { expect, test } from '@oclif/test'
import { expect } from 'chai'
import { runCommand } from '@oclif/test'


describe('orders:archive', () => {
test
.timeout(30000)
.stdout()
.command(['orders:noc'])
.it('runs NoC', ctx => {
expect(ctx.stdout).to.contain('-= NoC =-')
})
it('runs NoC', async () => {
const { stdout } = await runCommand<{ name: string }>(['orders:noc'])
expect(stdout).to.contain('-= NoC =-')
}).timeout(30000)
})

16 changes: 8 additions & 8 deletions test/commands/orders/authorization_amount_ce.test.ts.test.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import { expect, test } from '@oclif/test'
import { expect } from 'chai'
import { runCommand } from '@oclif/test'


describe('orders:authorization_amount_cents', () => {
test
.timeout(30000)
.stdout()
.command(['orders:noc'])
.it('runs NoC', ctx => {
expect(ctx.stdout).to.contain('-= NoC =-')
})
it('runs NoC', async () => {
const { stdout } = await runCommand<{ name: string }>(['orders:noc'])
expect(stdout).to.contain('-= NoC =-')
}).timeout(30000)
})

16 changes: 8 additions & 8 deletions test/commands/orders/authorize.test.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import { expect, test } from '@oclif/test'
import { expect } from 'chai'
import { runCommand } from '@oclif/test'


describe('orders:authorize', () => {
test
.timeout(30000)
.stdout()
.command(['orders:noc'])
.it('runs NoC', ctx => {
expect(ctx.stdout).to.contain('-= NoC =-')
})
it('runs NoC', async () => {
const { stdout } = await runCommand<{ name: string }>(['orders:noc'])
expect(stdout).to.contain('-= NoC =-')
}).timeout(30000)
})

16 changes: 8 additions & 8 deletions test/commands/orders/billing_address_clone_id.test.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import { expect, test } from '@oclif/test'
import { expect } from 'chai'
import { runCommand } from '@oclif/test'


describe('orders:billing_address_clone_id', () => {
test
.timeout(30000)
.stdout()
.command(['orders:noc'])
.it('runs NoC', ctx => {
expect(ctx.stdout).to.contain('-= NoC =-')
})
it('runs NoC', async () => {
const { stdout } = await runCommand<{ name: string }>(['orders:noc'])
expect(stdout).to.contain('-= NoC =-')
}).timeout(30000)
})

16 changes: 8 additions & 8 deletions test/commands/orders/billing_address_same_as_shipping.test.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import { expect, test } from '@oclif/test'
import { expect } from 'chai'
import { runCommand } from '@oclif/test'


describe('orders:billing_address_same_as_shipping', () => {
test
.timeout(30000)
.stdout()
.command(['orders:noc'])
.it('runs NoC', ctx => {
expect(ctx.stdout).to.contain('-= NoC =-')
})
it('runs NoC', async () => {
const { stdout } = await runCommand<{ name: string }>(['orders:noc'])
expect(stdout).to.contain('-= NoC =-')
}).timeout(30000)
})

16 changes: 8 additions & 8 deletions test/commands/orders/cancel.test.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import { expect, test } from '@oclif/test'
import { expect } from 'chai'
import { runCommand } from '@oclif/test'


describe('orders:cancel', () => {
test
.timeout(30000)
.stdout()
.command(['orders:noc'])
.it('runs NoC', ctx => {
expect(ctx.stdout).to.contain('-= NoC =-')
})
it('runs NoC', async () => {
const { stdout } = await runCommand<{ name: string }>(['orders:noc'])
expect(stdout).to.contain('-= NoC =-')
}).timeout(30000)
})

16 changes: 8 additions & 8 deletions test/commands/orders/capture.test.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import { expect, test } from '@oclif/test'
import { expect } from 'chai'
import { runCommand } from '@oclif/test'


describe('orders:capture', () => {
test
.timeout(30000)
.stdout()
.command(['orders:noc'])
.it('runs NoC', ctx => {
expect(ctx.stdout).to.contain('-= NoC =-')
})
it('runs NoC', async () => {
const { stdout } = await runCommand<{ name: string }>(['orders:noc'])
expect(stdout).to.contain('-= NoC =-')
}).timeout(30000)
})

16 changes: 8 additions & 8 deletions test/commands/orders/commit_invoice.test.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import { expect, test } from '@oclif/test'
import { expect } from 'chai'
import { runCommand } from '@oclif/test'


describe('orders:commit_invoice', () => {
test
.timeout(30000)
.stdout()
.command(['orders:noc'])
.it('runs NoC', ctx => {
expect(ctx.stdout).to.contain('-= NoC =-')
})
it('runs NoC', async () => {
const { stdout } = await runCommand<{ name: string }>(['orders:noc'])
expect(stdout).to.contain('-= NoC =-')
}).timeout(30000)
})

16 changes: 8 additions & 8 deletions test/commands/orders/create_subscriptions.test.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import { expect, test } from '@oclif/test'
import { expect } from 'chai'
import { runCommand } from '@oclif/test'


describe('orders:create_subscriptions', () => {
test
.timeout(30000)
.stdout()
.command(['orders:noc'])
.it('runs NoC', ctx => {
expect(ctx.stdout).to.contain('-= NoC =-')
})
it('runs NoC', async () => {
const { stdout } = await runCommand<{ name: string }>(['orders:noc'])
expect(stdout).to.contain('-= NoC =-')
}).timeout(30000)
})

16 changes: 8 additions & 8 deletions test/commands/orders/customer_payment_source_id.test.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import { expect, test } from '@oclif/test'
import { expect } from 'chai'
import { runCommand } from '@oclif/test'


describe('orders:customer_payment_source_id', () => {
test
.timeout(30000)
.stdout()
.command(['orders:noc'])
.it('runs NoC', ctx => {
expect(ctx.stdout).to.contain('-= NoC =-')
})
it('runs NoC', async () => {
const { stdout } = await runCommand<{ name: string }>(['orders:noc'])
expect(stdout).to.contain('-= NoC =-')
}).timeout(30000)
})

16 changes: 8 additions & 8 deletions test/commands/orders/fulfill.test.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import { expect, test } from '@oclif/test'
import { expect } from 'chai'
import { runCommand } from '@oclif/test'


describe('orders:fulfill', () => {
test
.timeout(30000)
.stdout()
.command(['orders:noc'])
.it('runs NoC', ctx => {
expect(ctx.stdout).to.contain('-= NoC =-')
})
it('runs NoC', async () => {
const { stdout } = await runCommand<{ name: string }>(['orders:noc'])
expect(stdout).to.contain('-= NoC =-')
}).timeout(30000)
})

16 changes: 8 additions & 8 deletions test/commands/orders/nullify_payment_source.test.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import { expect, test } from '@oclif/test'
import { expect } from 'chai'
import { runCommand } from '@oclif/test'


describe('orders:nullify_payment_source', () => {
test
.timeout(30000)
.stdout()
.command(['orders:noc'])
.it('runs NoC', ctx => {
expect(ctx.stdout).to.contain('-= NoC =-')
})
it('runs NoC', async () => {
const { stdout } = await runCommand<{ name: string }>(['orders:noc'])
expect(stdout).to.contain('-= NoC =-')
}).timeout(30000)
})

16 changes: 8 additions & 8 deletions test/commands/orders/pending.test.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import { expect, test } from '@oclif/test'
import { expect } from 'chai'
import { runCommand } from '@oclif/test'


describe('orders:pending', () => {
test
.timeout(30000)
.stdout()
.command(['orders:noc'])
.it('runs NoC', ctx => {
expect(ctx.stdout).to.contain('-= NoC =-')
})
it('runs NoC', async () => {
const { stdout } = await runCommand<{ name: string }>(['orders:noc'])
expect(stdout).to.contain('-= NoC =-')
}).timeout(30000)
})

16 changes: 8 additions & 8 deletions test/commands/orders/place.test.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import { expect, test } from '@oclif/test'
import { expect } from 'chai'
import { runCommand } from '@oclif/test'


describe('orders:place', () => {
test
.timeout(30000)
.stdout()
.command(['orders:noc'])
.it('runs NoC', ctx => {
expect(ctx.stdout).to.contain('-= NoC =-')
})
it('runs NoC', async () => {
const { stdout } = await runCommand<{ name: string }>(['orders:noc'])
expect(stdout).to.contain('-= NoC =-')
}).timeout(30000)
})

Loading

0 comments on commit 94dabae

Please sign in to comment.