Skip to content

Commit bc67ffe

Browse files
authored
fix: auditer -> auditor (#323)
1 parent c863fee commit bc67ffe

9 files changed

+17
-17
lines changed

lib/audit.ts

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@ import { yellow } from "./colors.js";
22
import { ReportConfig } from "./common.js";
33
import type { AuditCiFullConfig } from "./config.js";
44
import type { Summary } from "./model.js";
5-
import * as npmAuditer from "./npm-auditer.js";
6-
import * as pnpmAuditer from "./pnpm-auditer.js";
7-
import * as yarnAuditer from "./yarn-auditer.js";
5+
import * as npmAuditor from "./npm-auditor.js";
6+
import * as pnpmAuditor from "./pnpm-auditor.js";
7+
import * as yarnAuditor from "./yarn-auditor.js";
88

99
const PARTIAL_RETRY_ERROR_MSG = {
1010
// The three ENOAUDIT error messages for NPM are:
@@ -20,16 +20,16 @@ const PARTIAL_RETRY_ERROR_MSG = {
2020

2121
function getAuditor(
2222
packageManager: "npm" | "yarn" | "pnpm",
23-
): typeof yarnAuditer | typeof npmAuditer | typeof pnpmAuditer {
23+
): typeof yarnAuditor | typeof npmAuditor | typeof pnpmAuditor {
2424
switch (packageManager) {
2525
case "yarn": {
26-
return yarnAuditer;
26+
return yarnAuditor;
2727
}
2828
case "npm": {
29-
return npmAuditer;
29+
return npmAuditor;
3030
}
3131
case "pnpm": {
32-
return pnpmAuditer;
32+
return pnpmAuditor;
3333
}
3434
default: {
3535
throw new Error(`Invalid package manager: ${packageManager}`);

lib/index.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,6 @@ export {
1212
type VulnerabilityLevels,
1313
} from "./map-vulnerability.js";
1414
export type { Summary } from "./model.js";
15-
export { audit as npmAudit } from "./npm-auditer.js";
16-
export { audit as pnpmAudit } from "./pnpm-auditer.js";
17-
export { audit as yarnAudit } from "./yarn-auditer.js";
15+
export { audit as npmAudit } from "./npm-auditor.js";
16+
export { audit as pnpmAudit } from "./pnpm-auditor.js";
17+
export { audit as yarnAudit } from "./yarn-auditor.js";
File renamed without changes.
File renamed without changes.
File renamed without changes.

test/npm-auditer.spec.ts renamed to test/npm-auditor.spec.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import { NPMAuditReportV1 } from "audit-types";
22
import { describe, expect, it } from "vitest";
33
import Allowlist from "../lib/allowlist.js";
4-
import { auditWithFullConfig, report } from "../lib/npm-auditer.js";
4+
import { auditWithFullConfig, report } from "../lib/npm-auditor.js";
55
import {
66
config as baseConfig,
77
summaryWithDefault,
@@ -36,7 +36,7 @@ function config(
3636

3737
// To modify what slow times are, need to use
3838
// function() {} instead of () => {}
39-
describe("npm-auditer", () => {
39+
describe("npm-auditor", () => {
4040
it("prints full report with critical severity", () => {
4141
const summary = report(
4242
reportNpmCritical,

test/npm7-auditer.spec.ts renamed to test/npm7-auditor.spec.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import { NPMAuditReportV2 } from "audit-types";
22
import semver from "semver";
33
import { describe, expect, it } from "vitest";
44
import Allowlist from "../lib/allowlist.js";
5-
import { auditWithFullConfig, report } from "../lib/npm-auditer.js";
5+
import { auditWithFullConfig, report } from "../lib/npm-auditor.js";
66
import {
77
config as baseConfig,
88
summaryWithDefault,
@@ -38,7 +38,7 @@ function config(
3838
return baseConfig({ ...additions, "package-manager": "npm" });
3939
}
4040

41-
describe("npm7-auditer", () => {
41+
describe("npm7-auditor", () => {
4242
it("prints full report with critical severity", () => {
4343
const summary = report(
4444
reportNpmCritical,

test/pnpm-auditer.spec.ts renamed to test/pnpm-auditor.spec.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { describe, expect, it } from "vitest";
22
import Allowlist from "../lib/allowlist.js";
3-
import { report } from "../lib/pnpm-auditer.js";
3+
import { report } from "../lib/pnpm-auditor.js";
44
import {
55
config as baseConfig,
66
summaryWithDefault,
@@ -23,7 +23,7 @@ function config(
2323

2424
// To modify what slow times are, need to use
2525
// function() {} instead of () => {}
26-
describe("pnpm-auditer", () => {
26+
describe("pnpm-auditor", () => {
2727
it("prints full report with critical severity", () => {
2828
const summary = report(
2929
reportPnpmCritical,

test/yarn-auditer.spec.ts renamed to test/yarn-auditor.spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ const canRunYarnBerry = semver.gte(
2424
// To modify what slow times are, need to use
2525
// function() {} instead of () => {}
2626
describe(
27-
"yarn-auditer",
27+
"yarn-auditor",
2828
() => {
2929
it("prints full report with critical severity", async () => {
3030
const summary = await audit(

0 commit comments

Comments
 (0)