From e43f188a5465df7e7860585dc1897aa679e76382 Mon Sep 17 00:00:00 2001 From: Victorien ELVINGER Date: Sun, 16 Feb 2020 12:39:51 +0000 Subject: [PATCH 1/3] Remove is-plain-object dependency Co-authored-by: Mark Wubben --- index.js | 5 ++++- package.json | 3 +-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/index.js b/index.js index 5d0cd1e..c054114 100644 --- a/index.js +++ b/index.js @@ -2,10 +2,13 @@ const path = require('path'); const escapeStringRegexp = require('escape-string-regexp'); -const isPlainObject = require('is-plain-object'); const pkg = require('./package.json'); +function isPlainObject(x) { + return x !== null && typeof x === 'object' && Reflect.getPrototypeOf(x) === Object.prototype; +} + function isValidExtensions(extensions) { return Array.isArray(extensions) && extensions.length > 0 && diff --git a/package.json b/package.json index 07b87ca..b9631d9 100644 --- a/package.json +++ b/package.json @@ -19,8 +19,7 @@ "test": "xo && nyc ava" }, "dependencies": { - "escape-string-regexp": "^2.0.0", - "is-plain-object": "^3.0.0" + "escape-string-regexp": "^2.0.0" }, "devDependencies": { "ava": "^3.0.0", From 2093768617d76cdbe4f2a81041839c1edf0bd278 Mon Sep 17 00:00:00 2001 From: Mark Wubben Date: Sun, 16 Feb 2020 13:43:15 +0100 Subject: [PATCH 2/3] Clarify which build files are ignored by AVA Fixes #14. --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index 4b3da26..c403a50 100644 --- a/README.md +++ b/README.md @@ -34,6 +34,8 @@ Both keys and values of the `rewritePaths` object must end with a `/`. Paths are Output files are expected to have the `.js` extension. +AVA searches your entire project for `*.js`, `*.cjs`, `*.mjs` and `*.ts` files (or other extensions you've configured). It will ignore such files found in the `rewritePaths` targets (e.g. `build/`). If you use more specific paths, for instance `build/main/`, you may need to change AVA's `files` configuration to ignore other directories. + ## Add additional extensions You can configure AVA to recognize additional file extensions. To add (partial†) JSX support: From f622e6b4d4a75f5a636f34582cdc6732cc52aab9 Mon Sep 17 00:00:00 2001 From: Mark Wubben Date: Sun, 16 Feb 2020 13:45:01 +0100 Subject: [PATCH 3/3] 1.1.1 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index b9631d9..7e1ac53 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@ava/typescript", - "version": "1.1.0", + "version": "1.1.1", "description": "TypeScript provider for AVA", "engines": { "node": ">=10.18.0 <11 || >=12.14.0 <13 || >=13.5.0"