@tapjs/reporter
Advanced tools
Comparing version 1.0.2 to 1.0.3
import { Text, Transform } from 'ink'; | ||
import React from 'react'; | ||
// kind of a weird way to add a hanging indent for wrapped lines, | ||
// but it seems to work. | ||
// See: https://github.com/vadimdemedes/ink/issues/611 | ||
const sigil = '\x01\x02\x03\x03\x02\x01'; | ||
export const HangingIndent = ({ indent = 4, children, ...props }) => (React.createElement(Transform, { transform: o => o.includes(sigil) | ||
? o.replace(sigil, '') | ||
: ' '.repeat(indent) + o }, | ||
React.createElement(Text, { ...props }, | ||
sigil, | ||
children))); | ||
export const HangingIndent = ({ indent = 4, children, ...props }) => (React.createElement(Transform, { transform: (o, i) => (i === 0 ? o : ' '.repeat(indent) + o) }, | ||
React.createElement(Text, { ...props }, children))); | ||
//# sourceMappingURL=hanging-indent.js.map |
{ | ||
"name": "@tapjs/reporter", | ||
"version": "1.0.2", | ||
"version": "1.0.3", | ||
"description": "Pretty test output reporters for tap", | ||
@@ -69,13 +69,13 @@ "author": "Isaac Z. Schlueter <i@izs.me> (https://blog.izs.me)", | ||
"peerDependencies": { | ||
"@tapjs/core": "1.0.2" | ||
"@tapjs/core": "1.0.3" | ||
}, | ||
"dependencies": { | ||
"@tapjs/config": "2.0.2", | ||
"@tapjs/test": "1.0.2", | ||
"@tapjs/config": "2.0.3", | ||
"@tapjs/test": "1.0.3", | ||
"chalk": "^5.2.0", | ||
"ink": "^4.3.1", | ||
"ink": "^4.4.1", | ||
"ms": "^2.1.3", | ||
"patch-console": "^2.0.0", | ||
"prismjs": "^1.29.0", | ||
"prismjs-terminal": "^1.2.2", | ||
"prismjs-terminal": "^1.2.3", | ||
"react": "^18.2.0", | ||
@@ -82,0 +82,0 @@ "string-length": "^6.0.0" |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
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
157130
1081
+ Added@tapjs/config@2.0.3(transitive)
+ Added@tapjs/core@1.0.3(transitive)
+ Added@tapjs/test@1.0.3(transitive)
- Removed@tapjs/config@2.0.2(transitive)
- Removed@tapjs/core@1.0.2(transitive)
- Removed@tapjs/test@1.0.2(transitive)
Updated@tapjs/config@2.0.3
Updated@tapjs/test@1.0.3
Updatedink@^4.4.1
Updatedprismjs-terminal@^1.2.3