-
-
Notifications
You must be signed in to change notification settings - Fork 306
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
19 changed files
with
1,395 additions
and
1,284 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,3 +9,4 @@ jobs: | |
range: '< 10' | ||
type: minors | ||
command: npm run tests-only | ||
subpackage: ./lib |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,3 +9,4 @@ jobs: | |
range: '>= 10' | ||
type: minors | ||
command: npm run tests-only | ||
subpackage: ./lib |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,8 @@ | ||
# gitignore | ||
|
||
/node_modules | ||
**/node_modules | ||
!node_modules/tape-lib | ||
|
||
# Only apps should have lockfiles | ||
yarn.lock | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
'use strict'; | ||
|
||
module.exports = require('tape-lib'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
package-lock=false | ||
allow-same-version=true | ||
message=v%s |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,52 +1,3 @@ | ||
'use strict'; | ||
|
||
var through = require('@ljharb/through'); | ||
var fs = require('fs'); | ||
|
||
module.exports = function () { | ||
var line = ''; | ||
var stream = through(write, flush); | ||
return stream; | ||
|
||
function write(buf) { | ||
if ( | ||
buf == null // eslint-disable-line eqeqeq | ||
|| (Object(buf) !== buf && typeof buf !== 'string') | ||
) { | ||
flush(); | ||
return; | ||
} | ||
for (var i = 0; i < buf.length; i++) { | ||
var c = typeof buf === 'string' | ||
? buf.charAt(i) | ||
: String.fromCharCode(buf[i]); | ||
if (c === '\n') { | ||
flush(); | ||
} else { | ||
line += c; | ||
} | ||
} | ||
} | ||
|
||
function flush() { | ||
if (fs.writeSync && (/^win/).test(process.platform)) { | ||
try { | ||
fs.writeSync(1, line + '\n'); | ||
} catch (e) { | ||
stream.emit('error', e); | ||
} | ||
} else { | ||
try { | ||
if (typeof console !== 'undefined' && console.log) { // eslint-disable-line no-console | ||
console.log(line); // eslint-disable-line no-console | ||
} else if (typeof document !== 'undefined') { | ||
// for IE < 9 | ||
document.body.innerHTML += line + '<br />'; | ||
} | ||
} catch (e) { | ||
stream.emit('error', e); | ||
} | ||
} | ||
line = ''; | ||
} | ||
}; | ||
module.exports = require('tape-lib/default_stream'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,71 @@ | ||
{ | ||
"name": "tape-lib", | ||
"version": "0.0.0", | ||
"description": "TAP-producing test harness library for node and browsers", | ||
"main": "index.js", | ||
"browser": { | ||
"fs": false | ||
}, | ||
"exports": { | ||
".": "./index.js", | ||
"./default_stream": "./default_stream.js", | ||
"./results": "./results.js", | ||
"./test": "./test.js", | ||
"./package.json": "./package.json" | ||
}, | ||
"scripts": { | ||
"prepack": "npmignore --auto --commentLines=autogenerated --gitignore=../.gitignore", | ||
"version": "auto-changelog && git add CHANGELOG.md", | ||
"postversion": "auto-changelog && git add CHANGELOG.md && git commit --no-edit --amend && git tag -f \"v$(node -e \"console.log(require('./package.json').version)\")\"", | ||
"prepublishOnly": "safe-publish-latest", | ||
"prepublish": "not-in-publish || npm run prepublishOnly", | ||
"tests-only": "cd ../ && npm run tests-only", | ||
"test": "cd ../ && npm test" | ||
}, | ||
"repository": { | ||
"type": "git", | ||
"url": "git+https://github.com/ljharb/tape.git", | ||
"directory": "lib" | ||
}, | ||
"author": "Jordan Harband <[email protected]>", | ||
"license": "MIT", | ||
"bugs": { | ||
"url": "https://github.com/ljharb/tape/issues" | ||
}, | ||
"homepage": "https://github.com/ljharb/tape/#readme", | ||
"keywords": [ | ||
"tap", | ||
"test", | ||
"harness", | ||
"assert", | ||
"browser" | ||
], | ||
"dependencies": { | ||
"@ljharb/resumer": "^0.0.1", | ||
"@ljharb/through": "^2.3.11", | ||
"array.prototype.every": "^1.1.5", | ||
"call-bind": "^1.0.5", | ||
"deep-equal": "^2.2.3", | ||
"defined": "^1.0.1", | ||
"for-each": "^0.3.3", | ||
"hasown": "^2.0.0", | ||
"inherits": "^2.0.4", | ||
"is-regex": "^1.1.4", | ||
"mock-property": "^1.0.3", | ||
"object-inspect": "^1.13.1", | ||
"object-is": "^1.1.5", | ||
"object-keys": "^1.1.1", | ||
"string.prototype.trim": "^1.2.8" | ||
}, | ||
"engines": { | ||
"node": ">= 0.4" | ||
}, | ||
"publishConfig": { | ||
"ignore": [] | ||
}, | ||
"devDependencies": { | ||
"in-publish": "^2.0.1", | ||
"npmignore": "^0.3.0", | ||
"safe-publish-latest": "^2.0.0" | ||
} | ||
} |
Oops, something went wrong.