cache.js: preparation for git module (factor out getCacheStat) #4765

Closed
wants to merge 2 commits into
from

Conversation

Projects
None yet
2 participants
@robertkowalski
Member

robertkowalski commented Feb 23, 2014

This is one of the first steps to factor out the git part of
cache.js into a separate module which can be tested separately.

@robertkowalski

This comment has been minimized.

Show comment Hide comment
@robertkowalski

robertkowalski Feb 23, 2014

Member

Note: @isaacs already got publish rights for the module, will start a transfer if we merge this in

Member

robertkowalski commented Feb 23, 2014

Note: @isaacs already got publish rights for the module, will start a transfer if we merge this in

+ , fs = require("fs")
+ , fixtures = path.join(__dirname, "fixtures")
+
+var npm = { cache: path.join(fixtures, "mycache") }

This comment has been minimized.

Show comment Hide comment
@domenic

domenic Feb 23, 2014

Member

If all you use from the npm object is the cache property, perhaps this module should just accept a cache value?

@domenic

domenic Feb 23, 2014

Member

If all you use from the npm object is the cache property, perhaps this module should just accept a cache value?

This comment has been minimized.

Show comment Hide comment
@robertkowalski

robertkowalski Feb 23, 2014

Member

You are absolutely right. Missed the forest for the trees :)

@robertkowalski

robertkowalski Feb 23, 2014

Member

You are absolutely right. Missed the forest for the trees :)

robertkowalski added some commits Feb 23, 2014

Factor out getCacheStat
This is one of the first steps to factor out the git part of
`cache.js` into a separate module which can be tested separately.
@robertkowalski

This comment has been minimized.

Show comment Hide comment
@robertkowalski

robertkowalski Feb 23, 2014

Member

fixed! :)

Member

robertkowalski commented Feb 23, 2014

fixed! :)

@domenic

This comment has been minimized.

Show comment Hide comment
@domenic

domenic Feb 24, 2014

Member

So this LGreatTM but I want to make sure @isaacs is on board with this direction of refactoring cache.js. I know our original and/or long-term plan was #4159 but this might be a nice way to go in the meantime. Actually it might still be necessary anyway even after that.

Member

domenic commented Feb 24, 2014

So this LGreatTM but I want to make sure @isaacs is on board with this direction of refactoring cache.js. I know our original and/or long-term plan was #4159 but this might be a nice way to go in the meantime. Actually it might still be necessary anyway even after that.

@robertkowalski

This comment has been minimized.

Show comment Hide comment
@robertkowalski

robertkowalski Mar 1, 2014

Member

Side-note: #4159 discusses mainly caching http agents, not how the git part should work. I'm planning to integrate the git module into npm-fetch anyway which is also suggested there.

Member

robertkowalski commented Mar 1, 2014

Side-note: #4159 discusses mainly caching http agents, not how the git part should work. I'm planning to integrate the git module into npm-fetch anyway which is also suggested there.

@domenic

This comment has been minimized.

Show comment Hide comment
@domenic

domenic May 11, 2014

Member

Well, I guess @othiym23's recent cache refactor supersedes this...

Member

domenic commented May 11, 2014

Well, I guess @othiym23's recent cache refactor supersedes this...

@domenic domenic closed this May 11, 2014

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment