Skip to content

Commit f967ba0

Browse files
authored
Merge pull request #460 from aws-amplify/main
Release PR
2 parents d8ed7e8 + 4e724fe commit f967ba0

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

41 files changed

+12330
-4347
lines changed

.eslintrc.js

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,6 +119,7 @@ module.exports = {
119119
'no-plusplus': 'off',
120120

121121
// TODO enable later
122+
'camelcase': 'off',
122123
'consistent-return': 'off', // https://eslint.org/docs/rules/consistent-return
123124
'no-console': 'off', // https://eslint.org/docs/rules/no-console
124125
'no-prototype-builtins': 'off', // https://eslint.org/docs/rules/no-prototype-builtins
@@ -138,7 +139,13 @@ module.exports = {
138139
'no-return-await': 'off', // https://eslint.org/docs/rules/no-return-await
139140

140141
// TSLint existing rules
141-
'@typescript-eslint/class-name-casing': 'error',
142+
'@typescript-eslint/naming-convention': [
143+
'error',
144+
{
145+
'selector': ['class', 'interface'],
146+
'format': ['PascalCase'],
147+
}
148+
],
142149
'curly': 'off', // Enable later
143150
'guard-for-in': 'error',
144151
'indent': 'off', // Enable later

package.json

Lines changed: 15 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,8 @@
2323
"verdaccio-publish": "yarn verdaccio-clean && yarn publish-to-verdaccio",
2424
"verdaccio-disconnect": "source .circleci/local_publish_helpers.sh && unsetNpmRegistryUrl",
2525
"verdaccio-stop": "kill -9 $(lsof -n -t -iTCP:4873 -sTCP:LISTEN)",
26-
"setup-dev": "(yarn && lerna run build) && yarn add-cli-no-save && (yarn hoist-cli && yarn rm-dev-link && yarn link-dev)",
27-
"add-cli-no-save": "yarn add @aws-amplify/cli-internal -W && git restore package.json",
26+
"setup-dev": "rm -rf yarn.lock && (yarn && lerna run build) && yarn add-cli-no-save && (yarn hoist-cli && yarn rm-dev-link && yarn link-dev)",
27+
"add-cli-no-save": "yarn add @aws-amplify/amplify-category-api @aws-amplify/cli-internal -W && git restore package.json yarn.lock",
2828
"hoist-cli": "rm -rf node_modules/amplify-cli-internal && mkdir node_modules/amplify-cli-internal && cp -r node_modules/@aws-amplify/cli-internal/ node_modules/amplify-cli-internal",
2929
"link-dev": "cd node_modules/amplify-cli-internal && ln -s \"$(pwd)/bin/amplify\" \"$(yarn global bin)/amplify-dev\" && cd -",
3030
"rm-dev-link": "rm -f \"$(yarn global bin)/amplify-dev\"",
@@ -62,10 +62,10 @@
6262
"@commitlint/cli": "^17.0.3",
6363
"@commitlint/config-conventional": "^17.0.3",
6464
"@commitlint/config-lerna-scopes": "^17.0.2",
65-
"@types/jest": "^25.2.1",
65+
"@types/jest": "^28.1.6",
6666
"@types/js-yaml": "^3.12.3",
67-
"@typescript-eslint/eslint-plugin": "^2.16.0",
68-
"@typescript-eslint/parser": "^2.16.0",
67+
"@typescript-eslint/eslint-plugin": "^4.0.0",
68+
"@typescript-eslint/parser": "^4.0.0",
6969
"cmd-shim": "^3.0.3",
7070
"codecov": "^3.7.0",
7171
"commitizen": "^4.2.4",
@@ -76,34 +76,36 @@
7676
"eslint-config-prettier": "^6.9.0",
7777
"eslint-import-resolver-typescript": "^2.0.0",
7878
"eslint-plugin-import": "^2.20.0",
79-
"eslint-plugin-jest": "^23.6.0",
79+
"eslint-plugin-jest": "^26.6.0",
8080
"eslint-plugin-json": "^2.0.1",
8181
"eslint-plugin-jsx-a11y": "^6.4.1",
8282
"eslint-plugin-prettier": "^3.1.2",
8383
"eslint-plugin-react": "^7.21.5",
8484
"eslint-plugin-spellcheck": "^0.0.17",
8585
"glob": "^7.1.6",
8686
"husky": "^3.0.3",
87-
"jest": "^25.5.4",
88-
"jest-circus": "^25.5.4",
89-
"jest-junit": "^10.0.0",
87+
"jest": "^28.1.3",
88+
"jest-circus": "^28.1.3",
89+
"jest-junit": "^14.0.0",
9090
"js-yaml": "3.13.1",
9191
"lnk": "1.1.0",
9292
"prettier": "^1.19.1",
9393
"prettier-eslint": "^9.0.1",
9494
"pretty-quick": "^3.1.0",
9595
"rimraf": "^3.0.0",
96-
"ts-jest": "^25.5.0",
96+
"ts-jest": "^28.0.7",
9797
"ts-node": "^8.10.1",
98-
"typescript": "^3.8.3",
99-
"amplify-cli-core": "^2.3.0",
98+
"typescript": "^4.7.4",
99+
"amplify-cli-core": "^2.3.0",
100100
"graphql-transformer-core": "^7.2.1",
101101
"amplify-headless-interface": "^1.13.1"
102102
},
103103
"resolutions": {
104104
"minimist": "^1.2.6",
105105
"lodash": "^4.17.21",
106-
"node-fetch": "^2.6.7"
106+
"node-fetch": "^2.6.7",
107+
"cross-fetch": "^2.2.6",
108+
"glob-parent": "^6.0.2"
107109
},
108110
"config": {
109111
"commitizen": {

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@
3636
"yargs": "^15.1.0"
3737
},
3838
"devDependencies": {
39-
"@types/jest": "^26.0.22",
39+
"@types/jest": "^28.1.6",
4040
"ts-node": "^8.9.0"
4141
},
4242
"peerDependencies": {

packages/amplify-codegen/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
"chalk": "^3.0.0",
2828
"fs-extra": "^8.1.0",
2929
"glob-all": "^3.1.0",
30-
"glob-parent": "^5.1.1",
30+
"glob-parent": "^6.0.2",
3131
"graphql": "^14.5.8",
3232
"graphql-config": "^2.2.1",
3333
"inquirer": "^7.3.3",

packages/amplify-codegen/src/commands/models.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,7 @@ async function generateModels(context) {
8484
const emitAuthProvider = readFeatureFlag('codegen.emitAuthProvider');
8585
const usePipelinedTransformer = readFeatureFlag('graphQLTransformer.useExperimentalPipelinedTransformer')
8686
const transformerVersion = readNumericFeatureFlag('graphQLTransformer.transformerVersion');
87+
const respectPrimaryKeyAttributesOnConnectionField = readFeatureFlag('graphQLTransformer.respectPrimaryKeyAttributesOnConnectionField');
8788

8889
let isTimestampFieldsAdded = readFeatureFlag('codegen.addTimestampFields');
8990
let enableDartNullSafety = readFeatureFlag('codegen.enableDartNullSafety');
@@ -125,7 +126,8 @@ async function generateModels(context) {
125126
usePipelinedTransformer,
126127
enableDartZeroThreeFeatures,
127128
transformerVersion,
128-
dartUpdateAmplifyCoreDependency
129+
dartUpdateAmplifyCoreDependency,
130+
respectPrimaryKeyAttributesOnConnectionField,
129131
},
130132
});
131133

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
import { toCamelCase } from "../../utils/fieldUtils";
2+
3+
describe('Field util function tests', () => {
4+
describe('toCamelCase test', () => {
5+
it('should construct the string array to a camel case phrase', () => {
6+
const words: string[] = ['AMPlify', 'data', 'build', 'time'];
7+
expect(toCamelCase(words)).toBe('aMPlifyDataBuildTime');
8+
});
9+
});
10+
});

0 commit comments

Comments
 (0)