Merge pull request #11494 from Budibase/chore/fix_os_contributor

Fix build when no submodule is loaded
This commit is contained in:
Adria Navarro 2023-08-21 12:59:54 +03:00 committed by GitHub
commit 2f1aa51525
6 changed files with 46 additions and 13 deletions

View File

@ -8,22 +8,16 @@
"esModuleInterop": true,
"resolveJsonModule": true,
"incremental": true,
"types": [ "node", "jest" ],
"types": ["node", "jest"],
"outDir": "dist",
"skipLibCheck": true,
"paths": {
"@budibase/types": ["../types/src"],
"@budibase/backend-core": ["../backend-core/src"],
"@budibase/backend-core/*": ["../backend-core/*"]
"@budibase/backend-core/*": ["../backend-core/*"],
"@budibase/shared-core": ["../shared-core/src"]
}
},
"include": [
"src/**/*"
],
"exclude": [
"node_modules",
"dist",
"**/*.spec.ts",
"**/*.spec.js"
]
"include": ["src/**/*"],
"exclude": ["node_modules", "dist", "**/*.spec.ts", "**/*.spec.js"]
}

View File

@ -179,5 +179,20 @@
},
"optionalDependencies": {
"oracledb": "5.3.0"
},
"nx": {
"targets": {
"dev:builder": {
"dependsOn": [
{
"comment": "Required for pro usage when submodule not loaded",
"projects": [
"@budibase/backend-core"
],
"target": "build"
}
]
}
}
}
}

View File

@ -1,4 +1,10 @@
{
"extends": "./tsconfig.build.json",
"compilerOptions": {
"baseUrl": "..",
"rootDir": "src",
"composite": true,
"tsBuildInfoFile": "dist/tsconfig.tsbuildinfo"
},
"exclude": ["node_modules", "dist"]
}

View File

@ -1,7 +1,7 @@
{
"compilerOptions": {
"target": "es6",
"moduleResolution": "node",
"module": "commonjs",
"lib": ["es2020"],
"strict": true,
"noImplicitAny": true,

View File

@ -102,5 +102,20 @@
"tsconfig-paths": "4.0.0",
"typescript": "4.7.3",
"update-dotenv": "1.1.1"
},
"nx": {
"targets": {
"dev:builder": {
"dependsOn": [
{
"comment": "Required for pro usage when submodule not loaded",
"projects": [
"@budibase/backend-core"
],
"target": "build"
}
]
}
}
}
}

View File

@ -22,7 +22,10 @@ function runBuild(entry, outfile) {
fs.readFileSync(tsconfig, "utf-8")
)
if (!fs.existsSync("../pro/src")) {
if (
!fs.existsSync("../pro/src") &&
tsconfigPathPluginContent.compilerOptions?.paths
) {
// If we don't have pro, we cannot bundle backend-core.
// Otherwise, the main context will not be shared between libraries
delete tsconfigPathPluginContent?.compilerOptions?.paths?.[