Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update readme. Add codecov badge. #7

Merged
merged 1 commit into from
Feb 26, 2024
Merged
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
26 changes: 18 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,18 +43,18 @@ fromMem(code: string, options: FromMemOptions): Promise<unknown>
export type FromMemOptions = {
/**
* What format does the code have? "guess" means to read the closest
* package.json file looking for the "type" key. Default: "commonjs".
* package.json file looking for the "type" key.
* Default: "commonjs".
*/
format?: "bare" | "commonjs" | "es" | "globals" | "guess";
/**
* What is the fully-qualified synthetic
* filename for the code? Most important is the directory, which is used to
* find modules that the code import's or require's.
* What is the fully-qualified synthetic filename for the code? Most
* important is the directory, which is used to find modules that the
* code import's or require's.
*/
filename: string;
/**
* Variables to make availble in the global
* scope while code is being evaluated.
* Variables to make availble in the global scope while code is being evaluated.
*/
context?: object;
/**
Expand All @@ -63,10 +63,19 @@ export type FromMemOptions = {
*/
includeGlobals?: boolean;
/**
* For type "globals", what name is
* exported from the module?
* For type "globals", what name is exported from the module?
*/
globalExport?: string;
/**
* Specifies the line number offset that is displayed in stack traces
* produced by this script.
*/
lineOffset?: number | undefined;
/**
* Specifies the first-line column number ffset that is displayed in stack
* traces produced by this script.
*/
columnOffset?: number | undefined;
};
```

Expand All @@ -79,3 +88,4 @@ for node for the moment. Hopefully, we will track changes to the API as they
happen.

[![Tests](https://github.com/peggyjs/from-mem/actions/workflows/node.js.yml/badge.svg)](https://github.com/peggyjs/from-mem/actions/workflows/node.js.yml)
[![codecov](https://codecov.io/gh/peggyjs/from-mem/graph/badge.svg?token=CWQ7GSH0ZI)](https://codecov.io/gh/peggyjs/from-mem)
Loading