@boost/cli
Advanced tools
Comparing version 2.8.2 to 2.9.0
@@ -6,2 +6,19 @@ # Change Log | ||
## 2.9.0 - 2021-01-16 | ||
#### 🚀 Updates | ||
- Add `Command#render` to render components continuously. (#136) ([999f20d](https://github.com/milesj/boost/commit/999f20d)), closes [#136](https://github.com/milesj/boost/issues/136) | ||
- Migrate to Packemon for package building. (#135) ([1a0e9d8](https://github.com/milesj/boost/commit/1a0e9d8)), closes [#135](https://github.com/milesj/boost/issues/135) | ||
#### 🐞 Fixes | ||
- Improve deep inheritance static pollution. ([e87bbba](https://github.com/milesj/boost/commit/e87bbba)) | ||
**Note:** Version bump only for package @boost/cli | ||
### 2.8.2 - 2020-12-21 | ||
@@ -8,0 +25,0 @@ |
'use strict'; | ||
Object.defineProperty(exports, '__esModule', { value: true }); | ||
Object.defineProperty(exports, '__esModule', { | ||
value: true | ||
}); | ||
var ink = require('ink'); | ||
var internal = require('@boost/internal'); | ||
var terminal = require('@boost/terminal'); | ||
var test = require('@boost/log/test'); | ||
var index = require('./index'); | ||
/* eslint-disable unicorn/import-index, no-param-reassign, jest/prefer-spy-on */ | ||
var terminal = require('@boost/terminal'); | ||
var index_ts = require('./index.js'); | ||
class MockReadStream { | ||
@@ -18,2 +23,3 @@ constructor() { | ||
} | ||
class MockWriteStream { | ||
@@ -45,11 +51,13 @@ constructor(append = false) { | ||
} | ||
function mockStreams() { | ||
function mockStreams(append) { | ||
return { | ||
stderr: new MockWriteStream(), | ||
stderr: new MockWriteStream(append), | ||
stdin: new MockReadStream(), | ||
stdout: new MockWriteStream() | ||
stdout: new MockWriteStream(append) | ||
}; | ||
} | ||
function mockProgram(options, streams) { | ||
return new index.Program({ | ||
return new index_ts.Program({ | ||
bin: 'test', | ||
@@ -61,2 +69,3 @@ name: 'Test', | ||
} | ||
async function renderComponent(element, stripped = false) { | ||
@@ -72,7 +81,7 @@ const stdout = new MockWriteStream(); | ||
} | ||
async function runCommand(command, params, options) { | ||
if (options) { | ||
Object.assign(command, options); // @ts-expect-error | ||
command[index.INTERNAL_OPTIONS] = { | ||
Object.assign(command, options); | ||
command[index_ts.INTERNAL_OPTIONS] = { | ||
help: false, | ||
@@ -87,3 +96,3 @@ locale: 'en', | ||
command.log = test.mockLogger(); | ||
command[index.INTERNAL_PARAMS] = params; | ||
command[index_ts.INTERNAL_PARAMS] = params; | ||
const result = await command.run(...params); | ||
@@ -97,2 +106,3 @@ | ||
} | ||
function runTask(task, args, context) { | ||
@@ -118,9 +128,12 @@ const notTestable = name => () => { | ||
} | ||
async function runProgram(program, argv) { | ||
async function runProgram(program, argv, { | ||
append | ||
} = {}) { | ||
if (!(program.streams.stderr instanceof MockWriteStream)) { | ||
program.streams.stderr = new MockWriteStream(); | ||
program.streams.stderr = new MockWriteStream(append); | ||
} | ||
if (!(program.streams.stdout instanceof MockWriteStream)) { | ||
program.streams.stdout = new MockWriteStream(); | ||
program.streams.stdout = new MockWriteStream(append); | ||
} | ||
@@ -130,7 +143,4 @@ | ||
program.streams.stdin = new MockReadStream(); | ||
} // Ink async rendering never resolves while testing, | ||
// as it relies on system signals to "exit". | ||
// So we set this to flag the renderer to avoid awaiting. | ||
} | ||
internal.env('CLI_TEST_ONLY', 'true'); | ||
@@ -137,0 +147,0 @@ const code = await program.run(argv); |
{ | ||
"name": "@boost/cli", | ||
"version": "2.8.2", | ||
"version": "2.9.0", | ||
"release": "1594765247526", | ||
@@ -18,7 +18,13 @@ "description": "An interactive command line program builder, powered by React and Ink.", | ||
"main": "./lib/index.js", | ||
"types": "./lib/index.d.ts", | ||
"types": "./dts/index.d.ts", | ||
"engines": { | ||
"node": ">=10.17.0" | ||
"node": ">=10.3.0", | ||
"npm": ">=6.1.0" | ||
}, | ||
"repository": "https://github.com/milesj/boost/tree/master/packages/cli", | ||
"repository": { | ||
"type": "git", | ||
"url": "git@github.com:milesj/boost.git", | ||
"directory": "packages/cli" | ||
}, | ||
"author": "Miles Johnson", | ||
"license": "MIT", | ||
@@ -29,9 +35,9 @@ "publishConfig": { | ||
"dependencies": { | ||
"@boost/args": "^2.2.3", | ||
"@boost/common": "^2.4.1", | ||
"@boost/event": "^2.2.1", | ||
"@boost/internal": "^2.1.2", | ||
"@boost/log": "^2.1.8", | ||
"@boost/terminal": "^2.1.1", | ||
"@boost/translate": "^2.1.6", | ||
"@boost/args": "^2.3.0", | ||
"@boost/common": "^2.5.0", | ||
"@boost/event": "^2.3.0", | ||
"@boost/internal": "^2.2.0", | ||
"@boost/log": "^2.2.0", | ||
"@boost/terminal": "^2.2.0", | ||
"@boost/translate": "^2.2.0", | ||
"execa": "^5.0.0", | ||
@@ -51,3 +57,10 @@ "levenary": "^1.1.1", | ||
}, | ||
"gitHead": "45655a11181a9b0cef323516256b1be107767edc" | ||
"packemon": { | ||
"inputs": { | ||
"index": "src/index.ts", | ||
"test": "src/test.ts" | ||
}, | ||
"platform": "node" | ||
}, | ||
"gitHead": "e2c452ee0c15aa7db91d1945e23ac6951028e672" | ||
} |
@@ -1,1 +0,1 @@ | ||
export * from './lib/test'; | ||
export * from './dts/test'; |
Sorry, the diff of this file is too big to display
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
No contributors or author data
MaintenancePackage does not specify a list of contributors or an author in package.json.
Found 1 instance in 1 package
No repository
Supply chain riskPackage does not have a linked source code repository. Without this field, a package will have no reference to the location of the source code use to generate the package.
Found 1 instance in 1 package
1
4
172145
3337
Updated@boost/args@^2.3.0
Updated@boost/common@^2.5.0
Updated@boost/event@^2.3.0
Updated@boost/internal@^2.2.0
Updated@boost/log@^2.2.0
Updated@boost/terminal@^2.2.0
Updated@boost/translate@^2.2.0