Skip to content

Commit 128c544

Browse files
committed
run prettier:write after resolving to the root level prettier config
1 parent b702935 commit 128c544

33 files changed

Lines changed: 570 additions & 570 deletions

ab-testing/cdk/bin/cdk.ts

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,58 +1,58 @@
1-
import "source-map-support/register.js";
2-
import { App } from "aws-cdk-lib";
3-
import { AbTestingConfig } from "../lib/abTestingConfig.ts";
4-
import { AbTestingDeploymentLambda } from "../lib/deploymentLambda.ts";
5-
import { AbTestingNotificationLambda } from "../lib/notificationLambda.ts";
6-
import { riffRaffYamlFile } from "../lib/riffRaffYamlFile.ts";
1+
import 'source-map-support/register.js';
2+
import { App } from 'aws-cdk-lib';
3+
import { AbTestingConfig } from '../lib/abTestingConfig.ts';
4+
import { AbTestingDeploymentLambda } from '../lib/deploymentLambda.ts';
5+
import { AbTestingNotificationLambda } from '../lib/notificationLambda.ts';
6+
import { riffRaffYamlFile } from '../lib/riffRaffYamlFile.ts';
77

88
const app = new App();
99

10-
const region = "eu-west-1";
11-
const stack = "frontend";
10+
const region = 'eu-west-1';
11+
const stack = 'frontend';
1212

