Skip to content

Commit b39ecfb

Browse files
authored
Merge pull request #374 from aws-amplify/master
Release Amplify Codegen v2.27.2
2 parents 046a044 + 6255b8b commit b39ecfb

File tree

2 files changed

+5
-12
lines changed

2 files changed

+5
-12
lines changed

packages/amplify-codegen/src/utils/validateAmplifyFlutterCapableZeroThreeFeatures.js

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@ const yaml = require('js-yaml');
22
const path = require('path');
33
const fs = require('fs-extra');
44
const semver = require('semver');
5-
const { printer } = require('amplify-prompts');
65

76
const PUBSPEC_LOCK_FILE_NAME = 'pubspec.lock';
87
const MINIMUM_VERSION_CONSTRAIN = '>= 0.3.0 || >= 0.3.0-rc.2';
@@ -21,11 +20,11 @@ function validateAmplifyFlutterCapableZeroThreeFeatures(projectRoot) {
2120
return false;
2221
} catch (e) {
2322
if (e.stack) {
24-
printer.error(e.stack);
25-
printer.error(e.message);
23+
console.log(e.stack);
24+
console.log(e.message);
2625
}
2726

28-
printer.error('An error occurred while parsing ' + PUBSPEC_LOCK_FILE_NAME + '.');
27+
console.log('An error occurred while parsing ' + PUBSPEC_LOCK_FILE_NAME + '.');
2928
return false;
3029
}
3130
}

packages/amplify-codegen/tests/utils/validateAmplifyFlutterCapableForNonModel.test.js

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -6,17 +6,11 @@ const {
66
const mockFs = require('mock-fs');
77
const { join } = require('path');
88
const yaml = require('js-yaml');
9-
const { printer } = require('amplify-prompts');
10-
11-
jest.mock('amplify-prompts', () => ({
12-
printer: {
13-
error: jest.fn()
14-
},
15-
}));
169

1710
const MOCK_PROJECT_ROOT = 'project';
1811
const MOCK_PUBSPEC_FILE_PATH = join(MOCK_PROJECT_ROOT, PUBSPEC_LOCK_FILE_NAME);
19-
const mockErrorPrinter = printer.error;
12+
global.console = {log: jest.fn()}
13+
const mockErrorPrinter = console.log;
2014

2115
describe('Validate amplify flutter version tests', () => {
2216
afterEach(() => {

0 commit comments

Comments
 (0)