eslint-plugin-import icon indicating copy to clipboard operation
eslint-plugin-import copied to clipboard

Replaced read-pkg-up with cache-aware package locator

Open hulkish opened this issue 7 years ago • 6 comments

hulkish avatar Feb 08 '18 00:02 hulkish

Coverage Status

Coverage increased (+0.2%) to 96.449% when pulling 14fdf06e2154d6a538897399730f7ccdebde077b on hulkish:cached-read-pkg-up into 402c60a3377fa2bbbb7980b2efa7f4afd62ebcd8 on benmosher:master.

coveralls avatar Feb 08 '18 00:02 coveralls

Coverage Status

Coverage decreased (-0.1%) to 96.091% when pulling a9fb1b02257ff20b5767f95657ae37d9180ed792 on hulkish:cached-read-pkg-up into 219a8d2e5af230f73b4754f725916843645889ff on benmosher:master.

coveralls avatar Feb 08 '18 00:02 coveralls

Coverage Status

Coverage decreased (-0.1%) to 96.091% when pulling a9fb1b02257ff20b5767f95657ae37d9180ed792 on hulkish:cached-read-pkg-up into 219a8d2e5af230f73b4754f725916843645889ff on benmosher:master.

coveralls avatar Feb 08 '18 00:02 coveralls

@ljharp one other thing that occurs to me... is it safe for the cache to exist at module level as i currently have it?

Are there instances where I should be clearing the cache? I'd like to add some tests to account for this.

hulkish avatar Feb 08 '18 18:02 hulkish

@ljharb Ok I think this is ready now.

One easy way to see the benefit here, is by running the following command in both master and the branch for this pr (note the --trace-sync-io):

BABEL_ENV=test NODE_PATH=./src ./node_modules/.bin/mocha --require babel-register tests/src/rules/no-extraneous-dependencies.js --trace-sync-io 2>&1 | grep -c "src/rules/no-extraneous-dependencies.js"

The difference is clear when u see that master produces 524 io calls originating from the no-extraneous-dependencies rule. This pr branch, using same command yields 25

hulkish avatar Feb 10 '18 03:02 hulkish

@hulkish are you still interested in completing this?

ljharb avatar May 14 '21 05:05 ljharb