node
node copied to clipboard
lib: allow CJS source map cache to be reclaimed
Unifies the CJS and ESM source map cache map and allows the CJS cache entries to be queried more efficiently with a source url without iteration on an IterableWeakMap. Reclaims the CJS cache entry with a FinalizationRegistry instead.
Add a regression test to verify that the CJS source map cache entry can be reclaimed.
Review requested:
- [ ] @nodejs/loaders
@aduh95 @joyeecheung would you mind taking a look again? Thank you!
CI: https://ci.nodejs.org/job/node-test-pull-request/57812/
@joyeecheung would you mind taking another look at this? Thank you!
CI: https://ci.nodejs.org/job/node-test-pull-request/59466/
CI: https://ci.nodejs.org/job/node-test-pull-request/59480/
CI is green. @joyeecheung @aduh95 would be great to have another review, thanks!
Stress test: https://ci.nodejs.org/job/node-stress-single-test/508 (passed)
Landed in c0c598d753d5ce7e1721215c6e6254dc02c023a8