fix: base tsconfig (#9309)

* fix: base tsconfig

* WIP

* wi[]

* update integration typescript version

* update lock file

* fix deps

* fix medusa tests runner
This commit is contained in:
Adrien de Peretti
2024-09-25 16:31:57 +02:00
committed by GitHub
parent 6e5d007837
commit ae320ac73f
9 changed files with 30 additions and 20 deletions

View File

@@ -19,8 +19,7 @@
"strictFunctionTypes": true,
"noImplicitThis": true,
"allowJs": true,
"skipLibCheck": true,
"rootDir": "${configDir}/src"
"skipLibCheck": true
},
"include": ["${configDir}/src"],
"exclude": ["${configDir}/dist", "${configDir}/node_modules"]

View File

@@ -35,6 +35,6 @@
"form-data": "^4.0.0",
"jest": "^29.7.0",
"jest-environment-node": "^29.7.0",
"typescript": "^5.3.3"
"typescript": "^5.6.2"
}
}

View File

@@ -40,6 +40,6 @@
"@swc/jest": "^0.2.36",
"jest": "^29.7.0",
"jest-environment-node": "^29.7.0",
"typescript": "^5.3.3"
"typescript": "^5.6.2"
}
}

View File

@@ -40,6 +40,6 @@
"@swc/jest": "^0.2.36",
"jest": "^29.7.0",
"jest-environment-node": "^29.7.0",
"typescript": "^5.3.3"
"typescript": "^5.6.2"
}
}

View File

