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
5 changes: 5 additions & 0 deletions .changeset/great-sloths-tickle.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@nodesecure/scanner": minor
---

Remove getDirNameFromUrl utilities in favor of import.meta.dirname
4 changes: 1 addition & 3 deletions workspaces/scanner/src/registry/NpmRegistryProvider.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,11 @@ import type {
} from "../types.ts";
import { Logger } from "../class/logger.class.ts";
import { getLinks } from "../utils/getLinks.ts";
import { getDirNameFromUrl } from "../utils/dirname.ts";

// CONSTANTS
const kNotFoundStatusCode = 404;

await i18n.extendFromSystemPath(
path.join(getDirNameFromUrl(import.meta.url), "..", "i18n")
path.join(import.meta.dirname, "..", "i18n")
);

type PackumentNpmApiOptions = {
Expand Down
9 changes: 0 additions & 9 deletions workspaces/scanner/src/utils/dirname.ts

This file was deleted.

1 change: 0 additions & 1 deletion workspaces/scanner/src/utils/index.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
export * from "./dirname.ts";
export * from "./warnings.ts";
export * from "./addMissingVersionFlags.ts";
export * from "./getLinks.ts";
Expand Down
3 changes: 1 addition & 2 deletions workspaces/scanner/src/utils/warnings.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,11 @@ import {
import type { Contact } from "@nodesecure/npm-types";

// Import Internal Dependencies
import { getDirNameFromUrl } from "./dirname.ts";
import { TopPackages } from "../class/TopPackages.class.ts";
import type { Dependency, GlobalWarning } from "../types.ts";

await i18n.extendFromSystemPath(
path.join(getDirNameFromUrl(import.meta.url), "..", "i18n")
path.join(import.meta.dirname, "..", "i18n")
);

// CONSTANTS
Expand Down
Loading