Skip to content
This repository has been archived by the owner on Sep 4, 2024. It is now read-only.

Commit

Permalink
build: upgrade to nodejs v18 (#254)
Browse files Browse the repository at this point in the history
  • Loading branch information
ConjunctiveNormalForm authored Sep 8, 2023
1 parent 9e3a60a commit ce73698
Show file tree
Hide file tree
Showing 7 changed files with 112 additions and 165 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@ jobs:
uses: actions/checkout@v2

- name: Set up node
uses: actions/setup-node@v1
uses: actions/setup-node@v3
with:
node-version: 16.x
node-version: 18.x
registry-url: https://registry.npmjs.org

- name: Install dependencies
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@ jobs:
uses: actions/checkout@v2

- name: Set up node
uses: actions/setup-node@v1
uses: actions/setup-node@v3
with:
node-version: 16.x
node-version: 18.x
registry-url: https://registry.npmjs.org

- name: Install dependencies
Expand Down
1 change: 1 addition & 0 deletions .nvmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
18.17.1
11 changes: 5 additions & 6 deletions bin/app.ts
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ export class APIPipeline extends Stack {
const synthStep = new CodeBuildStep('Synth', {
input: code,
buildEnvironment: {
buildImage: cdk.aws_codebuild.LinuxBuildImage.STANDARD_6_0,
buildImage: cdk.aws_codebuild.LinuxBuildImage.STANDARD_7_0,
environmentVariables: {
NPM_TOKEN: {
value: 'npm-private-repo-access-token',
Expand All @@ -83,7 +83,7 @@ export class APIPipeline extends Stack {
phases: {
install: {
'runtime-versions': {
nodejs: '16',
nodejs: '18',
},
},
},
Expand Down Expand Up @@ -130,8 +130,7 @@ export class APIPipeline extends Stack {
});

const syntheticSwitchApiKeySecret = sm.Secret.fromSecretAttributes(this, 'synthetic-switch-api-key', {
secretCompleteArn:
'arn:aws:secretsmanager:us-east-2:644039819003:secret:UniswapX/ParamApi/ApiKeys-hYyUt1',
secretCompleteArn: 'arn:aws:secretsmanager:us-east-2:644039819003:secret:UniswapX/ParamApi/ApiKeys-hYyUt1',
});

// Beta us-east-2
Expand Down Expand Up @@ -209,7 +208,7 @@ export class APIPipeline extends Stack {
UNISWAP_API: apiStage.url,
},
buildEnvironment: {
buildImage: cdk.aws_codebuild.LinuxBuildImage.STANDARD_6_0,
buildImage: cdk.aws_codebuild.LinuxBuildImage.STANDARD_7_0,
environmentVariables: {
NPM_TOKEN: {
value: 'npm-private-repo-access-token',
Expand Down Expand Up @@ -248,7 +247,7 @@ export class APIPipeline extends Stack {
phases: {
install: {
'runtime-versions': {
nodejs: '16',
nodejs: '18',
},
},
},
Expand Down
6 changes: 3 additions & 3 deletions bin/stacks/api-stack.ts
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,7 @@ export class APIStack extends cdk.Stack {
});
const quoteLambda = new aws_lambda_nodejs.NodejsFunction(this, 'Quote', {
role: lambdaRole,
runtime: aws_lambda.Runtime.NODEJS_16_X,
runtime: aws_lambda.Runtime.NODEJS_18_X,
entry: path.join(__dirname, '../../lib/handlers/index.ts'),
handler: 'quoteHandler',
memorySize: 1024,
Expand All @@ -189,7 +189,7 @@ export class APIStack extends cdk.Stack {
...props.envVars,
},
timeout: cdk.Duration.seconds(30),
logRetention: aws_logs.RetentionDays.ONE_MONTH
logRetention: aws_logs.RetentionDays.ONE_MONTH,
});

const quoteLambdaAlias = new aws_lambda.Alias(this, `GetOrdersLiveAlias`, {
Expand All @@ -212,7 +212,7 @@ export class APIStack extends cdk.Stack {
quoteTarget.scaleToTrackMetric('QuoteProvConcTracking', {
targetValue: 0.8,
predefinedMetric: aws_asg.PredefinedMetric.LAMBDA_PROVISIONED_CONCURRENCY_UTILIZATION,
})
});
}

/* Analytics */
Expand Down
3 changes: 1 addition & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -70,9 +70,8 @@
"@uniswap/smart-order-router": "3.15.2",
"@uniswap/uniswapx-sdk": "1.1.0",
"@uniswap/universal-router-sdk": "^1.5.7",
"aws-cdk-lib": "2.43.1",
"aws-cdk-lib": "2.85.0",
"aws-embedded-metrics": "^4.1.0",
"aws-sdk": "^2.1238.0",
"axios": "^1.2.1",
"axios-retry": "^3.4.0",
"bunyan": "^1.8.15",
Expand Down
Loading

0 comments on commit ce73698

Please sign in to comment.