Skip to content

Commit

Permalink
v2.0.0 (#262)
Browse files Browse the repository at this point in the history
* v2.0.0
  • Loading branch information
AndrewLane authored Jun 17, 2024
1 parent 050d946 commit 941c9ad
Show file tree
Hide file tree
Showing 6 changed files with 36 additions and 22 deletions.
12 changes: 12 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,17 @@ All notable changes to this project will be documented in this file.

This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [2.0.0] - 16-Jun-2024

### Changed

- Switch to ESM module
- Bump eslint to version 9.5, with migrated config file
- Drop eslint-config-airbnb-base and eslint-plugin-import
- Other dev dependency bumps
- MacOS Specific tweaks for testing
- GitHub Action version bumps

## [1.2.0] - 15-Oct-2023

### Changed
Expand Down Expand Up @@ -46,6 +57,7 @@ This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.htm

### Initial Release

[2.0.0]: https://github.com/AndrewLane/ssh-keygen2/compare/v1.2.0...v2.0.0
[1.2.0]: https://github.com/AndrewLane/ssh-keygen2/compare/v1.1.4...v1.2.0
[1.1.4]: https://github.com/AndrewLane/ssh-keygen2/compare/v1.1.3...v1.1.4
[1.1.3]: https://github.com/AndrewLane/ssh-keygen2/compare/v1.1.2...v1.1.3
Expand Down
24 changes: 12 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,16 +29,16 @@ command to be installed and in the path.
### Usage

```js
var keygen = require('@andrewwlane/ssh-keygen2')
, assert = require('assert')
import keygen from "@andrewwlane/ssh-keygen2";
import assert from "assert";

// generate a temporary keypair and return details
keygen(function (err, keypair) {
assert.ifError(err);
console.log(keypair.private);
console.log(keypair.public);
console.log(keypair.fingerprint + '\n');
console.log(keypair.randomart + '\n');
console.log(keypair.fingerprint + "\n");
console.log(keypair.randomart + "\n");
});
```

Expand Down Expand Up @@ -93,24 +93,24 @@ ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDRjv3GW0oAWhusF7+4jIOhkkax33jqOyIUE1dSnkun
With full options:

```js
var keygen = require('@andrewwlane/ssh-keygen2')
, assert = require('assert')
import keygen from "@andrewwlane/ssh-keygen2";
import assert from "assert";

var opts = {
type: 'rsa',
type: "rsa",
bits: 4096,
passphrase: 'this will encrypt the private key',
location: '/path/to/id_rsa',
passphrase: "this will encrypt the private key",
location: "/path/to/id_rsa",
keep: true, // this will keep the resulting files
comment: 'optional comment for ssh public key'
comment: "optional comment for ssh public key",
};

keygen(opts, function (err, keypair) {
assert.ifError(err);
console.log(keypair.private);
console.log(keypair.public);
console.log(keypair.fingerprint + '\n');
console.log(keypair.randomart + '\n');
console.log(keypair.fingerprint + "\n");
console.log(keypair.randomart + "\n");
});
```

Expand Down
10 changes: 6 additions & 4 deletions examples/advanced.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
const assert = require("assert");
const path = require("path");
const tmpDir = require("os").tmpdir();
const keygen = require("..");
import assert from "assert";
import keygen from "../index.js";
import path from "path";
import os from "os";

const tmpDir = os.tmpdir();

const opts = {
type: "rsa",
Expand Down
4 changes: 2 additions & 2 deletions examples/simple.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
const assert = require("assert");
const keygen = require("..");
import assert from "assert";
import keygen from "../index.js";

// generate a temporary keypair and return details
keygen((err, keypair) => {
Expand Down
4 changes: 2 additions & 2 deletions package-lock.json

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

4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@andrewwlane/ssh-keygen2",
"type": "module",
"version": "1.2.0",
"version": "2.0.0",
"description": "Automate ssh-keygen command for generating RSA keypairs",
"main": "index.js",
"devDependencies": {
Expand Down Expand Up @@ -38,4 +38,4 @@
"bugs": {
"url": "https://github.com/AndrewLane/ssh-keygen2/issues"
}
}
}

0 comments on commit 941c9ad

Please sign in to comment.