Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ This section should get you running with **Amplify API Category** and get you fa

> If you are using Yarn v2, run `yarn set version classic` to change to Yarn Classic.
>
> Note: Ensure that the version of Node installed is v20.x. During the installation process, some modules may not be compatible with other versions of Node.
> Note: Ensure that the version of Node installed is v18.x. During the installation process, some modules may not be compatible with other versions of Node.

1. Ensure you are using the npm registry, even with yarn by running `yarn config set registry https://registry.npmjs.org`

Expand Down
4 changes: 2 additions & 2 deletions client-test-apps/js/api-model-relationship-app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
"@types/ini": "^1.3.31",
"@types/jest": "^27.5.2",
"@types/jest-dev-server": "^5.0.0",
"@types/node": "^20.0.0",
"@types/node": "^18.0.0",
"@types/react": "18.2.42",
"@types/react-dom": "^18.0.6",
"aws-amplify": "^4.3.30",
Expand Down Expand Up @@ -72,4 +72,4 @@
"axios": "axios/dist/node/axios.cjs"
}
}
}
}
2 changes: 1 addition & 1 deletion codebuild_specs/build_windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ env:
phases:
pre_build:
commands:
- choco install -fy nodejs-lts --version=20.9.0
- choco install -fy nodejs-lts --version=18.20.4
- |
$nodeVersion = node -v
Write-Host "Node version: $nodeVersion"
Expand Down
2 changes: 1 addition & 1 deletion packages/amplify-data-construct/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -291,7 +291,7 @@
},
"devDependencies": {
"@types/fs-extra": "^8.0.1",
"@types/node": "^20.0.0",
"@types/node": "^18.0.0",
"aws-cdk-lib": "2.187.0",
"constructs": "10.3.0",
"jsii": "^5.4.23",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@
"@aws-amplify/graphql-transformer-core": "3.4.1",
"@aws-amplify/graphql-transformer-interfaces": "4.2.4",
"@aws-amplify/graphql-validate-transformer": "1.1.1",
"@types/node": "^20.0.0",
"@types/node": "^18.0.0",
"aws-cdk-lib": "2.187.0",
"constructs": "10.3.0",
"ts-node": "^8.10.2"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ executionRole.applyRemovalPolicy(RemovalPolicy.DESTROY);

const apiInvoker = new NodejsFunction(stack, 'ApiInvoker', {
entry: path.join(__dirname, 'apiInvoker.ts'),
runtime: Runtime.NODEJS_20_X,
runtime: Runtime.NODEJS_18_X,
role: executionRole,
bundling: {
nodeModules: ['@smithy/util-utf8'], // Force inclusion
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,7 @@ const createUserPoolTriggers = (triggers: Record<string, string>): UserPoolTrigg

const createLambdaFunction = (name: string, code: string): Function => {
return new Function(stack, `${name}Lambda`, {
runtime: Runtime.NODEJS_20_X,
runtime: Runtime.NODEJS_18_X,
handler: 'index.handler',
code: Code.fromInline(code),
});
Expand Down
2 changes: 1 addition & 1 deletion packages/amplify-graphql-api-construct/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -292,7 +292,7 @@
"devDependencies": {
"@aws-amplify/graphql-transformer-test-utils": "1.0.15",
"@types/fs-extra": "^8.0.1",
"@types/node": "^20.0.0",
"@types/node": "^18.0.0",
"aws-cdk-lib": "2.187.0",
"constructs": "10.3.0",
"jsii": "^5.4.23",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,7 @@ describe('function directive', () => {
it('supports passing in a function defined in-stack', () => {
const stack = new cdk.Stack();
const referencedFunction = new lambda.Function(stack, 'Createdfunction', {
runtime: lambda.Runtime.NODEJS_20_X,
runtime: lambda.Runtime.NODEJS_18_X,
code: lambda.Code.fromInline('I am code'),
handler: 'index.main',
});
Expand Down Expand Up @@ -237,7 +237,7 @@ describe('function directive', () => {
it('wires through a function from the definition', () => {
const stack = new cdk.Stack();
const referencedFunction = new lambda.Function(stack, 'Createdfunction', {
runtime: lambda.Runtime.NODEJS_20_X,
runtime: lambda.Runtime.NODEJS_18_X,
code: lambda.Code.fromInline('I am code'),
handler: 'index.main',
});
Expand Down
2 changes: 1 addition & 1 deletion packages/amplify-graphql-auth-transformer/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@
"@aws-amplify/graphql-searchable-transformer": "3.0.16",
"@aws-amplify/graphql-sql-transformer": "0.4.16",
"@aws-amplify/graphql-transformer-test-utils": "1.0.15",
"@types/node": "^20.0.0"
"@types/node": "^18.0.0"
},
"peerDependencies": {
"aws-cdk-lib": "^2.187.0",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ describe('ConversationTransformer', () => {
const transformerManager = new TransformManager();
const stack = transformerManager.getTransformScope();
const customHandler = new Function(stack, 'conversation-handler', {
runtime: Runtime.NODEJS_20_X,
runtime: Runtime.NODEJS_18_X,
code: Code.fromInline('exports.handler = async (event) => { return "Hello World"; }'),
handler: 'index.handler',
});
Expand Down
2 changes: 1 addition & 1 deletion packages/amplify-graphql-model-transformer/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@
"@aws-sdk/client-sfn": "^3.624.0",
"@types/aws-lambda": "8.10.119",
"@types/lodash.isequal": "^4.5.8",
"@types/node": "^20.0.0",
"@types/node": "^18.0.0",
"lodash.isequal": "^4.5.0"
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ export const createRdsLambda = (
`functions/${resourceNames.sqlLambdaFunction}.zip`,
'handler.run',
path.resolve(__dirname, '..', '..', '..', 'lib', 'rds-lambda.zip'),
Runtime.NODEJS_20_X,
Runtime.NODEJS_18_X,
[LayerVersion.fromLayerVersionArn(scope, resourceNames.sqlLambdaLayerVersion, layerVersionArn)],
lambdaRole,
lambdaEnvironment,
Expand Down Expand Up @@ -364,7 +364,7 @@ export const createRdsPatchingLambda = (
`functions/${resourceNames.sqlPatchingLambdaFunction}.zip`,
'index.handler',
path.resolve(__dirname, '..', '..', '..', 'lib', 'rds-patching-lambda.zip'),
Runtime.NODEJS_20_X,
Runtime.NODEJS_18_X,
[],
lambdaRole,
environment,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ export class Provider extends Construct {
const fn = new aws_lambda.Function(this, `framework-${entrypoint}`, {
code: code,
description: `AmplifyManagedTable - ${entrypoint} (${this.node.path})`.slice(0, 256),
runtime: aws_lambda.Runtime.NODEJS_20_X,
runtime: aws_lambda.Runtime.NODEJS_18_X,
handler,
timeout: Duration.minutes(14),
role,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ export const createMappingLambda = (host: TransformHostProvider, stackManager: S
`functions/${funcLogicalId}.zip`, // function key
'index.handler', // function handler
path.join(__dirname, 'assets', 'mapping-lambda.zip'),
lambda.Runtime.NODEJS_20_X,
lambda.Runtime.NODEJS_18_X,
undefined, // layers
role, // execution role,
undefined, // env vars
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1302,7 +1302,7 @@ $utils.error($ctx.result.body)
"Arn",
],
},
"Runtime": "nodejs20.x",
"Runtime": "nodejs18.x",
"Timeout": 60,
},
"Type": "AWS::Lambda::Function",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -403,7 +403,7 @@ function createPredictionsLambda(context: TransformerContextProvider, stack: cdk
`functions/${functionId}.zip`,
PredictionsResourceIDs.lambdaHandlerName,
path.join(__dirname, '..', 'lib', 'predictionsLambdaFunction.zip'),
lambda.Runtime.NODEJS_20_X,
lambda.Runtime.NODEJS_18_X,
[],
role,
{},
Expand Down
2 changes: 1 addition & 1 deletion packages/amplify-graphql-schema-generator/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@
"typescript": "^4.8.4"
},
"devDependencies": {
"@types/node": "^20.0.0",
"@types/node": "^18.0.0",
"@types/pluralize": "^0.0.29"
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ const createSchemaInspectorLambda = async (lambdaName: string, iamRole: Role, vp
FunctionName: lambdaName,
Handler: 'index.handler',
Role: iamRole.Arn,
Runtime: 'nodejs20.x',
Runtime: 'nodejs18.x',
VpcConfig: {
SecurityGroupIds: vpc.securityGroupIds,
SubnetIds: subnetIds,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,6 @@
},
"devDependencies": {
"@aws-amplify/graphql-transformer-test-utils": "1.0.15",
"@types/node": "^20.0.0"
"@types/node": "^18.0.0"
}
}
2 changes: 1 addition & 1 deletion packages/amplify-graphql-transformer-core/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@
"@types/fs-extra": "^8.0.1",
"@types/hjson": "^2.4.3",
"@types/md5": "^2.3.1",
"@types/node": "^20.0.0",
"@types/node": "^18.0.0",
"@types/object-hash": "^2.2.1",
"@types/uuid": "^9.0.1"
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
"@aws-amplify/graphql-transformer-interfaces": "4.2.4"
},
"devDependencies": {
"@types/node": "^20.0.0",
"@types/node": "^18.0.0",
"rimraf": "^3.0.0"
},
"peerDependencies": {
Expand Down
2 changes: 1 addition & 1 deletion packages/amplify-graphql-transformer/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@
},
"devDependencies": {
"@aws-amplify/graphql-transformer-test-utils": "1.0.15",
"@types/node": "^20.0.0",
"@types/node": "^18.0.0",
"fs-extra": "^8.1.0",
"rimraf": "^3.0.0"
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ export class PredictionsResourceIDs {

static lambdaHandlerName = 'predictionsLambda.handler';

static lambdaRuntime = 'nodejs20.x';
static lambdaRuntime = 'nodejs18.x';

static lambdaTimeout = 60;

Expand Down
2 changes: 1 addition & 1 deletion packages/graphql-transformer-core/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
"@aws-amplify/amplify-cli-core": "^4.3.9",
"@types/fs-extra": "^8.0.1",
"@types/mock-fs": "4.13.4",
"@types/node": "^20.0.0",
"@types/node": "^18.0.0",
"mock-fs": "5.2.0"
}
}
2 changes: 1 addition & 1 deletion packages/graphql-transformers-e2e-tests/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
"@aws-amplify/graphql-transformer-core": "3.4.1",
"@aws-amplify/graphql-transformer-interfaces": "4.2.4",
"@aws-amplify/graphql-transformer-test-utils": "1.0.15",
"@types/node": "^20.0.0",
"@types/node": "^18.0.0",
"aws-amplify": "^4.2.8",
"aws-appsync": "^4.1.1",
"aws-sdk": "^2.1113.0",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ export class JsonMockStack extends cdk.Stack {
const jsonLambda = new lambda.Function(this, 'jsonServerFunction', {
code: new lambda.AssetCode('src-server'),
handler: 'index.handler',
runtime: lambda.Runtime.NODEJS_20_X,
runtime: lambda.Runtime.NODEJS_18_X,
});

const api = new apigateway.LambdaRestApi(this, 'jsonMockApi', {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ export class LambdaHelper {
Code: {
ZipFile: zipContents,
},
Runtime: 'nodejs20.x',
Runtime: 'nodejs18.x',
Handler: `${filePrefix}.handler`,
Role: roleArn,
})
Expand Down
2 changes: 1 addition & 1 deletion scripts/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,6 @@
"@types/fs-extra": "^9.0.13",
"@types/glob": "^7.2.0",
"@types/js-yaml": "^4.0.4",
"@types/node": "^20.0.0"
"@types/node": "^18.0.0"
}
}
2 changes: 1 addition & 1 deletion shared-scripts.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/bin/bash

AMPLIFY_NODE_VERSION=20.9.0
AMPLIFY_NODE_VERSION=18.20.4

# set exit on error to true
set -e
Expand Down
18 changes: 9 additions & 9 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -8189,12 +8189,12 @@
resolved "https://registry.npmjs.org/@types/node/-/node-16.18.126.tgz#27875faa2926c0f475b39a8bb1e546c0176f8d4b"
integrity sha512-OTcgaiwfGFBKacvfwuHzzn1KLxH/er8mluiy8/uM3sGXHaRe73RrSIj01jow9t4kJEW633Ov+cOexXeiApTyAw==

"@types/node@^20.0.0":
version "20.17.30"
resolved "https://registry.npmjs.org/@types/node/-/node-20.17.30.tgz#1d93f656d3b869dbef7b796568ac457606ba58d0"
integrity sha512-7zf4YyHA+jvBNfVrk2Gtvs6x7E8V+YDW05bNfG2XkWDJfYRXrTiP/DsB2zSYTaHX0bGIujTBQdMVAhb+j7mwpg==
"@types/node@^18.0.0":
version "18.19.85"
resolved "https://registry.npmjs.org/@types/node/-/node-18.19.85.tgz#c5778d9c8c00ec81d4fa10845f328b94e0e6c220"
integrity sha512-61sLB7tXUMpkHJagZQAzPV4xGyqzulLvphe0lquRX80rZG24VupRv9p6Qo06V9VBNeGBM8Sv8rRVVLji6pi7QQ==
dependencies:
undici-types "~6.19.2"
undici-types "~5.26.4"

"@types/normalize-package-data@^2.4.0":
version "2.4.4"
Expand Down Expand Up @@ -17740,10 +17740,10 @@ unbox-primitive@^1.1.0:
has-symbols "^1.1.0"
which-boxed-primitive "^1.1.1"

undici-types@~6.19.2:
version "6.19.8"
resolved "https://registry.npmjs.org/undici-types/-/undici-types-6.19.8.tgz#35111c9d1437ab83a7cdc0abae2f26d88eda0a02"
integrity sha512-ve2KP6f/JnbPBFyobGHuerC9g1FYGn/F8n1LWTwNxCEzd6IfqTwUQcNXgEtmmQ6DlRrC1hrSrBnCZPokRrDHjw==
undici-types@~5.26.4:
version "5.26.5"
resolved "https://registry.npmjs.org/undici-types/-/undici-types-5.26.5.tgz#bcd539893d00b56e964fd2657a4866b221a65617"
integrity sha512-JlCMO+ehdEIKqlFxk6IfVoAUVmgz7cU7zD/h9XZ0qzeosSHmUJVOzSQvvYSYWXkFXC+IfLKSIffhv0sVZup6pA==

undici-types@~6.20.0:
version "6.20.0"
Expand Down
Loading