-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add
overrideProperties
option to debugAsync
BREAKING CHANGE by default variables will override context properties; rename "babel" entry point to "babel-plugin"
- Loading branch information
Dmitry Steblyuk
committed
Jul 23, 2021
1 parent
add7f71
commit 4dccaf1
Showing
16 changed files
with
180 additions
and
107 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
{ | ||
"main": "../lib/babel-plugin.js", | ||
"types": "../lib/babel-plugin.d.ts" | ||
"main": "../lib/debug-async-browser.js", | ||
"types": "../lib/debug-async-browser.d.ts" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
{ | ||
"main": "../lib/debug-async-node.js", | ||
"types": "../lib/debug-async-node.d.ts" | ||
"main": "../lib/index.js", | ||
"types": "../lib/index.d.ts" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
{ | ||
"main": "../lib/babel-plugin.js", | ||
"types": "../lib/babel-plugin.d.ts" | ||
"main": "../lib/debug-async-node.js", | ||
"types": "../lib/debug-async-node.d.ts" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
require('@babel/register')({ | ||
sourceType: 'unambiguous', | ||
plugins: ['async-debugger/babel'], | ||
plugins: ['async-debugger/babel-plugin'], | ||
extensions: ['.es6', '.es', '.jsx', '.js', '.mjs', '.ts', '.tsx'] | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,26 @@ | ||
export * from './create-debugger-api'; | ||
export * from './extend-context'; | ||
export * from './types'; | ||
export const API_NAMESPACE = 'AsyncDebugger'; | ||
|
||
export function getLogger( | ||
{ | ||
info = console.info.bind(console, `[${API_NAMESPACE}]`), | ||
warn = console.warn.bind(console, `[${API_NAMESPACE}]`), | ||
error = console.error.bind(console, `[${API_NAMESPACE}]`) | ||
}: Partial<Logger> = {} | ||
) { | ||
return {info, warn, error}; | ||
} | ||
|
||
export interface Bindings { | ||
[variableName: string]: () => unknown; | ||
} | ||
export interface Logger { | ||
info: ((...args: unknown[]) => void) | null; | ||
warn: ((...args: unknown[]) => void) | null; | ||
error: ((...args: unknown[]) => void) | null; | ||
} | ||
export interface DebugAsyncCommonOptions { | ||
contexts?: object[]; | ||
logger?: Partial<Logger>; | ||
apiNamespace?: string; | ||
overrideProperties?: boolean; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.