Skip to content
Open
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: 1 addition & 2 deletions test/harness.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1895,6 +1895,7 @@ export class VerdaccioRegistry {

async start(silent: boolean = true) {
await rm(join(dirname(this.configPath), "htpasswd"), { force: true });
this.users = {};
// Bind the IPv4 loopback explicitly: a bare port makes verdaccio listen on
// whatever `localhost` resolves to, which is `::1` on hosts that list it first,
// while the install client connects to 127.0.0.1 and every request is refused.
Expand Down Expand Up @@ -1993,12 +1994,10 @@ export class VerdaccioRegistry {
files: {},
},
) {
await rm(join(dirname(this.configPath), "htpasswd"), { force: true });
await rm(join(this.packagesPath, "private-pkg-dont-touch"), { force: true });
const packageDir = tempDir("verdaccio-test-", opts.files ?? {});
const packageJson = join(packageDir, "package.json");
await this.writeBunfig(packageDir, opts.bunfigOpts);
this.users = {};
return { packageDir: String(packageDir), packageJson };
}

Expand Down
Loading