Skip to content

Commit

Permalink
chore(logger)!: Replace nodejs util import with our sprintf library (#…
Browse files Browse the repository at this point in the history
…857)

Depends upon #856 

Towards #51 

This replaces the `import { format } from "util"` with our custom sprintf formatter. This is a breaking change to the logging library because we are more restrictive on data types; however, this doesn't really matter because we're making larger breaking changes for #822 and #855 before we release the beta version.
  • Loading branch information
blaine-arcjet authored Jun 4, 2024
1 parent 160a16e commit edd99a1
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 3 deletions.
3 changes: 1 addition & 2 deletions logger/index.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
// TODO(#180): Implement our own format utility
import { format } from "util";
import format from "@arcjet/sprintf";

export type LogLevel = "DEBUG" | "LOG" | "WARN" | "ERROR";

Expand Down
4 changes: 3 additions & 1 deletion logger/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,9 @@
"pretest": "npm run build",
"test": "NODE_OPTIONS=--experimental-vm-modules jest --passWithNoTests"
},
"dependencies": {},
"dependencies": {
"@arcjet/sprintf": "1.0.0-alpha.13"
},
"devDependencies": {
"@arcjet/eslint-config": "1.0.0-alpha.13",
"@arcjet/rollup-config": "1.0.0-alpha.13",
Expand Down
4 changes: 4 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit edd99a1

Please sign in to comment.