stable

Clone or download

Read-only

request #19373 Separate Cypress and Jest TypeScript globals

How to test: - No functional change - CI for Jest tests is happy Notes: In order to stop mixing Cypress and Jest global definitions, this change removes the automatic inclusion of all global types. We must now specify which "lib" we need (e.g. "ES2015" for Promise global) and which global "types" to include (e.g. "jest" for "expect" global). @types/node is needed in AgileDashboard and ProgramManagement because tests use `setImmediate`. It is also needed in TestManagement because `process.env` is used in the relative date custom element. Otherwise, only "jest" is added. I do not precisely understand why, but it seems Jest will cause a compilation of typescript files from unrelated plugins when running tests. For example, Jest could fail a test in Timetracking plugin because of some false error in AgileDashboard or Document plugin. I suspect it is because they pull @tuleap/tlp-fetch, but I'm not really sure. Anyway, adding a tsconfig at their root seems to fix this problem and is harmless otherwise. It will better separate the plugins into tsconfig projects. Change-Id: Ia645ef7ac376c977bbc038a95cf3043429ad5fd9

Modified Files

Name
M plugins/agiledashboard/package-lock.json +6 −0 Go to diff View file
M plugins/agiledashboard/package.json +1 −0 Go to diff View file
M plugins/agiledashboard/tsconfig.json +3 −4 Go to diff View file
M plugins/hudson_git/package.json +5 −5 Go to diff View file
M plugins/hudson_git/tsconfig.json +2 −1 Go to diff View file
A plugins/label/tsconfig.json +4 −0 Go to diff View file
M plugins/program_management/package-lock.json +6 −0 Go to diff View file
M plugins/program_management/package.json +1 −0 Go to diff View file
M plugins/program_management/tsconfig.json +3 −4 Go to diff View file
A plugins/pullrequest/tsconfig.json +4 −0 Go to diff View file
M plugins/testmanagement/package-lock.json +6 −0 Go to diff View file
M plugins/testmanagement/package.json +1 −0 Go to diff View file
M plugins/testmanagement/tsconfig.json +2 −6 Go to diff View file
A plugins/timetracking/tsconfig.json +4 −0 Go to diff View file
M plugins/tracker/scripts/lib/rich-text-editor/tsconfig.json +3 −2 Go to diff View file
M plugins/tracker/tsconfig.json +2 −1 Go to diff View file
M src/package-lock.json +6 −0 Go to diff View file
M src/package.json +1 −0 Go to diff View file
M src/scripts/lib/date-helper/tsconfig.json +2 −2 Go to diff View file
M src/scripts/lib/drag-and-drop/tsconfig.json +2 −4 Go to diff View file
M src/scripts/lib/filter-table/tsconfig.json +3 −2 Go to diff View file
M src/scripts/lib/gettext/tsconfig.json +0 −1 Go to diff View file
M src/scripts/lib/keyboard-shortcuts/tsconfig.json +2 −1 Go to diff View file
M src/scripts/lib/list-picker/tsconfig.json +3 −2 Go to diff View file
M src/scripts/lib/tlp-fetch/tsconfig.json +3 −2 Go to diff View file
M src/scripts/lib/vue-breadcrumb-privacy/tsconfig.json +2 −1 Go to diff View file
M src/tsconfig.json +2 −1 Go to diff View file
M tools/utils/scripts/tsconfig-for-libraries.json +3 −2 Go to diff View file
M tsconfig.json +5 −4 Go to diff View file