Skip to content

Commit a52338e

Browse files
authored
Merge pull request #563 from evcodes/prepend-scopes
chore: prepend @aws-amplify to amplify-cli-core
2 parents 906ffab + 2c823b6 commit a52338e

29 files changed

+1423
-1448
lines changed

package.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -59,13 +59,15 @@
5959
"packages/*"
6060
],
6161
"devDependencies": {
62+
"@aws-amplify/amplify-cli-core": "^4.0.0",
6263
"@commitlint/cli": "^17.0.3",
6364
"@commitlint/config-conventional": "^17.0.3",
6465
"@commitlint/config-lerna-scopes": "^17.0.2",
6566
"@types/jest": "^27.0.0",
6667
"@types/js-yaml": "^4.0.0",
6768
"@typescript-eslint/eslint-plugin": "^4.0.0",
6869
"@typescript-eslint/parser": "^4.0.0",
70+
"amplify-headless-interface": "^1.13.1",
6971
"cmd-shim": "^3.0.3",
7072
"codecov": "^3.7.0",
7173
"commitizen": "^4.2.4",
@@ -83,6 +85,7 @@
8385
"eslint-plugin-react": "^7.21.5",
8486
"eslint-plugin-spellcheck": "^0.0.17",
8587
"glob": "^7.1.6",
88+
"graphql-transformer-core": "^8.0.0",
8689
"husky": "^3.0.3",
8790
"jest": "^27.0.0",
8891
"jest-circus": "^27.0.0",
@@ -95,10 +98,7 @@
9598
"rimraf": "^3.0.0",
9699
"ts-jest": "^27.0.0",
97100
"ts-node": "^8.10.1",
98-
"typescript": "4.7.4",
99-
"amplify-cli-core": "^4.0.0",
100-
"graphql-transformer-core": "^8.0.0",
101-
"amplify-headless-interface": "^1.13.1"
101+
"typescript": "4.7.4"
102102
},
103103
"resolutions": {
104104
"minimist": "^1.2.6",

packages/amplify-codegen-e2e-core/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@
3535
"uuid": "7.0.1"
3636
},
3737
"peerDependencies": {
38-
"amplify-cli-core": "^4.0.0",
38+
"@aws-amplify/amplify-cli-core": "^4.0.0",
3939
"amplify-headless-interface": "^1.13.1",
4040
"graphql-transformer-core": "^8.0.0"
4141
}

packages/amplify-codegen-e2e-core/src/categories/lambda-layer.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import * as fs from 'fs-extra';
22
import * as path from 'path';
33
import _ from 'lodash';
4-
import { JSONUtilities } from 'amplify-cli-core';
4+
import { JSONUtilities } from '@aws-amplify/amplify-cli-core';
55
import { nspawn as spawn, ExecutionContext, getCLIPath, KEY_DOWN_ARROW } from '..';
66
import { getLayerVersion, listVersions } from '../utils/sdk-calls';
77
import { multiSelect } from '../utils/selectors';

packages/amplify-codegen-e2e-core/src/utils/add-circleci-tags.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { stateManager } from 'amplify-cli-core';
1+
import { stateManager } from '@aws-amplify/amplify-cli-core';
22

33
declare global {
44
namespace NodeJS {

packages/amplify-codegen-e2e-core/src/utils/feature-flags.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import _ from 'lodash';
2-
import { pathManager, FeatureFlagsEntry, JSONUtilities } from 'amplify-cli-core';
2+
import { pathManager, FeatureFlagsEntry, JSONUtilities } from '@aws-amplify/amplify-cli-core';
33

44
type FeatureFlagData = { features: FeatureFlagsEntry };
55
const getFeatureFlagFilePath = (projectRoot: string) => {

packages/amplify-codegen-e2e-core/src/utils/projectMeta.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import * as path from 'path';
22
import * as os from 'os';
33
import * as fs from 'fs-extra';
44
import _ from 'lodash';
5-
import { JSONUtilities } from 'amplify-cli-core';
5+
import { JSONUtilities } from '@aws-amplify/amplify-cli-core';
66

77
function getAWSConfigAndroidPath(projRoot: string): string {
88
return path.join(projRoot, 'app', 'src', 'main', 'res', 'raw', 'awsconfiguration.json');

packages/amplify-codegen-e2e-tests/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@
4141
"ts-node": "^8.10.1"
4242
},
4343
"peerDependencies": {
44-
"amplify-cli-core": "^4.0.0",
44+
"@aws-amplify/amplify-cli-core": "^4.0.0",
4545
"graphql-transformer-core": "^8.0.0"
4646
},
4747
"jest": {
Lines changed: 16 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,29 @@
11
import * as fs from 'fs-extra';
22
import { initJSProjectWithProfile, createNewProjectDir, deleteProject, deleteProjectDir } from '@aws-amplify/amplify-codegen-e2e-core';
3-
import { pathManager } from 'amplify-cli-core';
3+
import { pathManager } from '@aws-amplify/amplify-cli-core';
44

55
const codegenFeatureFlags = {
6-
"handlelistnullabilitytransparently": true,
7-
"addtimestampfields": true,
8-
"useappsyncmodelgenplugin": true,
9-
"usedocsgeneratorplugin": true,
10-
"usetypesgeneratorplugin": true,
11-
"cleangeneratedmodelsdirectory": true,
12-
"retaincasestyle": true,
13-
"generateindexrules": true,
14-
"emitauthprovider": true,
15-
"enabledartnullsafety": true,
16-
"generatemodelsforlazyloadandcustomselectionset": false,
6+
handlelistnullabilitytransparently: true,
7+
addtimestampfields: true,
8+
useappsyncmodelgenplugin: true,
9+
usedocsgeneratorplugin: true,
10+
usetypesgeneratorplugin: true,
11+
cleangeneratedmodelsdirectory: true,
12+
retaincasestyle: true,
13+
generateindexrules: true,
14+
emitauthprovider: true,
15+
enabledartnullsafety: true,
16+
generatemodelsforlazyloadandcustomselectionset: false,
1717
};
1818

1919
describe('codegen related feature flags - new project', () => {
2020
let projRoot: string;
2121

2222
beforeEach(async () => {
23-
// Given: a new project is created
24-
// When: amplify is initialized in the new project
25-
projRoot = await createNewProjectDir('feature-flags');
26-
await initJSProjectWithProfile(projRoot, {});
23+
// Given: a new project is created
24+
// When: amplify is initialized in the new project
25+
projRoot = await createNewProjectDir('feature-flags');
26+
await initJSProjectWithProfile(projRoot, {});
2727
});
2828

2929
afterEach(async () => {
@@ -38,4 +38,3 @@ describe('codegen related feature flags - new project', () => {
3838
expect(fs.readJSONSync(cliJSONFilePath).features.codegen).toEqual(codegenFeatureFlags);
3939
});
4040
});
41-

packages/amplify-codegen-e2e-tests/src/__tests__/pull-codegen.test.ts

Lines changed: 12 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
import {
2-
createNewProjectDir,
1+
import {
2+
createNewProjectDir,
33
deleteProjectDir,
44
deleteProject,
55
initJSProjectWithProfile,
@@ -16,24 +16,17 @@ import {
1616
AmplifyFrontendConfig,
1717
getAdminApp,
1818
amplifyPullSandbox,
19-
getProjectSchema
20-
} from "@aws-amplify/amplify-codegen-e2e-core";
21-
import { existsSync } from "fs";
19+
getProjectSchema,
20+
} from '@aws-amplify/amplify-codegen-e2e-core';
21+
import { existsSync } from 'fs';
2222
import path from 'path';
2323
import { isNotEmptyDir, generateSourceCode } from '../utils';
24-
import { JSONUtilities } from 'amplify-cli-core';
24+
import { JSONUtilities } from '@aws-amplify/amplify-cli-core';
2525
import { SandboxApp } from '../types/SandboxApp';
2626

27-
28-
2927
const schema = 'simple_model.graphql';
3028
const envName = 'pulltest';
31-
const frontendConfigs: AmplifyFrontendConfig[] = [
32-
DEFAULT_JS_CONFIG,
33-
DEFAULT_ANDROID_CONFIG,
34-
DEFAULT_IOS_CONFIG,
35-
DEFAULT_FLUTTER_CONFIG
36-
];
29+
const frontendConfigs: AmplifyFrontendConfig[] = [DEFAULT_JS_CONFIG, DEFAULT_ANDROID_CONFIG, DEFAULT_IOS_CONFIG, DEFAULT_FLUTTER_CONFIG];
3730

3831
describe('Amplify pull in amplify app with codegen tests', () => {
3932
let projectRoot: string;
@@ -67,9 +60,9 @@ describe('Amplify pull in amplify app with codegen tests', () => {
6760
});
6861

6962
describe('amplify pull in a new folder', () => {
70-
let emptyProjectRoot: string
63+
let emptyProjectRoot: string;
7164
beforeEach(async () => {
72-
emptyProjectRoot= await createNewProjectDir('pullCodegenEmpty');
65+
emptyProjectRoot = await createNewProjectDir('pullCodegenEmpty');
7366
});
7467
afterEach(async () => {
7568
deleteProjectDir(emptyProjectRoot);
@@ -80,13 +73,12 @@ describe('Amplify pull in amplify app with codegen tests', () => {
8073
//generate pre existing user file
8174
const userSourceCodePath = generateSourceCode(emptyProjectRoot, config.srcDir);
8275
//amplify pull in a new project
83-
await amplifyPull(emptyProjectRoot, {emptyDir: true, appId, frontendConfig: config});
76+
await amplifyPull(emptyProjectRoot, { emptyDir: true, appId, frontendConfig: config });
8477
expect(existsSync(userSourceCodePath)).toBe(true);
8578
expect(isNotEmptyDir(path.join(emptyProjectRoot, config.modelgenDir))).toBe(true);
86-
});
79+
});
8780
});
8881
});
89-
9082
});
9183

9284
describe('Amplify pull in sandbox app with codegen tests', () => {
@@ -114,7 +106,6 @@ describe('Amplify pull in sandbox app with codegen tests', () => {
114106
deleteProjectDir(projectRoot);
115107
});
116108

117-
118109
frontendConfigs.forEach(config => {
119110
it(`should pull sandbox, download schema and generate models without deleting user files in ${config.frontendType} project`, async () => {
120111
//generate pre existing user file
@@ -130,7 +121,6 @@ describe('Amplify pull in sandbox app with codegen tests', () => {
130121
//models should be generated and no user files get deleted
131122
expect(existsSync(userSourceCodePath)).toBe(true);
132123
expect(isNotEmptyDir(path.join(projectRoot, config.modelgenDir))).toBe(true);
133-
134124
});
135125
});
136-
});
126+
});

packages/amplify-codegen-e2e-tests/src/amplify-app-helpers/amplify-app-validation.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import * as fs from 'fs-extra';
22
import * as path from 'path';
3-
import { pathManager } from 'amplify-cli-core';
3+
import { pathManager } from '@aws-amplify/amplify-cli-core';
44

55
function validateProject(projRoot: string, platform: string) {
66
expect(fs.existsSync(path.join(projRoot, 'amplify'))).toBe(true);

0 commit comments

Comments
 (0)