From 5fc9ccd540a092dbf66b795e07d99bb4a43b6493 Mon Sep 17 00:00:00 2001 From: Jordan Date: Sat, 13 Feb 2021 13:42:22 +1100 Subject: [PATCH] Native ES modules (#249) * Refactor for native es module release * Don't test out-of-support NodeJS 13 * Test logging improvements * Expunged fragile mock-fs, and stray dependency glob-escape * Version bumps --- .github/workflows/ci.yml | 86 +-- .gitignore | 1 - .npmignore | 2 + CHANGELOG.md | 10 +- LICENSE | 2 +- README.md | 10 +- docs/api/vinyl-fs-vpath.iconfig.md | 6 +- package-lock.json | 964 +++++------------------------ package.json | 31 +- src/index.ts | 5 - src/main.test.ts | 6 + src/main.ts | 4 +- src/missing-types.d.ts | 6 - src/resolver.test.ts | 95 +-- src/src.test.ts | 137 ++-- src/src.ts | 2 +- tsconfig.json | 7 +- 17 files changed, 372 insertions(+), 1002 deletions(-) delete mode 100644 src/index.ts create mode 100644 src/main.test.ts delete mode 100644 src/missing-types.d.ts diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 01632fa1..bdddf2c0 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -1,61 +1,25 @@ -{ - "name": "Continuous Integration", - "on": { - # Every push - "push": {}, - "schedule": [ - { - # Every Monday and Thursday at 12PM UTC - "cron": "0 12 * * 1,4" - } - ] - }, - "jobs": { - "test": { - "strategy": { - "matrix": { - "os": [ - "ubuntu-latest", - "macos-latest", - "windows-latest" - ], - "node-version": [ - "10.x", - "12.x", - "14.x", - "15.x", - ] - } - }, - "runs-on": "${{ matrix.os }}", - "steps": [ - { - "name": "Checkout", - "uses": "actions/checkout@v1" - }, - { - "name": "Setup node", - "uses": "actions/setup-node@v1", - "with": { - "node-version": "${{ matrix.node-version }}" - } - }, - { - "name": "Install dependencies", - "run": "npm ci" - }, - { - "name": "Run tests", - "run": "./node_modules/.bin/nyc --reporter=lcovonly npm test" - }, - { - "name": "Push coverage to Codecov", - "uses": "codecov/codecov-action@v1", - "with": { - "token": "${{ secrets.CODECOV_UPLOAD_TOKEN }}" - } - } - ] - } - } -} +name: Continuous Integration +on: + # Every push + push: + schedule: + # Every Monday and Thursday at 12PM UTC + - cron: '0 12 * * 1,4' + +jobs: + test: + strategy: + matrix: + platform: [ ubuntu-latest, macos-latest, windows-latest ] + node-version: [ ^12.17.0, ^14.0.0, ^15.0.0 ] + runs-on: ${{ matrix.platform }} + steps: + - uses: actions/checkout@v2 + - uses: actions/setup-node@v1 + with: + node-version: ${{ matrix.node-version }} + - run: npm ci + - run: npm test + - uses: codecov/codecov-action@v1 + with: + token: ${{ secrets.CODECOV_UPLOAD_TOKEN }} diff --git a/.gitignore b/.gitignore index 67c17aab..2c6006c6 100644 --- a/.gitignore +++ b/.gitignore @@ -1,6 +1,5 @@ node_modules/ npm-debug.log dist/ -.nyc_output coverage temp diff --git a/.npmignore b/.npmignore index 3e9b5026..2cd52acb 100644 --- a/.npmignore +++ b/.npmignore @@ -13,3 +13,5 @@ temp/ test-data/ tsconfig.json .github +.dependabot +.vscode diff --git a/CHANGELOG.md b/CHANGELOG.md index 08feea2f..aff0eaa4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,12 +7,16 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0. ## [Unreleased] +### Changed +- Removed `esm` loader in favour of native ESM support. +- Raised minimum NodeJS version from 10 to 12.17.0. + ## [2.0.0] - 2020-10-25 ### Changed -* `since` configuration option. Use [vinyl-filter-since](https://www.npmjs.com/package/vinyl-filter-since) if functionality is needed. This may be restored in a future release. -* `removeBOM` configuration option. Use [gulp-stripbom](https://www.npmjs.com/package/gulp-stripbom) if functionality is needed. This may be restored in a future release. -* `sourcemaps` configuration option. Use [gulp-sourcemaps](https://www.npmjs.com/package/gulp-sourcemaps) if functionality is needed. This may be restored in a future release. +- `since` configuration option. Use [vinyl-filter-since](https://www.npmjs.com/package/vinyl-filter-since) if functionality is needed. This may be restored in a future release. +- `removeBOM` configuration option. Use [gulp-stripbom](https://www.npmjs.com/package/gulp-stripbom) if functionality is needed. This may be restored in a future release. +- `sourcemaps` configuration option. Use [gulp-sourcemaps](https://www.npmjs.com/package/gulp-sourcemaps) if functionality is needed. This may be restored in a future release. ### Fixed * File names containing glob syntax failing to be read correctly due to unescaped glob syntax being processed by `vinyl-fs` internally. [#79](https://github.com/userfrosting/vinyl-fs-vpath/issues/79) diff --git a/LICENSE b/LICENSE index d1669df1..6a684ed7 100644 --- a/LICENSE +++ b/LICENSE @@ -1,6 +1,6 @@ The MIT License (MIT) -Copyright (c) 2019 - 2020 David Jordan Myles Mele +Copyright (c) 2019 - 2021 David Jordan Myles Mele Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/README.md b/README.md index 7598544c..9d14ad32 100644 --- a/README.md +++ b/README.md @@ -14,8 +14,12 @@ npm i -D @userfrosting/vinyl-fs-vpath ## Usage +> **IMPORTANT**
+> This is an ES module package targeting NodeJS `^12.17.0 || >=13.2.0`, refer to the [NodeJS ESM docs](https://nodejs.org/api/esm.html) regarding how to correctly import. +> ESM loaders like `@babel/loader` or `esm` likely won't work as expected. + ```js -// gulpfile.esm.js +// gulpfile.mjs import { src } from "@userfrosting/vinyl-fs-vpath"; import { dest } from "gulp"; import terser from "gulp-terser"; @@ -59,9 +63,9 @@ $ gulp bundle ## Why no `dest`? -This package was originally created to address a pain point that adding support for `dest` would inherit, backpressure and memory pressure. Backpressure occurs in a stream when a single part of the pipeline collects chunks but emits little to nothing for later pipeline parts, thus reducing effiency overall. The override logic with virtual paths needs to hold onto most of the files to decide what files should be discarded, which means memory requirements will steadily increase proportionally with the number of files in the pipeline. Some optimisations can be made, however they have little impact in most cases. +Applying virtual path logic requires knowledge, without it there is no way to perform the operation in a deterministic manner. `src` does this by finding all the files and then performing the virtual path logic against the complete set, such an approach however does map translate to `dest` well. Memory pressure is a significant concern (that has no easy workaround) and perhaps more importantly it hurts the efficiency of the overall pipeline by introducing backpressure (tasks later in the pipeline remain idle, reducing opportunity for asynchronous operations to be run). -Much of the source does already exist in `@userfrosting/gulp-bundle-assets@^3`, so its introduction wouldn't be tremendously difficult. If it is something you might find useful just ask. +I can see a need for mid-stream or end-of-stream virtual path operations in more specialised scenarios, so if its needed file an issue. Much of the logic already exists in `@userfrosting/gulp-bundle-assets@^3`, so it would not be a significant undertaking. The scope would most likely be limited to mid-stream operations to avoid duplicating the functionality of `gulp.dest` which can just be chained immediately after. ## API diff --git a/docs/api/vinyl-fs-vpath.iconfig.md b/docs/api/vinyl-fs-vpath.iconfig.md index 01bf7593..788bfc86 100644 --- a/docs/api/vinyl-fs-vpath.iconfig.md +++ b/docs/api/vinyl-fs-vpath.iconfig.md @@ -15,9 +15,9 @@ export interface IConfig | Property | Type | Description | | --- | --- | --- | -| [base](./vinyl-fs-vpath.iconfig.base.md) | string | Specifies the folder relative to the cwd This is used to determine the file names when saving in .dest() Default: cwd | -| [cwd](./vinyl-fs-vpath.iconfig.cwd.md) | string | Current working directory. Default: process.cwd() | +| [base?](./vinyl-fs-vpath.iconfig.base.md) | string | (Optional) Specifies the folder relative to the cwd This is used to determine the file names when saving in .dest() Default: cwd | +| [cwd?](./vinyl-fs-vpath.iconfig.cwd.md) | string | (Optional) Current working directory. Default: process.cwd() | | [globs](./vinyl-fs-vpath.iconfig.globs.md) | string \| string\[\] | Input file matchers. | -| [logger](./vinyl-fs-vpath.iconfig.logger.md) | Logger | Optional logger. Use this to debug issues and trace behaviours. Adheres to interface defined in ts-log package. | +| [logger?](./vinyl-fs-vpath.iconfig.logger.md) | Logger | (Optional) Optional logger. Use this to debug issues and trace behaviours. Adheres to interface defined in ts-log package. | | [pathMappings](./vinyl-fs-vpath.iconfig.pathmappings.md) | [IPathMapper](./vinyl-fs-vpath.ipathmapper.md)\[\] | Virtual path mappings. Collision resolution uses the last mapping to select the file. Internally mapping occurs on absolute path strings, conversion and normalisation is performed automatically. Resolution is \*not\* recursive. | diff --git a/package-lock.json b/package-lock.json index 2d018643..cbca0729 100644 --- a/package-lock.json +++ b/package-lock.json @@ -13,200 +13,12 @@ "@babel/highlight": "^7.10.4" } }, - "@babel/core": { - "version": "7.10.2", - "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.10.2.tgz", - "integrity": "sha512-KQmV9yguEjQsXqyOUGKjS4+3K8/DlOCE2pZcq4augdQmtTy5iv5EHtmMSJ7V4c1BIPjuwtZYqYLCq9Ga+hGBRQ==", - "dev": true, - "requires": { - "@babel/code-frame": "^7.10.1", - "@babel/generator": "^7.10.2", - "@babel/helper-module-transforms": "^7.10.1", - "@babel/helpers": "^7.10.1", - "@babel/parser": "^7.10.2", - "@babel/template": "^7.10.1", - "@babel/traverse": "^7.10.1", - "@babel/types": "^7.10.2", - "convert-source-map": "^1.7.0", - "debug": "^4.1.0", - "gensync": "^1.0.0-beta.1", - "json5": "^2.1.2", - "lodash": "^4.17.13", - "resolve": "^1.3.2", - "semver": "^5.4.1", - "source-map": "^0.5.0" - }, - "dependencies": { - "@babel/code-frame": { - "version": "7.10.1", - "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.10.1.tgz", - "integrity": "sha512-IGhtTmpjGbYzcEDOw7DcQtbQSXcG9ftmAXtWTu9V936vDye4xjjekktFAtgZsWpzTj/X01jocB46mTywm/4SZw==", - "dev": true, - "requires": { - "@babel/highlight": "^7.10.1" - } - }, - "@babel/helper-validator-identifier": { - "version": "7.10.1", - "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.10.1.tgz", - "integrity": "sha512-5vW/JXLALhczRCWP0PnFDMCJAchlBvM7f4uk/jXritBnIa6E1KmqmtrS3yn1LAnxFBypQ3eneLuXjsnfQsgILw==", - "dev": true - }, - "@babel/highlight": { - "version": "7.10.1", - "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.10.1.tgz", - "integrity": "sha512-8rMof+gVP8mxYZApLF/JgNDAkdKa+aJt3ZYxF8z6+j/hpeXL7iMsKCPHa2jNMHu/qqBwzQF4OHNoYi8dMA/rYg==", - "dev": true, - "requires": { - "@babel/helper-validator-identifier": "^7.10.1", - "chalk": "^2.0.0", - "js-tokens": "^4.0.0" - } - }, - "semver": { - "version": "5.7.1", - "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", - "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==", - "dev": true - }, - "source-map": { - "version": "0.5.7", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz", - "integrity": "sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=", - "dev": true - } - } - }, - "@babel/generator": { - "version": "7.10.2", - "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.10.2.tgz", - "integrity": "sha512-AxfBNHNu99DTMvlUPlt1h2+Hn7knPpH5ayJ8OqDWSeLld+Fi2AYBTC/IejWDM9Edcii4UzZRCsbUt0WlSDsDsA==", - "dev": true, - "requires": { - "@babel/types": "^7.10.2", - "jsesc": "^2.5.1", - "lodash": "^4.17.13", - "source-map": "^0.5.0" - }, - "dependencies": { - "source-map": { - "version": "0.5.7", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz", - "integrity": "sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=", - "dev": true - } - } - }, - "@babel/helper-function-name": { - "version": "7.10.1", - "resolved": "https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.10.1.tgz", - "integrity": "sha512-fcpumwhs3YyZ/ttd5Rz0xn0TpIwVkN7X0V38B9TWNfVF42KEkhkAAuPCQ3oXmtTRtiPJrmZ0TrfS0GKF0eMaRQ==", - "dev": true, - "requires": { - "@babel/helper-get-function-arity": "^7.10.1", - "@babel/template": "^7.10.1", - "@babel/types": "^7.10.1" - } - }, - "@babel/helper-get-function-arity": { - "version": "7.10.1", - "resolved": "https://registry.npmjs.org/@babel/helper-get-function-arity/-/helper-get-function-arity-7.10.1.tgz", - "integrity": "sha512-F5qdXkYGOQUb0hpRaPoetF9AnsXknKjWMZ+wmsIRsp5ge5sFh4c3h1eH2pRTTuy9KKAA2+TTYomGXAtEL2fQEw==", - "dev": true, - "requires": { - "@babel/types": "^7.10.1" - } - }, - "@babel/helper-member-expression-to-functions": { - "version": "7.10.1", - "resolved": "https://registry.npmjs.org/@babel/helper-member-expression-to-functions/-/helper-member-expression-to-functions-7.10.1.tgz", - "integrity": "sha512-u7XLXeM2n50gb6PWJ9hoO5oO7JFPaZtrh35t8RqKLT1jFKj9IWeD1zrcrYp1q1qiZTdEarfDWfTIP8nGsu0h5g==", - "dev": true, - "requires": { - "@babel/types": "^7.10.1" - } - }, - "@babel/helper-module-imports": { - "version": "7.10.1", - "resolved": "https://registry.npmjs.org/@babel/helper-module-imports/-/helper-module-imports-7.10.1.tgz", - "integrity": "sha512-SFxgwYmZ3HZPyZwJRiVNLRHWuW2OgE5k2nrVs6D9Iv4PPnXVffuEHy83Sfx/l4SqF+5kyJXjAyUmrG7tNm+qVg==", - "dev": true, - "requires": { - "@babel/types": "^7.10.1" - } - }, - "@babel/helper-module-transforms": { - "version": "7.10.1", - "resolved": "https://registry.npmjs.org/@babel/helper-module-transforms/-/helper-module-transforms-7.10.1.tgz", - "integrity": "sha512-RLHRCAzyJe7Q7sF4oy2cB+kRnU4wDZY/H2xJFGof+M+SJEGhZsb+GFj5j1AD8NiSaVBJ+Pf0/WObiXu/zxWpFg==", - "dev": true, - "requires": { - "@babel/helper-module-imports": "^7.10.1", - "@babel/helper-replace-supers": "^7.10.1", - "@babel/helper-simple-access": "^7.10.1", - "@babel/helper-split-export-declaration": "^7.10.1", - "@babel/template": "^7.10.1", - "@babel/types": "^7.10.1", - "lodash": "^4.17.13" - } - }, - "@babel/helper-optimise-call-expression": { - "version": "7.10.1", - "resolved": "https://registry.npmjs.org/@babel/helper-optimise-call-expression/-/helper-optimise-call-expression-7.10.1.tgz", - "integrity": "sha512-a0DjNS1prnBsoKx83dP2falChcs7p3i8VMzdrSbfLhuQra/2ENC4sbri34dz/rWmDADsmF1q5GbfaXydh0Jbjg==", - "dev": true, - "requires": { - "@babel/types": "^7.10.1" - } - }, - "@babel/helper-replace-supers": { - "version": "7.10.1", - "resolved": "https://registry.npmjs.org/@babel/helper-replace-supers/-/helper-replace-supers-7.10.1.tgz", - "integrity": "sha512-SOwJzEfpuQwInzzQJGjGaiG578UYmyi2Xw668klPWV5n07B73S0a9btjLk/52Mlcxa+5AdIYqws1KyXRfMoB7A==", - "dev": true, - "requires": { - "@babel/helper-member-expression-to-functions": "^7.10.1", - "@babel/helper-optimise-call-expression": "^7.10.1", - "@babel/traverse": "^7.10.1", - "@babel/types": "^7.10.1" - } - }, - "@babel/helper-simple-access": { - "version": "7.10.1", - "resolved": "https://registry.npmjs.org/@babel/helper-simple-access/-/helper-simple-access-7.10.1.tgz", - "integrity": "sha512-VSWpWzRzn9VtgMJBIWTZ+GP107kZdQ4YplJlCmIrjoLVSi/0upixezHCDG8kpPVTBJpKfxTH01wDhh+jS2zKbw==", - "dev": true, - "requires": { - "@babel/template": "^7.10.1", - "@babel/types": "^7.10.1" - } - }, - "@babel/helper-split-export-declaration": { - "version": "7.10.1", - "resolved": "https://registry.npmjs.org/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.10.1.tgz", - "integrity": "sha512-UQ1LVBPrYdbchNhLwj6fetj46BcFwfS4NllJo/1aJsT+1dLTEnXJL0qHqtY7gPzF8S2fXBJamf1biAXV3X077g==", - "dev": true, - "requires": { - "@babel/types": "^7.10.1" - } - }, "@babel/helper-validator-identifier": { "version": "7.12.11", "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.12.11.tgz", "integrity": "sha512-np/lG3uARFybkoHokJUmf1QfEvRVCPbmQeUQpKow5cQ3xWrV9i3rUHodKDJPQfTVX61qKi+UdYk8kik84n7XOw==", "dev": true }, - "@babel/helpers": { - "version": "7.10.1", - "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.10.1.tgz", - "integrity": "sha512-muQNHF+IdU6wGgkaJyhhEmI54MOZBKsFfsXFhboz1ybwJ1Kl7IHlbm2a++4jwrmY5UYsgitt5lfqo1wMFcHmyw==", - "dev": true, - "requires": { - "@babel/template": "^7.10.1", - "@babel/traverse": "^7.10.1", - "@babel/types": "^7.10.1" - } - }, "@babel/highlight": { "version": "7.10.4", "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.10.4.tgz", @@ -218,115 +30,12 @@ "js-tokens": "^4.0.0" } }, - "@babel/parser": { - "version": "7.10.2", - "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.10.2.tgz", - "integrity": "sha512-PApSXlNMJyB4JiGVhCOlzKIif+TKFTvu0aQAhnTvfP/z3vVSN6ZypH5bfUNwFXXjRQtUEBNFd2PtmCmG2Py3qQ==", + "@bcoe/v8-coverage": { + "version": "0.2.3", + "resolved": "https://registry.npmjs.org/@bcoe/v8-coverage/-/v8-coverage-0.2.3.tgz", + "integrity": "sha512-0hYQ8SB4Db5zvZB4axdMHGwEaQjkZzFjQiN9LVYvIFB2nSUHW9tYpxWriPrWDASIxiaXax83REcLxuSdnGPZtw==", "dev": true }, - "@babel/template": { - "version": "7.10.1", - "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.10.1.tgz", - "integrity": "sha512-OQDg6SqvFSsc9A0ej6SKINWrpJiNonRIniYondK2ViKhB06i3c0s+76XUft71iqBEe9S1OKsHwPAjfHnuvnCig==", - "dev": true, - "requires": { - "@babel/code-frame": "^7.10.1", - "@babel/parser": "^7.10.1", - "@babel/types": "^7.10.1" - }, - "dependencies": { - "@babel/code-frame": { - "version": "7.10.1", - "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.10.1.tgz", - "integrity": "sha512-IGhtTmpjGbYzcEDOw7DcQtbQSXcG9ftmAXtWTu9V936vDye4xjjekktFAtgZsWpzTj/X01jocB46mTywm/4SZw==", - "dev": true, - "requires": { - "@babel/highlight": "^7.10.1" - } - }, - "@babel/helper-validator-identifier": { - "version": "7.10.1", - "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.10.1.tgz", - "integrity": "sha512-5vW/JXLALhczRCWP0PnFDMCJAchlBvM7f4uk/jXritBnIa6E1KmqmtrS3yn1LAnxFBypQ3eneLuXjsnfQsgILw==", - "dev": true - }, - "@babel/highlight": { - "version": "7.10.1", - "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.10.1.tgz", - "integrity": "sha512-8rMof+gVP8mxYZApLF/JgNDAkdKa+aJt3ZYxF8z6+j/hpeXL7iMsKCPHa2jNMHu/qqBwzQF4OHNoYi8dMA/rYg==", - "dev": true, - "requires": { - "@babel/helper-validator-identifier": "^7.10.1", - "chalk": "^2.0.0", - "js-tokens": "^4.0.0" - } - } - } - }, - "@babel/traverse": { - "version": "7.10.1", - "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.10.1.tgz", - "integrity": "sha512-C/cTuXeKt85K+p08jN6vMDz8vSV0vZcI0wmQ36o6mjbuo++kPMdpOYw23W2XH04dbRt9/nMEfA4W3eR21CD+TQ==", - "dev": true, - "requires": { - "@babel/code-frame": "^7.10.1", - "@babel/generator": "^7.10.1", - "@babel/helper-function-name": "^7.10.1", - "@babel/helper-split-export-declaration": "^7.10.1", - "@babel/parser": "^7.10.1", - "@babel/types": "^7.10.1", - "debug": "^4.1.0", - "globals": "^11.1.0", - "lodash": "^4.17.13" - }, - "dependencies": { - "@babel/code-frame": { - "version": "7.10.1", - "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.10.1.tgz", - "integrity": "sha512-IGhtTmpjGbYzcEDOw7DcQtbQSXcG9ftmAXtWTu9V936vDye4xjjekktFAtgZsWpzTj/X01jocB46mTywm/4SZw==", - "dev": true, - "requires": { - "@babel/highlight": "^7.10.1" - } - }, - "@babel/helper-validator-identifier": { - "version": "7.10.1", - "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.10.1.tgz", - "integrity": "sha512-5vW/JXLALhczRCWP0PnFDMCJAchlBvM7f4uk/jXritBnIa6E1KmqmtrS3yn1LAnxFBypQ3eneLuXjsnfQsgILw==", - "dev": true - }, - "@babel/highlight": { - "version": "7.10.1", - "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.10.1.tgz", - "integrity": "sha512-8rMof+gVP8mxYZApLF/JgNDAkdKa+aJt3ZYxF8z6+j/hpeXL7iMsKCPHa2jNMHu/qqBwzQF4OHNoYi8dMA/rYg==", - "dev": true, - "requires": { - "@babel/helper-validator-identifier": "^7.10.1", - "chalk": "^2.0.0", - "js-tokens": "^4.0.0" - } - } - } - }, - "@babel/types": { - "version": "7.10.2", - "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.10.2.tgz", - "integrity": "sha512-AD3AwWBSz0AWF0AkCN9VPiWrvldXq+/e3cHa4J89vo4ymjz1XwrBFFVZmkJTsQIPNk+ZVomPSXUJqq8yyjZsng==", - "dev": true, - "requires": { - "@babel/helper-validator-identifier": "^7.10.1", - "lodash": "^4.17.13", - "to-fast-properties": "^2.0.0" - }, - "dependencies": { - "@babel/helper-validator-identifier": { - "version": "7.10.1", - "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.10.1.tgz", - "integrity": "sha512-5vW/JXLALhczRCWP0PnFDMCJAchlBvM7f4uk/jXritBnIa6E1KmqmtrS3yn1LAnxFBypQ3eneLuXjsnfQsgILw==", - "dev": true - } - } - }, "@concordance/react": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/@concordance/react/-/react-2.0.0.tgz", @@ -344,19 +53,6 @@ } } }, - "@istanbuljs/load-nyc-config": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/@istanbuljs/load-nyc-config/-/load-nyc-config-1.1.0.tgz", - "integrity": "sha512-VjeHSlIzpv/NyD3N0YuHfXOPDIixcA1q2ZV98wsMqcYlPmv2n3Yb2lYP9XMElnaFVXg5A7YLTeLu6V84uQDjmQ==", - "dev": true, - "requires": { - "camelcase": "^5.3.1", - "find-up": "^4.1.0", - "get-package-type": "^0.1.0", - "js-yaml": "^3.13.1", - "resolve-from": "^5.0.0" - } - }, "@istanbuljs/schema": { "version": "0.1.2", "resolved": "https://registry.npmjs.org/@istanbuljs/schema/-/schema-0.1.2.tgz", @@ -632,21 +328,24 @@ "@types/node": "*" } }, + "@types/is-windows": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/@types/is-windows/-/is-windows-1.0.0.tgz", + "integrity": "sha512-tJ1rq04tGKuIJoWIH0Gyuwv4RQ3+tIu7wQrC0MV47raQ44kIzXSSFKfrxFUOWVRvesoF7mrTqigXmqoZJsXwTg==", + "dev": true + }, + "@types/istanbul-lib-coverage": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/@types/istanbul-lib-coverage/-/istanbul-lib-coverage-2.0.3.tgz", + "integrity": "sha512-sz7iLqvVUg1gIedBOvlkxPlc8/uVzyS5OwGz1cKjXzkl3FpL3al0crU8YGU1WoHkxn0Wxbw5tyi6hvzJKNzFsw==", + "dev": true + }, "@types/minimatch": { "version": "3.0.3", "resolved": "https://registry.npmjs.org/@types/minimatch/-/minimatch-3.0.3.tgz", "integrity": "sha512-tHq6qdbT9U1IRSGf14CL0pUlULksvY9OZ+5eEgl1N7t+OA3tGvNpxJCzuKQlsNgCVwbAs670L1vcVQi8j9HjnA==", "dev": true }, - "@types/mock-fs": { - "version": "4.13.0", - "resolved": "https://registry.npmjs.org/@types/mock-fs/-/mock-fs-4.13.0.tgz", - "integrity": "sha512-FUqxhURwqFtFBCuUj3uQMp7rPSQs//b3O9XecAVxhqS9y4/W8SIJEZFq2mmpnFVZBXwR/2OyPLE97CpyYiB8Mw==", - "dev": true, - "requires": { - "@types/node": "*" - } - }, "@types/node": { "version": "14.14.27", "resolved": "https://registry.npmjs.org/@types/node/-/node-14.14.27.tgz", @@ -690,6 +389,15 @@ "@types/vinyl": "*" } }, + "@userfrosting/ts-log-adapter-ava": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/@userfrosting/ts-log-adapter-ava/-/ts-log-adapter-ava-0.1.1.tgz", + "integrity": "sha512-wUit5cDhq8mUMG9BZLJsWte9K7Ra+Jagug5GG14e6OIdIYHgF4ZRih+7lpj/hprrktA8KbRSe1CtstuJ8erTdA==", + "dev": true, + "requires": { + "ts-log": "^2.1.4" + } + }, "acorn": { "version": "8.0.4", "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.0.4.tgz", @@ -826,21 +534,6 @@ "buffer-equal": "^1.0.0" } }, - "append-transform": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/append-transform/-/append-transform-2.0.0.tgz", - "integrity": "sha512-7yeyCEurROLQJFv5Xj4lEGTy0borxepjFv1g22oAdqFu//SrAlDl1O1Nxx15SH1RoliUml6p8dwJW9jvZughhg==", - "dev": true, - "requires": { - "default-require-extensions": "^3.0.0" - } - }, - "archy": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/archy/-/archy-1.0.0.tgz", - "integrity": "sha1-+cjBN1fMHde8N5rHeyxipcKGjEA=", - "dev": true - }, "argparse": { "version": "1.0.10", "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz", @@ -1225,6 +918,109 @@ "integrity": "sha512-MQcXEUbCKtEo7bhqEs6560Hyd4XaovZlO/k9V3hjVUF/zwW7KBVdSK4gIt/bzwS9MbR5qob+F5jusZsb0YQK2A==", "dev": true }, + "c8": { + "version": "7.5.0", + "resolved": "https://registry.npmjs.org/c8/-/c8-7.5.0.tgz", + "integrity": "sha512-GSkLsbvDr+FIwjNSJ8OwzWAyuznEYGTAd1pzb/Kr0FMLuV4vqYJTyjboDTwmlUNAG6jAU3PFWzqIdKrOt1D8tw==", + "dev": true, + "requires": { + "@bcoe/v8-coverage": "^0.2.3", + "@istanbuljs/schema": "^0.1.2", + "find-up": "^5.0.0", + "foreground-child": "^2.0.0", + "furi": "^2.0.0", + "istanbul-lib-coverage": "^3.0.0", + "istanbul-lib-report": "^3.0.0", + "istanbul-reports": "^3.0.2", + "rimraf": "^3.0.0", + "test-exclude": "^6.0.0", + "v8-to-istanbul": "^7.1.0", + "yargs": "^16.0.0", + "yargs-parser": "^20.0.0" + }, + "dependencies": { + "cliui": { + "version": "7.0.4", + "resolved": "https://registry.npmjs.org/cliui/-/cliui-7.0.4.tgz", + "integrity": "sha512-OcRE68cOsVMXp1Yvonl/fzkQOyjLSu/8bhPDfQt0e0/Eb283TKP20Fs2MqoPsr9SwA595rRCA+QMzYc9nBP+JQ==", + "dev": true, + "requires": { + "string-width": "^4.2.0", + "strip-ansi": "^6.0.0", + "wrap-ansi": "^7.0.0" + } + }, + "find-up": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-5.0.0.tgz", + "integrity": "sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng==", + "dev": true, + "requires": { + "locate-path": "^6.0.0", + "path-exists": "^4.0.0" + } + }, + "locate-path": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-6.0.0.tgz", + "integrity": "sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw==", + "dev": true, + "requires": { + "p-locate": "^5.0.0" + } + }, + "p-limit": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-3.1.0.tgz", + "integrity": "sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==", + "dev": true, + "requires": { + "yocto-queue": "^0.1.0" + } + }, + "p-locate": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-5.0.0.tgz", + "integrity": "sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw==", + "dev": true, + "requires": { + "p-limit": "^3.0.2" + } + }, + "wrap-ansi": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz", + "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==", + "dev": true, + "requires": { + "ansi-styles": "^4.0.0", + "string-width": "^4.1.0", + "strip-ansi": "^6.0.0" + } + }, + "y18n": { + "version": "5.0.5", + "resolved": "https://registry.npmjs.org/y18n/-/y18n-5.0.5.tgz", + "integrity": "sha512-hsRUr4FFrvhhRH12wOdfs38Gy7k2FFzB9qgN9v3aLykRq0dRcdcpz5C9FxdS2NuhOrI/628b/KSTJ3rwHysYSg==", + "dev": true + }, + "yargs": { + "version": "16.2.0", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-16.2.0.tgz", + "integrity": "sha512-D1mvvtDG0L5ft/jGWkLpG1+m0eQxOfaBvTNELraWj22wSVUMWxZUvYgJYcKh6jGGIkJFhH4IZPQhR4TKpc8mBw==", + "dev": true, + "requires": { + "cliui": "^7.0.2", + "escalade": "^3.1.1", + "get-caller-file": "^2.0.5", + "require-directory": "^2.1.1", + "string-width": "^4.2.0", + "y18n": "^5.0.5", + "yargs-parser": "^20.2.2" + } + } + } + }, "cacheable-request": { "version": "6.1.0", "resolved": "https://registry.npmjs.org/cacheable-request/-/cacheable-request-6.1.0.tgz", @@ -1257,18 +1053,6 @@ } } }, - "caching-transform": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/caching-transform/-/caching-transform-4.0.0.tgz", - "integrity": "sha512-kpqOvwXnjjN44D89K5ccQC+RUrsy7jB/XLlRrx0D7/2HNcTPqzsb6XgYoErwko6QsV184CA2YgS1fxDiiDZMWA==", - "dev": true, - "requires": { - "hasha": "^5.0.0", - "make-dir": "^3.0.0", - "package-hash": "^4.0.0", - "write-file-atomic": "^3.0.0" - } - }, "callsites": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/callsites/-/callsites-3.1.0.tgz", @@ -1401,28 +1185,6 @@ "string-width": "^4.2.0" } }, - "cliui": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/cliui/-/cliui-6.0.0.tgz", - "integrity": "sha512-t6wbgtoCXvAzst7QgXxJYqPt0usEfbgQdftEPbLL/cvv6HPE5VgvqCuAIDR0NgU52ds6rFwqrgakNLrHEjCbrQ==", - "dev": true, - "requires": { - "string-width": "^4.2.0", - "strip-ansi": "^6.0.0", - "wrap-ansi": "^6.2.0" - }, - "dependencies": { - "strip-ansi": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.0.tgz", - "integrity": "sha512-AuvKTrTfQNYNIctbR1K/YGTR1756GycPsg7b9bdV9Duqur4gv6aKqHXah67Z8ImS7WEz5QVcOtlfW2rZEugt6w==", - "dev": true, - "requires": { - "ansi-regex": "^5.0.0" - } - } - } - }, "clone": { "version": "2.1.2", "resolved": "https://registry.npmjs.org/clone/-/clone-2.1.2.tgz", @@ -1500,12 +1262,6 @@ "integrity": "sha512-QE33hToZseCH3jS0qN96O/bSh3kaw/h+Tq7ngyY9eWDUnTlTNUyqfqvCXioLe5Na5jFsL78ra/wuBU4iuEgd4w==", "dev": true }, - "commondir": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/commondir/-/commondir-1.0.1.tgz", - "integrity": "sha1-3dgA2gxmEnOTzKWVDqloo6rxJTs=", - "dev": true - }, "concat-map": { "version": "0.0.1", "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", @@ -1597,21 +1353,6 @@ "time-zone": "^1.0.0" } }, - "debug": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.1.1.tgz", - "integrity": "sha512-pYAIzeRo8J6KPEaJ0VWOh5Pzkbw/RetuzehGM7QRRX5he4fPHx2rdKMB256ehJCkX+XRQm16eZLqLNS8RSZXZw==", - "dev": true, - "requires": { - "ms": "^2.1.1" - } - }, - "decamelize": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/decamelize/-/decamelize-1.2.0.tgz", - "integrity": "sha1-9lNNFRSCabIDUue+4m9QH5oZEpA=", - "dev": true - }, "decompress-response": { "version": "3.3.0", "resolved": "https://registry.npmjs.org/decompress-response/-/decompress-response-3.3.0.tgz", @@ -1627,23 +1368,6 @@ "integrity": "sha512-LOHxIOaPYdHlJRtCQfDIVZtfw/ufM8+rVj649RIHzcm/vGwQRXFt6OPqIFWsm2XEMrNIEtWR64sY1LEKD2vAOA==", "dev": true }, - "default-require-extensions": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/default-require-extensions/-/default-require-extensions-3.0.0.tgz", - "integrity": "sha512-ek6DpXq/SCpvjhpFsLFRVtIxJCRw6fUR42lYMVZuUMK7n8eMz4Uh5clckdBjEpLhn/gEBZo7hDJnJcwdKLKQjg==", - "dev": true, - "requires": { - "strip-bom": "^4.0.0" - }, - "dependencies": { - "strip-bom": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-4.0.0.tgz", - "integrity": "sha512-3xurFv5tEgii33Zi8Jtp55wEIILR9eh34FAW00PZf+JnSsTmV/ioewSgQl97JHvgjoRGwPShsWm+IdrxB35d0w==", - "dev": true - } - } - }, "defaults": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/defaults/-/defaults-1.0.3.tgz", @@ -1693,9 +1417,9 @@ }, "dependencies": { "graceful-fs": { - "version": "4.2.4", - "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.4.tgz", - "integrity": "sha512-WjKPNJF79dtJAVniUlGGWHYGz2jWxT6VhN/4m1NdkbZ2nOsEF+cI1Edgql5zCRhs/VsQYRvrXctxktVXZUkixw==", + "version": "4.2.6", + "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.6.tgz", + "integrity": "sha512-nTnJ528pbqxYanhpDYsi4Rd8MAeaBA67+RZ10CM1m3bTAVFEDcd5AuA4a6W5YkGZ1iNXHzZz8T6TBKLeBuNriQ==", "dev": true } } @@ -1771,12 +1495,6 @@ "is-arrayish": "^0.2.1" } }, - "es6-error": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/es6-error/-/es6-error-4.1.1.tgz", - "integrity": "sha512-Um/+FxMr9CISWh0bi5Zv0iOD+4cFh5qLeks1qhAopKVAJw3drgKbKySikp7wGhDL0HPeaja0P5ULZrxLkniUVg==", - "dev": true - }, "escalade": { "version": "3.1.1", "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.1.1.tgz", @@ -1795,11 +1513,6 @@ "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=", "dev": true }, - "esm": { - "version": "3.2.25", - "resolved": "https://registry.npmjs.org/esm/-/esm-3.2.25.tgz", - "integrity": "sha512-U1suiZ2oDVWv4zPO56S0NcR5QriEahGtdN2OR6FiOG4WJvcjBVFB0qI4+eKoWFH483PKGuLuu6V8Z4T5g63UVA==" - }, "esprima": { "version": "4.0.1", "resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz", @@ -1878,34 +1591,6 @@ "to-regex-range": "^5.0.1" } }, - "find-cache-dir": { - "version": "3.3.1", - "resolved": "https://registry.npmjs.org/find-cache-dir/-/find-cache-dir-3.3.1.tgz", - "integrity": "sha512-t2GDMt3oGC/v+BMwzmllWDuJF/xcDtE5j/fCGbqDD7OLuJkj0cfh1YSA5VKPvwMeLFLNDBkwOKZ2X85jGLVftQ==", - "dev": true, - "requires": { - "commondir": "^1.0.1", - "make-dir": "^3.0.2", - "pkg-dir": "^4.1.0" - }, - "dependencies": { - "make-dir": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-3.1.0.tgz", - "integrity": "sha512-g3FeP20LNwhALb/6Cz6Dd4F2ngze0jz7tbzrD2wAV+o9FeNHe4rL+yK2md0J/fiSf1sa1ADhXqi5+oVwOM/eGw==", - "dev": true, - "requires": { - "semver": "^6.0.0" - } - }, - "semver": { - "version": "6.3.0", - "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", - "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", - "dev": true - } - } - }, "find-up": { "version": "4.1.0", "resolved": "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz", @@ -1944,12 +1629,6 @@ "signal-exit": "^3.0.2" } }, - "fromentries": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/fromentries/-/fromentries-1.2.0.tgz", - "integrity": "sha512-33X7H/wdfO99GdRLLgkjUrD4geAFdq/Uv0kl3HD4da6HDixd2GUg8Mw7dahLCV9r/EARkmtYBB6Tch4EEokFTQ==", - "dev": true - }, "fs-extra": { "version": "7.0.1", "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-7.0.1.tgz", @@ -1990,11 +1669,15 @@ "integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==", "dev": true }, - "gensync": { - "version": "1.0.0-beta.1", - "resolved": "https://registry.npmjs.org/gensync/-/gensync-1.0.0-beta.1.tgz", - "integrity": "sha512-r8EC6NO1sngH/zdD9fiRDLdcgnbayXah+mLgManTaIZJqEC1MZstmnox8KpnI2/fxQwrp5OpCOYWLp4rBl4Jcg==", - "dev": true + "furi": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/furi/-/furi-2.0.0.tgz", + "integrity": "sha512-uKuNsaU0WVaK/vmvj23wW1bicOFfyqSsAIH71bRZx8kA4Xj+YCHin7CJKJJjkIsmxYaPFLk9ljmjEyB7xF7WvQ==", + "dev": true, + "requires": { + "@types/is-windows": "^1.0.0", + "is-windows": "^1.0.2" + } }, "get-caller-file": { "version": "2.0.5", @@ -2002,12 +1685,6 @@ "integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==", "dev": true }, - "get-package-type": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/get-package-type/-/get-package-type-0.1.0.tgz", - "integrity": "sha512-pjzuKtY64GYfWizNAJ0fr9VqttZkNiK2iS430LtIHzjBEr6bX8Am2zm4sW4Ro5wjWW5cAlRL1qAMTcXbjNAO2Q==", - "dev": true - }, "get-stream": { "version": "6.0.0", "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-6.0.0.tgz", @@ -2028,12 +1705,6 @@ "path-is-absolute": "^1.0.0" } }, - "glob-escape": { - "version": "0.0.2", - "resolved": "https://registry.npmjs.org/glob-escape/-/glob-escape-0.0.2.tgz", - "integrity": "sha1-nCf3gh7RwTd1gvPv2VWOP2dWKO0=", - "dev": true - }, "glob-parent": { "version": "5.1.0", "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.0.tgz", @@ -2090,12 +1761,6 @@ "ini": "1.3.7" } }, - "globals": { - "version": "11.12.0", - "resolved": "https://registry.npmjs.org/globals/-/globals-11.12.0.tgz", - "integrity": "sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA==", - "dev": true - }, "globby": { "version": "11.0.2", "resolved": "https://registry.npmjs.org/globby/-/globby-11.0.2.tgz", @@ -2171,16 +1836,6 @@ "integrity": "sha512-UqBRqi4ju7T+TqGNdqAO0PaSVGsDGJUBQvk9eUWNGRY1CFGDzYhLWoM7JQEemnlvVcv/YEmc2wNW8BC24EnUsw==", "dev": true }, - "hasha": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/hasha/-/hasha-5.2.0.tgz", - "integrity": "sha512-2W+jKdQbAdSIrggA8Q35Br8qKadTrqCTC8+XZvBWepKDK6m9XkX6Iz1a2yh2KP01kzAR/dpuMeUnocoLYDcskw==", - "dev": true, - "requires": { - "is-stream": "^2.0.0", - "type-fest": "^0.8.0" - } - }, "hosted-git-info": { "version": "2.8.8", "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-2.8.8.tgz", @@ -2435,12 +2090,6 @@ "is-unc-path": "^1.0.0" } }, - "is-stream": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-2.0.0.tgz", - "integrity": "sha512-XCoy+WlUr7d1+Z8GgSuXmpuUFC9fOhRXglJMx+dwLKTkL44Cjd4W1Z5P+BQZpr+cR93aGP4S/s7Ftw6Nd/kiEw==", - "dev": true - }, "is-typedarray": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/is-typedarray/-/is-typedarray-1.0.0.tgz", @@ -2501,61 +2150,6 @@ "integrity": "sha512-UiUIqxMgRDET6eR+o5HbfRYP1l0hqkWOs7vNxC/mggutCMUIhWMm8gAHb8tHlyfD3/l6rlgNA5cKdDzEAf6hEg==", "dev": true }, - "istanbul-lib-hook": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/istanbul-lib-hook/-/istanbul-lib-hook-3.0.0.tgz", - "integrity": "sha512-Pt/uge1Q9s+5VAZ+pCo16TYMWPBIl+oaNIjgLQxcX0itS6ueeaA+pEfThZpH8WxhFgCiEb8sAJY6MdUKgiIWaQ==", - "dev": true, - "requires": { - "append-transform": "^2.0.0" - } - }, - "istanbul-lib-instrument": { - "version": "4.0.3", - "resolved": "https://registry.npmjs.org/istanbul-lib-instrument/-/istanbul-lib-instrument-4.0.3.tgz", - "integrity": "sha512-BXgQl9kf4WTCPCCpmFGoJkz/+uhvm7h7PFKUYxh7qarQd3ER33vHG//qaE8eN25l07YqZPpHXU9I09l/RD5aGQ==", - "dev": true, - "requires": { - "@babel/core": "^7.7.5", - "@istanbuljs/schema": "^0.1.2", - "istanbul-lib-coverage": "^3.0.0", - "semver": "^6.3.0" - }, - "dependencies": { - "semver": { - "version": "6.3.0", - "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", - "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", - "dev": true - } - } - }, - "istanbul-lib-processinfo": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/istanbul-lib-processinfo/-/istanbul-lib-processinfo-2.0.2.tgz", - "integrity": "sha512-kOwpa7z9hme+IBPZMzQ5vdQj8srYgAtaRqeI48NGmAQ+/5yKiHLV0QbYqQpxsdEF0+w14SoB8YbnHKcXE2KnYw==", - "dev": true, - "requires": { - "archy": "^1.0.0", - "cross-spawn": "^7.0.0", - "istanbul-lib-coverage": "^3.0.0-alpha.1", - "make-dir": "^3.0.0", - "p-map": "^3.0.0", - "rimraf": "^3.0.0", - "uuid": "^3.3.3" - }, - "dependencies": { - "p-map": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/p-map/-/p-map-3.0.0.tgz", - "integrity": "sha512-d3qXVTF/s+W+CdJ5A29wywV2n8CQQYahlgz2bFiA+4eVNJbHJodPZ+/gXwPGh0bOqA+j8S+6+ckmvLGPk1QpxQ==", - "dev": true, - "requires": { - "aggregate-error": "^3.0.0" - } - } - } - }, "istanbul-lib-report": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/istanbul-lib-report/-/istanbul-lib-report-3.0.0.tgz", @@ -2567,17 +2161,6 @@ "supports-color": "^7.1.0" } }, - "istanbul-lib-source-maps": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/istanbul-lib-source-maps/-/istanbul-lib-source-maps-4.0.0.tgz", - "integrity": "sha512-c16LpFRkR8vQXyHZ5nLpY35JZtzj1PQY1iZmesUbf1FZHbIupcWfjgOXBY9YHkLEQ6puz1u4Dgj6qmU/DisrZg==", - "dev": true, - "requires": { - "debug": "^4.1.1", - "istanbul-lib-coverage": "^3.0.0", - "source-map": "^0.6.1" - } - }, "istanbul-reports": { "version": "3.0.2", "resolved": "https://registry.npmjs.org/istanbul-reports/-/istanbul-reports-3.0.2.tgz", @@ -2616,12 +2199,6 @@ "esprima": "^4.0.0" } }, - "jsesc": { - "version": "2.5.2", - "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-2.5.2.tgz", - "integrity": "sha512-OYu7XEzjkCQ3C5Ps3QIZsQfNpqoJyZZA99wd9aWd05NCtC5pWOkShK2mkL6HXQR6/Cy2lbNdPlZBpuQHXE63gA==", - "dev": true - }, "json-buffer": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/json-buffer/-/json-buffer-3.0.0.tgz", @@ -2646,15 +2223,6 @@ "integrity": "sha1-nbe1lJatPzz+8wp1FC0tkwrXJlE=", "dev": true }, - "json5": { - "version": "2.1.3", - "resolved": "https://registry.npmjs.org/json5/-/json5-2.1.3.tgz", - "integrity": "sha512-KXPvOm8K9IJKFM0bmdn8QXh7udDh1g/giieX0NLCaMnb4hEiVFqnop2ImTXCc5e0/oHz3LTqmHGtExn5hfMkOA==", - "dev": true, - "requires": { - "minimist": "^1.2.5" - } - }, "jsonfile": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-4.0.0.tgz", @@ -2742,12 +2310,6 @@ "integrity": "sha512-JNvd8XER9GQX0v2qJgsaN/mzFCNA5BRe/j8JN9d+tWyGLSodKQHKFicdwNYzWwI3wjRnaKPsGj1XkBjx/F96DQ==", "dev": true }, - "lodash.flattendeep": { - "version": "4.4.0", - "resolved": "https://registry.npmjs.org/lodash.flattendeep/-/lodash.flattendeep-4.4.0.tgz", - "integrity": "sha1-+wMJF/hqMTTlvJvsDWngAT3f7bI=", - "dev": true - }, "lodash.get": { "version": "4.4.2", "resolved": "https://registry.npmjs.org/lodash.get/-/lodash.get-4.4.2.tgz", @@ -2898,27 +2460,6 @@ "integrity": "sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw==", "dev": true }, - "mock-fs": { - "version": "4.13.0", - "resolved": "https://registry.npmjs.org/mock-fs/-/mock-fs-4.13.0.tgz", - "integrity": "sha512-DD0vOdofJdoaRNtnWcrXe6RQbpHkPPmtqGq14uRX0F8ZKJ5nv89CVTYl/BZdppDxBDaV0hl75htg3abpEWlPZA==", - "dev": true - }, - "ms": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", - "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", - "dev": true - }, - "node-preload": { - "version": "0.2.1", - "resolved": "https://registry.npmjs.org/node-preload/-/node-preload-0.2.1.tgz", - "integrity": "sha512-RM5oyBy45cLEoHqCeh+MNuFAxO0vTFBLskvQbOKnEE7YTTSN4tbN8QWDIPQ6L+WvKsB/qLEGpYe2ZZ9d4W9OIQ==", - "dev": true, - "requires": { - "process-on-spawn": "^1.0.0" - } - }, "normalize-package-data": { "version": "2.5.0", "resolved": "https://registry.npmjs.org/normalize-package-data/-/normalize-package-data-2.5.0.tgz", @@ -2970,66 +2511,6 @@ "once": "^1.3.2" } }, - "nyc": { - "version": "15.1.0", - "resolved": "https://registry.npmjs.org/nyc/-/nyc-15.1.0.tgz", - "integrity": "sha512-jMW04n9SxKdKi1ZMGhvUTHBN0EICCRkHemEoE5jm6mTYcqcdas0ATzgUgejlQUHMvpnOZqGB5Xxsv9KxJW1j8A==", - "dev": true, - "requires": { - "@istanbuljs/load-nyc-config": "^1.0.0", - "@istanbuljs/schema": "^0.1.2", - "caching-transform": "^4.0.0", - "convert-source-map": "^1.7.0", - "decamelize": "^1.2.0", - "find-cache-dir": "^3.2.0", - "find-up": "^4.1.0", - "foreground-child": "^2.0.0", - "get-package-type": "^0.1.0", - "glob": "^7.1.6", - "istanbul-lib-coverage": "^3.0.0", - "istanbul-lib-hook": "^3.0.0", - "istanbul-lib-instrument": "^4.0.0", - "istanbul-lib-processinfo": "^2.0.2", - "istanbul-lib-report": "^3.0.0", - "istanbul-lib-source-maps": "^4.0.0", - "istanbul-reports": "^3.0.2", - "make-dir": "^3.0.0", - "node-preload": "^0.2.1", - "p-map": "^3.0.0", - "process-on-spawn": "^1.0.0", - "resolve-from": "^5.0.0", - "rimraf": "^3.0.0", - "signal-exit": "^3.0.2", - "spawn-wrap": "^2.0.0", - "test-exclude": "^6.0.0", - "yargs": "^15.0.2" - }, - "dependencies": { - "glob": { - "version": "7.1.6", - "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.6.tgz", - "integrity": "sha512-LwaxwyZ72Lk7vZINtNNrywX0ZuLyStrdDtabefZKAY5ZGJhVtgdznluResxNmPitE0SAO+O26sWTHeKSI2wMBA==", - "dev": true, - "requires": { - "fs.realpath": "^1.0.0", - "inflight": "^1.0.4", - "inherits": "2", - "minimatch": "^3.0.4", - "once": "^1.3.0", - "path-is-absolute": "^1.0.0" - } - }, - "p-map": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/p-map/-/p-map-3.0.0.tgz", - "integrity": "sha512-d3qXVTF/s+W+CdJ5A29wywV2n8CQQYahlgz2bFiA+4eVNJbHJodPZ+/gXwPGh0bOqA+j8S+6+ckmvLGPk1QpxQ==", - "dev": true, - "requires": { - "aggregate-error": "^3.0.0" - } - } - } - }, "object-keys": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/object-keys/-/object-keys-1.1.1.tgz", @@ -3172,18 +2653,6 @@ "integrity": "sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==", "dev": true }, - "package-hash": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/package-hash/-/package-hash-4.0.0.tgz", - "integrity": "sha512-whdkPIooSu/bASggZ96BWVvZTRMOFxnyUG5PnTSGKoJE2gd5mbVNmR2Nj20QFzxYYgAXpoqC+AiXzl+UMRh7zQ==", - "dev": true, - "requires": { - "graceful-fs": "^4.1.15", - "hasha": "^5.0.0", - "lodash.flattendeep": "^4.4.0", - "release-zalgo": "^1.0.0" - } - }, "package-json": { "version": "6.5.0", "resolved": "https://registry.npmjs.org/package-json/-/package-json-6.5.0.tgz", @@ -3361,15 +2830,6 @@ "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.0.tgz", "integrity": "sha512-MtEC1TqN0EU5nephaJ4rAtThHtC86dNN9qCuEhtshvpVBkAW5ZO7BASN9REnF9eoXGcRub+pFuKEpOHE+HbEMw==" }, - "process-on-spawn": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/process-on-spawn/-/process-on-spawn-1.0.0.tgz", - "integrity": "sha512-1WsPDsUSMmZH5LeMLegqkPDrsGgsWwk1Exipy2hvB0o/F0ASzbpIctSCcZIK1ykJvtTJULEH+20WOFjMvGnCTg==", - "dev": true, - "requires": { - "fromentries": "^1.2.0" - } - }, "pump": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/pump/-/pump-3.0.0.tgz", @@ -3505,15 +2965,6 @@ "rc": "^1.2.8" } }, - "release-zalgo": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/release-zalgo/-/release-zalgo-1.0.0.tgz", - "integrity": "sha1-CXALflB0Mpc5Mw5TXFqQ+2eFFzA=", - "dev": true, - "requires": { - "es6-error": "^4.0.1" - } - }, "remove-bom-buffer": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/remove-bom-buffer/-/remove-bom-buffer-3.0.0.tgz", @@ -3551,21 +3002,6 @@ "integrity": "sha1-jGStX9MNqxyXbiNE/+f3kqam30I=", "dev": true }, - "require-main-filename": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/require-main-filename/-/require-main-filename-2.0.0.tgz", - "integrity": "sha512-NKN5kMDylKuldxYLSUfrbo5Tuzh4hd+2E8NPPX02mZtn1VuREQToYe/ZdlJy+J3uCpfaiGF05e7B8W0iXbQHmg==", - "dev": true - }, - "resolve": { - "version": "1.8.1", - "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.8.1.tgz", - "integrity": "sha512-AicPrAC7Qu1JxPCZ9ZgCZlY35QgFnNqc+0LtbRNxnVw4TXvjQ72wnuL9JQcEBgXkI9JM8MsT9kaQoHcpCRJOYA==", - "dev": true, - "requires": { - "path-parse": "^1.0.5" - } - }, "resolve-cwd": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/resolve-cwd/-/resolve-cwd-3.0.0.tgz", @@ -3673,12 +3109,6 @@ } } }, - "set-blocking": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/set-blocking/-/set-blocking-2.0.0.tgz", - "integrity": "sha1-BF+XgtARrppoA93TgrJDkrPYkPc=", - "dev": true - }, "shebang-command": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", @@ -3742,20 +3172,6 @@ "source-map": "^0.6.0" } }, - "spawn-wrap": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/spawn-wrap/-/spawn-wrap-2.0.0.tgz", - "integrity": "sha512-EeajNjfN9zMnULLwhZZQU3GWBoFNkbngTUPfaawT4RkMiviTxcX0qfhVbGey39mfctfDHkWtuecgQ8NJcyQWHg==", - "dev": true, - "requires": { - "foreground-child": "^2.0.0", - "is-windows": "^1.0.2", - "make-dir": "^3.0.0", - "rimraf": "^3.0.0", - "signal-exit": "^3.0.2", - "which": "^2.0.1" - } - }, "spdx-correct": { "version": "3.1.1", "resolved": "https://registry.npmjs.org/spdx-correct/-/spdx-correct-3.1.1.tgz", @@ -4008,12 +3424,6 @@ "is-negated-glob": "^1.0.0" } }, - "to-fast-properties": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/to-fast-properties/-/to-fast-properties-2.0.0.tgz", - "integrity": "sha1-3F5pjL0HkmW8c+A3doGk5Og/YW4=", - "dev": true - }, "to-readable-stream": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/to-readable-stream/-/to-readable-stream-1.0.0.tgz", @@ -4148,11 +3558,24 @@ "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", "integrity": "sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8=" }, - "uuid": { - "version": "3.4.0", - "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.4.0.tgz", - "integrity": "sha512-HjSDRw6gZE5JMggctHBcjVak08+KEVhSIiDzFnT9S9aegmp85S/bReBVTb4QTFaRNptJ9kuYaNhnbNEOkbKb/A==", - "dev": true + "v8-to-istanbul": { + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/v8-to-istanbul/-/v8-to-istanbul-7.1.0.tgz", + "integrity": "sha512-uXUVqNUCLa0AH1vuVxzi+MI4RfxEOKt9pBgKwHbgH7st8Kv2P1m+jvWNnektzBh5QShF3ODgKmUFCf38LnVz1g==", + "dev": true, + "requires": { + "@types/istanbul-lib-coverage": "^2.0.1", + "convert-source-map": "^1.6.0", + "source-map": "^0.7.3" + }, + "dependencies": { + "source-map": { + "version": "0.7.3", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.7.3.tgz", + "integrity": "sha512-CkCj6giN3S+n9qrYiBTX5gystlENnRW5jZeNLHpe6aue+SrHcG5VYwujhW9s4dY31mEGsxBDrHR6oI69fTXsaQ==", + "dev": true + } + } }, "validate-npm-package-license": { "version": "3.0.4", @@ -4283,12 +3706,6 @@ "isexe": "^2.0.0" } }, - "which-module": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/which-module/-/which-module-2.0.0.tgz", - "integrity": "sha1-2e8H3Od7mQK4o6j6SzHD4/fm6Ho=", - "dev": true - }, "widest-line": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/widest-line/-/widest-line-3.1.0.tgz", @@ -4298,28 +3715,6 @@ "string-width": "^4.0.0" } }, - "wrap-ansi": { - "version": "6.2.0", - "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-6.2.0.tgz", - "integrity": "sha512-r6lPcBGxZXlIcymEu7InxDMhdW0KDxpLgoFLcguasxCaJ/SOIZwINatK9KY/tf+ZrlywOKU0UDj3ATXUBfxJXA==", - "dev": true, - "requires": { - "ansi-styles": "^4.0.0", - "string-width": "^4.1.0", - "strip-ansi": "^6.0.0" - }, - "dependencies": { - "strip-ansi": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.0.tgz", - "integrity": "sha512-AuvKTrTfQNYNIctbR1K/YGTR1756GycPsg7b9bdV9Duqur4gv6aKqHXah67Z8ImS7WEz5QVcOtlfW2rZEugt6w==", - "dev": true, - "requires": { - "ansi-regex": "^5.0.0" - } - } - } - }, "wrappy": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", @@ -4350,49 +3745,18 @@ "integrity": "sha512-LKYU1iAXJXUgAXn9URjiu+MWhyUXHsvfp7mcuYm9dSUKK0/CjtrUwFAxD82/mCWbtLsGjFIad0wIsod4zrTAEQ==", "dev": true }, - "y18n": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/y18n/-/y18n-4.0.0.tgz", - "integrity": "sha512-r9S/ZyXu/Xu9q1tYlpsLIsa3EeLXXk0VwlxqTcFRfg9EhMW+17kbt9G0NrgCmhGb5vT2hyhJZLfDGx+7+5Uj/w==", - "dev": true - }, - "yargs": { - "version": "15.3.1", - "resolved": "https://registry.npmjs.org/yargs/-/yargs-15.3.1.tgz", - "integrity": "sha512-92O1HWEjw27sBfgmXiixJWT5hRBp2eobqXicLtPBIDBhYB+1HpwZlXmbW2luivBJHBzki+7VyCLRtAkScbTBQA==", - "dev": true, - "requires": { - "cliui": "^6.0.0", - "decamelize": "^1.2.0", - "find-up": "^4.1.0", - "get-caller-file": "^2.0.1", - "require-directory": "^2.1.1", - "require-main-filename": "^2.0.0", - "set-blocking": "^2.0.0", - "string-width": "^4.2.0", - "which-module": "^2.0.0", - "y18n": "^4.0.0", - "yargs-parser": "^18.1.1" - }, - "dependencies": { - "yargs-parser": { - "version": "18.1.3", - "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-18.1.3.tgz", - "integrity": "sha512-o50j0JeToy/4K6OZcaQmW6lyXXKhq7csREXcDwk2omFPJEwUNOVtJKvmDr9EI1fAJZUyZcRF7kxGBWmRXudrCQ==", - "dev": true, - "requires": { - "camelcase": "^5.0.0", - "decamelize": "^1.2.0" - } - } - } - }, "yargs-parser": { "version": "20.2.4", "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-20.2.4.tgz", "integrity": "sha512-WOkpgNhPTlE73h4VFAFsOnomJVaovO8VqLDzy5saChRBFQFBoMYirowyW+Q9HB4HFF4Z7VZTiG3iSzJJA29yRA==", "dev": true }, + "yocto-queue": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/yocto-queue/-/yocto-queue-0.1.0.tgz", + "integrity": "sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==", + "dev": true + }, "z-schema": { "version": "3.18.4", "resolved": "https://registry.npmjs.org/z-schema/-/z-schema-3.18.4.tgz", diff --git a/package.json b/package.json index 80fef791..ede09586 100644 --- a/package.json +++ b/package.json @@ -6,12 +6,12 @@ "funding": { "url": "https://opencollective.com/userfrosting" }, - "main": "./dist/index.js", - "module": "./dist/main.js", + "type": "module", + "exports": "./dist/main.js", "types": "./dist/main.d.ts", "scripts": { "pretest": "tsc", - "test": "nyc --reporter=text ava", + "test": "c8 --all --reporter=text --reporter=lcovonly ava", "prepublishOnly": "tsc", "preversion": "npm test", "version": "npm run version:apiDocRefresh && npm run version:changelogBump", @@ -40,41 +40,36 @@ "url": "https://github.com/userfrosting/vinyl-fs-vpath/issues" }, "dependencies": { - "esm": "^3.2.25", - "globby": "^11.0.1", + "globby": "^11.0.2", "plugin-error": "^1.0.1", "ts-log": "^2.2.3", "vinyl-file": "^3.0.0" }, "devDependencies": { - "@microsoft/api-documenter": "^7.9.16", - "@microsoft/api-extractor": "^7.10.4", - "@types/mock-fs": "^4.13.0", - "@types/node": "^14.14.2", + "@microsoft/api-documenter": "^7.12.7", + "@microsoft/api-extractor": "^7.13.1", + "@types/node": "^14.14.27", "@types/vinyl": "^2.0.4", "@types/vinyl-file": "^3.0.0", "@types/vinyl-fs": "^2.4.11", - "ava": "^3.13.0", + "@userfrosting/ts-log-adapter-ava": "^0.1.1", + "ava": "^3.15.0", + "c8": "^7.5.0", "changelog-updater": "2.0.2", + "del": "^6.0.0", "get-stream": "^6.0.0", - "glob-escape": "0.0.2", - "mock-fs": "^4.13.0", - "nyc": "^15.1.0", "sort-on": "^4.1.0", - "typescript": "^4.0.3", + "typescript": "^4.1.5", "vinyl": "^2.2.1", "vinyl-fs": "^3.0.3" }, "engines": { - "node": ">=10.0.0" + "node": ">=12.17.0" }, "engineStrict": true, "ava": { "files": [ "dist/**/*.test.js" - ], - "require": [ - "esm" ] } } diff --git a/src/index.ts b/src/index.ts deleted file mode 100644 index d3b0f4e6..00000000 --- a/src/index.ts +++ /dev/null @@ -1,5 +0,0 @@ -require = require("esm")(module, { - // Caching is best reserved for projects not dev tool libraries - cache: false -}); -module.exports = require("./main"); diff --git a/src/main.test.ts b/src/main.test.ts new file mode 100644 index 00000000..f9fb1942 --- /dev/null +++ b/src/main.test.ts @@ -0,0 +1,6 @@ +import { src } from "@userfrosting/vinyl-fs-vpath"; +import test from "ava"; + +test("Validate exports", t => { + t.assert(typeof src === "function", "src named export is wrong type"); +}); diff --git a/src/main.ts b/src/main.ts index 9bad9c15..b9a87be2 100644 --- a/src/main.ts +++ b/src/main.ts @@ -1,2 +1,2 @@ -export { src, IConfig } from "./src"; -export { IPathMapper } from "./resolver"; +export { src, IConfig } from "./src.js"; +export { IPathMapper } from "./resolver.js"; diff --git a/src/missing-types.d.ts b/src/missing-types.d.ts deleted file mode 100644 index a7aff340..00000000 --- a/src/missing-types.d.ts +++ /dev/null @@ -1,6 +0,0 @@ -declare module "glob-escape" { - function escape(patterns: string[]): string[]; - function escape(pattern: string): string; - - export default escape; -} diff --git a/src/resolver.test.ts b/src/resolver.test.ts index 51d0bc0b..c42d30cd 100644 --- a/src/resolver.test.ts +++ b/src/resolver.test.ts @@ -1,44 +1,61 @@ -import test from "ava"; -import { resolve as resolvePath } from "path"; -import mockFs from "mock-fs"; -import { dummyLogger } from "ts-log"; -import resolver from "./resolver"; +import pTest, { TestInterface } from "ava"; +import path from "path"; +import os from "os"; +import fs from "fs"; +import del from "del"; +import { logAdapter } from "@userfrosting/ts-log-adapter-ava"; +import resolver from "./resolver.js"; + +// TODO Remove dependence on file system, this is currently an integration test retrofitted as a unit test +const test = pTest as TestInterface<{ + pathAsRelative: (naivePath: string) => string, + pathAsAbsolute: (naivePath: string) => string, +}>; test.before(t => { - mockFs({ - "./test-data": { - "scripts-1": { - "a.js": `window.a = "foo";`, - "b.js": "function bar() {}", - }, - "scripts-2": { - "a.js": "const add = (a, b) => a + b;", - "c.js": `"use strict";\nalert("danger!");`, - }, - "scripts-3": { - "b.js": `(function ($) {\n $('body').foo();\n}(jQuery))`, - "glob [syntax].js": `export function foo() {}`, - }, - } - }); + // Hooks for tests + const mockCwd = (os.tmpdir() + "/vinyl-fs-vpath/src.test/").replace(/\\/g, "/"); + const mockCwdRelative = (path.relative(process.cwd(), mockCwd) + "/").replace(/\\/g, "/"); + function pathAsRelative(naivePath: string) { + return mockCwdRelative + naivePath; + } + t.context.pathAsRelative = pathAsRelative; + function pathAsAbsolute(naivePath: string) { + return path.resolve(mockCwd + naivePath); + } + t.context.pathAsAbsolute = pathAsAbsolute; + function writeFile(naivePath: string, data: string) { + fs.writeFileSync(pathAsAbsolute(naivePath), data); + } + + // Create files to be read + fs.mkdirSync(pathAsAbsolute("test-data/scripts-1"), { recursive: true }); + writeFile("test-data/scripts-1/a.js", `window.a = "foo";`); + writeFile("test-data/scripts-1/b.js", "function bar() {}"); + fs.mkdirSync(pathAsAbsolute("test-data/scripts-2"), { recursive: true }); + writeFile("test-data/scripts-2/a.js", "const add = (a, b) => a + b;"); + writeFile("test-data/scripts-2/c.js", `"use strict";\nalert("danger!");`); + fs.mkdirSync(pathAsAbsolute("test-data/scripts-3"), { recursive: true }); + writeFile("test-data/scripts-3/b.js", `(function ($) {\n $('body').foo();\n}(jQuery))`); + writeFile("test-data/scripts-3/glob [syntax].js", `export function foo() {}`); }); test.after(t => { - mockFs.restore(); + del.sync(t.context.pathAsAbsolute("") + "/**", { force: true }); }); test("Returns all glob matched paths when no vpaths provided", t => { - const file1 = resolvePath("./test-data/scripts-1/a.js"); - const file2 = resolvePath("./test-data/scripts-1/b.js"); - const file3 = resolvePath("./test-data/scripts-2/a.js"); - const file4 = resolvePath("./test-data/scripts-2/c.js"); - const file5 = resolvePath("./test-data/scripts-3/b.js"); - const file6 = resolvePath("./test-data/scripts-3/glob [syntax].js"); + const file1 = t.context.pathAsAbsolute("test-data/scripts-1/a.js"); + const file2 = t.context.pathAsAbsolute("test-data/scripts-1/b.js"); + const file3 = t.context.pathAsAbsolute("test-data/scripts-2/a.js"); + const file4 = t.context.pathAsAbsolute("test-data/scripts-2/c.js"); + const file5 = t.context.pathAsAbsolute("test-data/scripts-3/b.js"); + const file6 = t.context.pathAsAbsolute("test-data/scripts-3/glob [syntax].js"); t.deepEqual( resolver( - [ "./test-data/**/*.js" ], - { virtPathMaps: [], cwd: process.cwd(), logger: dummyLogger } + [ t.context.pathAsRelative("test-data") + "/**/*.js" ], + { virtPathMaps: [], cwd: process.cwd(), logger: logAdapter(t.log), } ), [ { virtual: file1, actual: file1 }, @@ -53,23 +70,23 @@ test("Returns all glob matched paths when no vpaths provided", t => { test.only("Overrides when vpaths intersect", t => { const actual = resolver( - [ "./test-data/**/*.js" ], + [ t.context.pathAsRelative("test-data") + "/**/*.js" ], { virtPathMaps: [ - { match: "./test-data/scripts-3/", replace: "./test-data/scripts/" }, - { match: "./test-data/scripts-1/", replace: "./test-data/scripts/" }, - { match: "./test-data/scripts-2/", replace: "./test-data/scripts/" }, + { match: t.context.pathAsAbsolute("test-data/scripts-3/"), replace: t.context.pathAsAbsolute("test-data/scripts/") }, + { match: t.context.pathAsAbsolute("test-data/scripts-1/"), replace: t.context.pathAsAbsolute("test-data/scripts/") }, + { match: t.context.pathAsAbsolute("test-data/scripts-2/"), replace: t.context.pathAsAbsolute("test-data/scripts/") }, ], cwd: process.cwd(), - logger: dummyLogger + logger: logAdapter(t.log), } ); const expected = [ - { virtual: resolvePath("./test-data/scripts/a.js"), actual: resolvePath("./test-data/scripts-2/a.js") }, - { virtual: resolvePath("./test-data/scripts/b.js"), actual: resolvePath("./test-data/scripts-1/b.js") }, - { virtual: resolvePath("./test-data/scripts/c.js"), actual: resolvePath("./test-data/scripts-2/c.js") }, - { virtual: resolvePath("./test-data/scripts/glob [syntax].js"), actual: resolvePath("./test-data/scripts-3/glob [syntax].js") }, + { virtual: t.context.pathAsAbsolute("test-data/scripts/a.js"), actual: t.context.pathAsAbsolute("test-data/scripts-2/a.js") }, + { virtual: t.context.pathAsAbsolute("test-data/scripts/b.js"), actual: t.context.pathAsAbsolute("test-data/scripts-1/b.js") }, + { virtual: t.context.pathAsAbsolute("test-data/scripts/c.js"), actual: t.context.pathAsAbsolute("test-data/scripts-2/c.js") }, + { virtual: t.context.pathAsAbsolute("test-data/scripts/glob [syntax].js"), actual: t.context.pathAsAbsolute("test-data/scripts-3/glob [syntax].js") }, ]; t.deepEqual(actual, expected); diff --git a/src/src.test.ts b/src/src.test.ts index 4d7c286e..9671102b 100644 --- a/src/src.test.ts +++ b/src/src.test.ts @@ -1,43 +1,60 @@ -import test from "ava"; -import { src } from "./src"; +import pTest, { TestInterface } from "ava"; +import { src } from "./src.js"; import getStream from "get-stream"; -import { dummyLogger } from "ts-log"; import vinylFs from "vinyl-fs"; import sortOn from "sort-on"; import Vinyl from "vinyl"; -import mockFs from "mock-fs"; -import { resolve as resolvePath } from "path"; +import path from "path"; +import { logAdapter } from "@userfrosting/ts-log-adapter-ava"; +import os from "os"; +import fs from "fs"; +import del from "del"; + +// TODO Remove dependence on file system, this is currently an integration test retrofitted as a unit test +const test = pTest as TestInterface<{ + pathAsRelative: (naivePath: string) => string, + pathAsAbsolute: (naivePath: string) => string, +}>; test.before(t => { - mockFs({ - "./test-data": { - "scripts-1": { - "a.js": `window.a = "foo";`, - "b.js": "function bar() {}", - }, - "scripts-2": { - "a.js": "const add = (a, b) => a + b;", - "c.js": `"use strict";\nalert("danger!");`, - }, - "scripts-3": { - "b.js": `(function ($) {\n $('body').foo();\n}(jQuery))`, - "glob [syntax].js": `export function foo() {}`, - }, - } - }); + // Hooks for tests + const mockCwd = (os.tmpdir() + "/vinyl-fs-vpath/src.test/").replace(/\\/g, "/"); + const mockCwdRelative = (path.relative(process.cwd(), mockCwd) + "/").replace(/\\/g, "/"); + function pathAsRelative(naivePath: string) { + return mockCwdRelative + naivePath; + } + t.context.pathAsRelative = pathAsRelative; + function pathAsAbsolute(naivePath: string) { + return path.resolve(mockCwd + naivePath); + } + t.context.pathAsAbsolute = pathAsAbsolute; + function writeFile(naivePath: string, data: string) { + fs.writeFileSync(pathAsAbsolute(naivePath), data); + } + + // Create files to be read + fs.mkdirSync(pathAsAbsolute("test-data/scripts-1"), { recursive: true }); + writeFile("test-data/scripts-1/a.js", `window.a = "foo";`); + writeFile("test-data/scripts-1/b.js", "function bar() {}"); + fs.mkdirSync(pathAsAbsolute("test-data/scripts-2"), { recursive: true }); + writeFile("test-data/scripts-2/a.js", "const add = (a, b) => a + b;"); + writeFile("test-data/scripts-2/c.js", `"use strict";\nalert("danger!");`); + fs.mkdirSync(pathAsAbsolute("test-data/scripts-3"), { recursive: true }); + writeFile("test-data/scripts-3/b.js", `(function ($) {\n $('body').foo();\n}(jQuery))`); + writeFile("test-data/scripts-3/glob [syntax].js", `export function foo() {}`); }); test.after(t => { - mockFs.restore(); + del.sync(t.context.pathAsAbsolute("") + "/**", { force: true }); }); test("Throws if no files resolved", async t => { await t.throwsAsync( async () => await getStream.array(src({ - globs: "./test-data/scripts-0/**/*", + globs: t.context.pathAsRelative("test-data/scripts-0") + "/**/*", pathMappings: [], cwd: process.cwd(), - logger: dummyLogger, + logger: logAdapter(t.log), })), { instanceOf: Error, @@ -47,7 +64,7 @@ test("Throws if no files resolved", async t => { await t.throwsAsync( async () => await getStream.array(src({ - globs: "./test-data/scripts-1/0.js", + globs: t.context.pathAsRelative("test-data/scripts-1/0.js"), pathMappings: [], })), { @@ -60,7 +77,7 @@ test("Throws if no files resolved", async t => { test("Pushes expected files into stream", async t => { const actual = sortOn( await getStream.array(src({ - globs: "./test-data/**/*.js", + globs: t.context.pathAsRelative("test-data") + "/**/*.js", pathMappings: [], })), "history" @@ -68,11 +85,11 @@ test("Pushes expected files into stream", async t => { const expected = sortOn( [ - new Vinyl({ path: resolvePath("./test-data/scripts-1/a.js") }), - new Vinyl({ path: resolvePath("./test-data/scripts-1/b.js") }), - new Vinyl({ path: resolvePath("./test-data/scripts-2/a.js") }), - new Vinyl({ path: resolvePath("./test-data/scripts-2/c.js") }), - new Vinyl({ path: resolvePath("./test-data/scripts-3/b.js") }), + new Vinyl({ path: t.context.pathAsAbsolute("test-data/scripts-1/a.js") }), + new Vinyl({ path: t.context.pathAsAbsolute("test-data/scripts-1/b.js") }), + new Vinyl({ path: t.context.pathAsAbsolute("test-data/scripts-2/a.js") }), + new Vinyl({ path: t.context.pathAsAbsolute("test-data/scripts-2/c.js") }), + new Vinyl({ path: t.context.pathAsAbsolute("test-data/scripts-3/b.js") }), ], "history" ); @@ -88,7 +105,7 @@ test("Pushes expected files into stream when custom options passed to Vinyl", as // We are just pushing these custom options to Vinyl, so we aren't too concerned about their logic. const actual = sortOn( await getStream.array(src({ - globs: "./test-data/**/*.js", + globs: t.context.pathAsRelative("test-data") + "/**/*.js", pathMappings: [], base: process.cwd(), })), @@ -97,11 +114,11 @@ test("Pushes expected files into stream when custom options passed to Vinyl", as const expected = sortOn( [ - new Vinyl({ path: resolvePath("./test-data/scripts-1/a.js") }), - new Vinyl({ path: resolvePath("./test-data/scripts-1/b.js") }), - new Vinyl({ path: resolvePath("./test-data/scripts-2/a.js") }), - new Vinyl({ path: resolvePath("./test-data/scripts-2/c.js") }), - new Vinyl({ path: resolvePath("./test-data/scripts-3/b.js") }), + new Vinyl({ path: t.context.pathAsAbsolute("test-data/scripts-1/a.js") }), + new Vinyl({ path: t.context.pathAsAbsolute("test-data/scripts-1/b.js") }), + new Vinyl({ path: t.context.pathAsAbsolute("test-data/scripts-2/a.js") }), + new Vinyl({ path: t.context.pathAsAbsolute("test-data/scripts-2/c.js") }), + new Vinyl({ path: t.context.pathAsAbsolute("test-data/scripts-3/b.js") }), ], "history" ); @@ -116,11 +133,11 @@ test("Pushes expected files into stream when custom options passed to Vinyl", as test("Pushes expected files into stream with vPaths and simple glob", async t => { const actual = sortOn( await getStream.array(src({ - globs: "./test-data/**/*.js", + globs: t.context.pathAsRelative("test-data") + "/**/*.js", pathMappings: [ - { match: "./test-data/scripts-3/", replace: "./test-data/scripts/" }, - { match: "./test-data/scripts-1/", replace: "./test-data/scripts/" }, - { match: "./test-data/scripts-2/", replace: "./test-data/scripts/" }, + { match: t.context.pathAsAbsolute("test-data/scripts-3/"), replace: t.context.pathAsAbsolute("test-data/scripts/") }, + { match: t.context.pathAsAbsolute("test-data/scripts-1/"), replace: t.context.pathAsAbsolute("test-data/scripts/") }, + { match: t.context.pathAsAbsolute("test-data/scripts-2/"), replace: t.context.pathAsAbsolute("test-data/scripts/") }, ] })), "history" @@ -129,16 +146,16 @@ test("Pushes expected files into stream with vPaths and simple glob", async t => const expected = sortOn( [ new Vinyl({ - path: resolvePath("./test-data/scripts/b.js"), - history: [ resolvePath("./test-data/scripts-1/b.js") ], + path: t.context.pathAsAbsolute("test-data/scripts/b.js"), + history: [ t.context.pathAsAbsolute("test-data/scripts-1/b.js") ], }), new Vinyl({ - path: resolvePath("./test-data/scripts/a.js"), - history: [ resolvePath("./test-data/scripts-2/a.js") ], + path: t.context.pathAsAbsolute("test-data/scripts/a.js"), + history: [ t.context.pathAsAbsolute("test-data/scripts-2/a.js") ], }), new Vinyl({ - path: resolvePath("./test-data/scripts/c.js"), - history: [ resolvePath("./test-data/scripts-2/c.js") ], + path: t.context.pathAsAbsolute("test-data/scripts/c.js"), + history: [ t.context.pathAsAbsolute("test-data/scripts-2/c.js") ], }), ], "history" @@ -154,11 +171,14 @@ test("Pushes expected files into stream with vPaths and simple glob", async t => test("Pushes expected files into stream with vPaths and complex glob", async t => { const actual = sortOn( await getStream.array(src({ - globs: [ "./test-data/**/*.js", "!./test-data/scripts-2/**/*.js" ], + globs: [ + t.context.pathAsRelative("test-data") + "/**/*.js", + "!" + t.context.pathAsRelative("test-data/scripts-2") + "/**/*.js", + ], pathMappings: [ - { match: "./test-data/scripts-3/", replace: "./test-data/scripts/" }, - { match: "./test-data/scripts-1/", replace: "./test-data/scripts/" }, - { match: "./test-data/scripts-2/", replace: "./test-data/scripts/" }, + { match: t.context.pathAsAbsolute("test-data/scripts-3/"), replace: t.context.pathAsAbsolute("test-data/scripts/") }, + { match: t.context.pathAsAbsolute("test-data/scripts-1/"), replace: t.context.pathAsAbsolute("test-data/scripts/") }, + { match: t.context.pathAsAbsolute("test-data/scripts-2/"), replace: t.context.pathAsAbsolute("test-data/scripts/") }, ] })), "history" @@ -167,12 +187,12 @@ test("Pushes expected files into stream with vPaths and complex glob", async t = const expected = sortOn( [ new Vinyl({ - path: resolvePath("./test-data/scripts/b.js"), - history: [ resolvePath("./test-data/scripts-1/b.js") ], + path: t.context.pathAsAbsolute("test-data/scripts/b.js"), + history: [ t.context.pathAsAbsolute("test-data/scripts-1/b.js") ], }), new Vinyl({ - path: resolvePath("./test-data/scripts/a.js"), - history: [ resolvePath("./test-data/scripts-1/a.js") ], + path: t.context.pathAsAbsolute("test-data/scripts/a.js"), + history: [ t.context.pathAsAbsolute("test-data/scripts-1/a.js") ], }), ], "history" @@ -185,14 +205,15 @@ test("Pushes expected files into stream with vPaths and complex glob", async t = } }); -test("Outputs equivilant to vinyl-fs package", async t => { +test("Outputs equivalent to vinyl-fs package", async t => { const actual = await getStream.array(src({ - globs: [ "./test-data/**/*.js" ], + globs: [ t.context.pathAsRelative("test-data") + "/**/*.js" ], pathMappings: [], + logger: logAdapter(t.log), })); const expected = await getStream.array(vinylFs.src( - "./test-data/**/*.js", + t.context.pathAsRelative("test-data") + "/**/*.js", { base: process.cwd() } )); diff --git a/src/src.ts b/src/src.ts index 883831e0..e7212d22 100644 --- a/src/src.ts +++ b/src/src.ts @@ -100,9 +100,9 @@ class VinylFsVPathSrc extends Readable { this.logger.trace("Pushing file", { actual, virtual }); this.push(file); return; + /* c8 ignore next 4 */ } catch (error) { // This can happen when there are file changes during processing, difficult to test - /* istanbul ignore next */ throw new PluginError("userfrosting/vinyl-fs-vpath", error); } } diff --git a/tsconfig.json b/tsconfig.json index 1d3159d5..f93c2ff7 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -10,6 +10,11 @@ "declaration": true, "target": "es2017", "outDir": "./dist/", - "sourceMap": true + "sourceMap": true, + // TODO Remove once self-referencing supported https://github.com/microsoft/TypeScript/issues/38675 + "baseUrl": "./src/", + "paths": { + "@userfrosting/vinyl-fs-vpath": [ "./main" ] + } } }