@@ -17,7 +17,6 @@ import { track } from "medusa-telemetry"
import boxen from "boxen"
import { emojify } from "node-emoji"
import ProcessManager from "../utils/process-manager.js"
import { nanoid } from "nanoid"
import { displayFactBox, FactBoxOptions } from "../utils/facts.js"
import { EOL } from "os"
import { runCloneRepo } from "../utils/clone-repo.js"
@@ -57,7 +56,7 @@ export default async ({
if (nodeVersion < MIN_SUPPORTED_NODE_VERSION) {
logMessage({
message: `Medusa requires at least v20 of Node.js. You're using v${nodeVersion}. Please install at least v20 and try again: https://nodejs.org/en/download`,
type: "error"
type: "error",
})
}
track("CREATE_CLI_CMA")
@@ -160,7 +159,7 @@ export default async ({
abortController,
factBoxOptions,
verbose,
processManager
processManager,
})
: ""
@@ -297,7 +296,17 @@ function showSuccessMessage(
message: boxen(
chalk.green(
// eslint-disable-next-line prettier/prettier
`Change to the \`${projectName}\` directory to explore your Medusa project.${EOL}${EOL}Start your Medusa app again with the following command:${EOL}${EOL}yarn dev${EOL}${EOL}${inviteToken ? `After you start the Medusa app, you can set a password for your admin user with the URL ${getInviteUrl(inviteToken)}${EOL}${EOL}` : ""}${nextjsDirectory?.length ? `The Next.js Starter storefront was installed in the \`${nextjsDirectory}\` directory. Change to that directory and start it with the following command:${EOL}${EOL}npm run dev${EOL}${EOL}` : ""}Check out the Medusa documentation to start your development:${EOL}${EOL}https://docs.medusajs.com/${EOL}${EOL}Star us on GitHub if you like what we're building:${EOL}${EOL}https://github.com/medusajs/medusa/stargazers`
`Change to the \`${projectName}\` directory to explore your Medusa project.${EOL}${EOL}Start your Medusa app again with the following command:${EOL}${EOL}yarn dev${EOL}${EOL}${
inviteToken
? `After you start the Medusa app, you can set a password for your admin user with the URL ${getInviteUrl(
inviteToken
)}${EOL}${EOL}`
: ""
}${
nextjsDirectory?.length
? `The Next.js Starter storefront was installed in the \`${nextjsDirectory}\` directory. Change to that directory and start it with the following command:${EOL}${EOL}npm run dev${EOL}${EOL}`
: ""
}Check out the Medusa documentation to start your development:${EOL}${EOL}https://docs.medusajs.com/${EOL}${EOL}Star us on GitHub if you like what we're building:${EOL}${EOL}https://github.com/medusajs/medusa/stargazers`
),
{
titleAlignment: "center",

View File

@@ -37,7 +37,6 @@ export function medusaIntegrationTestRunner({
moduleName,
dbName,
medusaConfigFile,
loadApplication,
schema = "public",
env = {},
debug = false,
@@ -48,7 +47,6 @@ export function medusaIntegrationTestRunner({
env?: Record<string, any>
dbName?: string
medusaConfigFile?: string
loadApplication?: boolean
schema?: string
debug?: boolean
inApp?: boolean
@@ -133,9 +131,7 @@ export function medusaIntegrationTestRunner({
let serverShutdownRes: () => any
let portRes: number
if (loadApplication) {
loadedApplication = await appLoader.load()
}
loadedApplication = await appLoader.load()
try {
const {

View File

@@ -28,18 +28,21 @@
"devDependencies": {
"@swc/jest": "^0.2.36",
"@types/express": "^4.17.21",
"cross-env": "^5.2.1",
"expect-type": "^0.20.0",
"express": "^4.21.0",
"jest": "^29.7.0",
"pg-god": "^1.0.12",
"rimraf": "^5.0.1",
"typescript": "^5.6.2"
},
"dependencies": {
"@graphql-codegen/core": "^4.0.2",
"@graphql-codegen/typescript": "^4.0.9",
"@graphql-tools/merge": "^9.0.7",
"@graphql-tools/schema": "^10.0.6",
"@medusajs/types": "^1.11.16",
"@mikro-orm/core": "5.9.7",
"@mikro-orm/knex": "5.9.7",
"@mikro-orm/migrations": "5.9.7",
"@mikro-orm/postgresql": "5.9.7",
"awilix": "^8.0.1",

View File

@@ -1,9 +1,9 @@
import { FileSystem } from "@medusajs/utils"
import { GraphQLSchema } from "graphql/type"
import { parse, printSchema } from "graphql"
import { codegen } from "@graphql-codegen/core"
import * as typescriptPlugin from "@graphql-codegen/typescript"
import { ModuleJoinerConfig } from "@medusajs/types"
import { FileSystem } from "../common"
function buildEntryPointsTypeMap({
schema,

View File

@@ -6739,17 +6739,19 @@ __metadata:
version: 0.0.0-use.local
resolution: "@medusajs/utils@workspace:packages/core/utils"
dependencies:
"@graphql-codegen/core": ^4.0.2
"@graphql-codegen/typescript": ^4.0.9
"@graphql-tools/merge": ^9.0.7
"@graphql-tools/schema": ^10.0.6
"@medusajs/types": ^1.11.16
"@mikro-orm/core": 5.9.7
"@mikro-orm/knex": 5.9.7
"@mikro-orm/migrations": 5.9.7
"@mikro-orm/postgresql": 5.9.7
"@swc/jest": ^0.2.36
"@types/express": ^4.17.21
awilix: ^8.0.1
bignumber.js: ^9.1.2
cross-env: ^5.2.1
dotenv: ^16.4.5
dotenv-expand: ^11.0.6
expect-type: ^0.20.0
@@ -6759,6 +6761,7 @@ __metadata:
jsonwebtoken: ^9.0.2
pg: ^8.13.0
pg-connection-string: ^2.7.0
pg-god: ^1.0.12
pluralize: ^8.0.0
rimraf: ^5.0.1
typescript: ^5.6.2
@@ -22173,7 +22176,7 @@ __metadata:
jest: ^29.7.0
jest-environment-node: ^29.7.0
pg: ^8.11.3
typescript: ^5.3.3
typescript: ^5.6.2
languageName: unknown
linkType: soft
@@ -22209,7 +22212,7 @@ __metadata:
jest-environment-node: ^29.7.0
medusa-test-utils: "workspace:*"
pg: ^8.11.3
typescript: ^5.3.3
typescript: ^5.6.2
languageName: unknown
linkType: soft
@@ -22245,7 +22248,7 @@ __metadata:
jest-environment-node: ^29.7.0
medusa-test-utils: "workspace:*"
pg: ^8.11.3
typescript: ^5.3.3
typescript: ^5.6.2
languageName: unknown
linkType: soft