Commit Graph
3 Commits
Author SHA1 Message Date
Simon Zünd fda9300884 Upgrade TypeScript to 4.4.2
DISABLE_THIRD_PARTY_CHECK=Upgrade requires some compatability changes
R=tvanderlippe@chromium.org

Fixed: 1247593
Change-Id: I78ffad8d969e043952555cac813ac803f2561bb5
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/3147890
Commit-Queue: Simon Zünd <szuend@chromium.org>
Reviewed-by: Tim van der Lippe <tvanderlippe@chromium.org>
2021-09-13 06:41:11 +00:00
Tim van der Lippe 84dc0c5881 Remove baseUrl from TypeScript options
The baseUrl option is used to resolve non-relative module imports.
However, since we enforce that all imports are relative in DevTools,
we don't actually need this option to compile succesfully.

In fact, setting this option will actually break things. One instance
is that packages that are written expecting Node module resolution
(for instance Puppeteer or the Node types themselves), assume that
they are being resolved relative to their own location (according
to the Node module resolution). However, by setting `baseUrl`, we
essentially remap all non-relative module imports to be resolved
from the output directory.

As such, if you include a file in your `ts_library` that has a name
that is equivalent to a non-relative module import name in a different
part, a second compilation of the `ts_library` target breaks. That's
because, instead of resolving to the correct location, it now starts
using the `.d.ts` file from its own `ts_library` target.

By removing the `baseUrl` option, we ensure that we always resolve
from source, rather than build output. This avoids the accidental
usage of `.d.ts` output files and circumvents the second
compilation problem.

R=alexrudenko@chromium.org

Bug: none
Change-Id: I01b2a27fa91e42627a8ca65c8ea2f4da87af2805
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/3021227
Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org>
Commit-Queue: Alex Rudenko <alexrudenko@chromium.org>
Auto-Submit: Tim van der Lippe <tvanderlippe@chromium.org>
Reviewed-by: Alex Rudenko <alexrudenko@chromium.org>
2021-07-12 15:44:51 +00:00
Tim van der Lippe 46244285d4 Cleanup TypeScript configuration files and root OWNERS
This moves the required TypeScript configuration files into
/config/typescript/, which allows us to cleanup the root OWNERS.
Doing so will make it easier to make infrastructure refactorings
in our TypeScript configuration (if we for example need to add
a new file), while not requiring ENG_REVIEW_OWNERS.

DISABLE_THIRD_PARTY_CHECK=Configuration changes
R=yangguo@chromium.org,szuend@chromium.org

Bug: none
Change-Id: Icffd52d37c37b52651dc8125948dc90b2b79cdf5
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2975287
Reviewed-by: Simon Zünd <szuend@chromium.org>
Reviewed-by: Yang Guo <yangguo@chromium.org>
Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org>
2021-06-22 10:45:59 +00:00