mirror of
https://github.com/overleaf/overleaf.git
synced 2024-11-21 20:47:08 -05:00
Merge pull request #19686 from overleaf/jpa-fix-ce
[web] sync overleafModuleImports between environments and check in CI GitOrigin-RevId: c36c41d87d1b6fd687942bca8284a4725bb6c300
This commit is contained in:
parent
91125f8b1c
commit
e08b0b3d9e
3 changed files with 31 additions and 0 deletions
|
@ -423,6 +423,10 @@ lint: lint_flag_res_send_usage
|
||||||
lint_flag_res_send_usage:
|
lint_flag_res_send_usage:
|
||||||
bin/lint_flag_res_send_usage
|
bin/lint_flag_res_send_usage
|
||||||
|
|
||||||
|
lint: lint_overleafModuleImports
|
||||||
|
lint_overleafModuleImports:
|
||||||
|
node scripts/check_overleafModuleImports.js
|
||||||
|
|
||||||
lint: typecheck_frontend
|
lint: typecheck_frontend
|
||||||
typecheck_frontend:
|
typecheck_frontend:
|
||||||
npx -p typescript tsc --noEmit
|
npx -p typescript tsc --noEmit
|
||||||
|
|
|
@ -881,6 +881,7 @@ module.exports = {
|
||||||
sourceEditorComponents: [],
|
sourceEditorComponents: [],
|
||||||
pdfLogEntryComponents: [],
|
pdfLogEntryComponents: [],
|
||||||
pdfLogEntriesComponents: [],
|
pdfLogEntriesComponents: [],
|
||||||
|
pdfPreviewPromotions: [],
|
||||||
diagnosticActions: [],
|
diagnosticActions: [],
|
||||||
sourceEditorCompletionSources: [],
|
sourceEditorCompletionSources: [],
|
||||||
sourceEditorSymbolPalette: [],
|
sourceEditorSymbolPalette: [],
|
||||||
|
|
26
services/web/scripts/check_overleafModuleImports.js
Normal file
26
services/web/scripts/check_overleafModuleImports.js
Normal file
|
@ -0,0 +1,26 @@
|
||||||
|
function getOverleafModuleImports(settings) {
|
||||||
|
return Object.keys(settings.overleafModuleImports).sort().join(',')
|
||||||
|
}
|
||||||
|
|
||||||
|
const CE_CONFIG = require('../config/settings.defaults')
|
||||||
|
const PRO_CONFIG = require('../config/settings.overrides.server-pro')
|
||||||
|
const SAAS_CONFIG = require('../config/settings.webpack')
|
||||||
|
|
||||||
|
function main() {
|
||||||
|
const CE = getOverleafModuleImports(CE_CONFIG)
|
||||||
|
const PRO = getOverleafModuleImports(CE_CONFIG.mergeWith(PRO_CONFIG))
|
||||||
|
const SAAS = getOverleafModuleImports(CE_CONFIG.mergeWith(SAAS_CONFIG))
|
||||||
|
|
||||||
|
if (CE !== PRO) {
|
||||||
|
throw new Error(
|
||||||
|
'settings.defaults is missing overleafModuleImports defined in settings.overrides.server-pro'
|
||||||
|
)
|
||||||
|
}
|
||||||
|
if (CE !== SAAS) {
|
||||||
|
throw new Error(
|
||||||
|
'settings.defaults is missing overleafModuleImports defined in settings.webpack'
|
||||||
|
)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
main()
|
Loading…
Reference in a new issue