Commit 2fb007f
lib: allow skipping source maps in node_modules
Files in `node_modules` are not authored by the user directly and the
original sources are less relevant to the user.
Skipping source maps in `node_modules` improves the general
performance. Add `module.setSourceMapsSupport(enabled, options)` to
skip source maps in `node_modules` if it is needed. This moves
all source maps related API to `node:module` and this a step to
promote the source maps API to stable.
PR-URL: #56639
Reviewed-By: Vinícius Lourenço Claro Cardoso <contact@viniciusl.com.br>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>1 parent f885496 commit 2fb007fCopy full SHA for 2fb007f
File tree
Expand file treeCollapse file tree
24 files changed
+491
-48
lines changedOpen diff view settings
Filter options
- benchmark
- es
- fixtures/node_modules/error-stack
- doc/api
- lib
- internal
- bootstrap
- modules/esm
- process
- source_map
- test
- fixtures/source-map
- node_modules/error-stack
- output
- parallel
Expand file treeCollapse file tree
24 files changed
+491
-48
lines changedOpen diff view settings
Collapse file
benchmark/es/error-stack.js
Copy file name to clipboardExpand all lines: benchmark/es/error-stack.js+22-4Lines changed: 22 additions & 4 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
2 | 2 | |
3 | 3 | |
4 | 4 | |
| 5 | + |
| 6 | + |
5 | 7 | |
6 | 8 | |
7 | | - |
| 9 | + |
| 10 | + |
| 11 | + |
| 12 | + |
| 13 | + |
8 | 14 | |
9 | 15 | |
10 | 16 | |
11 | | - |
| 17 | + |
12 | 18 | |
13 | 19 | |
14 | 20 | |
| ||
22 | 28 | |
23 | 29 | |
24 | 30 | |
25 | | - |
| 31 | + |
26 | 32 | |
27 | 33 | |
28 | 34 | |
29 | | - |
| 35 | + |
| 36 | + |
| 37 | + |
| 38 | + |
| 39 | + |
| 40 | + |
| 41 | + |
| 42 | + |
| 43 | + |
| 44 | + |
| 45 | + |
| 46 | + |
| 47 | + |
30 | 48 | |
31 | 49 | |
32 | 50 | |
|
Collapse file
benchmark/fixtures/node_modules/error-stack/simple-error-stack.js
Copy file name to clipboardExpand all lines: benchmark/fixtures/node_modules/error-stack/simple-error-stack.js+16Lines changed: 16 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Collapse file
benchmark/fixtures/node_modules/error-stack/simple-error-stack.ts
Copy file name to clipboardExpand all lines: benchmark/fixtures/node_modules/error-stack/simple-error-stack.ts+19Lines changed: 19 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Collapse file
+40Lines changed: 40 additions & 0 deletions
- Display the source diff
- Display the rich diff
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
1590 | 1590 | |
1591 | 1591 | |
1592 | 1592 | |
| 1593 | + |
| 1594 | + |
| 1595 | + |
| 1596 | + |
| 1597 | + |
| 1598 | + |
| 1599 | + |
| 1600 | + |
| 1601 | + |
| 1602 | + |
| 1603 | + |
| 1604 | + |
| 1605 | + |
| 1606 | + |
1593 | 1607 | |
1594 | 1608 | |
1595 | 1609 | |
| ||
1609 | 1623 | |
1610 | 1624 | |
1611 | 1625 | |
| 1626 | + |
| 1627 | + |
| 1628 | + |
| 1629 | + |
| 1630 | + |
| 1631 | + |
| 1632 | + |
| 1633 | + |
| 1634 | + |
| 1635 | + |
| 1636 | + |
| 1637 | + |
| 1638 | + |
| 1639 | + |
| 1640 | + |
| 1641 | + |
| 1642 | + |
| 1643 | + |
| 1644 | + |
| 1645 | + |
| 1646 | + |
| 1647 | + |
| 1648 | + |
| 1649 | + |
| 1650 | + |
1612 | 1651 | |
1613 | 1652 | |
1614 | 1653 | |
| ||
1709 | 1748 | |
1710 | 1749 | |
1711 | 1750 | |
| 1751 | + |
1712 | 1752 | |
1713 | 1753 | |
1714 | 1754 | |
|
Collapse file
+7-2Lines changed: 7 additions & 2 deletions
- Display the source diff
- Display the rich diff
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
3987 | 3987 | |
3988 | 3988 | |
3989 | 3989 | |
3990 | | - |
| 3990 | + |
3991 | 3991 | |
3992 | 3992 | |
3993 | 3993 | |
| ||
4000 | 4000 | |
4001 | 4001 | |
4002 | 4002 | |
| 4003 | + |
| 4004 | + |
| 4005 | + |
4003 | 4006 | |
4004 | 4007 | |
4005 | 4008 | |
| ||
4034 | 4037 | |
4035 | 4038 | |
4036 | 4039 | |
4037 | | - |
| 4040 | + |
4038 | 4041 | |
4039 | 4042 | |
4040 | 4043 | |
| ||
4501 | 4504 | |
4502 | 4505 | |
4503 | 4506 | |
| 4507 | + |
4504 | 4508 | |
| 4509 | + |
4505 | 4510 | |
4506 | 4511 | |
4507 | 4512 | |
|
Collapse file
lib/internal/bootstrap/node.js
Copy file name to clipboardExpand all lines: lib/internal/bootstrap/node.js+13-4Lines changed: 13 additions & 4 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
368 | 368 | |
369 | 369 | |
370 | 370 | |
371 | | - |
372 | | - |
| 371 | + |
| 372 | + |
373 | 373 | |
374 | 374 | |
375 | 375 | |
| ||
381 | 381 | |
382 | 382 | |
383 | 383 | |
384 | | - |
| 384 | + |
385 | 385 | |
386 | 386 | |
387 | | - |
| 387 | + |
| 388 | + |
| 389 | + |
| 390 | + |
| 391 | + |
| 392 | + |
| 393 | + |
| 394 | + |
| 395 | + |
| 396 | + |
388 | 397 | |
389 | 398 | |
390 | 399 | |
|
Collapse file
lib/internal/modules/esm/module_job.js
Copy file name to clipboardExpand all lines: lib/internal/modules/esm/module_job.js+2-2Lines changed: 2 additions & 2 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
30 | 30 | |
31 | 31 | |
32 | 32 | |
33 | | - |
| 33 | + |
34 | 34 | |
35 | 35 | |
36 | 36 | |
| ||
186 | 186 | |
187 | 187 | |
188 | 188 | |
189 | | - |
| 189 | + |
190 | 190 | |
191 | 191 | |
192 | 192 | |
|
Collapse file
lib/internal/process/pre_execution.js
Copy file name to clipboardExpand all lines: lib/internal/process/pre_execution.js+10-2Lines changed: 10 additions & 2 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
608 | 608 | |
609 | 609 | |
610 | 610 | |
611 | | - |
| 611 | + |
612 | 612 | |
613 | | - |
| 613 | + |
| 614 | + |
| 615 | + |
| 616 | + |
| 617 | + |
| 618 | + |
| 619 | + |
| 620 | + |
| 621 | + |
614 | 622 | |
615 | 623 | |
616 | 624 | |
|
Collapse file
lib/internal/source_map/source_map_cache.js
Copy file name to clipboardExpand all lines: lib/internal/source_map/source_map_cache.js+46-19Lines changed: 46 additions & 19 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
3 | 3 | |
4 | 4 | |
5 | 5 | |
| 6 | + |
6 | 7 | |
7 | 8 | |
8 | 9 | |
| ||
15 | 16 | |
16 | 17 | |
17 | 18 | |
18 | | - |
| 19 | + |
19 | 20 | |
20 | 21 | |
21 | 22 | |
22 | 23 | |
23 | 24 | |
24 | 25 | |
25 | 26 | |
26 | | - |
| 27 | + |
27 | 28 | |
28 | 29 | |
29 | 30 | |
| ||
45 | 46 | |
46 | 47 | |
47 | 48 | |
48 | | - |
49 | | - |
50 | | - |
| 49 | + |
| 50 | + |
| 51 | + |
| 52 | + |
| 53 | + |
| 54 | + |
| 55 | + |
| 56 | + |
| 57 | + |
51 | 58 | |
52 | 59 | |
53 | 60 | |
54 | 61 | |
55 | | - |
| 62 | + |
| 63 | + |
| 64 | + |
| 65 | + |
56 | 66 | |
57 | | - |
58 | | - |
| 67 | + |
| 68 | + |
| 69 | + |
| 70 | + |
| 71 | + |
| 72 | + |
| 73 | + |
59 | 74 | |
60 | | - |
61 | | - |
| 75 | + |
| 76 | + |
62 | 77 | |
63 | 78 | |
64 | 79 | |
65 | 80 | |
66 | | - |
67 | | - |
| 81 | + |
68 | 82 | |
69 | 83 | |
70 | 84 | |
71 | | - |
| 85 | + |
| 86 | + |
| 87 | + |
| 88 | + |
| 89 | + |
| 90 | + |
72 | 91 | |
73 | 92 | |
74 | 93 | |
| ||
130 | 149 | |
131 | 150 | |
132 | 151 | |
133 | | - |
134 | | - |
| 152 | + |
| 153 | + |
135 | 154 | |
136 | 155 | |
137 | 156 | |
138 | 157 | |
139 | 158 | |
140 | 159 | |
| 160 | + |
| 161 | + |
| 162 | + |
| 163 | + |
141 | 164 | |
142 | 165 | |
143 | 166 | |
| ||
185 | 208 | |
186 | 209 | |
187 | 210 | |
188 | | - |
189 | | - |
| 211 | + |
| 212 | + |
190 | 213 | |
191 | 214 | |
192 | 215 | |
| ||
352 | 375 | |
353 | 376 | |
354 | 377 | |
| 378 | + |
| 379 | + |
| 380 | + |
| 381 | + |
355 | 382 | |
356 | 383 | |
357 | 384 | |
| ||
377 | 404 | |
378 | 405 | |
379 | 406 | |
380 | | - |
381 | | - |
| 407 | + |
| 408 | + |
382 | 409 | |
383 | 410 | |
384 | 411 | |
|
0 commit comments