From fff1f67e172e7f686c1e39bff87a211043d10f4a Mon Sep 17 00:00:00 2001 From: sttk Date: Sun, 28 Feb 2021 16:08:30 +0900 Subject: [PATCH 1/9] Breaking: Upgrade scaffold, dropping node <10 support --- .eslintrc | 5 +++- .github/security.md | 16 ++++++++-- .gitignore | 50 +++++++++++++++++++++++++++----- .prettierignore | 2 ++ README.md | 27 +++++++++-------- package.json | 28 +++++++++++------- test/.eslintrc | 3 -- test/{lib => }/extension.test.js | 0 test/index.js | 12 ++++---- 9 files changed, 99 insertions(+), 44 deletions(-) create mode 100644 .prettierignore delete mode 100644 test/.eslintrc rename test/{lib => }/extension.test.js (100%) diff --git a/.eslintrc b/.eslintrc index a5a4a17..76e7721 100644 --- a/.eslintrc +++ b/.eslintrc @@ -1,3 +1,6 @@ { - "extends": "gulp" + "extends": "gulp", + "rules": { + "max-statements": 0 + } } diff --git a/.github/security.md b/.github/security.md index 6cb3e3b..5e4d9df 100644 --- a/.github/security.md +++ b/.github/security.md @@ -1,4 +1,16 @@ -## Security contact information +# Security Policy -To report a security vulnerability, please use the [Tidelift security contact](https://tidelift.com/security). +## Supported Versions + +| Version | Supported | +| ------- | ------------------ | +| 1.x.x | :white_check_mark: | +| 0.7.0 | :white_check_mark: | +| < 0.7.0 | :x: | + +## Reporting a Vulnerability + +To report a security vulnerability, please use the +[Tidelift security contact](https://tidelift.com/security). Tidelift will coordinate the fix and disclosure. + diff --git a/.gitignore b/.gitignore index 6f63646..58a757a 100644 --- a/.gitignore +++ b/.gitignore @@ -1,11 +1,15 @@ # Logs logs *.log +npm-debug.log* +yarn-debug.log* +yarn-error.log* # Runtime data pids *.pid *.seed +*.pid.lock # Directory for instrumented libs generated by jscoverage/JSCover lib-cov @@ -13,19 +17,51 @@ lib-cov # Coverage directory used by tools like istanbul coverage +# nyc test coverage +.nyc_output + # Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files) .grunt -# Compiled binary addons (http://nodejs.org/api/addons.html) +# Bower dependency directory (https://bower.io/) +bower_components + +# node-waf configuration +.lock-wscript + +# Compiled binary addons (https://nodejs.org/api/addons.html) build/Release -# Dependency directory -# Commenting this out is preferred by some people, see -# https://www.npmjs.org/doc/misc/npm-faq.html#should-i-check-my-node_modules-folder-into-git- -node_modules +# Dependency directories +node_modules/ +jspm_packages/ -# Users Environment Variables -.lock-wscript +# TypeScript v1 declaration files +typings/ + +# Optional npm cache directory +.npm + +# Optional eslint cache +.eslintcache + +# Optional REPL history +.node_repl_history + +# Output of 'npm pack' +*.tgz + +# Yarn Integrity file +.yarn-integrity + +# dotenv environment variables file +.env + +# next.js build output +.next # Garbage files .DS_Store + +# Test results +test.xunit diff --git a/.prettierignore b/.prettierignore new file mode 100644 index 0000000..ed88d37 --- /dev/null +++ b/.prettierignore @@ -0,0 +1,2 @@ +coverage/ +.nyc_output/ diff --git a/README.md b/README.md index cf96e4f..7f2a509 100644 --- a/README.md +++ b/README.md @@ -6,7 +6,7 @@ # rechoir -[![NPM version][npm-image]][npm-url] [![Downloads][downloads-image]][npm-url] [![Travis Build Status][travis-image]][travis-url] [![AppVeyor Build Status][appveyor-image]][appveyor-url] [![Coveralls Status][coveralls-image]][coveralls-url] [![Gitter chat][gitter-image]][gitter-url] +[![NPM version][npm-image]][npm-url] [![Downloads][downloads-image]][npm-url] [![Travis Build Status][travis-image]][travis-url] [![AppVeyor Build Status][appveyor-image]][appveyor-url] [![Coveralls Status][coveralls-image]][coveralls-url] Prepare a node environment to require files with different extensions. @@ -19,10 +19,10 @@ This module, in conjunction with [interpret]-like objects, can register any file ## rechoir for enterprise -Available as part of the Tidelift Subscription - -The maintainers of rechoir and thousands of other packages are working with Tidelift to deliver commercial support and maintenance for the open source dependencies you use to build your applications. Save time, reduce risk, and improve code health, while paying the maintainers of the exact dependencies you use. [Learn more.](https://tidelift.com/subscription/pkg/npm-rechoir?utm_source=npm-rechoir&utm_medium=referral&utm_campaign=enterprise&utm_term=repo) +Available as part of the Tidelift Subscription. +The maintainers of `rechoir` and thousands of other packages are working with Tidelift to deliver commercial support and maintenance for the open source dependencies you use to build your applications. Save time, reduce risk, and improve code health, while paying the maintainers of the exact dependencies you use. [Learn more.][tidelift-url] + ## Usage @@ -42,7 +42,7 @@ console.log(require('./test/fixtures/test.toml')); ### `prepare(config, filepath, [cwd], [noThrow])` -Look for a module loader associated with the provided file and attempt require it. If necessary, run any setup required to inject it into [require.extensions](http://nodejs.org/api/globals.html#globals_require_extensions). +Look for a module loader associated with the provided file and attempt require it. If necessary, run any setup required to inject it into [require.extensions]. `config` An [interpret]-like configuration object. @@ -62,22 +62,21 @@ If a loader is already registered, this will simply return `true`. MIT -[interpret]: http://github.com/gulpjs/interpret -[Liftoff]: http://github.com/gulpjs/liftoff +[interpret]: https://github.com/gulpjs/interpret +[require.extensions]: https://nodejs.org/api/modules.html#modules_require_extensions +[Liftoff]: https://github.com/js-cli/js-liftoff -[downloads-image]: http://img.shields.io/npm/dm/rechoir.svg +[downloads-image]: https://img.shields.io/npm/dm/rechoir.svg?style=flat-square [npm-url]: https://www.npmjs.com/package/rechoir -[npm-image]: http://img.shields.io/npm/v/rechoir.svg +[npm-image]: https://img.shields.io/npm/v/rechoir.svg?style=flat-square [travis-url]: https://travis-ci.org/gulpjs/rechoir -[travis-image]: http://img.shields.io/travis/gulpjs/rechoir.svg?label=travis-ci +[travis-image]: https://img.shields.io/travis/gulpjs/rechoir.svg?label=travis-ci [appveyor-url]: https://ci.appveyor.com/project/gulpjs/rechoir [appveyor-image]: https://img.shields.io/appveyor/ci/gulpjs/rechoir.svg?label=appveyor [coveralls-url]: https://coveralls.io/r/gulpjs/rechoir -[coveralls-image]: http://img.shields.io/coveralls/gulpjs/rechoir/master.svg - -[gitter-url]: https://gitter.im/gulpjs/gulp -[gitter-image]: https://badges.gitter.im/gulpjs/gulp.svg +[coveralls-image]: https://img.shields.io/coveralls/gulpjs/rechoir/master.svg +[tidelift-url]: https://tidelift.com/subscription/pkg/npm-rechoir?utm_source=npm-rechoir&utm_medium=referral&utm_campaign=enterprise&utm_term=repo diff --git a/package.json b/package.json index 00d125c..65ecff2 100644 --- a/package.json +++ b/package.json @@ -10,7 +10,7 @@ "repository": "gulpjs/rechoir", "license": "MIT", "engines": { - "node": ">= 0.10" + "node": ">= 10.13.0" }, "main": "index.js", "files": [ @@ -21,20 +21,26 @@ "scripts": { "lint": "eslint .", "pretest": "rm -rf tmp/ && npm run lint", - "test": "mocha --async-only test test/lib", - "cover": "istanbul cover _mocha --report lcovonly test test/lib", - "coveralls": "npm run cover && istanbul-coveralls" + "test": "nyc mocha --async-only" }, "dependencies": { - "resolve": "^1.9.0" + "resolve": "^1.20.0" }, "devDependencies": { - "eslint": "^2.13.0", - "eslint-config-gulp": "^3.0.1", - "expect": "^1.20.2", - "istanbul": "^0.4.3", - "istanbul-coveralls": "^1.0.3", - "mocha": "^3.5.3" + "eslint": "^7.21.0", + "eslint-config-gulp": "^5.0.1", + "expect": "^26.6.2", + "mocha": "^8.3.0", + "nyc": "^15.1.0" + }, + "nyc": { + "reporter": [ + "lcov", + "text-summary" + ] + }, + "prettier": { + "singleQuote": true }, "keywords": [ "require", diff --git a/test/.eslintrc b/test/.eslintrc deleted file mode 100644 index 06b940f..0000000 --- a/test/.eslintrc +++ /dev/null @@ -1,3 +0,0 @@ -{ - "extends": "gulp/test" -} diff --git a/test/lib/extension.test.js b/test/extension.test.js similarity index 100% rename from test/lib/extension.test.js rename to test/extension.test.js diff --git a/test/index.js b/test/index.js index a0a0f3c..2e3cc7c 100644 --- a/test/index.js +++ b/test/index.js @@ -130,7 +130,7 @@ describe('rechoir', function() { }); it('should return an error if the specified module cannot be registered', function(done) { - expect(register(__dirname, 'whatev')).toBeAn(Error); + expect(register(__dirname, 'whatev')).toBeInstanceOf(Error); done(); }); @@ -176,11 +176,11 @@ describe('rechoir', function() { // Check the failure entries in the thrown or returned error object. function checkFailures(e) { - expect(e.failures).toBeAn('array'); - expect(e.failures[0].error).toBeAn(Error); + expect(e.failures).toBeInstanceOf(Array); + expect(e.failures[0].error).toBeInstanceOf(Error); expect(e.failures[0].moduleName).toEqual('nothere'); expect(e.failures[0].module).toEqual(null); - expect(e.failures[1].error).toBeAn(Error); + expect(e.failures[1].error).toBeInstanceOf(Error); expect(e.failures[1].moduleName).toEqual('orhere'); expect(e.failures[1].module).toEqual(null); } @@ -193,7 +193,7 @@ describe('rechoir', function() { err = e; checkFailures(e); } - expect(err).toBeAn(Error); + expect(err).toBeInstanceOf(Error); done(); }); @@ -216,7 +216,7 @@ describe('rechoir', function() { }, testFilePath); expect(function() { require(testFilePath); - }).toNotThrow(Error); + }).not.toThrow(Error); done(); }); From 1150adb4d268348ea409af2489526ead83814b3c Mon Sep 17 00:00:00 2001 From: sttk Date: Sun, 28 Feb 2021 17:18:25 +0900 Subject: [PATCH 2/9] Build: Use prettier --- .github/security.md | 1 - README.md | 15 ++-- appveyor.yml | 14 ++-- index.js | 10 +-- lib/extension.js | 2 +- lib/normalize.js | 2 +- lib/register.js | 2 +- test/index.js | 172 ++++++++++++++++++++++++-------------------- 8 files changed, 115 insertions(+), 103 deletions(-) diff --git a/.github/security.md b/.github/security.md index 5e4d9df..75c346e 100644 --- a/.github/security.md +++ b/.github/security.md @@ -13,4 +13,3 @@ To report a security vulnerability, please use the [Tidelift security contact](https://tidelift.com/security). Tidelift will coordinate the fix and disclosure. - diff --git a/README.md b/README.md index 7f2a509..6d5f2fe 100644 --- a/README.md +++ b/README.md @@ -16,13 +16,11 @@ This module, in conjunction with [interpret]-like objects, can register any file **Note:** While `rechoir` will automatically load and register transpilers like `coffee-script`, you must provide a local installation. The transpilers are **not** bundled with this module. - ## rechoir for enterprise Available as part of the Tidelift Subscription. The maintainers of `rechoir` and thousands of other packages are working with Tidelift to deliver commercial support and maintenance for the open source dependencies you use to build your applications. Save time, reduce risk, and improve code health, while paying the maintainers of the exact dependencies you use. [Learn more.][tidelift-url] - ## Usage @@ -42,13 +40,13 @@ console.log(require('./test/fixtures/test.toml')); ### `prepare(config, filepath, [cwd], [noThrow])` -Look for a module loader associated with the provided file and attempt require it. If necessary, run any setup required to inject it into [require.extensions]. +Look for a module loader associated with the provided file and attempt require it. If necessary, run any setup required to inject it into [require.extensions]. `config` An [interpret]-like configuration object. `filepath` A file whose type you'd like to register a module loader for. -`cwd` An optional path to start searching for the module required to load the requested file. Defaults to the directory of `filepath`. +`cwd` An optional path to start searching for the module required to load the requested file. Defaults to the directory of `filepath`. `noThrow` An optional boolean indicating if the method should avoid throwing. @@ -62,21 +60,18 @@ If a loader is already registered, this will simply return `true`. MIT + [interpret]: https://github.com/gulpjs/interpret [require.extensions]: https://nodejs.org/api/modules.html#modules_require_extensions -[Liftoff]: https://github.com/js-cli/js-liftoff - +[liftoff]: https://github.com/js-cli/js-liftoff [downloads-image]: https://img.shields.io/npm/dm/rechoir.svg?style=flat-square [npm-url]: https://www.npmjs.com/package/rechoir [npm-image]: https://img.shields.io/npm/v/rechoir.svg?style=flat-square - [travis-url]: https://travis-ci.org/gulpjs/rechoir [travis-image]: https://img.shields.io/travis/gulpjs/rechoir.svg?label=travis-ci - [appveyor-url]: https://ci.appveyor.com/project/gulpjs/rechoir [appveyor-image]: https://img.shields.io/appveyor/ci/gulpjs/rechoir.svg?label=appveyor - [coveralls-url]: https://coveralls.io/r/gulpjs/rechoir [coveralls-image]: https://img.shields.io/coveralls/gulpjs/rechoir/master.svg - [tidelift-url]: https://tidelift.com/subscription/pkg/npm-rechoir?utm_source=npm-rechoir&utm_medium=referral&utm_campaign=enterprise&utm_term=repo + diff --git a/appveyor.yml b/appveyor.yml index bd65027..cdcc345 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -4,12 +4,12 @@ environment: matrix: # node.js - - nodejs_version: "0.10" - - nodejs_version: "0.12" - - nodejs_version: "4" - - nodejs_version: "6" - - nodejs_version: "8" - - nodejs_version: "10" + - nodejs_version: '0.10' + - nodejs_version: '0.12' + - nodejs_version: '4' + - nodejs_version: '6' + - nodejs_version: '8' + - nodejs_version: '10' install: - ps: Install-Product node $env:nodejs_version @@ -23,4 +23,4 @@ test_script: build: off # build version format -version: "{build}" +version: '{build}' diff --git a/index.js b/index.js index eb9ec70..cc76ae3 100644 --- a/index.js +++ b/index.js @@ -4,14 +4,14 @@ var extension = require('./lib/extension'); var normalize = require('./lib/normalize'); var register = require('./lib/register'); -exports.prepare = function(extensions, filepath, cwd, nothrow) { +exports.prepare = function (extensions, filepath, cwd, nothrow) { var config, usedExtension, err, option, attempt, error; var attempts = []; var onlyErrors = true; var exts = extension(filepath); if (exts) { - exts.some(function(ext) { + exts.some(function (ext) { usedExtension = ext; config = normalize(extensions[ext]); return !!config; @@ -40,7 +40,7 @@ exports.prepare = function(extensions, filepath, cwd, nothrow) { for (var i in config) { option = config[i]; attempt = register(cwd, option.module, option.register); - error = (attempt instanceof Error) ? attempt : null; + error = attempt instanceof Error ? attempt : null; if (error) { attempt = null; } @@ -55,7 +55,9 @@ exports.prepare = function(extensions, filepath, cwd, nothrow) { } } if (onlyErrors) { - err = new Error('Unable to use specified module loaders for "' + usedExtension + '".'); + err = new Error( + 'Unable to use specified module loaders for "' + usedExtension + '".' + ); err.failures = attempts; if (nothrow) { return err; diff --git a/lib/extension.js b/lib/extension.js index cc8070d..a5e4585 100644 --- a/lib/extension.js +++ b/lib/extension.js @@ -34,7 +34,7 @@ function getPossibleExtensions(longExtension) { return arr; } -module.exports = function(input) { +module.exports = function (input) { var basename = path.basename(input); var longExtension = getLongExtension(basename); if (!longExtension) { diff --git a/lib/normalize.js b/lib/normalize.js index 7e974f6..af1122f 100644 --- a/lib/normalize.js +++ b/lib/normalize.js @@ -5,7 +5,7 @@ function normalizer(config) { return config; } -module.exports = function(config) { +module.exports = function (config) { if (Array.isArray(config)) { return config.map(normalizer); } diff --git a/lib/register.js b/lib/register.js index f5d2336..843e8ad 100644 --- a/lib/register.js +++ b/lib/register.js @@ -1,6 +1,6 @@ var resolve = require('resolve'); -module.exports = function(cwd, moduleName, register) { +module.exports = function (cwd, moduleName, register) { var result; try { var modulePath = resolve.sync(moduleName, { basedir: cwd }); diff --git a/test/index.js b/test/index.js index 2e3cc7c..020eac9 100644 --- a/test/index.js +++ b/test/index.js @@ -10,7 +10,7 @@ var register = require('../lib/register'); // save the original Module._extensions var originalExtensions = Object.keys(Module._extensions); -var original = originalExtensions.reduce(function(result, key) { +var original = originalExtensions.reduce(function (result, key) { result[key] = require.extensions[key]; return result; }, {}); @@ -40,11 +40,9 @@ function cleanup(done) { done(); } -describe('rechoir', function() { - - describe('extension', function() { - - it('should extract extension from filename/path from the first dot', function(done) { +describe('rechoir', function () { + describe('extension', function () { + it('should extract extension from filename/path from the first dot', function (done) { expect(extension('file.js')[0]).toEqual('.js'); expect(extension('file.tmp.dot.js')[0]).toEqual('.tmp.dot.js'); expect(extension('file.tmp.dot.js')[1]).toEqual('.dot.js'); @@ -52,45 +50,66 @@ describe('rechoir', function() { expect(extension('relative/path/to/file.js')[0]).toEqual('.js'); expect(extension('relative/path/to/file.dot.js')[0]).toEqual('.dot.js'); expect(extension('relative/path/to/file.dot.js')[1]).toEqual('.js'); - expect(extension('relative/path.with.dot/to/file.dot.js')[0]).toEqual('.dot.js'); - expect(extension('relative/path.with.dot/to/file.dot.js')[1]).toEqual('.js'); + expect(extension('relative/path.with.dot/to/file.dot.js')[0]).toEqual( + '.dot.js' + ); + expect(extension('relative/path.with.dot/to/file.dot.js')[1]).toEqual( + '.js' + ); done(); }); - it('does not match any if the path ends in a dot', function(done) { + it('does not match any if the path ends in a dot', function (done) { expect(extension('file.js.')).toEqual(undefined); done(); }); - it('treats additional dots as a separate extension', function(done) { + it('treats additional dots as a separate extension', function (done) { // Double - expect(extension('file.babel..js')).toEqual(['.babel..js', '..js', '.js']); - expect(extension('file..babel.js')).toEqual(['..babel.js', '.babel.js', '.js']); + expect(extension('file.babel..js')).toEqual([ + '.babel..js', + '..js', + '.js', + ]); + expect(extension('file..babel.js')).toEqual([ + '..babel.js', + '.babel.js', + '.js', + ]); // Triple - expect(extension('file.babel...js')).toEqual(['.babel...js', '...js', '..js', '.js']); - expect(extension('file...babel.js')).toEqual(['...babel.js', '..babel.js', '.babel.js', '.js']); + expect(extension('file.babel...js')).toEqual([ + '.babel...js', + '...js', + '..js', + '.js', + ]); + expect(extension('file...babel.js')).toEqual([ + '...babel.js', + '..babel.js', + '.babel.js', + '.js', + ]); done(); }); - it('does not consider a leading dot to be an extension', function(done) { + it('does not consider a leading dot to be an extension', function (done) { expect(extension('.config')).toEqual(undefined); done(); }); }); - describe('normalize', function() { - - it('should convert a string input into array/object format', function(done) { + describe('normalize', function () { + it('should convert a string input into array/object format', function (done) { expect(normalize('foo')).toEqual({ module: 'foo' }); done(); }); - it('should convert object input into array format', function(done) { + it('should convert object input into array format', function (done) { var input = { module: 'foo', }; @@ -99,79 +118,74 @@ describe('rechoir', function() { done(); }); - it('should iterate an array, normalizing each item', function(done) { - var input = [ - { module: 'foo' }, - 'bar', - ]; - expect(normalize(input)).toEqual([ - { module: 'foo' }, - { module: 'bar' }, - ]); + it('should iterate an array, normalizing each item', function (done) { + var input = [{ module: 'foo' }, 'bar']; + expect(normalize(input)).toEqual([{ module: 'foo' }, { module: 'bar' }]); done(); }); }); - describe('register', function() { - - it('should return the specified module relative to the provided cwd', function(done) { + describe('register', function () { + it('should return the specified module relative to the provided cwd', function (done) { expect(register(__dirname, 'expect')).toEqual(expect); done(); }); - it('should call a register function if provided, passing in the module', function(done) { - register(__dirname, 'expect', function(attempt) { + it('should call a register function if provided, passing in the module', function (done) { + register(__dirname, 'expect', function (attempt) { expect(attempt).toEqual(expect); }); done(); }); - it('should return an error if the specified module cannot be registered', function(done) { + it('should return an error if the specified module cannot be registered', function (done) { expect(register(__dirname, 'whatev')).toBeInstanceOf(Error); done(); }); }); - describe('prepare', function() { + describe('prepare', function () { var testFilePath = path.join(__dirname, 'fixtures', 'test.stub'); beforeEach(cleanup); - it('should throw if extension is unknown', function(done) { - expect(function() { + it('should throw if extension is unknown', function (done) { + expect(function () { rechoir.prepare({}, './test/fixtures/test.whatever'); }).toThrow(/No module loader found for/); done(); }); - it('should return undefined if an unknown extension is specified when nothrow is enabled', function(done) { - expect(rechoir.prepare({}, './test/fixtures/.testrc', null, true)).toEqual(undefined); + it('should return undefined if an unknown extension is specified when nothrow is enabled', function (done) { + expect( + rechoir.prepare({}, './test/fixtures/.testrc', null, true) + ).toEqual(undefined); done(); }); - it('should throw if a module loader cannot be found or loaded', function(done) { - expect(function() { - rechoir.prepare({ - '.stub': ['nothere'], - }, testFilePath); + it('should throw if a module loader cannot be found or loaded', function (done) { + expect(function () { + rechoir.prepare( + { + '.stub': ['nothere'], + }, + testFilePath + ); require(testFilePath); }).toThrow(); done(); }); - describe('all module loaders that were attempted failed to load', function() { + describe('all module loaders that were attempted failed to load', function () { var exts = { - '.stub': [ - 'nothere', - 'orhere', - ], + '.stub': ['nothere', 'orhere'], }; // Check the failure entries in the thrown or returned error object. @@ -185,7 +199,7 @@ describe('rechoir', function() { expect(e.failures[1].module).toEqual(null); } - it('should throw error listing each module loader that was attempted when nothrow = false', function(done) { + it('should throw error listing each module loader that was attempted when nothrow = false', function (done) { var err; try { rechoir.prepare(exts, testFilePath); @@ -198,48 +212,51 @@ describe('rechoir', function() { done(); }); - it('should return error listing each module loader that was attempted when nothrow = true', function(done) { - checkFailures( - rechoir.prepare(exts, testFilePath, null, true) - ); + it('should return error listing each module loader that was attempted when nothrow = true', function (done) { + checkFailures(rechoir.prepare(exts, testFilePath, null, true)); done(); }); }); - it('should register a module loader for the specified extension', function(done) { - rechoir.prepare({ - '.stub': [ - 'nothere', - '../require-stub', - ], - }, testFilePath); - expect(function() { + it('should register a module loader for the specified extension', function (done) { + rechoir.prepare( + { + '.stub': ['nothere', '../require-stub'], + }, + testFilePath + ); + expect(function () { require(testFilePath); }).not.toThrow(Error); done(); }); - it('should return true if the module loader for the specified extension is already available', function(done) { - rechoir.prepare({ - '.stub': [ - 'nothere', - '../require-stub', - ], - }, testFilePath); - expect(rechoir.prepare({ - '.stub': [ - 'nothere', - '../require-stub', - ], - }, testFilePath)).toEqual(true); + it('should return true if the module loader for the specified extension is already available', function (done) { + rechoir.prepare( + { + '.stub': ['nothere', '../require-stub'], + }, + testFilePath + ); + expect( + rechoir.prepare( + { + '.stub': ['nothere', '../require-stub'], + }, + testFilePath + ) + ).toEqual(true); done(); }); - it('must not fail on folders with dots', function(done) { - rechoir.prepare({ '.stub': '../../require-stub' }, './test/fixtures/folder.with.dots/test.stub'); + it('must not fail on folders with dots', function (done) { + rechoir.prepare( + { '.stub': '../../require-stub' }, + './test/fixtures/folder.with.dots/test.stub' + ); expect(require('./fixtures/folder.with.dots/test.stub')).toEqual({ data: { trueKey: true, @@ -269,5 +286,4 @@ describe('rechoir', function() { done(); }); }); - }); From 652351476089b164d28e0d75bc53f3f5512ee404 Mon Sep 17 00:00:00 2001 From: sttk Date: Sat, 3 Apr 2021 19:30:34 +0900 Subject: [PATCH 3/9] Test: Add a test case using cwd for `prepare`. --- test/fixtures/cwd/test.foo | 0 test/index.js | 19 +++++++++++++++++-- 2 files changed, 17 insertions(+), 2 deletions(-) create mode 100644 test/fixtures/cwd/test.foo diff --git a/test/fixtures/cwd/test.foo b/test/fixtures/cwd/test.foo new file mode 100644 index 0000000..e69de29 diff --git a/test/index.js b/test/index.js index 020eac9..f766df4 100644 --- a/test/index.js +++ b/test/index.js @@ -270,7 +270,7 @@ describe('rechoir', function () { done(); }); - it('should register a module loader even if the extension is single character (issue #38)', function(done) { + it('should register a module loader even if the extension is single character (issue #38)', function (done) { var fpath = path.join(__dirname, 'fixtures', 'test.s'); rechoir.prepare({ '.s': [ @@ -279,11 +279,26 @@ describe('rechoir', function () { ], }, fpath); - expect(function() { + expect(function () { require(fpath); }).toNotThrow(Error); done(); }); + + it('should register a module loader for the specified extension with cwd', function (done) { + rechoir.prepare( + { + '.foo': ['nothere', '../require-stub'], + }, + path.join('cwd', 'test.foo'), + path.join(__dirname, 'fixtures') + ); + expect(function () { + require(testFilePath); + }).not.toThrow(Error); + + done(); + }); }); }); From 8c75bcf4f7275b48fb7a0f747ad251d775b2a606 Mon Sep 17 00:00:00 2001 From: sttk Date: Sun, 28 Feb 2021 18:25:11 +0900 Subject: [PATCH 4/9] Test: Introduce github action, and stop tests with travis-ci and appveyor. --- .github/workflows/dev.yml | 78 +++++++++++++++++++++++++++++++++++++++ .travis.yml | 11 ------ README.md | 8 ++-- appveyor.yml | 26 ------------- 4 files changed, 81 insertions(+), 42 deletions(-) create mode 100644 .github/workflows/dev.yml delete mode 100644 .travis.yml delete mode 100644 appveyor.yml diff --git a/.github/workflows/dev.yml b/.github/workflows/dev.yml new file mode 100644 index 0000000..49fe458 --- /dev/null +++ b/.github/workflows/dev.yml @@ -0,0 +1,78 @@ +name: dev +on: + pull_request: + push: + branches: + +env: + CI: true + +jobs: + prettier: + name: Format code + runs-on: ubuntu-latest + if: | + github.event_name == 'push' && + github.ref == 'refs/heads/master' && + github.repository_owner == 'gulpjs' + + steps: + - name: Checkout + uses: actions/checkout@v2 + + - name: Prettier + uses: gulpjs/prettier_action@v3.0 + with: + commit_message: 'Build: Run prettier' + prettier_options: '--write .' + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + + test: + name: Tests for Node ${{ matrix.node }} on ${{ matrix.os }} + runs-on: ${{ matrix.os }} + + steps: + - name: Clone repository + uses: actions/checkout@v2 + + - name: Set Node.js version + uses: actions/setup-node@v1 + with: + node-version: ${{ matrix.node }} + + - run: node --version + - run: npm --version + + - name: Install npm dependencies + run: npm install + + - name: Run lint and test + run: npm test + + - name: Coveralls Parallel + uses: coverallsapp/github-action@v1.1.0 + with: + github-token: ${{ secrets.GITHUB_TOKEN }} + parallel: true + env: + COVERALLS_FLAG_NAME: ${{matrix.os}}-node-${{ matrix.node }} + + strategy: + fail-fast: false + matrix: + node: [10, 12, 14] + os: [ubuntu-latest, windows-latest, macos-latest] + + coveralls: + name: Finish up + runs-on: ubuntu-latest + needs: test + + steps: + - name: Coveralls Finished + uses: coverallsapp/github-action@v1.1.0 + with: + github-token: ${{ secrets.GITHUB_TOKEN }} + parallel-finished: true + diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 7e14b19..0000000 --- a/.travis.yml +++ /dev/null @@ -1,11 +0,0 @@ -sudo: false -language: node_js -node_js: - - '10' - - '8' - - '6' - - '4' - - '0.12' - - '0.10' -after_script: - - npm run coveralls diff --git a/README.md b/README.md index 6d5f2fe..3d02b76 100644 --- a/README.md +++ b/README.md @@ -6,7 +6,7 @@ # rechoir -[![NPM version][npm-image]][npm-url] [![Downloads][downloads-image]][npm-url] [![Travis Build Status][travis-image]][travis-url] [![AppVeyor Build Status][appveyor-image]][appveyor-url] [![Coveralls Status][coveralls-image]][coveralls-url] +[![NPM version][npm-image]][npm-url] [![Downloads][downloads-image]][npm-url] [![Build Status][ci-image]][ci-url] [![Coveralls Status][coveralls-image]][coveralls-url] Prepare a node environment to require files with different extensions. @@ -67,10 +67,8 @@ MIT [downloads-image]: https://img.shields.io/npm/dm/rechoir.svg?style=flat-square [npm-url]: https://www.npmjs.com/package/rechoir [npm-image]: https://img.shields.io/npm/v/rechoir.svg?style=flat-square -[travis-url]: https://travis-ci.org/gulpjs/rechoir -[travis-image]: https://img.shields.io/travis/gulpjs/rechoir.svg?label=travis-ci -[appveyor-url]: https://ci.appveyor.com/project/gulpjs/rechoir -[appveyor-image]: https://img.shields.io/appveyor/ci/gulpjs/rechoir.svg?label=appveyor +[ci-url]: https://github.com/gulpjs/rechoir/actions?query=workflow:dev +[ci-image]: https://img.shields.io/github/workflow/status/gulpjs/rechoir/dev?style=flat-square [coveralls-url]: https://coveralls.io/r/gulpjs/rechoir [coveralls-image]: https://img.shields.io/coveralls/gulpjs/rechoir/master.svg [tidelift-url]: https://tidelift.com/subscription/pkg/npm-rechoir?utm_source=npm-rechoir&utm_medium=referral&utm_campaign=enterprise&utm_term=repo diff --git a/appveyor.yml b/appveyor.yml deleted file mode 100644 index cdcc345..0000000 --- a/appveyor.yml +++ /dev/null @@ -1,26 +0,0 @@ -# http://www.appveyor.com/docs/appveyor-yml -# http://www.appveyor.com/docs/lang/nodejs-iojs - -environment: - matrix: - # node.js - - nodejs_version: '0.10' - - nodejs_version: '0.12' - - nodejs_version: '4' - - nodejs_version: '6' - - nodejs_version: '8' - - nodejs_version: '10' - -install: - - ps: Install-Product node $env:nodejs_version - - npm install - -test_script: - - node --version - - npm --version - - cmd: npm test - -build: off - -# build version format -version: '{build}' From 1f2af81829d995326c8253a90b767b579a23da6c Mon Sep 17 00:00:00 2001 From: sttk Date: Sat, 12 Jun 2021 18:37:01 +0900 Subject: [PATCH 5/9] Scaffold: Remove .github/security.md because of gulpjs global security policy --- .github/security.md | 15 --------------- 1 file changed, 15 deletions(-) delete mode 100644 .github/security.md diff --git a/.github/security.md b/.github/security.md deleted file mode 100644 index 75c346e..0000000 --- a/.github/security.md +++ /dev/null @@ -1,15 +0,0 @@ -# Security Policy - -## Supported Versions - -| Version | Supported | -| ------- | ------------------ | -| 1.x.x | :white_check_mark: | -| 0.7.0 | :white_check_mark: | -| < 0.7.0 | :x: | - -## Reporting a Vulnerability - -To report a security vulnerability, please use the -[Tidelift security contact](https://tidelift.com/security). -Tidelift will coordinate the fix and disclosure. From 29df841d30a7624f5c5740ba854418e691c4a157 Mon Sep 17 00:00:00 2001 From: Blaine Bublitz Date: Fri, 23 Jul 2021 21:16:13 -0700 Subject: [PATCH 6/9] fix failing tests --- test/extension.test.js | 52 +++++++++++++++++++++--------------------- test/index.js | 2 +- 2 files changed, 27 insertions(+), 27 deletions(-) diff --git a/test/extension.test.js b/test/extension.test.js index 2901f72..b320fea 100644 --- a/test/extension.test.js +++ b/test/extension.test.js @@ -1,125 +1,125 @@ 'use strict'; var expect = require('expect'); -var extension = require('../../lib/extension'); +var extension = require('../lib/extension'); -describe('Take out possible extensions from a file path', function() { +describe('Take out possible extensions from a file path', function () { - it('should return an extension: ".js" from "app.js"', function(done) { - expect(extension('app.js')).toEqual('.js'); - expect(extension('a/b/c/app.js')).toEqual('.js'); + it('should return an extension: ".js" from "app.js"', function (done) { + expect(extension('app.js')).toEqual(['.js']); + expect(extension('a/b/c/app.js')).toEqual(['.js']); done(); }); - it('should return extensions: ".babel.js" and ".js" from "app.babel.js"', function(done) { + it('should return extensions: ".babel.js" and ".js" from "app.babel.js"', function (done) { expect(extension('app.babel.js')).toEqual(['.babel.js', '.js']); expect(extension('a/b/c/app.babel.js')).toEqual(['.babel.js', '.js']); done(); }); - it('should return extensions: ".aaa.bbb.ccc", ".aaa.bbb" and ".ccc" from "app.aaa.bbb.ccc"', function(done) { + it('should return extensions: ".aaa.bbb.ccc", ".aaa.bbb" and ".ccc" from "app.aaa.bbb.ccc"', function (done) { expect(extension('app.aaa.bbb.ccc')).toEqual(['.aaa.bbb.ccc', '.bbb.ccc', '.ccc']); expect(extension('a/b/c/app.aaa.bbb.ccc')).toEqual(['.aaa.bbb.ccc', '.bbb.ccc', '.ccc']); done(); }); - it('should return an extension: ".j" from "app.j"', function(done) { - expect(extension('app.j')).toEqual('.j'); - expect(extension('a/b/c/app.j')).toEqual('.j'); + it('should return an extension: ".j" from "app.j"', function (done) { + expect(extension('app.j')).toEqual(['.j']); + expect(extension('a/b/c/app.j')).toEqual(['.j']); done(); }); - it('should return extensions: ".b.j" and ".j" from "app.b.j"', function(done) { + it('should return extensions: ".b.j" and ".j" from "app.b.j"', function (done) { expect(extension('app.b.j')).toEqual(['.b.j', '.j']); expect(extension('a/b/c/app.b.j')).toEqual(['.b.j', '.j']); done(); }); - it('should return extensions: ".a.b.c", ".a.b" and ".c" from "app.a.b.c"', function(done) { + it('should return extensions: ".a.b.c", ".a.b" and ".c" from "app.a.b.c"', function (done) { expect(extension('app.a.b.c')).toEqual(['.a.b.c', '.b.c', '.c']); expect(extension('a/b/c/app.a.b.c')).toEqual(['.a.b.c', '.b.c', '.c']); done(); }); - it('should return undefined from "."', function(done) { + it('should return undefined from "."', function (done) { expect(extension('.')).toBe(undefined); expect(extension('a/b/c/.')).toBe(undefined); done(); }); - it('should return undefined from ".."', function(done) { + it('should return undefined from ".."', function (done) { expect(extension('..')).toBe(undefined); expect(extension('a/b/c/..')).toBe(undefined); done(); }); - it('should return undefined from "..."', function(done) { + it('should return undefined from "..."', function (done) { expect(extension('...')).toBe(undefined); expect(extension('a/b/c/...')).toBe(undefined); done(); }); - it('should return undefined from "a."', function(done) { + it('should return undefined from "a."', function (done) { expect(extension('a.')).toBe(undefined); expect(extension('a/b/c/a.')).toBe(undefined); done(); }); - it('should return undefined from "app."', function(done) { + it('should return undefined from "app."', function (done) { expect(extension('app.')).toBe(undefined); expect(extension('a/b/c/app.')).toBe(undefined); done(); }); - it('should return undefined from "a.b.c."', function(done) { + it('should return undefined from "a.b.c."', function (done) { expect(extension('a.b.c.')).toBe(undefined); expect(extension('a/b/c/a.b.c.')).toBe(undefined); done(); }); - it('should return undefined from ".a"', function(done) { + it('should return undefined from ".a"', function (done) { expect(extension('.a')).toBe(undefined); expect(extension('a/b/c/.a')).toBe(undefined); done(); }); - it('should return undefined from ".app"', function(done) { + it('should return undefined from ".app"', function (done) { expect(extension('.app')).toBe(undefined); expect(extension('a/b/c/.app')).toBe(undefined); done(); }); - it('should return undefined from ".a."', function(done) { + it('should return undefined from ".a."', function (done) { expect(extension('.a.')).toBe(undefined); expect(extension('a/b/c/.a.')).toBe(undefined); done(); }); - it('should return undefined from ".app."', function(done) { + it('should return undefined from ".app."', function (done) { expect(extension('.app.')).toBe(undefined); expect(extension('a/b/c/.app.')).toBe(undefined); done(); }); - it('should return undefined from ".a.b.c."', function(done) { + it('should return undefined from ".a.b.c."', function (done) { expect(extension('.a.b.c.')).toBe(undefined); expect(extension('a/b/c/.a.b.c.')).toBe(undefined); done(); }); - it('should return ".b.c" and ".c" from ".a.b.c"', function(done) { + it('should return ".b.c" and ".c" from ".a.b.c"', function (done) { expect(extension('.a.b.c')).toEqual(['.b.c', '.c']); expect(extension('a/b/c/.a.b.c')).toEqual(['.b.c', '.c']); done(); }); - it('should return ".bb.cc" and ".cc" from ".aa.bb.cc"', function(done) { + it('should return ".bb.cc" and ".cc" from ".aa.bb.cc"', function (done) { expect(extension('.aa.bb.cc')).toEqual(['.bb.cc', '.cc']); expect(extension('a/b/c/.aa.bb.cc')).toEqual(['.bb.cc', '.cc']); done(); }); - it('should return "..b" and ".b" from ".a..b"', function(done) { + it('should return "..b" and ".b" from ".a..b"', function (done) { expect(extension('.a..b')).toEqual(['..b', '.b']); expect(extension('a/b/c/.a..b')).toEqual(['..b', '.b']); done(); diff --git a/test/index.js b/test/index.js index f766df4..875ed4a 100644 --- a/test/index.js +++ b/test/index.js @@ -281,7 +281,7 @@ describe('rechoir', function () { expect(function () { require(fpath); - }).toNotThrow(Error); + }).not.toThrow(Error); done(); }); From 21aefdca175bb2664b81dc6457135e48c5570bd8 Mon Sep 17 00:00:00 2001 From: Blaine Bublitz Date: Fri, 23 Jul 2021 21:20:12 -0700 Subject: [PATCH 7/9] run update-template command --- .github/workflows/dev.yml | 45 ++++++++++++++++------------------- .github/workflows/release.yml | 16 +++++++++++++ .prettierignore | 1 + LICENSE | 35 +++++++++++++-------------- package.json | 2 +- 5 files changed, 55 insertions(+), 44 deletions(-) create mode 100644 .github/workflows/release.yml diff --git a/.github/workflows/dev.yml b/.github/workflows/dev.yml index 49fe458..3b07263 100644 --- a/.github/workflows/dev.yml +++ b/.github/workflows/dev.yml @@ -3,7 +3,8 @@ on: pull_request: push: branches: - + - master + - main env: CI: true @@ -11,10 +12,7 @@ jobs: prettier: name: Format code runs-on: ubuntu-latest - if: | - github.event_name == 'push' && - github.ref == 'refs/heads/master' && - github.repository_owner == 'gulpjs' + if: ${{ github.event_name == 'push' }} steps: - name: Checkout @@ -23,21 +21,25 @@ jobs: - name: Prettier uses: gulpjs/prettier_action@v3.0 with: - commit_message: 'Build: Run prettier' + commit_message: 'chore: Run prettier' prettier_options: '--write .' - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} test: name: Tests for Node ${{ matrix.node }} on ${{ matrix.os }} runs-on: ${{ matrix.os }} + strategy: + fail-fast: false + matrix: + node: [10, 12, 14, 16] + os: [ubuntu-latest, windows-latest, macos-latest] + steps: - name: Clone repository uses: actions/checkout@v2 - name: Set Node.js version - uses: actions/setup-node@v1 + uses: actions/setup-node@v2 with: node-version: ${{ matrix.node }} @@ -47,32 +49,27 @@ jobs: - name: Install npm dependencies run: npm install - - name: Run lint and test + - name: Run lint + run: npm run lint + + - name: Run tests run: npm test - - name: Coveralls Parallel - uses: coverallsapp/github-action@v1.1.0 + - name: Coveralls + uses: coverallsapp/github-action@v1.1.2 with: github-token: ${{ secrets.GITHUB_TOKEN }} + flag-name: ${{matrix.os}}-node-${{ matrix.node }} parallel: true - env: - COVERALLS_FLAG_NAME: ${{matrix.os}}-node-${{ matrix.node }} - - strategy: - fail-fast: false - matrix: - node: [10, 12, 14] - os: [ubuntu-latest, windows-latest, macos-latest] coveralls: - name: Finish up - runs-on: ubuntu-latest needs: test + name: Finish up + runs-on: ubuntu-latest steps: - name: Coveralls Finished - uses: coverallsapp/github-action@v1.1.0 + uses: coverallsapp/github-action@v1.1.2 with: github-token: ${{ secrets.GITHUB_TOKEN }} parallel-finished: true - diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..87cd13c --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,16 @@ +name: release +on: + push: + branches: + - master + - main + +jobs: + release-please: + runs-on: ubuntu-latest + steps: + - uses: GoogleCloudPlatform/release-please-action@v2 + with: + token: ${{ secrets.GITHUB_TOKEN }} + release-type: node + package-name: release-please-action diff --git a/.prettierignore b/.prettierignore index ed88d37..c96ebe0 100644 --- a/.prettierignore +++ b/.prettierignore @@ -1,2 +1,3 @@ coverage/ .nyc_output/ +CHANGELOG.md diff --git a/LICENSE b/LICENSE index 41ed300..4f92523 100644 --- a/LICENSE +++ b/LICENSE @@ -1,24 +1,21 @@ The MIT License (MIT) -Copyright (c) 2014-2019 Tyler Kellen , Blaine Bublitz , and Eric Schoffstall +Copyright (c) 2014-2019, 2021 Tyler Kellen , Blaine Bublitz , and Eric Schoffstall -Permission is hereby granted, free of charge, to any person -obtaining a copy of this software and associated documentation -files (the "Software"), to deal in the Software without -restriction, including without limitation the rights to use, -copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the -Software is furnished to do so, subject to the following -conditions: +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES -OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT -HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, -WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR -OTHER DEALINGS IN THE SOFTWARE. +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/package.json b/package.json index 65ecff2..84249e8 100644 --- a/package.json +++ b/package.json @@ -29,7 +29,7 @@ "devDependencies": { "eslint": "^7.21.0", "eslint-config-gulp": "^5.0.1", - "expect": "^26.6.2", + "expect": "^27.0.0", "mocha": "^8.3.0", "nyc": "^15.1.0" }, From 0331530f9ecdb4a760061af1b352a0877ea2fcac Mon Sep 17 00:00:00 2001 From: Blaine Bublitz Date: Fri, 23 Jul 2021 21:24:10 -0700 Subject: [PATCH 8/9] remove tidelift copy because we have the website & sponsors --- README.md | 6 ------ 1 file changed, 6 deletions(-) diff --git a/README.md b/README.md index 3d02b76..693c972 100644 --- a/README.md +++ b/README.md @@ -16,12 +16,6 @@ This module, in conjunction with [interpret]-like objects, can register any file **Note:** While `rechoir` will automatically load and register transpilers like `coffee-script`, you must provide a local installation. The transpilers are **not** bundled with this module. -## rechoir for enterprise - -Available as part of the Tidelift Subscription. - -The maintainers of `rechoir` and thousands of other packages are working with Tidelift to deliver commercial support and maintenance for the open source dependencies you use to build your applications. Save time, reduce risk, and improve code health, while paying the maintainers of the exact dependencies you use. [Learn more.][tidelift-url] - ## Usage ```js From 74797422d946141e2d5684fef5d37cbe389921b7 Mon Sep 17 00:00:00 2001 From: Blaine Bublitz Date: Fri, 23 Jul 2021 21:24:42 -0700 Subject: [PATCH 9/9] move around links a little --- README.md | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 693c972..6e65abb 100644 --- a/README.md +++ b/README.md @@ -12,7 +12,7 @@ Prepare a node environment to require files with different extensions. ## What is it? -This module, in conjunction with [interpret]-like objects, can register any filetype the npm ecosystem has a module loader for. This library is a dependency of [Liftoff]. +This module, in conjunction with [interpret]-like objects, can register any filetype the npm ecosystem has a module loader for. This library is a dependency of [liftoff]. **Note:** While `rechoir` will automatically load and register transpilers like `coffee-script`, you must provide a local installation. The transpilers are **not** bundled with this module. @@ -55,15 +55,19 @@ If a loader is already registered, this will simply return `true`. MIT -[interpret]: https://github.com/gulpjs/interpret -[require.extensions]: https://nodejs.org/api/modules.html#modules_require_extensions -[liftoff]: https://github.com/js-cli/js-liftoff [downloads-image]: https://img.shields.io/npm/dm/rechoir.svg?style=flat-square [npm-url]: https://www.npmjs.com/package/rechoir [npm-image]: https://img.shields.io/npm/v/rechoir.svg?style=flat-square + [ci-url]: https://github.com/gulpjs/rechoir/actions?query=workflow:dev [ci-image]: https://img.shields.io/github/workflow/status/gulpjs/rechoir/dev?style=flat-square + [coveralls-url]: https://coveralls.io/r/gulpjs/rechoir [coveralls-image]: https://img.shields.io/coveralls/gulpjs/rechoir/master.svg -[tidelift-url]: https://tidelift.com/subscription/pkg/npm-rechoir?utm_source=npm-rechoir&utm_medium=referral&utm_campaign=enterprise&utm_term=repo + + + +[interpret]: https://github.com/gulpjs/interpret +[require.extensions]: https://nodejs.org/api/modules.html#modules_require_extensions +[liftoff]: https://github.com/js-cli/js-liftoff