13-
new AbTestingDeploymentLambda(app, "AbTestingDeploymentLambdaCode", {
13+
new AbTestingDeploymentLambda(app, 'AbTestingDeploymentLambdaCode', {
1414
stack,
15-
stage: "CODE",
15+
stage: 'CODE',
1616
env: {
1717
region,
1818
},
1919
});
2020

21-
new AbTestingDeploymentLambda(app, "AbTestingDeploymentLambdaProd", {
21+
new AbTestingDeploymentLambda(app, 'AbTestingDeploymentLambdaProd', {
2222
stack,
23-
stage: "PROD",
23+
stage: 'PROD',
2424
env: {
2525
region,
2626
},
2727
});
2828

29-
new AbTestingConfig(app, "AbTestingConfigCode", {
29+
new AbTestingConfig(app, 'AbTestingConfigCode', {
3030
stack,
31-
stage: "CODE",
31+
stage: 'CODE',
3232
env: {
3333
region,
3434
},
3535
});
3636

37-
new AbTestingConfig(app, "AbTestingConfigProd", {
37+
new AbTestingConfig(app, 'AbTestingConfigProd', {
3838
stack,
39-
stage: "PROD",
39+
stage: 'PROD',
4040
env: {
4141
region,
4242
},
4343
});
4444

45-
new AbTestingNotificationLambda(app, "AbTestingNotificationLambdaCode", {
45+
new AbTestingNotificationLambda(app, 'AbTestingNotificationLambdaCode', {
4646
stack,
47-
stage: "CODE",
47+
stage: 'CODE',
4848
env: {
4949
region,
5050
},
5151
});
5252

53-
new AbTestingNotificationLambda(app, "AbTestingNotificationLambdaProd", {
53+
new AbTestingNotificationLambda(app, 'AbTestingNotificationLambdaProd', {
5454
stack,
55-
stage: "PROD",
55+
stage: 'PROD',
5656
env: {
5757
region,
5858
},

ab-testing/cdk/lib/abTestingConfig.test.ts

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
import { describe, it } from "node:test";
2-
import { snapshot } from "node:test";
3-
import { basename } from "path";
4-
import { GuRoot } from "@guardian/cdk/lib/constructs/root.js";
5-
import { Template } from "aws-cdk-lib/assertions";
6-
import { AbTestingConfig } from "./abTestingConfig.ts";
1+
import { describe, it } from 'node:test';
2+
import { snapshot } from 'node:test';
3+
import { basename } from 'path';
4+
import { GuRoot } from '@guardian/cdk/lib/constructs/root.js';
5+
import { Template } from 'aws-cdk-lib/assertions';
6+
import { AbTestingConfig } from './abTestingConfig.ts';
77

88
snapshot.setResolveSnapshotPath(
99
() =>
@@ -12,27 +12,27 @@ snapshot.setResolveSnapshotPath(
1212
)}.snap`,
1313
);
1414

15-
void describe("The ID5 Baton Lambda stack", () => {
16-
void it("matches the CODE snapshot", ({ assert }) => {
15+
void describe('The ID5 Baton Lambda stack', () => {
16+
void it('matches the CODE snapshot', ({ assert }) => {
1717
const app = new GuRoot();
18-
const stack = new AbTestingConfig(app, "AbTestingConfig", {
19-
stack: "frontend",
20-
stage: "CODE",
18+
const stack = new AbTestingConfig(app, 'AbTestingConfig', {
19+
stack: 'frontend',
20+
stage: 'CODE',
2121
env: {
22-
region: "eu-west-1",
22+
region: 'eu-west-1',
2323
},
2424
});
2525
const template = Template.fromStack(stack);
2626
assert.snapshot(template.toJSON());
2727
});
2828

29-
void it("matches the PROD snapshot", ({ assert }) => {
29+
void it('matches the PROD snapshot', ({ assert }) => {
3030
const app = new GuRoot();
31-
const stack = new AbTestingConfig(app, "AbTestingConfig", {
32-
stack: "frontend",
33-
stage: "PROD",
31+
const stack = new AbTestingConfig(app, 'AbTestingConfig', {
32+
stack: 'frontend',
33+
stage: 'PROD',
3434
env: {
35-
region: "eu-west-1",
35+
region: 'eu-west-1',
3636
},
3737
});
3838
const template = Template.fromStack(stack);

ab-testing/cdk/lib/abTestingConfig.ts

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,31 +1,31 @@
1-
import type { GuStackProps } from "@guardian/cdk/lib/constructs/core/stack.js";
2-
import { GuStack } from "@guardian/cdk/lib/constructs/core/stack.js";
3-
import type { App } from "aws-cdk-lib";
4-
import { CfnParameter, CustomResource, Duration } from "aws-cdk-lib";
5-
import { Function } from "aws-cdk-lib/aws-lambda";
6-
import { lambdaFunctionName } from "./deploymentLambda.ts";
1+
import type { GuStackProps } from '@guardian/cdk/lib/constructs/core/stack.js';
2+
import { GuStack } from '@guardian/cdk/lib/constructs/core/stack.js';
3+
import type { App } from 'aws-cdk-lib';
4+
import { CfnParameter, CustomResource, Duration } from 'aws-cdk-lib';
5+
import { Function } from 'aws-cdk-lib/aws-lambda';
6+
import { lambdaFunctionName } from './deploymentLambda.ts';
77

88
export class AbTestingConfig extends GuStack {
99
constructor(scope: App, id: string, props: GuStackProps) {
1010
super(scope, id, props);
1111

1212
const lambda = Function.fromFunctionName(
1313
this,
14-
"DeploymentLambdaFunction",
14+
'DeploymentLambdaFunction',
1515
`${lambdaFunctionName}-${this.stage}`,
1616
);
1717

18-
const buildId = new CfnParameter(this, "BuildId", {
19-
type: "String",
18+
const buildId = new CfnParameter(this, 'BuildId', {
19+
type: 'String',
2020
description:
21-
"The riff-raff build id, automatically generated and provided by riff-raff",
21+
'The riff-raff build id, automatically generated and provided by riff-raff',
2222
});
2323

2424
// Trigger the Lambda to run upon deployment
25-
new CustomResource(this, "InvokeDictionaryDeployLambda", {
25+
new CustomResource(this, 'InvokeDictionaryDeployLambda', {
2626
serviceToken: lambda.functionArn,
2727
serviceTimeout: Duration.minutes(5),
28-
resourceType: "Custom::FastlyEdgeDictionaryDeploy",
28+
resourceType: 'Custom::FastlyEdgeDictionaryDeploy',
2929
properties: {
3030
/** Ensures the custom resource is invoked on every deploy */
3131
BuildId: buildId.valueAsString,

ab-testing/cdk/lib/deploymentLambda.test.ts

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
import { describe, it } from "node:test";
2-
import { snapshot } from "node:test";
3-
import { basename } from "path";
4-
import { GuRoot } from "@guardian/cdk/lib/constructs/root.js";
5-
import { Template } from "aws-cdk-lib/assertions";
6-
import { AbTestingDeploymentLambda } from "./deploymentLambda.ts";
1+
import { describe, it } from 'node:test';
2+
import { snapshot } from 'node:test';
3+
import { basename } from 'path';
4+
import { GuRoot } from '@guardian/cdk/lib/constructs/root.js';
5+
import { Template } from 'aws-cdk-lib/assertions';
6+
import { AbTestingDeploymentLambda } from './deploymentLambda.ts';
77

88
snapshot.setResolveSnapshotPath(
99
() =>
@@ -12,34 +12,34 @@ snapshot.setResolveSnapshotPath(
1212
)}.snap`,
1313
);
1414

15-
void describe("The AB testing deployment lambda stack", () => {
16-
void it("matches the CODE snapshot", ({ assert }) => {
15+
void describe('The AB testing deployment lambda stack', () => {
16+
void it('matches the CODE snapshot', ({ assert }) => {
1717
const app = new GuRoot();
1818
const stack = new AbTestingDeploymentLambda(
1919
app,
20-
"AbTestingDeploymentLambda",
20+
'AbTestingDeploymentLambda',
2121
{
22-
stack: "frontend",
23-
stage: "CODE",
22+
stack: 'frontend',
23+
stage: 'CODE',
2424
env: {
25-
region: "eu-west-1",
25+
region: 'eu-west-1',
2626
},
2727
},
2828
);
2929
const template = Template.fromStack(stack);
3030
assert.snapshot(template.toJSON());
3131
});
3232

33-
void it("matches the PROD snapshot", ({ assert }) => {
33+
void it('matches the PROD snapshot', ({ assert }) => {
3434
const app = new GuRoot();
3535
const stack = new AbTestingDeploymentLambda(
3636
app,
37-
"AbTestingDeploymentLambda",
37+
'AbTestingDeploymentLambda',
3838
{
39-
stack: "frontend",
40-
stage: "PROD",
39+
stack: 'frontend',
40+
stage: 'PROD',
4141
env: {
42-
region: "eu-west-1",
42+
region: 'eu-west-1',
4343
},
4444
},
4545
);

ab-testing/cdk/lib/deploymentLambda.ts

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,20 @@
1-
import type { GuStackProps } from "@guardian/cdk/lib/constructs/core/stack.js";
2-
import { GuStack } from "@guardian/cdk/lib/constructs/core/stack.js";
3-
import { GuLambdaFunction } from "@guardian/cdk/lib/constructs/lambda/index.js";
4-
import { GuS3Bucket } from "@guardian/cdk/lib/constructs/s3/index.js";
5-
import type { App } from "aws-cdk-lib";
6-
import { Runtime } from "aws-cdk-lib/aws-lambda";
7-
import { StringParameter } from "aws-cdk-lib/aws-ssm";
1+
import type { GuStackProps } from '@guardian/cdk/lib/constructs/core/stack.js';
2+
import { GuStack } from '@guardian/cdk/lib/constructs/core/stack.js';
3+
import { GuLambdaFunction } from '@guardian/cdk/lib/constructs/lambda/index.js';
4+
import { GuS3Bucket } from '@guardian/cdk/lib/constructs/s3/index.js';
5+
import type { App } from 'aws-cdk-lib';
6+
import { Runtime } from 'aws-cdk-lib/aws-lambda';
7+
import { StringParameter } from 'aws-cdk-lib/aws-ssm';
88

9-
export const lambdaFunctionName = "ab-testing-deployment-lambda";
9+
export const lambdaFunctionName = 'ab-testing-deployment-lambda';
1010

1111
export class AbTestingDeploymentLambda extends GuStack {
1212
constructor(scope: App, id: string, props: GuStackProps) {
1313
super(scope, id, props);
1414

1515
const s3Bucket = GuS3Bucket.fromBucketName(
1616
this,
17-
"DictionaryDeployBucket",
17+
'DictionaryDeployBucket',
1818
StringParameter.valueForStringParameter(
1919
this,
2020
`/account/services/dotcom-store.bucket`,
@@ -24,7 +24,7 @@ export class AbTestingDeploymentLambda extends GuStack {
2424
const fastlyApiKeyParameter =
2525
StringParameter.fromSecureStringParameterAttributes(
2626
this,
27-
"FastlyApiKeyParameter",
27+
'FastlyApiKeyParameter',
2828
{
2929
parameterName: `/ab-testing/${this.stage}/fastly-api-token`,
3030
},
@@ -33,16 +33,16 @@ export class AbTestingDeploymentLambda extends GuStack {
3333
const fastlyConfigParameter =
3434
StringParameter.fromSecureStringParameterAttributes(
3535
this,
36-
"FastlyAbTestingConfigParameter",
36+
'FastlyAbTestingConfigParameter',
3737
{
3838
parameterName: `/ab-testing/${this.stage}/fastly-config`,
3939
},
4040
);
4141

42-
const lambda = new GuLambdaFunction(this, "AbTestingDeploymentLambda", {
42+
const lambda = new GuLambdaFunction(this, 'AbTestingDeploymentLambda', {
4343
functionName: `${lambdaFunctionName}-${this.stage}`,
44-
fileName: "lambda.zip",
45-
handler: "index.handler",
44+
fileName: 'lambda.zip',
45+
handler: 'index.handler',
4646
app: lambdaFunctionName,
4747
runtime: Runtime.NODEJS_22_X,
4848
memorySize: 256,

ab-testing/cdk/lib/notificationLambda.test.ts

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
import { describe, it } from "node:test";
2-
import { snapshot } from "node:test";
3-
import { basename } from "path";
4-
import { GuRoot } from "@guardian/cdk/lib/constructs/root.js";
5-
import { Template } from "aws-cdk-lib/assertions";
6-
import { AbTestingNotificationLambda } from "./notificationLambda.ts";
1+
import { describe, it } from 'node:test';
2+
import { snapshot } from 'node:test';
3+
import { basename } from 'path';
4+
import { GuRoot } from '@guardian/cdk/lib/constructs/root.js';
5+
import { Template } from 'aws-cdk-lib/assertions';
6+
import { AbTestingNotificationLambda } from './notificationLambda.ts';
77

88
snapshot.setResolveSnapshotPath(
99
() =>
@@ -12,34 +12,34 @@ snapshot.setResolveSnapshotPath(
1212
)}.snap`,
1313
);
1414

15-
void describe("The AB testing notification lambda stack", () => {
16-
void it("matches the CODE snapshot", ({ assert }) => {
15+
void describe('The AB testing notification lambda stack', () => {
16+
void it('matches the CODE snapshot', ({ assert }) => {
1717
const app = new GuRoot();
1818
const stack = new AbTestingNotificationLambda(
1919
app,
20-
"AbTestingNotificationLambdaCODE",
20+
'AbTestingNotificationLambdaCODE',
2121
{
22-
stack: "frontend",
23-
stage: "CODE",
22+
stack: 'frontend',
23+
stage: 'CODE',
2424
env: {
25-
region: "eu-west-1",
25+
region: 'eu-west-1',
2626
},
2727
},
2828
);
2929
const template = Template.fromStack(stack);
3030
assert.snapshot(template.toJSON());
3131
});
3232

33-
void it("matches the PROD snapshot", ({ assert }) => {
33+
void it('matches the PROD snapshot', ({ assert }) => {
3434
const app = new GuRoot();
3535
const stack = new AbTestingNotificationLambda(
3636
app,
37-
"AbTestingNotificationLambdaPROD",
37+
'AbTestingNotificationLambdaPROD',
3838
{
39-
stack: "frontend",
40-
stage: "PROD",
39+
stack: 'frontend',
40+
stage: 'PROD',
4141
env: {
42-
region: "eu-west-1",
42+
region: 'eu-west-1',
4343
},
4444
},
4545
);

0 commit comments

Comments
 (0)