Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

oss-mariner

Package Overview
Dependencies
Maintainers
3
Versions
16
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

oss-mariner - npm Package Compare versions

Comparing version 0.5.1-beta to 0.6.0-beta

dist/src/Utilities/generateHtml.d.ts

1

dist/src/mariner/index.d.ts

@@ -6,1 +6,2 @@ export { DependencyDetailsRetriever } from '../dependency-details-retriever';

export { generateConfluenceMarkdown } from '../Utilities/generateConfluenceMarkdown';
export { generateHtml } from '../Utilities/generateHtml';

4

dist/src/mariner/index.js
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.generateConfluenceMarkdown = exports.setLogger = exports.getLogger = exports.IssueFinder = exports.readConfigFile = exports.DependencyDetailsRetriever = void 0;
exports.generateHtml = exports.generateConfluenceMarkdown = exports.setLogger = exports.getLogger = exports.IssueFinder = exports.readConfigFile = exports.DependencyDetailsRetriever = void 0;
var dependency_details_retriever_1 = require("../dependency-details-retriever");

@@ -15,1 +15,3 @@ Object.defineProperty(exports, "DependencyDetailsRetriever", { enumerable: true, get: function () { return dependency_details_retriever_1.DependencyDetailsRetriever; } });

Object.defineProperty(exports, "generateConfluenceMarkdown", { enumerable: true, get: function () { return generateConfluenceMarkdown_1.generateConfluenceMarkdown; } });
var generateHtml_1 = require("../Utilities/generateHtml");
Object.defineProperty(exports, "generateHtml", { enumerable: true, get: function () { return generateHtml_1.generateHtml; } });
{
"name": "oss-mariner",
"version": "0.5.1-beta",
"version": "0.6.0-beta",
"description": "A node.js library for analyzing open source library dependencies",

@@ -29,2 +29,3 @@ "main": "dist/src/mariner/index.js",

"@types/node-fetch": "^2.5.8",
"html-entities": "^2.3.2",
"luxon": "^1.26.0",

@@ -31,0 +32,0 @@ "node-fetch": "^2.6.1"

@@ -9,3 +9,3 @@ # Mariner

Mariner's goal is to help you to support the open source projects you rely upon by making it easy to get a list of the open issues in your dependencies.
Mariner's goal is to help you to support the open source projects you rely upon by making it easy to get a list of the open issues in your dependencies.

@@ -23,3 +23,3 @@ Mariner takes an input list of GitHub repos, fetches details about them from GitHub,

times faster, so the REST-related calls are now deprecated, and will be removed "soon". The
GraphQL approach is shown in the `runFasterCode.ts` example.
GraphQL approach is shown in the `runExample.ts` example.

@@ -29,5 +29,2 @@ ### Plans to rename the default branch from master

We anticipate renaming the default branch of this repository from `master` to `main`.
GitHub is planning to have a smooth easy conversion process/tool for later this year.
When that tool is available, we plan to take full advantage of it.
[Read more about it here](https://github.com/github/renaming/blob/main/README.md).

@@ -41,8 +38,7 @@ ## Getting Started Using Mariner

### Step-by-step instructions for creating a project that uses Mariner
1. Create a new project folder and use `npm init` to make it a node project.
1. Copy the contents of `runFasterCode.ts` into `index.js`.
- <https://github.com/indeedeng/Mariner/blob/master/examples/runFasterCode.ts>
1. Copy the contents of `runExample.ts` into `index.js`.
- <https://github.com/indeedeng/Mariner/blob/master/examples/runExample.ts>
1. In `index.js` comment out the existing line that imports mariner.

@@ -54,3 +50,3 @@ 1. Also in `index.js`, uncomment the line saying how mariner would normally be imported.

1. Mariner supports TypeScript, but we don't have step-by-step instructions for the TypeScript example.
For now, you can convert the runFasterCode.ts example code to JavaScript:
For now, you can convert the runExample.ts example code to JavaScript:
- Remove the `public` keywords from class members.

@@ -66,2 +62,3 @@ - Remove the `implements Xxxx` from the FancyLogger class declaration.

### Optional: Generating Markdown
- You can generate markdown for use in Confluence/jira

@@ -71,4 +68,5 @@ - The generateConfluenceMarkdown() creates the markdown based on two parameters: `maxIssuesAge` and `issuesByDependency`

- Square brackets and curly braces in issue titles will be replaced by parentheses.
- You can see an example of how to use in the `runFasterCode.ts` file.
- You can see an example of how to use in the `runExample.ts` file.
Example of confluenceMarkdown.md output:
```md

@@ -87,14 +85,16 @@ ## Updated: February 22, 2021, 5:38 PM PST

```
- The `runFasterCode.ts` example now demonstrates how to call this new function
- <https://github.com/indeedeng/Mariner/blob/master/examples/runFasterCode.ts>
- The `runExample.ts` example now demonstrates how to call this new function
- <https://github.com/indeedeng/Mariner/blob/master/examples/runExample.ts>
### Config.json Format
You can use our example config options as written, or customize the fields if you choose.
- Every GitHub issue can have one or more labels attached to it. `labelsToSearch` is an array of the labels you'd like Mariner to search for in the issues it will return. The defaults in our example are ones that will make it easy for someone to make a first contribution to a repo.
- Make sure that your `inputFilePath` is accurate. If you followed the steps above and put `exampleData.json` into a top-level folder called `examples`, you won't have to change the value of this variable.
- `outputFilePath` is the place you'd like the results written to
- `daysAgoCreated` is for deciding how fresh you want the issues to be. If you only want issues that were created in the last week, then choose 7, for example.
- `numberOfReposPerCall`: we recommend not changing this number. Unless you're getting an error from GitHub that your query string is too long, in which case try a smaller number.
- Every GitHub issue can have one or more labels attached to it. `labelsToSearch` is an array of the labels you'd like Mariner to search for in the issues it will return. The defaults in our example are ones that will make it easy for someone to make a first contribution to a repo.
- Make sure that your `inputFilePath` is accurate. If you followed the steps above and put `exampleData.json` into a top-level folder called `examples`, you won't have to change the value of this variable.
- `outputFilePath` is the place you'd like the results written to
- `daysAgoCreated` is for deciding how fresh you want the issues to be. If you only want issues that were created in the last week, then choose 7, for example.
- `numberOfReposPerCall`: we recommend not changing this number. Unless you're getting an error from GitHub that your query string is too long, in which case try a smaller number.
### Input File Format

@@ -104,9 +104,9 @@

- At the top level is a map/object, where each entry consists of a dependency as the key,
- At the top level is a map/object, where each entry consists of a dependency as the key,
and the number of projects that depend on that library as the value.
- Each dependency can be identified by a complete URL or just the owner/repo string.
- Example complete url: "https://api.github.com/repos/spring-projects/spring-framework": 19805,
- Example owner/repo strings: "square/retrofit": 5023,
- The project count value is mostly ignored, but is used by the "abbreviated" feature.
- See examples/exampleData.json for a complete example.
- Each dependency can be identified by a complete URL or just the owner/repo string.
- Example complete url: "https://api.github.com/repos/spring-projects/spring-framework": 19805,
- Example owner/repo strings: "square/retrofit": 5023,
- The project count value is mostly ignored, but is used by the "abbreviated" feature.
- See examples/exampleData.json for a complete example.

@@ -116,2 +116,3 @@ ### Output File Format

The output file is a JSON file in the format:
```javascript

@@ -179,3 +180,3 @@ {

appropiate parameters in finder.findIssues() you can see an example here:
<https://github.com/indeedeng/Mariner/blob/master/examples/runFasterCode.ts>
<https://github.com/indeedeng/Mariner/blob/master/examples/runExample.ts>

@@ -207,3 +208,3 @@ If you are using the `examples/runOldCode.ts file`, (using the old REST code that is very slow)

Follow the instructions in examples/runFasterCode.ts or examples/runOldCode.ts to configure the input and output files. NOTE: An example input file is included, in the examples directory.
Follow the instructions in examples/runExample.ts or examples/runOldCode.ts to configure the input and output files. NOTE: An example input file is included, in the examples directory.

@@ -214,3 +215,3 @@ Run `nvm use` to use the appropiate version of Node specified in the .nvmrc file.

Run `node dist/examples/runFasterCode.js` (to use GraphQL) or `node dist/examples/runOldCode.ts` (to use REST calls), to run the example program. It requires internet access, since it calls the GitHub API. It will take a couple minutes to complete. Some of the output includes the word "ERROR", so don't panic.
Run `node dist/examples/runExample.js` (to use GraphQL) or `node dist/examples/runOldCode.ts` (to use REST calls), to run the example program. It requires internet access, since it calls the GitHub API. It will take a couple minutes to complete. Some of the output includes the word "ERROR", so don't panic.

@@ -217,0 +218,0 @@ Ensure to lint your code by running `npm run lint` before submitting any code for review. Either manually fix the errors or run `npm run lint:fix` to automatically fix any errors.

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc