feat(reporters): pass the CLI's version number to reporters (#38)

This commit is contained in:
Joakim Carlstein 2023-12-14 13:11:55 +01:00 committed by GitHub
parent bf34cc427a
commit bad4e252f3
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
9 changed files with 32 additions and 7 deletions

View file

@ -10,6 +10,7 @@ import {
type Plugin,
type SerializedError,
} from '@emigrate/plugin-tools/types';
import { version } from '../get-package-info.js';
import upCommand from './up.js';
type Mocked<T> = {
@ -30,6 +31,7 @@ describe('up', () => {
command: 'up',
cwd: '/emigrate',
dry: false,
version,
directory: 'migrations',
},
]);
@ -105,6 +107,7 @@ describe('up', () => {
{
command: 'up',
cwd: '/emigrate',
version,
dry: false,
directory: 'migrations',
},
@ -142,6 +145,7 @@ describe('up', () => {
{
command: 'up',
cwd: '/emigrate',
version,
dry: true,
directory: 'migrations',
},
@ -179,6 +183,7 @@ describe('up', () => {
{
command: 'up',
cwd: '/emigrate',
version,
dry: false,
directory: 'migrations',
},
@ -204,6 +209,7 @@ describe('up', () => {
{
command: 'up',
cwd: '/emigrate',
version,
dry: false,
directory: 'migrations',
},
@ -249,6 +255,7 @@ describe('up', () => {
{
command: 'up',
cwd: '/emigrate',
version,
dry: false,
directory: 'migrations',
},
@ -295,6 +302,7 @@ describe('up', () => {
{
command: 'up',
cwd: '/emigrate',
version,
dry: false,
directory: 'migrations',
},