chore: upgrade moduleResolution to Node16 (#9269)

This commit is contained in:
Harminder Virk
2024-09-24 17:19:20 +05:30
committed by GitHub
parent d721282600
commit 9e711720dd
216 changed files with 981 additions and 2439 deletions
@@ -1,15 +1,2 @@
module.exports = {
transform: {
"^.+\\.[jt]s$": [
"@swc/jest",
{
jsc: {
parser: { syntax: "typescript", decorators: true },
transform: { decoratorMetadata: true },
},
},
],
},
testEnvironment: `node`,
moduleFileExtensions: [`js`, `ts`],
}
const defineJestConfig = require("../../../define_jest_config")
module.exports = defineJestConfig({})
@@ -4,7 +4,10 @@
"description": "Redis Event Bus Module for Medusa",
"main": "dist/index.js",
"files": [
"dist"
"dist",
"!dist/**/__tests__",
"!dist/**/__mocks__",
"!dist/**/__fixtures__"
],
"repository": {
"type": "git",
@@ -25,7 +28,7 @@
"jest": "^29.7.0",
"medusa-test-utils": "^1.1.44",
"rimraf": "^5.0.1",
"typescript": "^5.1.6"
"typescript": "^5.6.2"
},
"scripts": {
"watch": "tsc --build --watch",
@@ -339,8 +339,6 @@ describe("RedisEventBusService", () => {
})
describe("worker_", () => {
let result!: any
describe("Successfully processes the jobs", () => {
beforeEach(async () => {
jest.clearAllMocks()
@@ -395,7 +393,7 @@ describe("RedisEventBusService", () => {
return Promise.reject("fail2")
})
result = await eventBus.worker_({
await eventBus.worker_({
name: "eventName",
data: { data: { test: 1 } },
opts: { attempts: 1 },
@@ -434,7 +432,7 @@ describe("RedisEventBusService", () => {
}
)
result = await eventBus
await eventBus
.worker_({
name: "eventName",
data: {
@@ -473,7 +471,7 @@ describe("RedisEventBusService", () => {
}
)
result = await eventBus
await eventBus
.worker_({
name: "eventName",
data: {
+1 -28
View File
@@ -1,30 +1,3 @@
{
"compilerOptions": {
"lib": ["es2021"],
"target": "es2021",
"outDir": "./dist",
"esModuleInterop": true,
"declarationMap": true,
"declaration": true,
"module": "commonjs",
"moduleResolution": "node",
"emitDecoratorMetadata": true,
"experimentalDecorators": true,
"sourceMap": true,
"noImplicitReturns": true,
"strictNullChecks": true,
"strictFunctionTypes": true,
"noImplicitThis": true,
"allowJs": true,
"skipLibCheck": true,
"downlevelIteration": true // to use ES5 specific tooling
},
"include": ["src"],
"exclude": [
"dist",
"./src/**/__tests__",
"./src/**/__mocks__",
"./src/**/__fixtures__",
"node_modules"
]
"extends": "../../../_tsconfig.base.json"
}
@@ -1,5 +0,0 @@
{
"extends": "./tsconfig.json",
"include": ["src"],
"exclude": ["node_modules"]
}