Skip to content

Commit

Permalink
fix(esm): updating jest to support esm
Browse files Browse the repository at this point in the history
  • Loading branch information
bassrock committed Jan 3, 2025
1 parent e96802e commit b7620b3
Show file tree
Hide file tree
Showing 82 changed files with 265 additions and 146 deletions.
2 changes: 1 addition & 1 deletion infrastructure/otel-collector/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
"name": "otel-collector-cdk",
"version": "1.0.0",
"private": true,
"type": "module",
"main": "dist/main.js",
"types": "src/main.ts",
"type":"module",
"scripts": {
"build": "rm -rf dist && tsc",
"compile": "tsc --pretty",
Expand Down
2 changes: 1 addition & 1 deletion infrastructure/parser-graphql-wrapper/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
"version": "1.0.0",
"private": true,
"license": "MPL-2.0",
"type": "module",
"main": "dist/main.js",
"types": "src/main.ts",
"type": "module",
"scripts": {
"build": "rm -rf dist && tsc",
"compile": "tsc --pretty",
Expand Down
2 changes: 1 addition & 1 deletion infrastructure/pocket-event-bridge/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
"version": "1.0.0",
"private": true,
"license": "MPL-2.0",
"type": "module",
"main": "dist/main.js",
"types": "dist/main.ts",
"type": "module",
"scripts": {
"build": "rm -rf dist && tsc",
"compile": "tsc --pretty",
Expand Down
2 changes: 1 addition & 1 deletion infrastructure/push-server/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
"name": "push-server-cdk",
"version": "1.0.0",
"private": true,
"type": "module",
"main": "dist/main.js",
"types": "src/main.ts",
"type": "module",
"scripts": {
"build": "rm -rf dist && tsc",
"compile": "tsc --pretty",
Expand Down
2 changes: 1 addition & 1 deletion infrastructure/sendgrid-data/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
"version": "1.0.0",
"private": true,
"license": "MPL-2.0",
"type": "module",
"main": "dist/main.js",
"types": "src/main.ts",
"type": "module",
"scripts": {
"build": "rm -rf dist && tsc",
"compile": "tsc --pretty",
Expand Down
2 changes: 1 addition & 1 deletion infrastructure/shareable-lists-api/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
"version": "1.0.0",
"private": true,
"license": "MPL-2.0",
"type": "module",
"main": "dist/main.js",
"types": "dist/main.ts",
"type": "module",
"scripts": {
"build": "rm -rf dist && tsc",
"compile": "tsc --pretty",
Expand Down
2 changes: 1 addition & 1 deletion infrastructure/shared-snowplow-consumer/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
"version": "1.0.0",
"private": true,
"license": "MPL-2.0",
"type": "module",
"main": "dist/main.js",
"types": "dist/main.ts",
"type": "module",
"scripts": {
"build": "rm -rf dist && tsc",
"compile": "tsc --pretty",
Expand Down
2 changes: 1 addition & 1 deletion infrastructure/shares-api/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
"version": "1.0.0",
"private": true,
"license": "MPL-2.0",
"type": "module",
"main": "dist/main.js",
"types": "dist/main.ts",
"type": "module",
"scripts": {
"build": "rm -rf dist && tsc",
"compile": "tsc --pretty",
Expand Down
2 changes: 1 addition & 1 deletion infrastructure/transactional-emails/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
"version": "1.0.0",
"private": true,
"license": "MPL-2.0",
"type": "module",
"main": "dist/main.js",
"types": "dist/main.ts",
"type": "module",
"scripts": {
"build": "rm -rf dist && tsc",
"compile": "tsc --pretty",
Expand Down
2 changes: 1 addition & 1 deletion infrastructure/user-api/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
"name": "user-api-cdk",
"version": "1.0.0",
"private": true,
"type": "module",
"main": "dist/src/main.js",
"types": "src/main.ts",
"type": "module",
"scripts": {
"build": "rm -rf dist && tsc",
"compile": "tsc --pretty",
Expand Down
2 changes: 1 addition & 1 deletion infrastructure/v3-proxy-api/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
"version": "1.0.0",
"private": true,
"license": "MPL-2.0",
"type": "module",
"main": "dist/main.js",
"types": "dist/main.ts",
"type": "module",
"scripts": {
"build": "rm -rf dist && tsc",
"compile": "tsc --pretty",
Expand Down
9 changes: 0 additions & 9 deletions lambdas/account-data-deleter-batch-delete/jest.config.js

This file was deleted.

17 changes: 17 additions & 0 deletions lambdas/account-data-deleter-batch-delete/jest.config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
import type { Config } from 'jest';

const config: Config = {
preset: 'ts-jest',
testEnvironment: 'node',
testMatch: ['**/?(*.)+(spec|integration).ts'],
testPathIgnorePatterns: ['/dist/'],
setupFiles: ['./jest.setup.ts'],
displayName: 'lambda-batchdelete',
testTimeout: 1000000,
moduleNameMapper: {
"^(\\.\\/.+)\\.js$": "$1",
"^(\\..\\/.+)\\.js$": "$1"
},
};

export default config;
2 changes: 1 addition & 1 deletion lambdas/account-data-deleter-batch-delete/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
"description": "",
"license": "ISC",
"author": "",
"main": "dist/index.js",
"type": "module",
"main": "dist/index.js",
"files": [
"dist",
"package.json"
Expand Down
2 changes: 1 addition & 1 deletion lambdas/account-data-deleter-batch-delete/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"outDir": "dist",
"rootDir": "src"
},
"exclude": ["node_modules", "jest.config.js", "jest.setup.js"],
"exclude": ["node_modules", "jest.config.ts", "jest.setup.ts"],
"include": [
"src/**/*.ts",
]
Expand Down
8 changes: 0 additions & 8 deletions lambdas/account-data-deleter-events/jest.config.js

This file was deleted.

16 changes: 16 additions & 0 deletions lambdas/account-data-deleter-events/jest.config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
import type { Config } from 'jest';

const config: Config = {
preset: 'ts-jest',
testEnvironment: 'node',
testMatch: ['**/?(*.)+(spec|integration).ts'],
testPathIgnorePatterns: ['/dist/'],
setupFiles: ['./jest.setup.ts'],
displayName: 'lambda-events',
moduleNameMapper: {
"^(\\.\\/.+)\\.js$": "$1",
"^(\\..\\/.+)\\.js$": "$1"
},
};

export default config;
2 changes: 1 addition & 1 deletion lambdas/account-data-deleter-events/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@
"description": "",
"license": "ISC",
"author": "",
"type": "module",
"main": "dist/index.js",
"files": [
"dist",
"package.json"
],
"type": "module",
"scripts": {
"build": "rm -rf dist && tsc",
"format": "eslint --fix",
Expand Down
2 changes: 1 addition & 1 deletion lambdas/account-data-deleter-events/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"outDir": "dist",
"rootDir": "src"
},
"exclude": ["node_modules", "jest.config.js", "jest.setup.js"],
"exclude": ["node_modules", "jest.config.ts", "jest.setup.ts"],
"include": [
"src/**/*.ts",
]
Expand Down
8 changes: 0 additions & 8 deletions lambdas/account-delete-monitor/jest.config.js

This file was deleted.

16 changes: 16 additions & 0 deletions lambdas/account-delete-monitor/jest.config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
import type { Config } from 'jest';

const config: Config = {
preset: 'ts-jest',
testEnvironment: 'node',
testMatch: ['**/?(*.)+(spec|integration).ts'],
testPathIgnorePatterns: ['/dist/'],
displayName: 'account-delete-monitor',
setupFiles: ['./jest.setup.ts'],
moduleNameMapper: {
"^(\\.\\/.+)\\.js$": "$1",
"^(\\..\\/.+)\\.js$": "$1"
},
};

export default config;
2 changes: 1 addition & 1 deletion lambdas/account-delete-monitor/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@
"description": "",
"license": "ISC",
"author": "",
"type": "module",
"main": "dist/index.js",
"files": [
"dist",
"package.json"
],
"type": "module",
"scripts": {
"build": "rm -rf dist && tsc",
"format": "eslint --fix",
Expand Down
2 changes: 1 addition & 1 deletion lambdas/account-delete-monitor/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"outDir": "dist",
"rootDir": "src"
},
"exclude": ["node_modules", "jest.config.js", "jest.setup.js"],
"exclude": ["node_modules", "jest.config.ts", "jest.setup.ts"],
"include": [
"src/**/*.ts",
]
Expand Down
8 changes: 0 additions & 8 deletions lambdas/annotations-api-events/jest.config.js

This file was deleted.

16 changes: 16 additions & 0 deletions lambdas/annotations-api-events/jest.config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
import type { Config } from 'jest';

const config: Config = {
preset: 'ts-jest',
testEnvironment: 'node',
testMatch: ['**/?(*.)+(spec|integration).ts'],
testPathIgnorePatterns: ['/dist/'],
setupFiles: ['./jest.setup.ts'],
displayName: 'lambda-events',
moduleNameMapper: {
"^(\\.\\/.+)\\.js$": "$1",
"^(\\..\\/.+)\\.js$": "$1"
},
};

export default config;
2 changes: 1 addition & 1 deletion lambdas/annotations-api-events/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
"description": "",
"license": "ISC",
"author": "",
"main": "dist/index.js",
"type": "module",
"main": "dist/index.js",
"files": [
"dist",
"package.json"
Expand Down
2 changes: 1 addition & 1 deletion lambdas/annotations-api-events/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"outDir": "dist",
"rootDir": "src"
},
"exclude": ["node_modules", "jest.config.js", "jest.setup.js"],
"exclude": ["node_modules", "jest.config.ts", "jest.setup.ts"],
"include": [
"src/**/*.ts",
]
Expand Down
7 changes: 0 additions & 7 deletions lambdas/fxa-webook-proxy-gateway/jest.config.js

This file was deleted.

15 changes: 15 additions & 0 deletions lambdas/fxa-webook-proxy-gateway/jest.config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
import type { Config } from 'jest';

const config: Config = {
preset: 'ts-jest',
testEnvironment: 'node',
testMatch: ['**/?(*.)+(spec|functional).ts'],
testPathIgnorePatterns: ['/dist/'],
setupFiles: ['./jest.setup.ts'],
moduleNameMapper: {
"^(\\.\\/.+)\\.js$": "$1",
"^(\\..\\/.+)\\.js$": "$1"
},
};

export default config;
2 changes: 1 addition & 1 deletion lambdas/fxa-webook-proxy-gateway/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
"keywords": [],
"license": "ISC",
"author": "",
"main": "dist/index.js",
"type": "module",
"main": "dist/index.js",
"files": [
"dist",
"package.json"
Expand Down
7 changes: 0 additions & 7 deletions lambdas/fxa-webook-proxy-sqs/jest.config.js

This file was deleted.

15 changes: 15 additions & 0 deletions lambdas/fxa-webook-proxy-sqs/jest.config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
import type { Config } from 'jest';

const config: Config = {
preset: 'ts-jest',
testEnvironment: 'node',
testMatch: ['**/?(*.)+(spec|functional).ts'],
testPathIgnorePatterns: ['/dist/'],
setupFiles: ['./jest.setup.ts'],
moduleNameMapper: {
"^(\\.\\/.+)\\.js$": "$1",
"^(\\..\\/.+)\\.js$": "$1"
},
};

export default config;
File renamed without changes.
8 changes: 0 additions & 8 deletions lambdas/instant-sync-events/jest.config.js

This file was deleted.

Loading

0 comments on commit b7620b3

Please sign in to comment.