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
2 changes: 0 additions & 2 deletions yarn-project/foundation/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,6 @@
"./timer": "./dest/timer/index.js",
"./transport": "./dest/transport/index.js",
"./trees": "./dest/trees/index.js",
"./wasm": "./dest/wasm/index.js",
"./worker": "./dest/worker/index.js",
"./bigint-buffer": "./dest/bigint-buffer/index.js",
"./types": "./dest/types/index.js",
"./schemas": "./dest/schemas/index.js",
Expand Down
2 changes: 0 additions & 2 deletions yarn-project/foundation/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,6 @@ export * as transport from './transport/index.js';
export * as trees from './trees/index.js';
export * as types from './types/index.js';
export * as url from './url/index.js';
export * as wasm from './wasm/index.js';
export * as worker from './worker/index.js';
export * as testing from './testing/index.js';
export * as config from './config/index.js';
export * as buffer from './buffer/index.js';
Expand Down
104 changes: 0 additions & 104 deletions yarn-project/foundation/src/log/debug.ts

This file was deleted.

7 changes: 3 additions & 4 deletions yarn-project/foundation/src/log/index.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
export * from './console.js';
export * from './debug.js';
export * from './pino-logger.js';
export * from './log_history.js';
export * from './log_fn.js';
export * from './libp2p_logger.js';
export * from './log_fn.js';
export * from './noir_debug_log_util.js';
export * from './pino-logger.js';
89 changes: 0 additions & 89 deletions yarn-project/foundation/src/log/log_history.test.ts

This file was deleted.

44 changes: 0 additions & 44 deletions yarn-project/foundation/src/log/log_history.ts

This file was deleted.

21 changes: 21 additions & 0 deletions yarn-project/foundation/src/log/noir_debug_log_util.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
interface Printable {
toString(): string;
}

/**
* Format a debug string filling in `'{0}'` entries with their
* corresponding values from the args array, amd `'{}'` with the whole array.
*
* @param formatStr - str of form `'this is a string with some entries like {0} and {1}'`
* @param args - array of fields to fill in the string format entries with
* @returns formatted string
*/
export function applyStringFormatting(formatStr: string, args: Printable[]): string {
return formatStr
.replace(/{(\d+)}/g, (match, index) => {
return typeof args[index] === 'undefined' ? match : args[index].toString();
})
.replace(/{}/g, (_match, _index) => {
return args.toString();
});
}
4 changes: 0 additions & 4 deletions yarn-project/foundation/src/transport/browser/index.ts

This file was deleted.

This file was deleted.

This file was deleted.

Loading