Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions lib/ui5Framework/npm/Registry.js
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,9 @@ class Registry {
await configuration.load(); // Reads through the configurations
const config = configuration.flat; // JSON. Formatted via "flatten"

// Always use our cache dir instead of the configured one
config.cache = this._cacheDir;

if (!config.proxy && !config.httpsProxy) {
// Disable usage of shared keep-alive agents unless a proxy is configured
// which only works with agents.
Expand Down
1 change: 0 additions & 1 deletion test/lib/graph/helpers/ui5Framework.integration.js
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,6 @@ test.beforeEach(async (t) => {
}
sinon.stub(Config.prototype, "flat").value({
registry: "https://registry.fake",
cache: path.join(ui5FrameworkBaseDir, "cacache"),
proxy: ""
});

Expand Down
9 changes: 6 additions & 3 deletions test/lib/ui5framework/npm/Registry.js
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,8 @@ test.serial("_getPacoteOptions", async (t) => {

const expectedPacoteOptions = {
fake: "config",
agent: false
agent: false,
cache: "cacheDir"
};
npmConfigFlat.value(npmConfig);

Expand Down Expand Up @@ -109,7 +110,8 @@ test.serial("_getPacoteOptions (proxy config set)", async (t) => {
};

const expectedPacoteOptions = {
proxy: "http://localhost:9999"
proxy: "http://localhost:9999",
cache: "cacheDir"
};

npmConfigFlat.value(npmConfig);
Expand All @@ -134,7 +136,8 @@ test.serial("_getPacoteOptions (https-proxy config set)", async (t) => {
};

const expectedPacoteOptions = {
httpsProxy: "http://localhost:9999"
httpsProxy: "http://localhost:9999",
cache: "cacheDir"
};

npmConfigFlat.value(npmConfig);
Expand Down