[SERVER-71628] Read jsConfig baseUrl if its present, and use it as a loader base for modules Created: 26/Nov/22  Updated: 29/Oct/23  Resolved: 22/Dec/22

Status: Closed
Project: Core Server
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Improvement Priority: Major - P3
Reporter: Matt Broadstone Assignee: Matt Broadstone
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Related
Backwards Compatibility: Fully Compatible
Sprint: Server Serverless 2022-12-12, Server Serverless 2022-12-26
Participants:

 Description   

In order to properly support the existing specifier paths used for load in the mongo test runner, we need to either:

  • assume we are always running the test runner from the same directory
  • use some standard convention for determining the base URL for running tests

The code for load assumes the first, which is slightly problematic since you can't run jstests from any folder. VSCode/TypeScript use jsconfig.json to support a baseUrl option, which informs module loaders what the prefix for specifiers should be. This ticket will cover adding support for a jsconfig.json in the test runner, as well as adding one to the base directory of the mongo source directory.



 Comments   
Comment by Githook User [ 20/Dec/22 ]

Author:

{'name': 'Matt Broadstone', 'email': 'mbroadst@mongodb.com', 'username': 'mbroadst'}

Message: SERVER-71628 Try to resolve baseUrl defined in nearby jsconfig.json
Branch: master
https://github.com/mongodb/mongo/commit/d72723568e1689fc31617009daf72345f8c18666

Generated at Thu Feb 08 06:19:32 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.