Socket
Socket
Sign inDemoInstall

ava-ts

Package Overview
Dependencies
447
Maintainers
1
Versions
12
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 0.25.2 to 1.0.0-rc

dist/cli.js

19

cli.js
#!/usr/bin/env node
'use strict';
const debug = require('debug')('ava');
const importLocal = require('import-local');
// Prefer the local installation of AVA
if (importLocal(__filename)) {
debug('Using local install of AVA');
} else {
if (debug.enabled) {
require('@ladjs/time-require'); // eslint-disable-line import/no-unassigned-import
}
try {
require('./lib/cli').run();
} catch (err) {
console.error(`\n ${err.message}`);
process.exit(1);
}
}
require("./dist/cli.js")
{
"name": "ava-ts",
"version": "0.25.2",
"version": "1.0.0-rc",
"description": "Fork of the AVA test runner with native typescript support 🚀",
"author": "Andy Wermke (https://github.com/andywer)",
"license": "MIT",

@@ -9,154 +10,35 @@ "repository": "andywer/ava-ts",

"engines": {
"node": ">=4"
"node": ">= 6"
},
"scripts": {
"lint": "xo && lock-verify",
"test": "npm run lint && node ./cli.js",
"test-win": "tap --no-cov --reporter=classic --timeout=300 --jobs=4 test/*.js test/reporters/*.js",
"visual": "node test/visual/run-visual-tests.js",
"prepublish": "npm run make-ts",
"make-ts": "node types/make.js"
"build": "tsc",
"prepare": "run-p build"
},
"files": [
"lib",
"*.js",
"*.js.flow",
"types/generated.d.ts"
"dist",
"*.js"
],
"peerDependencies": {
"ava": "0.*",
"ts-node": "^3.0.0 || ^4.0.1 || ^5.0.0 || ^6.0.0 || ^7.0.0"
"ava": "1.*",
"ts-node": "^3.0.0 || ^4.0.1 || ^5.0.0 || ^6.0.0 || ^7.0.0 || ^8.0.0"
},
"dependencies": {
"@ava/babel-preset-stage-4": "^1.1.0",
"@ava/babel-preset-transform-test-files": "^3.0.0",
"@ava/write-file-atomic": "^2.2.0",
"@concordance/react": "^1.0.0",
"@ladjs/time-require": "^0.1.4",
"ansi-escapes": "^3.0.0",
"ansi-styles": "^3.1.0",
"arr-flatten": "^1.0.1",
"array-union": "^1.0.1",
"array-uniq": "^1.0.2",
"arrify": "^1.0.0",
"auto-bind": "^1.1.0",
"ava-init": "^0.2.0",
"babel-core": "^6.26.3",
"babel-generator": "^6.26.1",
"babel-plugin-syntax-object-rest-spread": "^6.13.0",
"bluebird": "^3.0.0",
"caching-transform": "^1.0.0",
"chalk": "^2.0.1",
"chokidar": "^2.0.4",
"clean-stack": "^1.1.1",
"clean-yaml-object": "^0.1.0",
"cli-cursor": "^2.1.0",
"cli-spinners": "^1.0.0",
"cli-truncate": "^1.0.0",
"co-with-promise": "^4.6.0",
"code-excerpt": "^2.1.1",
"common-path-prefix": "^1.0.0",
"concordance": "^3.0.0",
"convert-source-map": "^1.5.1",
"core-assert": "^0.2.0",
"currently-unhandled": "^0.4.1",
"debug": "^3.1.0",
"dot-prop": "^4.1.0",
"empower-core": "^0.6.1",
"equal-length": "^1.0.0",
"figures": "^2.0.0",
"find-cache-dir": "^1.0.0",
"fn-name": "^2.0.0",
"get-port": "^3.0.0",
"globby": "^6.0.0",
"has-flag": "^2.0.0",
"hullabaloo-config-manager": "^1.1.1",
"ignore-by-default": "^1.0.0",
"import-local": "^0.1.1",
"indent-string": "^3.0.0",
"is-ci": "^1.0.7",
"is-generator-fn": "^1.0.0",
"is-obj": "^1.0.0",
"is-observable": "^1.0.0",
"is-promise": "^2.1.0",
"last-line-stream": "^1.0.0",
"lodash.clonedeepwith": "^4.5.0",
"lodash.debounce": "^4.0.3",
"lodash.difference": "^4.3.0",
"lodash.flatten": "^4.2.0",
"loud-rejection": "^1.2.0",
"make-dir": "^1.0.0",
"matcher": "^1.0.0",
"md5-hex": "^2.0.0",
"meow": "^3.7.0",
"ms": "^2.0.0",
"multimatch": "^2.1.0",
"observable-to-promise": "^0.5.0",
"option-chain": "^1.0.0",
"package-hash": "^2.0.0",
"pkg-conf": "^2.0.0",
"plur": "^2.0.0",
"pretty-ms": "^3.0.0",
"require-precompiled": "^0.1.0",
"resolve-cwd": "^2.0.0",
"safe-buffer": "^5.1.1",
"semver": "^5.4.1",
"slash": "^1.0.0",
"source-map-support": "^0.5.0",
"stack-utils": "^1.0.1",
"strip-ansi": "^4.0.0",
"strip-bom-buf": "^1.0.0",
"supertap": "^1.0.0",
"supports-color": "^5.0.0",
"trim-off-newlines": "^1.0.1",
"unique-temp-dir": "^1.0.0",
"update-notifier": "^2.3.0"
},
"devDependencies": {
"@std/esm": "^0.19.1",
"ava": "^0.25.0",
"cli-table2": "^0.2.0",
"codecov": "^3.0.4",
"del": "^3.0.0",
"delay": "^2.0.0",
"execa": "^0.8.0",
"flow-bin": "^0.59.0",
"get-stream": "^3.0.0",
"git-branch": "^1.0.0",
"has-ansi": "^3.0.0",
"inquirer": "^4.0.0",
"is-array-sorted": "^1.0.0",
"lock-verify": "^1.1.0",
"lolex": "^2.1.2",
"nyc": "^11.0.3",
"proxyquire": "^1.7.4",
"react": "^16.1.1",
"react-test-renderer": "^16.1.1",
"signal-exit": "^3.0.0",
"sinon": "^4.1.2",
"source-map-fixtures": "^2.1.0",
"tap": "^12.0.1",
"temp-write": "^3.1.0",
"touch": "^3.1.0",
"ts-node": "^3.3.0",
"typescript": "^2.2.2",
"xo": "^0.19.0",
"zen-observable": "^0.6.0"
"@types/execa": "^0.9.0",
"@types/glob": "^7.1.1",
"@types/meow": "^5.0.0",
"@types/node": "^11.9.4",
"@types/pkg-conf": "^2.1.0",
"@types/tmp": "0.0.34",
"ava": "^1.2.1",
"npm-run-all": "^4.1.5",
"typescript": "^3.3.3333"
},
"typings": "types/generated.d.ts",
"xo": {
"ignores": [
"media/**"
],
"rules": {
"no-use-extend-native/no-use-extend-native": "off"
}
},
"nyc": {
"reporter": [
"html",
"lcov",
"text"
]
"dependencies": {
"esm": "^3.2.5",
"execa": "^1.0.0",
"glob": "^7.1.3",
"meow": "^5.0.0",
"pkg-conf": "^2.1.0",
"tmp": "0.0.33"
}
}

@@ -6,3 +6,3 @@ # AVA-TS

Native TypeScript support for sindresorhus' awesome [**AVA**](https://github.com/avajs/ava) test runner out of the box, without a prior build step.
Bringing zero-config TypeScript support to the [**AVA**](https://github.com/avajs/ava) test runner. Configures AVA to use [ts-node](https://github.com/TypeStrong/ts-node) and matches `.ts` test files by default.

@@ -14,3 +14,3 @@ 🚀 Zero-configuration setup<br/>

This is a fork of the official AVA repository with a couple of [minimally invasive changes](https://github.com/andywer/ava-ts/pull/1). Uses `ts-node/register` instead of Babel. Not the cleanest solution, but it works well.
Works with AVA v1.0+. Still on AVA v0.25? Check out [ava-ts v0.25](https://www.npmjs.com/package/ava-ts/v/0.25.2).

@@ -49,30 +49,28 @@

Fork of the AVA test runner with native typescript support 🚀
Fork of the AVA test runner with native typescript support 🚀
Usage
ava-ts [<file|directory|glob> ...]
Usage
ava-ts [<file|directory|glob> ...]
Options
--init Add AVA to your project
--fail-fast Stop after first test failure
--serial, -s Run tests serially
--tap, -t Generate TAP output
--verbose, -v Enable verbose output
--color Force color output
--no-color Disable color output
--match, -m Only run tests with matching title (Can be repeated)
--watch, -w Re-run tests when tests and source files change
--timeout, -T Set global timeout
--concurrency, -c Max number of test files running at the same time (Default: CPU cores)
--update-snapshots, -u Update snapshots
Options
--init Add AVA to your project
--fail-fast Stop after first test failure
--serial, -s Run tests serially
--tap, -t Generate TAP output
--verbose, -v Enable verbose output
--color Force color output
--no-color Disable color output
--match, -m Only run tests with matching title (Can be repeated)
--watch, -w Re-run tests when tests and source files change
--timeout, -T Set global timeout
--concurrency, -c Max number of test files running at the same time (Default: CPU cores)
--update-snapshots, -u Update snapshots
Examples
ava-ts
ava-ts test.ts test2.ts
ava-ts test-*.ts
ava-ts test
ava-ts --init
ava-ts --init foo.ts
Examples
ava-ts
ava-ts test.ts test2.ts
ava-ts test-*.ts
ava-ts test
Default patterns when no arguments:
Default patterns when no arguments:
test.ts test.tsx test-*.ts test-*.tsx test/**/*.ts test/**/*.tsx **/__tests__/**/*.ts **/__tests__/**/*.tsx **/*.test.ts **/*.test.tsx

@@ -89,8 +87,17 @@ ```

## Limitations
## Configuration
There are a few limitations compared to the original `ava` CLI.
The following AVA configuration is transparently set to consume TypeScript files:
* No babel support
* No power assert
```json
{
"compileEnhancements": false,
"extensions": [
"ts", "tsx"
],
"require": [
"ts-node/register"
]
}
```

@@ -97,0 +104,0 @@

SocketSocket SOC 2 Logo

Product

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc