Skip to content

Commit

Permalink
cli-helpers: listr2 dep, and test fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
Tobbe committed Oct 13, 2022
1 parent 422b976 commit 2366047
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 6 deletions.
3 changes: 2 additions & 1 deletion packages/cli-helpers/package.json
Expand Up @@ -24,7 +24,8 @@
"dependencies": {
"@babel/runtime-corejs3": "7.19.1",
"@redwoodjs/telemetry": "3.0.3",
"core-js": "3.25.3"
"core-js": "3.25.3",
"listr2": "5.0.5"
},
"devDependencies": {
"@babel/cli": "7.18.10",
Expand Down
6 changes: 3 additions & 3 deletions packages/cli-helpers/src/auth/__tests__/setupHelpers.test.ts
Expand Up @@ -33,13 +33,13 @@ jest.mock('../../lib/project', () => ({
}))

jest.mock('execa', () => {})
jest.mock('listr')
jest.mock('listr2')
jest.mock('prompts', () => jest.fn(() => ({ answer: true })))

import fs from 'fs'
import path from 'path'

import listr from 'listr'
import { Listr } from 'listr2'
import prompts from 'prompts'

// import * as auth from '../auth'
Expand All @@ -52,7 +52,7 @@ describe('Auth generator tests', () => {

const mockListrRun = jest.fn()

;(listr as jest.MockedFunction<jest.Mock>).mockImplementation(() => {
;(Listr as jest.MockedFunction<jest.Mock>).mockImplementation(() => {
return {
run: mockListrRun,
}
Expand Down
26 changes: 24 additions & 2 deletions yarn.lock
Expand Up @@ -6673,6 +6673,7 @@ __metadata:
"@types/react": 17.0.50
core-js: 3.25.3
jest: 29.0.3
listr2: ^5.0.5
react: 17.0.2
typescript: 4.7.4
languageName: unknown
Expand Down Expand Up @@ -13612,7 +13613,7 @@ __metadata:
languageName: node
linkType: hard

"colorette@npm:^2.0.10, colorette@npm:^2.0.14, colorette@npm:^2.0.16":
"colorette@npm:^2.0.10, colorette@npm:^2.0.14, colorette@npm:^2.0.16, colorette@npm:^2.0.19":
version: 2.0.19
resolution: "colorette@npm:2.0.19"
checksum: 2bcc9134095750fece6e88167011499b964b78bf0ea953469130ddb1dba3c8fe6c03debb0ae181e710e2be10900d117460f980483a7df4ba4a1bac3b182ecb64
Expand Down Expand Up @@ -22124,6 +22125,27 @@ __metadata:
languageName: node
linkType: hard

"listr2@npm:^5.0.5":
version: 5.0.5
resolution: "listr2@npm:5.0.5"
dependencies:
cli-truncate: ^2.1.0
colorette: ^2.0.19
log-update: ^4.0.0
p-map: ^4.0.0
rfdc: ^1.3.0
rxjs: ^7.5.6
through: ^2.3.8
wrap-ansi: ^7.0.0
peerDependencies:
enquirer: ">= 2.3.0 < 3"
peerDependenciesMeta:
enquirer:
optional: true
checksum: 293eea149301ca95822359af647ef8238cbb0a052287a4bf3bb6811802b66afd21117b6c5a391a4c0356b9dff41ad9324b159f49bd3c78562b6bc8b1fd8d988a
languageName: node
linkType: hard

"listr@npm:0.14.3":
version: 0.14.3
resolution: "listr@npm:0.14.3"
Expand Down Expand Up @@ -27959,7 +27981,7 @@ __metadata:
languageName: node
linkType: hard

"rxjs@npm:^7.0.0, rxjs@npm:^7.5.1, rxjs@npm:^7.5.5":
"rxjs@npm:^7.0.0, rxjs@npm:^7.5.1, rxjs@npm:^7.5.5, rxjs@npm:^7.5.6":
version: 7.5.7
resolution: "rxjs@npm:7.5.7"
dependencies:
Expand Down

0 comments on commit 2366047

Please sign in to comment.