pax_global_header00006660000000000000000000000064133151541670014520gustar00rootroot0000000000000052 comment=635c2c7e33910bb89845bbeb8ef2c4eda36527f2 enhanced-resolve-4.1.0/000077500000000000000000000000001331515416700147445ustar00rootroot00000000000000enhanced-resolve-4.1.0/.editorconfig000066400000000000000000000001021331515416700174120ustar00rootroot00000000000000root = true [*.js] indent_style=tab trim_trailing_whitespace=trueenhanced-resolve-4.1.0/.eslintignore000066400000000000000000000000221331515416700174410ustar00rootroot00000000000000test/fixtures/**/*enhanced-resolve-4.1.0/.eslintrc000066400000000000000000000025621331515416700165750ustar00rootroot00000000000000{ "root": true, "plugins": ["node", "eslint-plugin-node"], "extends": ["eslint:recommended", "plugin:node/recommended"], "env": { "node": true, "es6": true }, "rules": { "quotes": ["error", "double"], "no-undef": "error", "no-extra-semi": "error", "semi": "error", "no-template-curly-in-string": "error", "no-caller": "error", "yoda": "error", "eqeqeq": "error", "global-require": "off", "brace-style": "error", "eol-last": "error", "indent": ["error", "tab", { "SwitchCase": 1 }], "no-extra-bind": "warn", "no-empty": "off", "no-multiple-empty-lines": "error", "no-multi-spaces": "error", "no-process-exit": "warn", "space-in-parens": "error", "no-trailing-spaces": "error", "no-use-before-define": "off", "no-unused-vars": ["error", {"args": "none"}], "key-spacing": "error", "space-infix-ops": "error", "no-unsafe-negation": "error", "no-loop-func": "warn", "space-before-function-paren": ["error", "never"], "space-before-blocks": "error", "object-curly-spacing": ["error", "always"], "keyword-spacing": ["error", { "after": false, "overrides": { "try": {"after": true}, "else": {"after": true}, "throw": {"after": true}, "case": {"after": true}, "return": {"after": true}, "finally": {"after": true}, "do": {"after": true} } }], "no-console": "off", "valid-jsdoc": "error" } } enhanced-resolve-4.1.0/.gitignore000066400000000000000000000000271331515416700167330ustar00rootroot00000000000000/node_modules /coverageenhanced-resolve-4.1.0/.jsbeautifyrc000066400000000000000000000013021331515416700174330ustar00rootroot00000000000000{ "js": { "allowed_file_extensions": ["js", "json", "jshintrc", "jsbeautifyrc"], "brace_style": "collapse", "break_chained_methods": false, "e4x": true, "eval_code": false, "end_with_newline": true, "indent_char": "\t", "indent_level": 0, "indent_size": 1, "indent_with_tabs": true, "jslint_happy": false, "jslint_happy_align_switch_case": true, "space_after_anon_function": false, "keep_array_indentation": false, "keep_function_indentation": false, "max_preserve_newlines": 2, "preserve_newlines": true, "space_before_conditional": false, "space_in_paren": false, "unescape_strings": false, "wrap_line_length": 0 } }enhanced-resolve-4.1.0/.travis.yml000066400000000000000000000004061331515416700170550ustar00rootroot00000000000000sudo: false language: node_js node_js: - "8" - "6" script: npm run travis after_success: - cat ./coverage/lcov.info | node_modules/.bin/coveralls --verbose - cat ./coverage/coverage.json | node_modules/codecov.io/bin/codecov.io.js - rm -rf ./coverage enhanced-resolve-4.1.0/LICENSE000066400000000000000000000020571331515416700157550ustar00rootroot00000000000000Copyright JS Foundation and other contributors 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 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. enhanced-resolve-4.1.0/README.md000066400000000000000000000135071331515416700162310ustar00rootroot00000000000000# enhanced-resolve Offers an async require.resolve function. It's highly configurable. ## Features * plugin system * provide a custom filesystem * sync and async node.js filesystems included ## Getting Started ### Install ```sh # npm npm install enhanced-resolve # or Yarn yarn add enhanced-resolve ``` ### Creating a Resolver The easiest way to create a resolver is to use the `createResolver` function on `ResolveFactory`, along with one of the supplied File System implementations. ```js const { NodeJsInputFileSystem, CachedInputFileSystem, ResolverFactory } = require('enhanced-resolve'); // create a resolver const myResolver = ResolverFactory.createResolver({ // Typical usage will consume the `NodeJsInputFileSystem` + `CachedInputFileSystem`, which wraps the Node.js `fs` wrapper to add resilience + caching. fileSystem: new CachedInputFileSystem(new NodeJsInputFileSystem(), 4000), extensions: ['.js', '.json'] /* any other resolver options here. Options/defaults can be seen below */ }); // resolve a file with the new resolver const context = {}; const resolveContext = {}; const lookupStartPath = '/Users/webpack/some/root/dir'; const request = './path/to-look-up.js'; myResolver.resolve({}, lookupStartPath, request, resolveContext, (err/*Error*/, filepath/*string*/) => { // Do something with the path }); ``` For more examples creating different types resolvers (sync/async, context, etc) see `lib/node.js`. #### Resolver Options | Field | Default | Description | | ------------------------ | --------------------------- | ---------------------------------------------------------------------------------- | | alias | [] | A list of module alias configurations or an object which maps key to value | | aliasFields | [] | A list of alias fields in description files | | cacheWithContext | true | If unsafe cache is enabled, includes `request.context` in the cache key | | descriptionFiles | ["package.json"] | A list of description files to read from | | enforceExtension | false | Enforce that a extension from extensions must be used | | enforceModuleExtension | false | Enforce that a extension from moduleExtensions must be used | | extensions | [".js", ".json", ".node"] | A list of extensions which should be tried for files | | mainFields | ["main"] | A list of main fields in description files | | mainFiles | ["index"] | A list of main files in directories | | modules | ["node_modules"] | A list of directories to resolve modules from, can be absolute path or folder name | | unsafeCache | false | Use this cache object to unsafely cache the successful requests | | plugins | [] | A list of additional resolve plugins which should be applied | | symlinks | true | Whether to resolve symlinks to their symlinked location | | cachePredicate | function() { return true }; | A function which decides whether a request should be cached or not. An object is passed to the function with `path` and `request` properties. | | moduleExtensions | [] | A list of module extensions which should be tried for modules | | resolveToContext | false | Resolve to a context instead of a file | | fileSystem | | The file system which should be used | | resolver | undefined | A prepared Resolver to which the plugins are attached | ## Plugins Similar to `webpack`, the core of `enhanced-resolve` functionality is implemented as individual plugins that are executed using [`Tapable`](https://github.com/webpack/tapable). These plugins can extend the functionality of the library, adding other ways for files/contexts to be resolved. A plugin should be a `class` (or its ES5 equivalent) with an `apply` method. The `apply` method will receive a `resolver` instance, that can be used to hook in to the event system. ### Plugin Boilerplate ```js class MyResolverPlugin { constructor(source, target) { this.source = source; this.target = target; } apply(resolver) { const target = resolver.ensureHook(this.target); resolver.getHook(this.source).tapAsync("MyResolverPlugin", (request, resolveContext, callback) => { // Any logic you need to create a new `request` can go here resolver.doResolve(target, request, null, resolveContext, callback); }); } } ``` Plugins are executed in a pipeline, and register which event they should be executed before/after. In the example above, `source` is the name of the event that starts the pipeline, and `target` is what event this plugin should fire, which is what continues the execution of the pipeline. For an example of how these different plugin events create a chain, see `lib/ResolverFactory.js`, in the `//// pipeline ////` section. ## Tests ``` javascript npm test ``` [![Build Status](https://secure.travis-ci.org/webpack/enhanced-resolve.png?branch=master)](http://travis-ci.org/webpack/enhanced-resolve) ## Passing options from webpack If you are using `webpack`, and you want to pass custom options to `enhanced-resolve`, the options are passed from the `resolve` key of your webpack configuration e.g.: ``` resolve: { extensions: ['', '.js', '.jsx'], modules: ['src', 'node_modules'], plugins: [new DirectoryNamedWebpackPlugin()] ... }, ``` ## License Copyright (c) 2012-2016 Tobias Koppers MIT (http://www.opensource.org/licenses/mit-license.php) enhanced-resolve-4.1.0/lib/000077500000000000000000000000001331515416700155125ustar00rootroot00000000000000enhanced-resolve-4.1.0/lib/AliasFieldPlugin.js000066400000000000000000000035411331515416700212270ustar00rootroot00000000000000/* MIT License http://www.opensource.org/licenses/mit-license.php Author Tobias Koppers @sokra */ "use strict"; const DescriptionFileUtils = require("./DescriptionFileUtils"); const getInnerRequest = require("./getInnerRequest"); module.exports = class AliasFieldPlugin { constructor(source, field, target) { this.source = source; this.field = field; this.target = target; } apply(resolver) { const target = resolver.ensureHook(this.target); resolver.getHook(this.source).tapAsync("AliasFieldPlugin", (request, resolveContext, callback) => { if(!request.descriptionFileData) return callback(); const innerRequest = getInnerRequest(resolver, request); if(!innerRequest) return callback(); const fieldData = DescriptionFileUtils.getField(request.descriptionFileData, this.field); if(typeof fieldData !== "object") { if(resolveContext.log) resolveContext.log("Field '" + this.field + "' doesn't contain a valid alias configuration"); return callback(); } const data1 = fieldData[innerRequest]; const data2 = fieldData[innerRequest.replace(/^\.\//, "")]; const data = typeof data1 !== "undefined" ? data1 : data2; if(data === innerRequest) return callback(); if(data === undefined) return callback(); if(data === false) { const ignoreObj = Object.assign({}, request, { path: false }); return callback(null, ignoreObj); } const obj = Object.assign({}, request, { path: request.descriptionFileRoot, request: data }); resolver.doResolve(target, obj, "aliased from description file " + request.descriptionFilePath + " with mapping '" + innerRequest + "' to '" + data + "'", resolveContext, (err, result) => { if(err) return callback(err); // Don't allow other aliasing or raw request if(result === undefined) return callback(null, null); callback(null, result); }); }); } }; enhanced-resolve-4.1.0/lib/AliasPlugin.js000066400000000000000000000033751331515416700202700ustar00rootroot00000000000000/* MIT License http://www.opensource.org/licenses/mit-license.php Author Tobias Koppers @sokra */ "use strict"; function startsWith(string, searchString) { const stringLength = string.length; const searchLength = searchString.length; // early out if the search length is greater than the search string if(searchLength > stringLength) { return false; } let index = -1; while(++index < searchLength) { if(string.charCodeAt(index) !== searchString.charCodeAt(index)) { return false; } } return true; } module.exports = class AliasPlugin { constructor(source, options, target) { this.source = source; this.options = Array.isArray(options) ? options : [options]; this.target = target; } apply(resolver) { const target = resolver.ensureHook(this.target); resolver.getHook(this.source).tapAsync("AliasPlugin", (request, resolveContext, callback) => { const innerRequest = request.request || request.path; if(!innerRequest) return callback(); for(const item of this.options) { if(innerRequest === item.name || (!item.onlyModule && startsWith(innerRequest, item.name + "/"))) { if(innerRequest !== item.alias && !startsWith(innerRequest, item.alias + "/")) { const newRequestStr = item.alias + innerRequest.substr(item.name.length); const obj = Object.assign({}, request, { request: newRequestStr }); return resolver.doResolve(target, obj, "aliased with mapping '" + item.name + "': '" + item.alias + "' to '" + newRequestStr + "'", resolveContext, (err, result) => { if(err) return callback(err); // Don't allow other aliasing or raw request if(result === undefined) return callback(null, null); callback(null, result); }); } } } return callback(); }); } }; enhanced-resolve-4.1.0/lib/AppendPlugin.js000066400000000000000000000013051331515416700204350ustar00rootroot00000000000000/* MIT License http://www.opensource.org/licenses/mit-license.php Author Tobias Koppers @sokra */ "use strict"; module.exports = class AppendPlugin { constructor(source, appending, target) { this.source = source; this.appending = appending; this.target = target; } apply(resolver) { const target = resolver.ensureHook(this.target); resolver.getHook(this.source).tapAsync("AppendPlugin", (request, resolveContext, callback) => { const obj = Object.assign({}, request, { path: request.path + this.appending, relativePath: request.relativePath && (request.relativePath + this.appending) }); resolver.doResolve(target, obj, this.appending, resolveContext, callback); }); } }; enhanced-resolve-4.1.0/lib/CachedInputFileSystem.js000066400000000000000000000162401331515416700222470ustar00rootroot00000000000000/* MIT License http://www.opensource.org/licenses/mit-license.php Author Tobias Koppers @sokra */ "use strict"; class Storage { constructor(duration) { this.duration = duration; this.running = new Map(); this.data = new Map(); this.levels = []; if(duration > 0) { this.levels.push(new Set(), new Set(), new Set(), new Set(), new Set(), new Set(), new Set(), new Set(), new Set()); for(let i = 8000; i < duration; i += 500) this.levels.push(new Set()); } this.count = 0; this.interval = null; this.needTickCheck = false; this.nextTick = null; this.passive = true; this.tick = this.tick.bind(this); } ensureTick() { if(!this.interval && this.duration > 0 && !this.nextTick) this.interval = setInterval(this.tick, Math.floor(this.duration / this.levels.length)); } finished(name, err, result) { const callbacks = this.running.get(name); this.running.delete(name); if(this.duration > 0) { this.data.set(name, [err, result]); const levelData = this.levels[0]; this.count -= levelData.size; levelData.add(name); this.count += levelData.size; this.ensureTick(); } for(let i = 0; i < callbacks.length; i++) { callbacks[i](err, result); } } finishedSync(name, err, result) { if(this.duration > 0) { this.data.set(name, [err, result]); const levelData = this.levels[0]; this.count -= levelData.size; levelData.add(name); this.count += levelData.size; this.ensureTick(); } } provide(name, provider, callback) { if(typeof name !== "string") { callback(new TypeError("path must be a string")); return; } let running = this.running.get(name); if(running) { running.push(callback); return; } if(this.duration > 0) { this.checkTicks(); const data = this.data.get(name); if(data) { return process.nextTick(() => { callback.apply(null, data); }); } } this.running.set(name, running = [callback]); provider(name, (err, result) => { this.finished(name, err, result); }); } provideSync(name, provider) { if(typeof name !== "string") { throw new TypeError("path must be a string"); } if(this.duration > 0) { this.checkTicks(); const data = this.data.get(name); if(data) { if(data[0]) throw data[0]; return data[1]; } } let result; try { result = provider(name); } catch(e) { this.finishedSync(name, e); throw e; } this.finishedSync(name, null, result); return result; } tick() { const decay = this.levels.pop(); for(let item of decay) { this.data.delete(item); } this.count -= decay.size; decay.clear(); this.levels.unshift(decay); if(this.count === 0) { clearInterval(this.interval); this.interval = null; this.nextTick = null; return true; } else if(this.nextTick) { this.nextTick += Math.floor(this.duration / this.levels.length); const time = new Date().getTime(); if(this.nextTick > time) { this.nextTick = null; this.interval = setInterval(this.tick, Math.floor(this.duration / this.levels.length)); return true; } } else if(this.passive) { clearInterval(this.interval); this.interval = null; this.nextTick = new Date().getTime() + Math.floor(this.duration / this.levels.length); } else { this.passive = true; } } checkTicks() { this.passive = false; if(this.nextTick) { while(!this.tick()); } } purge(what) { if(!what) { this.count = 0; clearInterval(this.interval); this.nextTick = null; this.data.clear(); this.levels.forEach(level => { level.clear(); }); } else if(typeof what === "string") { for(let key of this.data.keys()) { if(key.startsWith(what)) this.data.delete(key); } } else { for(let i = what.length - 1; i >= 0; i--) { this.purge(what[i]); } } } } module.exports = class CachedInputFileSystem { constructor(fileSystem, duration) { this.fileSystem = fileSystem; this._statStorage = new Storage(duration); this._readdirStorage = new Storage(duration); this._readFileStorage = new Storage(duration); this._readJsonStorage = new Storage(duration); this._readlinkStorage = new Storage(duration); this._stat = this.fileSystem.stat ? this.fileSystem.stat.bind(this.fileSystem) : null; if(!this._stat) this.stat = null; this._statSync = this.fileSystem.statSync ? this.fileSystem.statSync.bind(this.fileSystem) : null; if(!this._statSync) this.statSync = null; this._readdir = this.fileSystem.readdir ? this.fileSystem.readdir.bind(this.fileSystem) : null; if(!this._readdir) this.readdir = null; this._readdirSync = this.fileSystem.readdirSync ? this.fileSystem.readdirSync.bind(this.fileSystem) : null; if(!this._readdirSync) this.readdirSync = null; this._readFile = this.fileSystem.readFile ? this.fileSystem.readFile.bind(this.fileSystem) : null; if(!this._readFile) this.readFile = null; this._readFileSync = this.fileSystem.readFileSync ? this.fileSystem.readFileSync.bind(this.fileSystem) : null; if(!this._readFileSync) this.readFileSync = null; if(this.fileSystem.readJson) { this._readJson = this.fileSystem.readJson.bind(this.fileSystem); } else if(this.readFile) { this._readJson = (path, callback) => { this.readFile(path, (err, buffer) => { if(err) return callback(err); let data; try { data = JSON.parse(buffer.toString("utf-8")); } catch(e) { return callback(e); } callback(null, data); }); }; } else { this.readJson = null; } if(this.fileSystem.readJsonSync) { this._readJsonSync = this.fileSystem.readJsonSync.bind(this.fileSystem); } else if(this.readFileSync) { this._readJsonSync = (path) => { const buffer = this.readFileSync(path); const data = JSON.parse(buffer.toString("utf-8")); return data; }; } else { this.readJsonSync = null; } this._readlink = this.fileSystem.readlink ? this.fileSystem.readlink.bind(this.fileSystem) : null; if(!this._readlink) this.readlink = null; this._readlinkSync = this.fileSystem.readlinkSync ? this.fileSystem.readlinkSync.bind(this.fileSystem) : null; if(!this._readlinkSync) this.readlinkSync = null; } stat(path, callback) { this._statStorage.provide(path, this._stat, callback); } readdir(path, callback) { this._readdirStorage.provide(path, this._readdir, callback); } readFile(path, callback) { this._readFileStorage.provide(path, this._readFile, callback); } readJson(path, callback) { this._readJsonStorage.provide(path, this._readJson, callback); } readlink(path, callback) { this._readlinkStorage.provide(path, this._readlink, callback); } statSync(path) { return this._statStorage.provideSync(path, this._statSync); } readdirSync(path) { return this._readdirStorage.provideSync(path, this._readdirSync); } readFileSync(path) { return this._readFileStorage.provideSync(path, this._readFileSync); } readJsonSync(path) { return this._readJsonStorage.provideSync(path, this._readJsonSync); } readlinkSync(path) { return this._readlinkStorage.provideSync(path, this._readlinkSync); } purge(what) { this._statStorage.purge(what); this._readdirStorage.purge(what); this._readFileStorage.purge(what); this._readlinkStorage.purge(what); this._readJsonStorage.purge(what); } }; enhanced-resolve-4.1.0/lib/CloneBasenamePlugin.js000066400000000000000000000014771331515416700217340ustar00rootroot00000000000000/* MIT License http://www.opensource.org/licenses/mit-license.php Author Tobias Koppers @sokra */ "use strict"; const basename = require("./getPaths").basename; module.exports = class CloneBasenamePlugin { constructor(source, target) { this.source = source; this.target = target; } apply(resolver) { const target = resolver.ensureHook(this.target); resolver.getHook(this.source).tapAsync("CloneBasenamePlugin", (request, resolveContext, callback) => { const filename = basename(request.path); const filePath = resolver.join(request.path, filename); const obj = Object.assign({}, request, { path: filePath, relativePath: request.relativePath && resolver.join(request.relativePath, filename) }); resolver.doResolve(target, obj, "using path: " + filePath, resolveContext, callback); }); } }; enhanced-resolve-4.1.0/lib/ConcordExtensionsPlugin.js000066400000000000000000000025441331515416700227030ustar00rootroot00000000000000/* MIT License http://www.opensource.org/licenses/mit-license.php Author Tobias Koppers @sokra */ "use strict"; const concord = require("./concord"); const DescriptionFileUtils = require("./DescriptionFileUtils"); const forEachBail = require("./forEachBail"); module.exports = class ConcordExtensionsPlugin { constructor(source, options, target) { this.source = source; this.options = options; this.target = target; } apply(resolver) { const target = resolver.ensureHook(this.target); resolver.getHook(this.source).tapAsync("ConcordExtensionsPlugin", (request, resolveContext, callback) => { const concordField = DescriptionFileUtils.getField(request.descriptionFileData, "concord"); if(!concordField) return callback(); const extensions = concord.getExtensions(request.context, concordField); if(!extensions) return callback(); forEachBail(extensions, (appending, callback) => { const obj = Object.assign({}, request, { path: request.path + appending, relativePath: request.relativePath && (request.relativePath + appending) }); resolver.doResolve(target, obj, "concord extension: " + appending, resolveContext, callback); }, (err, result) => { if(err) return callback(err); // Don't allow other processing if(result === undefined) return callback(null, null); callback(null, result); }); }); } }; enhanced-resolve-4.1.0/lib/ConcordMainPlugin.js000066400000000000000000000022071331515416700214240ustar00rootroot00000000000000/* MIT License http://www.opensource.org/licenses/mit-license.php Author Tobias Koppers @sokra */ "use strict"; const path = require("path"); const concord = require("./concord"); const DescriptionFileUtils = require("./DescriptionFileUtils"); module.exports = class ConcordMainPlugin { constructor(source, options, target) { this.source = source; this.options = options; this.target = target; } apply(resolver) { const target = resolver.ensureHook(this.target); resolver.getHook(this.source).tapAsync("ConcordMainPlugin", (request, resolveContext, callback) => { if(request.path !== request.descriptionFileRoot) return callback(); const concordField = DescriptionFileUtils.getField(request.descriptionFileData, "concord"); if(!concordField) return callback(); const mainModule = concord.getMain(request.context, concordField); if(!mainModule) return callback(); const obj = Object.assign({}, request, { request: mainModule }); const filename = path.basename(request.descriptionFilePath); return resolver.doResolve(target, obj, "use " + mainModule + " from " + filename, resolveContext, callback); }); } }; enhanced-resolve-4.1.0/lib/ConcordModulesPlugin.js000066400000000000000000000031671331515416700221560ustar00rootroot00000000000000/* MIT License http://www.opensource.org/licenses/mit-license.php Author Tobias Koppers @sokra */ "use strict"; const concord = require("./concord"); const DescriptionFileUtils = require("./DescriptionFileUtils"); const getInnerRequest = require("./getInnerRequest"); module.exports = class ConcordModulesPlugin { constructor(source, options, target) { this.source = source; this.options = options; this.target = target; } apply(resolver) { const target = resolver.ensureHook(this.target); resolver.getHook(this.source).tapAsync("ConcordModulesPlugin", (request, resolveContext, callback) => { const innerRequest = getInnerRequest(resolver, request); if(!innerRequest) return callback(); const concordField = DescriptionFileUtils.getField(request.descriptionFileData, "concord"); if(!concordField) return callback(); const data = concord.matchModule(request.context, concordField, innerRequest); if(data === innerRequest) return callback(); if(data === undefined) return callback(); if(data === false) { const ignoreObj = Object.assign({}, request, { path: false }); return callback(null, ignoreObj); } const obj = Object.assign({}, request, { path: request.descriptionFileRoot, request: data }); resolver.doResolve(target, obj, "aliased from description file " + request.descriptionFilePath + " with mapping '" + innerRequest + "' to '" + data + "'", resolveContext, (err, result) => { if(err) return callback(err); // Don't allow other aliasing or raw request if(result === undefined) return callback(null, null); callback(null, result); }); }); } }; enhanced-resolve-4.1.0/lib/DescriptionFilePlugin.js000066400000000000000000000032011331515416700223060ustar00rootroot00000000000000/* MIT License http://www.opensource.org/licenses/mit-license.php Author Tobias Koppers @sokra */ "use strict"; const DescriptionFileUtils = require("./DescriptionFileUtils"); module.exports = class DescriptionFilePlugin { constructor(source, filenames, target) { this.source = source; this.filenames = [].concat(filenames); this.target = target; } apply(resolver) { const target = resolver.ensureHook(this.target); resolver.getHook(this.source).tapAsync("DescriptionFilePlugin", (request, resolveContext, callback) => { const directory = request.path; DescriptionFileUtils.loadDescriptionFile(resolver, directory, this.filenames, resolveContext, (err, result) => { if(err) return callback(err); if(!result) { if(resolveContext.missing) { this.filenames.forEach((filename) => { resolveContext.missing.add(resolver.join(directory, filename)); }); } if(resolveContext.log) resolveContext.log("No description file found"); return callback(); } const relativePath = "." + request.path.substr(result.directory.length).replace(/\\/g, "/"); const obj = Object.assign({}, request, { descriptionFilePath: result.path, descriptionFileData: result.content, descriptionFileRoot: result.directory, relativePath: relativePath }); resolver.doResolve(target, obj, "using description file: " + result.path + " (relative path: " + relativePath + ")", resolveContext, (err, result) => { if(err) return callback(err); // Don't allow other processing if(result === undefined) return callback(null, null); callback(null, result); }); }); }); } }; enhanced-resolve-4.1.0/lib/DescriptionFileUtils.js000066400000000000000000000045301331515416700221560ustar00rootroot00000000000000/* MIT License http://www.opensource.org/licenses/mit-license.php Author Tobias Koppers @sokra */ "use strict"; const forEachBail = require("./forEachBail"); function loadDescriptionFile(resolver, directory, filenames, resolveContext, callback) { (function findDescriptionFile() { forEachBail(filenames, (filename, callback) => { const descriptionFilePath = resolver.join(directory, filename); if(resolver.fileSystem.readJson) { resolver.fileSystem.readJson(descriptionFilePath, (err, content) => { if(err) { if(typeof err.code !== "undefined") return callback(); return onJson(err); } onJson(null, content); }); } else { resolver.fileSystem.readFile(descriptionFilePath, (err, content) => { if(err) return callback(); let json; try { json = JSON.parse(content); } catch(e) { onJson(e); } onJson(null, json); }); } function onJson(err, content) { if(err) { if(resolveContext.log) resolveContext.log(descriptionFilePath + " (directory description file): " + err); else err.message = descriptionFilePath + " (directory description file): " + err; return callback(err); } callback(null, { content: content, directory: directory, path: descriptionFilePath }); } }, (err, result) => { if(err) return callback(err); if(result) { return callback(null, result); } else { directory = cdUp(directory); if(!directory) { return callback(); } else { return findDescriptionFile(); } } }); }()); } function getField(content, field) { if(!content) return undefined; if(Array.isArray(field)) { let current = content; for(let j = 0; j < field.length; j++) { if(current === null || typeof current !== "object") { current = null; break; } current = current[field[j]]; } if(typeof current === "object") { return current; } } else { if(typeof content[field] === "object") { return content[field]; } } } function cdUp(directory) { if(directory === "/") return null; const i = directory.lastIndexOf("/"), j = directory.lastIndexOf("\\"); const p = i < 0 ? j : j < 0 ? i : i < j ? j : i; if(p < 0) return null; return directory.substr(0, p || 1); } exports.loadDescriptionFile = loadDescriptionFile; exports.getField = getField; exports.cdUp = cdUp; enhanced-resolve-4.1.0/lib/DirectoryExistsPlugin.js000066400000000000000000000020371331515416700223750ustar00rootroot00000000000000/* MIT License http://www.opensource.org/licenses/mit-license.php Author Tobias Koppers @sokra */ "use strict"; module.exports = class DirectoryExistsPlugin { constructor(source, target) { this.source = source; this.target = target; } apply(resolver) { const target = resolver.ensureHook(this.target); resolver.getHook(this.source).tapAsync("DirectoryExistsPlugin", (request, resolveContext, callback) => { const fs = resolver.fileSystem; const directory = request.path; fs.stat(directory, (err, stat) => { if(err || !stat) { if(resolveContext.missing) resolveContext.missing.add(directory); if(resolveContext.log) resolveContext.log(directory + " doesn't exist"); return callback(); } if(!stat.isDirectory()) { if(resolveContext.missing) resolveContext.missing.add(directory); if(resolveContext.log) resolveContext.log(directory + " is not a directory"); return callback(); } resolver.doResolve(target, request, "existing directory", resolveContext, callback); }); }); } }; enhanced-resolve-4.1.0/lib/FileExistsPlugin.js000066400000000000000000000017601331515416700213120ustar00rootroot00000000000000/* MIT License http://www.opensource.org/licenses/mit-license.php Author Tobias Koppers @sokra */ "use strict"; module.exports = class FileExistsPlugin { constructor(source, target) { this.source = source; this.target = target; } apply(resolver) { const target = resolver.ensureHook(this.target); const fs = resolver.fileSystem; resolver.getHook(this.source).tapAsync("FileExistsPlugin", (request, resolveContext, callback) => { const file = request.path; fs.stat(file, (err, stat) => { if(err || !stat) { if(resolveContext.missing) resolveContext.missing.add(file); if(resolveContext.log) resolveContext.log(file + " doesn't exist"); return callback(); } if(!stat.isFile()) { if(resolveContext.missing) resolveContext.missing.add(file); if(resolveContext.log) resolveContext.log(file + " is not a file"); return callback(); } resolver.doResolve(target, request, "existing file: " + file, resolveContext, callback); }); }); } }; enhanced-resolve-4.1.0/lib/FileKindPlugin.js000066400000000000000000000011301331515416700207070ustar00rootroot00000000000000/* MIT License http://www.opensource.org/licenses/mit-license.php Author Tobias Koppers @sokra */ "use strict"; module.exports = class FileKindPlugin { constructor(source, target) { this.source = source; this.target = target; } apply(resolver) { const target = resolver.ensureHook(this.target); resolver.getHook(this.source).tapAsync("FileKindPlugin", (request, resolveContext, callback) => { if(request.directory) return callback(); const obj = Object.assign({}, request); delete obj.directory; resolver.doResolve(target, obj, null, resolveContext, callback); }); } }; enhanced-resolve-4.1.0/lib/JoinRequestPlugin.js000066400000000000000000000013201331515416700214730ustar00rootroot00000000000000/* MIT License http://www.opensource.org/licenses/mit-license.php Author Tobias Koppers @sokra */ "use strict"; module.exports = class JoinRequestPlugin { constructor(source, target) { this.source = source; this.target = target; } apply(resolver) { const target = resolver.ensureHook(this.target); resolver.getHook(this.source).tapAsync("JoinRequestPlugin", (request, resolveContext, callback) => { const obj = Object.assign({}, request, { path: resolver.join(request.path, request.request), relativePath: request.relativePath && resolver.join(request.relativePath, request.request), request: undefined }); resolver.doResolve(target, obj, null, resolveContext, callback); }); } }; enhanced-resolve-4.1.0/lib/LogInfoPlugin.js000066400000000000000000000021101331515416700205560ustar00rootroot00000000000000/* MIT License http://www.opensource.org/licenses/mit-license.php Author Tobias Koppers @sokra */ "use strict"; module.exports = class LogInfoPlugin { constructor(source) { this.source = source; } apply(resolver) { const source = this.source; resolver.getHook(this.source).tapAsync("LogInfoPlugin", (request, resolveContext, callback) => { if(!resolveContext.log) return callback(); const log = resolveContext.log; const prefix = "[" + source + "] "; if(request.path) log(prefix + "Resolving in directory: " + request.path); if(request.request) log(prefix + "Resolving request: " + request.request); if(request.module) log(prefix + "Request is an module request."); if(request.directory) log(prefix + "Request is a directory request."); if(request.query) log(prefix + "Resolving request query: " + request.query); if(request.descriptionFilePath) log(prefix + "Has description data from " + request.descriptionFilePath); if(request.relativePath) log(prefix + "Relative path from description file is: " + request.relativePath); callback(); }); } }; enhanced-resolve-4.1.0/lib/MainFieldPlugin.js000066400000000000000000000031511331515416700210570ustar00rootroot00000000000000/* MIT License http://www.opensource.org/licenses/mit-license.php Author Tobias Koppers @sokra */ "use strict"; const path = require("path"); module.exports = class MainFieldPlugin { constructor(source, options, target) { this.source = source; this.options = options; this.target = target; } apply(resolver) { const target = resolver.ensureHook(this.target); resolver.getHook(this.source).tapAsync("MainFieldPlugin", (request, resolveContext, callback) => { if(request.path !== request.descriptionFileRoot) return callback(); if(request.alreadyTriedMainField === request.descriptionFilePath) return callback(); const content = request.descriptionFileData; const filename = path.basename(request.descriptionFilePath); let mainModule; const field = this.options.name; if(Array.isArray(field)) { let current = content; for(let j = 0; j < field.length; j++) { if(current === null || typeof current !== "object") { current = null; break; } current = current[field[j]]; } if(typeof current === "string") { mainModule = current; } } else { if(typeof content[field] === "string") { mainModule = content[field]; } } if(!mainModule) return callback(); if(this.options.forceRelative && !/^\.\.?\//.test(mainModule)) mainModule = "./" + mainModule; const obj = Object.assign({}, request, { request: mainModule, alreadyTriedMainField: request.descriptionFilePath }); return resolver.doResolve(target, obj, "use " + mainModule + " from " + this.options.name + " in " + filename, resolveContext, callback); }); } }; enhanced-resolve-4.1.0/lib/ModuleAppendPlugin.js000066400000000000000000000022061331515416700216040ustar00rootroot00000000000000/* MIT License http://www.opensource.org/licenses/mit-license.php Author Tobias Koppers @sokra */ "use strict"; module.exports = class ModuleAppendPlugin { constructor(source, appending, target) { this.source = source; this.appending = appending; this.target = target; } apply(resolver) { const target = resolver.ensureHook(this.target); resolver.getHook(this.source).tapAsync("ModuleAppendPlugin", (request, resolveContext, callback) => { const i = request.request.indexOf("/"), j = request.request.indexOf("\\"); const p = i < 0 ? j : j < 0 ? i : i < j ? i : j; let moduleName, remainingRequest; if(p < 0) { moduleName = request.request; remainingRequest = ""; } else { moduleName = request.request.substr(0, p); remainingRequest = request.request.substr(p); } if(moduleName === "." || moduleName === "..") return callback(); const moduleFinalName = moduleName + this.appending; const obj = Object.assign({}, request, { request: moduleFinalName + remainingRequest }); resolver.doResolve(target, obj, "module variation " + moduleFinalName, resolveContext, callback); }); } }; enhanced-resolve-4.1.0/lib/ModuleKindPlugin.js000066400000000000000000000014241331515416700212630ustar00rootroot00000000000000/* MIT License http://www.opensource.org/licenses/mit-license.php Author Tobias Koppers @sokra */ "use strict"; module.exports = class ModuleKindPlugin { constructor(source, target) { this.source = source; this.target = target; } apply(resolver) { const target = resolver.ensureHook(this.target); resolver.getHook(this.source).tapAsync("ModuleKindPlugin", (request, resolveContext, callback) => { if(!request.module) return callback(); const obj = Object.assign({}, request); delete obj.module; resolver.doResolve(target, obj, "resolve as module", resolveContext, (err, result) => { if(err) return callback(err); // Don't allow other alternatives if(result === undefined) return callback(null, null); callback(null, result); }); }); } }; enhanced-resolve-4.1.0/lib/ModulesInHierachicDirectoriesPlugin.js000066400000000000000000000026421331515416700251270ustar00rootroot00000000000000/* MIT License http://www.opensource.org/licenses/mit-license.php Author Tobias Koppers @sokra */ "use strict"; const forEachBail = require("./forEachBail"); const getPaths = require("./getPaths"); module.exports = class ModulesInHierachicDirectoriesPlugin { constructor(source, directories, target) { this.source = source; this.directories = [].concat(directories); this.target = target; } apply(resolver) { const target = resolver.ensureHook(this.target); resolver.getHook(this.source).tapAsync("ModulesInHierachicDirectoriesPlugin", (request, resolveContext, callback) => { const fs = resolver.fileSystem; const addrs = getPaths(request.path).paths.map(p => { return this.directories.map(d => resolver.join(p, d)); }).reduce((array, p) => { array.push.apply(array, p); return array; }, []); forEachBail(addrs, (addr, callback) => { fs.stat(addr, (err, stat) => { if(!err && stat && stat.isDirectory()) { const obj = Object.assign({}, request, { path: addr, request: "./" + request.request }); const message = "looking for modules in " + addr; return resolver.doResolve(target, obj, message, resolveContext, callback); } if(resolveContext.log) resolveContext.log(addr + " doesn't exist or is not a directory"); if(resolveContext.missing) resolveContext.missing.add(addr); return callback(); }); }, callback); }); } }; enhanced-resolve-4.1.0/lib/ModulesInRootPlugin.js000066400000000000000000000012311331515416700217670ustar00rootroot00000000000000/* MIT License http://www.opensource.org/licenses/mit-license.php Author Tobias Koppers @sokra */ "use strict"; module.exports = class ModulesInRootPlugin { constructor(source, path, target) { this.source = source; this.path = path; this.target = target; } apply(resolver) { const target = resolver.ensureHook(this.target); resolver.getHook(this.source).tapAsync("ModulesInRootPlugin", (request, resolveContext, callback) => { const obj = Object.assign({}, request, { path: this.path, request: "./" + request.request }); resolver.doResolve(target, obj, "looking for modules in " + this.path, resolveContext, callback); }); } }; enhanced-resolve-4.1.0/lib/NextPlugin.js000066400000000000000000000007441331515416700201520ustar00rootroot00000000000000/* MIT License http://www.opensource.org/licenses/mit-license.php Author Tobias Koppers @sokra */ "use strict"; module.exports = class NextPlugin { constructor(source, target) { this.source = source; this.target = target; } apply(resolver) { const target = resolver.ensureHook(this.target); resolver.getHook(this.source).tapAsync("NextPlugin", (request, resolveContext, callback) => { resolver.doResolve(target, request, null, resolveContext, callback); }); } }; enhanced-resolve-4.1.0/lib/NodeJsInputFileSystem.js000066400000000000000000000015151331515416700222610ustar00rootroot00000000000000/* MIT License http://www.opensource.org/licenses/mit-license.php Author Tobias Koppers @sokra */ "use strict"; const fs = require("graceful-fs"); class NodeJsInputFileSystem { readdir(path, callback) { fs.readdir(path, (err, files) => { callback(err, files && files.map(file => { return file.normalize ? file.normalize("NFC") : file; })); }); } readdirSync(path) { const files = fs.readdirSync(path); return files && files.map(file => { return file.normalize ? file.normalize("NFC") : file; }); } } const fsMethods = [ "stat", "statSync", "readFile", "readFileSync", "readlink", "readlinkSync" ]; for(const key of fsMethods) { Object.defineProperty(NodeJsInputFileSystem.prototype, key, { configurable: true, writable: true, value: fs[key].bind(fs) }); } module.exports = NodeJsInputFileSystem; enhanced-resolve-4.1.0/lib/ParsePlugin.js000066400000000000000000000015371331515416700203070ustar00rootroot00000000000000/* MIT License http://www.opensource.org/licenses/mit-license.php Author Tobias Koppers @sokra */ "use strict"; module.exports = class ParsePlugin { constructor(source, target) { this.source = source; this.target = target; } apply(resolver) { const target = resolver.ensureHook(this.target); resolver.getHook(this.source).tapAsync("ParsePlugin", (request, resolveContext, callback) => { const parsed = resolver.parse(request.request); const obj = Object.assign({}, request, parsed); if(request.query && !parsed.query) { obj.query = request.query; } if(parsed && resolveContext.log) { if(parsed.module) resolveContext.log("Parsed request is a module"); if(parsed.directory) resolveContext.log("Parsed request is a directory"); } resolver.doResolve(target, obj, null, resolveContext, callback); }); } }; enhanced-resolve-4.1.0/lib/Resolver.js000066400000000000000000000212071331515416700176530ustar00rootroot00000000000000/* MIT License http://www.opensource.org/licenses/mit-license.php Author Tobias Koppers @sokra */ "use strict"; const util = require("util"); const Tapable = require("tapable/lib/Tapable"); const SyncHook = require("tapable/lib/SyncHook"); const AsyncSeriesBailHook = require("tapable/lib/AsyncSeriesBailHook"); const AsyncSeriesHook = require("tapable/lib/AsyncSeriesHook"); const createInnerContext = require("./createInnerContext"); const REGEXP_NOT_MODULE = /^\.$|^\.[\\\/]|^\.\.$|^\.\.[\/\\]|^\/|^[A-Z]:[\\\/]/i; const REGEXP_DIRECTORY = /[\/\\]$/i; const memoryFsJoin = require("memory-fs/lib/join"); const memoizedJoin = new Map(); const memoryFsNormalize = require("memory-fs/lib/normalize"); function withName(name, hook) { hook.name = name; return hook; } function toCamelCase(str) { return str.replace(/-([a-z])/g, str => str.substr(1).toUpperCase()); } const deprecatedPushToMissing = util.deprecate((set, item) => { set.add(item); }, "Resolver: 'missing' is now a Set. Use add instead of push."); const deprecatedResolveContextInCallback = util.deprecate((x) => { return x; }, "Resolver: The callback argument was splitted into resolveContext and callback."); const deprecatedHookAsString = util.deprecate((x) => { return x; }, "Resolver#doResolve: The type arguments (string) is now a hook argument (Hook). Pass a reference to the hook instead."); class Resolver extends Tapable { constructor(fileSystem) { super(); this.fileSystem = fileSystem; this.hooks = { resolveStep: withName("resolveStep", new SyncHook(["hook", "request"])), noResolve: withName("noResolve", new SyncHook(["request", "error"])), resolve: withName("resolve", new AsyncSeriesBailHook(["request", "resolveContext"])), result: new AsyncSeriesHook(["result", "resolveContext"]) }; this._pluginCompat.tap("Resolver: before/after", options => { if(/^before-/.test(options.name)) { options.name = options.name.substr(7); options.stage = -10; } else if(/^after-/.test(options.name)) { options.name = options.name.substr(6); options.stage = 10; } }); this._pluginCompat.tap("Resolver: step hooks", options => { const name = options.name; const stepHook = !/^resolve(-s|S)tep$|^no(-r|R)esolve$/.test(name); if(stepHook) { options.async = true; this.ensureHook(name); const fn = options.fn; options.fn = (request, resolverContext, callback) => { const innerCallback = (err, result) => { if(err) return callback(err); if(result !== undefined) return callback(null, result); callback(); }; for(const key in resolverContext) { innerCallback[key] = resolverContext[key]; } fn.call(this, request, innerCallback); }; } }); } ensureHook(name) { if(typeof name !== "string") return name; name = toCamelCase(name); if(/^before/.test(name)) { return this.ensureHook(name[6].toLowerCase() + name.substr(7)).withOptions({ stage: -10 }); } if(/^after/.test(name)) { return this.ensureHook(name[5].toLowerCase() + name.substr(6)).withOptions({ stage: 10 }); } const hook = this.hooks[name]; if(!hook) { return this.hooks[name] = withName(name, new AsyncSeriesBailHook(["request", "resolveContext"])); } return hook; } getHook(name) { if(typeof name !== "string") return name; name = toCamelCase(name); if(/^before/.test(name)) { return this.getHook(name[6].toLowerCase() + name.substr(7)).withOptions({ stage: -10 }); } if(/^after/.test(name)) { return this.getHook(name[5].toLowerCase() + name.substr(6)).withOptions({ stage: 10 }); } const hook = this.hooks[name]; if(!hook) { throw new Error(`Hook ${name} doesn't exist`); } return hook; } resolveSync(context, path, request) { let err, result, sync = false; this.resolve(context, path, request, {}, (e, r) => { err = e; result = r; sync = true; }); if(!sync) throw new Error("Cannot 'resolveSync' because the fileSystem is not sync. Use 'resolve'!"); if(err) throw err; return result; } resolve(context, path, request, resolveContext, callback) { // TODO remove in enhanced-resolve 5 // For backward compatiblity START if(typeof callback !== "function") { callback = deprecatedResolveContextInCallback(resolveContext); // resolveContext is a function containing additional properties // It's now used for resolveContext and callback } // END const obj = { context: context, path: path, request: request }; const message = "resolve '" + request + "' in '" + path + "'"; // Try to resolve assuming there is no error // We don't log stuff in this case return this.doResolve(this.hooks.resolve, obj, message, { missing: resolveContext.missing, stack: resolveContext.stack }, (err, result) => { if(!err && result) { return callback(null, result.path === false ? false : result.path + (result.query || ""), result); } const localMissing = new Set(); // TODO remove in enhanced-resolve 5 localMissing.push = item => deprecatedPushToMissing(localMissing, item); const log = []; return this.doResolve(this.hooks.resolve, obj, message, { log: msg => { if(resolveContext.log) { resolveContext.log(msg); } log.push(msg); }, missing: localMissing, stack: resolveContext.stack }, (err, result) => { if(err) return callback(err); const error = new Error("Can't " + message); error.details = log.join("\n"); error.missing = Array.from(localMissing); this.hooks.noResolve.call(obj, error); return callback(error); }); }); } doResolve(hook, request, message, resolveContext, callback) { // TODO remove in enhanced-resolve 5 // For backward compatiblity START if(typeof callback !== "function") { callback = deprecatedResolveContextInCallback(resolveContext); // resolveContext is a function containing additional properties // It's now used for resolveContext and callback } if(typeof hook === "string") { const name = toCamelCase(hook); hook = deprecatedHookAsString(this.hooks[name]); if(!hook) { throw new Error(`Hook "${name}" doesn't exist`); } } // END if(typeof callback !== "function") throw new Error("callback is not a function " + Array.from(arguments)); if(!resolveContext) throw new Error("resolveContext is not an object " + Array.from(arguments)); const stackLine = hook.name + ": (" + request.path + ") " + (request.request || "") + (request.query || "") + (request.directory ? " directory" : "") + (request.module ? " module" : ""); let newStack; if(resolveContext.stack) { newStack = new Set(resolveContext.stack); if(resolveContext.stack.has(stackLine)) { // Prevent recursion const recursionError = new Error("Recursion in resolving\nStack:\n " + Array.from(newStack).join("\n ")); recursionError.recursion = true; if(resolveContext.log) resolveContext.log("abort resolving because of recursion"); return callback(recursionError); } newStack.add(stackLine); } else { newStack = new Set([stackLine]); } this.hooks.resolveStep.call(hook, request); if(hook.isUsed()) { const innerContext = createInnerContext({ log: resolveContext.log, missing: resolveContext.missing, stack: newStack }, message); return hook.callAsync(request, innerContext, (err, result) => { if(err) return callback(err); if(result) return callback(null, result); callback(); }); } else { callback(); } } parse(identifier) { if(identifier === "") return null; const part = { request: "", query: "", module: false, directory: false, file: false }; const idxQuery = identifier.indexOf("?"); if(idxQuery === 0) { part.query = identifier; } else if(idxQuery > 0) { part.request = identifier.slice(0, idxQuery); part.query = identifier.slice(idxQuery); } else { part.request = identifier; } if(part.request) { part.module = this.isModule(part.request); part.directory = this.isDirectory(part.request); if(part.directory) { part.request = part.request.substr(0, part.request.length - 1); } } return part; } isModule(path) { return !REGEXP_NOT_MODULE.test(path); } isDirectory(path) { return REGEXP_DIRECTORY.test(path); } join(path, request) { let cacheEntry; let pathCache = memoizedJoin.get(path); if(typeof pathCache === "undefined") { memoizedJoin.set(path, pathCache = new Map()); } else { cacheEntry = pathCache.get(request); if(typeof cacheEntry !== "undefined") return cacheEntry; } cacheEntry = memoryFsJoin(path, request); pathCache.set(request, cacheEntry); return cacheEntry; } normalize(path) { return memoryFsNormalize(path); } } module.exports = Resolver; enhanced-resolve-4.1.0/lib/ResolverFactory.js000066400000000000000000000230551331515416700212060ustar00rootroot00000000000000/* MIT License http://www.opensource.org/licenses/mit-license.php Author Tobias Koppers @sokra */ "use strict"; const Resolver = require("./Resolver"); const SyncAsyncFileSystemDecorator = require("./SyncAsyncFileSystemDecorator"); const ParsePlugin = require("./ParsePlugin"); const DescriptionFilePlugin = require("./DescriptionFilePlugin"); const NextPlugin = require("./NextPlugin"); const TryNextPlugin = require("./TryNextPlugin"); const ModuleKindPlugin = require("./ModuleKindPlugin"); const FileKindPlugin = require("./FileKindPlugin"); const JoinRequestPlugin = require("./JoinRequestPlugin"); const ModulesInHierachicDirectoriesPlugin = require("./ModulesInHierachicDirectoriesPlugin"); const ModulesInRootPlugin = require("./ModulesInRootPlugin"); const AliasPlugin = require("./AliasPlugin"); const AliasFieldPlugin = require("./AliasFieldPlugin"); const ConcordExtensionsPlugin = require("./ConcordExtensionsPlugin"); const ConcordMainPlugin = require("./ConcordMainPlugin"); const ConcordModulesPlugin = require("./ConcordModulesPlugin"); const DirectoryExistsPlugin = require("./DirectoryExistsPlugin"); const FileExistsPlugin = require("./FileExistsPlugin"); const SymlinkPlugin = require("./SymlinkPlugin"); const MainFieldPlugin = require("./MainFieldPlugin"); const UseFilePlugin = require("./UseFilePlugin"); const AppendPlugin = require("./AppendPlugin"); const ResultPlugin = require("./ResultPlugin"); const ModuleAppendPlugin = require("./ModuleAppendPlugin"); const UnsafeCachePlugin = require("./UnsafeCachePlugin"); exports.createResolver = function(options) { //// OPTIONS //// // A list of directories to resolve modules from, can be absolute path or folder name let modules = options.modules || ["node_modules"]; // A list of description files to read from const descriptionFiles = options.descriptionFiles || ["package.json"]; // A list of additional resolve plugins which should be applied // The slice is there to create a copy, because otherwise pushing into plugins // changes the original options.plugins array, causing duplicate plugins const plugins = (options.plugins && options.plugins.slice()) || []; // A list of main fields in description files let mainFields = options.mainFields || ["main"]; // A list of alias fields in description files const aliasFields = options.aliasFields || []; // A list of main files in directories const mainFiles = options.mainFiles || ["index"]; // A list of extensions which should be tried for files let extensions = options.extensions || [".js", ".json", ".node"]; // Enforce that a extension from extensions must be used const enforceExtension = options.enforceExtension || false; // A list of module extensions which should be tried for modules let moduleExtensions = options.moduleExtensions || []; // Enforce that a extension from moduleExtensions must be used const enforceModuleExtension = options.enforceModuleExtension || false; // A list of module alias configurations or an object which maps key to value let alias = options.alias || []; // Resolve symlinks to their symlinked location const symlinks = typeof options.symlinks !== "undefined" ? options.symlinks : true; // Resolve to a context instead of a file const resolveToContext = options.resolveToContext || false; // Use this cache object to unsafely cache the successful requests let unsafeCache = options.unsafeCache || false; // Whether or not the unsafeCache should include request context as part of the cache key. const cacheWithContext = typeof options.cacheWithContext !== "undefined" ? options.cacheWithContext : true; // Enable concord description file instructions const enableConcord = options.concord || false; // A function which decides whether a request should be cached or not. // an object is passed with `path` and `request` properties. const cachePredicate = options.cachePredicate || function() { return true; }; // The file system which should be used const fileSystem = options.fileSystem; // Use only the sync constiants of the file system calls const useSyncFileSystemCalls = options.useSyncFileSystemCalls; // A prepared Resolver to which the plugins are attached let resolver = options.resolver; //// options processing //// if(!resolver) { resolver = new Resolver(useSyncFileSystemCalls ? new SyncAsyncFileSystemDecorator(fileSystem) : fileSystem); } extensions = [].concat(extensions); moduleExtensions = [].concat(moduleExtensions); modules = mergeFilteredToArray([].concat(modules), item => { return !isAbsolutePath(item); }); mainFields = mainFields.map(item => { if(typeof item === "string" || Array.isArray(item)) { item = { name: item, forceRelative: true }; } return item; }); if(typeof alias === "object" && !Array.isArray(alias)) { alias = Object.keys(alias).map(key => { let onlyModule = false; let obj = alias[key]; if(/\$$/.test(key)) { onlyModule = true; key = key.substr(0, key.length - 1); } if(typeof obj === "string") { obj = { alias: obj }; } obj = Object.assign({ name: key, onlyModule: onlyModule }, obj); return obj; }); } if(unsafeCache && typeof unsafeCache !== "object") { unsafeCache = {}; } //// pipeline //// resolver.ensureHook("resolve"); resolver.ensureHook("parsedResolve"); resolver.ensureHook("describedResolve"); resolver.ensureHook("rawModule"); resolver.ensureHook("module"); resolver.ensureHook("relative"); resolver.ensureHook("describedRelative"); resolver.ensureHook("directory"); resolver.ensureHook("existingDirectory"); resolver.ensureHook("undescribedRawFile"); resolver.ensureHook("rawFile"); resolver.ensureHook("file"); resolver.ensureHook("existingFile"); resolver.ensureHook("resolved"); // resolve if(unsafeCache) { plugins.push(new UnsafeCachePlugin("resolve", cachePredicate, unsafeCache, cacheWithContext, "new-resolve")); plugins.push(new ParsePlugin("new-resolve", "parsed-resolve")); } else { plugins.push(new ParsePlugin("resolve", "parsed-resolve")); } // parsed-resolve plugins.push(new DescriptionFilePlugin("parsed-resolve", descriptionFiles, "described-resolve")); plugins.push(new NextPlugin("after-parsed-resolve", "described-resolve")); // described-resolve if(alias.length > 0) plugins.push(new AliasPlugin("described-resolve", alias, "resolve")); if(enableConcord) { plugins.push(new ConcordModulesPlugin("described-resolve", {}, "resolve")); } aliasFields.forEach(item => { plugins.push(new AliasFieldPlugin("described-resolve", item, "resolve")); }); plugins.push(new ModuleKindPlugin("after-described-resolve", "raw-module")); plugins.push(new JoinRequestPlugin("after-described-resolve", "relative")); // raw-module moduleExtensions.forEach(item => { plugins.push(new ModuleAppendPlugin("raw-module", item, "module")); }); if(!enforceModuleExtension) plugins.push(new TryNextPlugin("raw-module", null, "module")); // module modules.forEach(item => { if(Array.isArray(item)) plugins.push(new ModulesInHierachicDirectoriesPlugin("module", item, "resolve")); else plugins.push(new ModulesInRootPlugin("module", item, "resolve")); }); // relative plugins.push(new DescriptionFilePlugin("relative", descriptionFiles, "described-relative")); plugins.push(new NextPlugin("after-relative", "described-relative")); // described-relative plugins.push(new FileKindPlugin("described-relative", "raw-file")); plugins.push(new TryNextPlugin("described-relative", "as directory", "directory")); // directory plugins.push(new DirectoryExistsPlugin("directory", "existing-directory")); if(resolveToContext) { // existing-directory plugins.push(new NextPlugin("existing-directory", "resolved")); } else { // existing-directory if(enableConcord) { plugins.push(new ConcordMainPlugin("existing-directory", {}, "resolve")); } mainFields.forEach(item => { plugins.push(new MainFieldPlugin("existing-directory", item, "resolve")); }); mainFiles.forEach(item => { plugins.push(new UseFilePlugin("existing-directory", item, "undescribed-raw-file")); }); // undescribed-raw-file plugins.push(new DescriptionFilePlugin("undescribed-raw-file", descriptionFiles, "raw-file")); plugins.push(new NextPlugin("after-undescribed-raw-file", "raw-file")); // raw-file if(!enforceExtension) { plugins.push(new TryNextPlugin("raw-file", "no extension", "file")); } if(enableConcord) { plugins.push(new ConcordExtensionsPlugin("raw-file", {}, "file")); } extensions.forEach(item => { plugins.push(new AppendPlugin("raw-file", item, "file")); }); // file if(alias.length > 0) plugins.push(new AliasPlugin("file", alias, "resolve")); if(enableConcord) { plugins.push(new ConcordModulesPlugin("file", {}, "resolve")); } aliasFields.forEach(item => { plugins.push(new AliasFieldPlugin("file", item, "resolve")); }); if(symlinks) plugins.push(new SymlinkPlugin("file", "relative")); plugins.push(new FileExistsPlugin("file", "existing-file")); // existing-file plugins.push(new NextPlugin("existing-file", "resolved")); } // resolved plugins.push(new ResultPlugin(resolver.hooks.resolved)); //// RESOLVER //// plugins.forEach(plugin => { plugin.apply(resolver); }); return resolver; }; function mergeFilteredToArray(array, filter) { return array.reduce((array, item) => { if(filter(item)) { const lastElement = array[array.length - 1]; if(Array.isArray(lastElement)) { lastElement.push(item); } else { array.push([item]); } return array; } else { array.push(item); return array; } }, []); } function isAbsolutePath(path) { return /^[A-Z]:|^\//.test(path); } enhanced-resolve-4.1.0/lib/ResultPlugin.js000066400000000000000000000010731331515416700205060ustar00rootroot00000000000000/* MIT License http://www.opensource.org/licenses/mit-license.php Author Tobias Koppers @sokra */ "use strict"; module.exports = class ResultPlugin { constructor(source) { this.source = source; } apply(resolver) { this.source.tapAsync("ResultPlugin", (request, resolverContext, callback) => { const obj = Object.assign({}, request); if(resolverContext.log) resolverContext.log("reporting result " + obj.path); resolver.hooks.result.callAsync(obj, resolverContext, err => { if(err) return callback(err); callback(null, obj); }); }); } }; enhanced-resolve-4.1.0/lib/SymlinkPlugin.js000066400000000000000000000027371331515416700206660ustar00rootroot00000000000000/* MIT License http://www.opensource.org/licenses/mit-license.php Author Tobias Koppers @sokra */ "use strict"; const getPaths = require("./getPaths"); const forEachBail = require("./forEachBail"); module.exports = class SymlinkPlugin { constructor(source, target) { this.source = source; this.target = target; } apply(resolver) { const target = resolver.ensureHook(this.target); const fs = resolver.fileSystem; resolver.getHook(this.source).tapAsync("SymlinkPlugin", (request, resolveContext, callback) => { const pathsResult = getPaths(request.path); const pathSeqments = pathsResult.seqments; const paths = pathsResult.paths; let containsSymlink = false; forEachBail.withIndex(paths, (path, idx, callback) => { fs.readlink(path, (err, result) => { if(!err && result) { pathSeqments[idx] = result; containsSymlink = true; // Shortcut when absolute symlink found if(/^(\/|[a-zA-Z]:($|\\))/.test(result)) return callback(null, idx); } callback(); }); }, (err, idx) => { if(!containsSymlink) return callback(); const resultSeqments = typeof idx === "number" ? pathSeqments.slice(0, idx + 1) : pathSeqments.slice(); const result = resultSeqments.reverse().reduce((a, b) => { return resolver.join(a, b); }); const obj = Object.assign({}, request, { path: result }); resolver.doResolve(target, obj, "resolved symlink to " + result, resolveContext, callback); }); }); } }; enhanced-resolve-4.1.0/lib/SyncAsyncFileSystemDecorator.js000066400000000000000000000023261331515416700236350ustar00rootroot00000000000000/* MIT License http://www.opensource.org/licenses/mit-license.php Author Tobias Koppers @sokra */ "use strict"; function SyncAsyncFileSystemDecorator(fs) { this.fs = fs; if(fs.statSync) { this.stat = function(arg, callback) { let result; try { result = fs.statSync(arg); } catch(e) { return callback(e); } callback(null, result); }; } if(fs.readdirSync) { this.readdir = function(arg, callback) { let result; try { result = fs.readdirSync(arg); } catch(e) { return callback(e); } callback(null, result); }; } if(fs.readFileSync) { this.readFile = function(arg, callback) { let result; try { result = fs.readFileSync(arg); } catch(e) { return callback(e); } callback(null, result); }; } if(fs.readlinkSync) { this.readlink = function(arg, callback) { let result; try { result = fs.readlinkSync(arg); } catch(e) { return callback(e); } callback(null, result); }; } if(fs.readJsonSync) { this.readJson = function(arg, callback) { let result; try { result = fs.readJsonSync(arg); } catch(e) { return callback(e); } callback(null, result); }; } } module.exports = SyncAsyncFileSystemDecorator; enhanced-resolve-4.1.0/lib/TryNextPlugin.js000066400000000000000000000010251331515416700206420ustar00rootroot00000000000000/* MIT License http://www.opensource.org/licenses/mit-license.php Author Tobias Koppers @sokra */ "use strict"; module.exports = class TryNextPlugin { constructor(source, message, target) { this.source = source; this.message = message; this.target = target; } apply(resolver) { const target = resolver.ensureHook(this.target); resolver.getHook(this.source).tapAsync("TryNextPlugin", (request, resolveContext, callback) => { resolver.doResolve(target, request, this.message, resolveContext, callback); }); } }; enhanced-resolve-4.1.0/lib/UnsafeCachePlugin.js000066400000000000000000000022471331515416700214010ustar00rootroot00000000000000/* MIT License http://www.opensource.org/licenses/mit-license.php Author Tobias Koppers @sokra */ "use strict"; function getCacheId(request, withContext) { return JSON.stringify({ context: withContext ? request.context : "", path: request.path, query: request.query, request: request.request }); } module.exports = class UnsafeCachePlugin { constructor(source, filterPredicate, cache, withContext, target) { this.source = source; this.filterPredicate = filterPredicate; this.withContext = withContext; this.cache = cache || {}; this.target = target; } apply(resolver) { const target = resolver.ensureHook(this.target); resolver.getHook(this.source).tapAsync("UnsafeCachePlugin", (request, resolveContext, callback) => { if(!this.filterPredicate(request)) return callback(); const cacheId = getCacheId(request, this.withContext); const cacheEntry = this.cache[cacheId]; if(cacheEntry) { return callback(null, cacheEntry); } resolver.doResolve(target, request, null, resolveContext, (err, result) => { if(err) return callback(err); if(result) return callback(null, this.cache[cacheId] = result); callback(); }); }); } }; enhanced-resolve-4.1.0/lib/UseFilePlugin.js000066400000000000000000000014051331515416700205630ustar00rootroot00000000000000/* MIT License http://www.opensource.org/licenses/mit-license.php Author Tobias Koppers @sokra */ "use strict"; module.exports = class UseFilePlugin { constructor(source, filename, target) { this.source = source; this.filename = filename; this.target = target; } apply(resolver) { const target = resolver.ensureHook(this.target); resolver.getHook(this.source).tapAsync("UseFilePlugin", (request, resolveContext, callback) => { const filePath = resolver.join(request.path, this.filename); const obj = Object.assign({}, request, { path: filePath, relativePath: request.relativePath && resolver.join(request.relativePath, this.filename) }); resolver.doResolve(target, obj, "using path: " + filePath, resolveContext, callback); }); } }; enhanced-resolve-4.1.0/lib/concord.js000066400000000000000000000123001331515416700174730ustar00rootroot00000000000000/* MIT License http://www.opensource.org/licenses/mit-license.php Author Tobias Koppers @sokra */ "use strict"; const globToRegExp = require("./globToRegExp").globToRegExp; function parseType(type) { const items = type.split("+"); const t = items.shift(); return { type: t === "*" ? null : t, features: items }; } function isTypeMatched(baseType, testedType) { if(typeof baseType === "string") baseType = parseType(baseType); if(typeof testedType === "string") testedType = parseType(testedType); if(testedType.type && testedType.type !== baseType.type) return false; return testedType.features.every(requiredFeature => { return baseType.features.indexOf(requiredFeature) >= 0; }); } function isResourceTypeMatched(baseType, testedType) { baseType = baseType.split("/"); testedType = testedType.split("/"); if(baseType.length !== testedType.length) return false; for(let i = 0; i < baseType.length; i++) { if(!isTypeMatched(baseType[i], testedType[i])) return false; } return true; } function isResourceTypeSupported(context, type) { return context.supportedResourceTypes && context.supportedResourceTypes.some(supportedType => { return isResourceTypeMatched(supportedType, type); }); } function isEnvironment(context, env) { return context.environments && context.environments.every(environment => { return isTypeMatched(environment, env); }); } const globCache = {}; function getGlobRegExp(glob) { const regExp = globCache[glob] || (globCache[glob] = globToRegExp(glob)); return regExp; } function matchGlob(glob, relativePath) { const regExp = getGlobRegExp(glob); return regExp.exec(relativePath); } function isGlobMatched(glob, relativePath) { return !!matchGlob(glob, relativePath); } function isConditionMatched(context, condition) { const items = condition.split("|"); return items.some(function testFn(item) { item = item.trim(); const inverted = /^!/.test(item); if(inverted) return !testFn(item.substr(1)); if(/^[a-z]+:/.test(item)) { // match named condition const match = /^([a-z]+):\s*/.exec(item); const value = item.substr(match[0].length); const name = match[1]; switch(name) { case "referrer": return isGlobMatched(value, context.referrer); default: return false; } } else if(item.indexOf("/") >= 0) { // match supported type return isResourceTypeSupported(context, item); } else { // match environment return isEnvironment(context, item); } }); } function isKeyMatched(context, key) { while(true) { //eslint-disable-line const match = /^\[([^\]]+)\]\s*/.exec(key); if(!match) return key; key = key.substr(match[0].length); const condition = match[1]; if(!isConditionMatched(context, condition)) { return false; } } } function getField(context, configuration, field) { let value; Object.keys(configuration).forEach(key => { const pureKey = isKeyMatched(context, key); if(pureKey === field) { value = configuration[key]; } }); return value; } function getMain(context, configuration) { return getField(context, configuration, "main"); } function getExtensions(context, configuration) { return getField(context, configuration, "extensions"); } function matchModule(context, configuration, request) { const modulesField = getField(context, configuration, "modules"); if(!modulesField) return request; let newRequest = request; const keys = Object.keys(modulesField); let iteration = 0; let match; let index; for(let i = 0; i < keys.length; i++) { const key = keys[i]; const pureKey = isKeyMatched(context, key); match = matchGlob(pureKey, newRequest); if(match) { const value = modulesField[key]; if(typeof value !== "string") { return value; } else if(/^\(.+\)$/.test(pureKey)) { newRequest = newRequest.replace(getGlobRegExp(pureKey), value); } else { index = 1; newRequest = value.replace(/(\/?\*)?\*/g, replaceMatcher); } i = -1; if(iteration++ > keys.length) { throw new Error("Request '" + request + "' matches recursively"); } } } return newRequest; function replaceMatcher(find) { switch(find) { case "/**": { const m = match[index++]; return m ? "/" + m : ""; } case "**": case "*": return match[index++]; } } } function matchType(context, configuration, relativePath) { const typesField = getField(context, configuration, "types"); if(!typesField) return undefined; let type; Object.keys(typesField).forEach(key => { const pureKey = isKeyMatched(context, key); if(isGlobMatched(pureKey, relativePath)) { const value = typesField[key]; if(!type && /\/\*$/.test(value)) throw new Error("value ('" + value + "') of key '" + key + "' contains '*', but there is no previous value defined"); type = value.replace(/\/\*$/, "/" + type); } }); return type; } exports.parseType = parseType; exports.isTypeMatched = isTypeMatched; exports.isResourceTypeSupported = isResourceTypeSupported; exports.isEnvironment = isEnvironment; exports.isGlobMatched = isGlobMatched; exports.isConditionMatched = isConditionMatched; exports.isKeyMatched = isKeyMatched; exports.getField = getField; exports.getMain = getMain; exports.getExtensions = getExtensions; exports.matchModule = matchModule; exports.matchType = matchType; enhanced-resolve-4.1.0/lib/createInnerCallback.js000066400000000000000000000022571331515416700217320ustar00rootroot00000000000000/* MIT License http://www.opensource.org/licenses/mit-license.php Author Tobias Koppers @sokra */ "use strict"; const util = require("util"); // TODO remove in enhanced-resolve 5 module.exports = util.deprecate(function createInnerCallback(callback, options, message, messageOptional) { const log = options.log; if(!log) { if(options.stack !== callback.stack) { const callbackWrapper = function callbackWrapper() { return callback.apply(this, arguments); }; callbackWrapper.stack = options.stack; callbackWrapper.missing = options.missing; return callbackWrapper; } return callback; } function loggingCallbackWrapper() { return callback.apply(this, arguments); } if(message) { if(!messageOptional) { log(message); } loggingCallbackWrapper.log = function writeLog(msg) { if(messageOptional) { log(message); messageOptional = false; } log(" " + msg); }; } else { loggingCallbackWrapper.log = function writeLog(msg) { log(msg); }; } loggingCallbackWrapper.stack = options.stack; loggingCallbackWrapper.missing = options.missing; return loggingCallbackWrapper; }, "Pass resolveContext instead and use createInnerContext"); enhanced-resolve-4.1.0/lib/createInnerContext.js000066400000000000000000000011421331515416700216520ustar00rootroot00000000000000/* MIT License http://www.opensource.org/licenses/mit-license.php Author Tobias Koppers @sokra */ "use strict"; module.exports = function createInnerContext(options, message, messageOptional) { let messageReported = false; const childContext = { log: (() => { if(!options.log) return undefined; if(!message) return options.log; const logFunction = (msg) => { if(!messageReported) { options.log(message); messageReported = true; } options.log(" " + msg); }; return logFunction; })(), stack: options.stack, missing: options.missing }; return childContext; }; enhanced-resolve-4.1.0/lib/forEachBail.js000066400000000000000000000030561331515416700202130ustar00rootroot00000000000000/* MIT License http://www.opensource.org/licenses/mit-license.php Author Tobias Koppers @sokra */ "use strict"; module.exports = function forEachBail(array, iterator, callback) { if(array.length === 0) return callback(); let currentPos = array.length; let currentResult; let done = []; for(let i = 0; i < array.length; i++) { const itCb = createIteratorCallback(i); iterator(array[i], itCb); if(currentPos === 0) break; } function createIteratorCallback(i) { return(...args) => { // eslint-disable-line if(i >= currentPos) return; // ignore done.push(i); if(args.length > 0) { currentPos = i + 1; done = done.filter(item => { return item <= i; }); currentResult = args; } if(done.length === currentPos) { callback.apply(null, currentResult); currentPos = 0; } }; } }; module.exports.withIndex = function forEachBailWithIndex(array, iterator, callback) { if(array.length === 0) return callback(); let currentPos = array.length; let currentResult; let done = []; for(let i = 0; i < array.length; i++) { const itCb = createIteratorCallback(i); iterator(array[i], i, itCb); if(currentPos === 0) break; } function createIteratorCallback(i) { return(...args) => { // eslint-disable-line if(i >= currentPos) return; // ignore done.push(i); if(args.length > 0) { currentPos = i + 1; done = done.filter(item => { return item <= i; }); currentResult = args; } if(done.length === currentPos) { callback.apply(null, currentResult); currentPos = 0; } }; } }; enhanced-resolve-4.1.0/lib/getInnerRequest.js000066400000000000000000000014461331515416700212010ustar00rootroot00000000000000/* MIT License http://www.opensource.org/licenses/mit-license.php Author Tobias Koppers @sokra */ "use strict"; module.exports = function getInnerRequest(resolver, request) { if(typeof request.__innerRequest === "string" && request.__innerRequest_request === request.request && request.__innerRequest_relativePath === request.relativePath) return request.__innerRequest; let innerRequest; if(request.request) { innerRequest = request.request; if(/^\.\.?\//.test(innerRequest) && request.relativePath) { innerRequest = resolver.join(request.relativePath, innerRequest); } } else { innerRequest = request.relativePath; } request.__innerRequest_request = request.request; request.__innerRequest_relativePath = request.relativePath; return request.__innerRequest = innerRequest; }; enhanced-resolve-4.1.0/lib/getPaths.js000066400000000000000000000016151331515416700176320ustar00rootroot00000000000000/* MIT License http://www.opensource.org/licenses/mit-license.php Author Tobias Koppers @sokra */ "use strict"; module.exports = function getPaths(path) { const parts = path.split(/(.*?[\\\/]+)/); const paths = [path]; const seqments = [parts[parts.length - 1]]; let part = parts[parts.length - 1]; path = path.substr(0, path.length - part.length - 1); for(let i = parts.length - 2; i > 2; i -= 2) { paths.push(path); part = parts[i]; path = path.substr(0, path.length - part.length) || "/"; seqments.push(part.substr(0, part.length - 1)); } part = parts[1]; seqments.push(part); paths.push(part); return { paths: paths, seqments: seqments }; }; module.exports.basename = function basename(path) { const i = path.lastIndexOf("/"), j = path.lastIndexOf("\\"); const p = i < 0 ? j : j < 0 ? i : i < j ? j : i; if(p < 0) return null; const s = path.substr(p + 1); return s; }; enhanced-resolve-4.1.0/lib/globToRegExp.js000066400000000000000000000077651331515416700204300ustar00rootroot00000000000000/* MIT License http://www.opensource.org/licenses/mit-license.php Author Tobias Koppers @sokra */ "use strict"; function globToRegExp(glob) { // * [^\\\/]* // /**/ /.+/ // ^* \./.+ (concord special) // ? [^\\\/] // [!...] [^...] // [^...] [^...] // / [\\\/] // {...,...} (...|...) // ?(...|...) (...|...)? // +(...|...) (...|...)+ // *(...|...) (...|...)* // @(...|...) (...|...) if(/^\(.+\)$/.test(glob)) { // allow to pass an RegExp in brackets return new RegExp(glob.substr(1, glob.length - 2)); } const tokens = tokenize(glob); const process = createRoot(); const regExpStr = tokens.map(process).join(""); return new RegExp("^" + regExpStr + "$"); } const SIMPLE_TOKENS = { "@(": "one", "?(": "zero-one", "+(": "one-many", "*(": "zero-many", "|": "segment-sep", "/**/": "any-path-segments", "**": "any-path", "*": "any-path-segment", "?": "any-char", "{": "or", "/": "path-sep", ",": "comma", ")": "closing-segment", "}": "closing-or" }; function tokenize(glob) { return glob.split(/([@?+*]\(|\/\*\*\/|\*\*|[?*]|\[[\!\^]?(?:[^\]\\]|\\.)+\]|\{|,|\/|[|)}])/g).map(item => { if(!item) return null; const t = SIMPLE_TOKENS[item]; if(t) { return { type: t }; } if(item[0] === "[") { if(item[1] === "^" || item[1] === "!") { return { type: "inverted-char-set", value: item.substr(2, item.length - 3) }; } else { return { type: "char-set", value: item.substr(1, item.length - 2) }; } } return { type: "string", value: item }; }).filter(Boolean).concat({ type: "end" }); } function createRoot() { const inOr = []; const process = createSeqment(); let initial = true; return function(token) { switch(token.type) { case "or": inOr.push(initial); return "("; case "comma": if(inOr.length) { initial = inOr[inOr.length - 1]; return "|"; } else { return process({ type: "string", value: "," }, initial); } case "closing-or": if(inOr.length === 0) throw new Error("Unmatched '}'"); inOr.pop(); return ")"; case "end": if(inOr.length) throw new Error("Unmatched '{'"); return process(token, initial); default: { const result = process(token, initial); initial = false; return result; } } }; } function createSeqment() { const inSeqment = []; const process = createSimple(); return function(token, initial) { switch(token.type) { case "one": case "one-many": case "zero-many": case "zero-one": inSeqment.push(token.type); return "("; case "segment-sep": if(inSeqment.length) { return "|"; } else { return process({ type: "string", value: "|" }, initial); } case "closing-segment": { const segment = inSeqment.pop(); switch(segment) { case "one": return ")"; case "one-many": return ")+"; case "zero-many": return ")*"; case "zero-one": return ")?"; } throw new Error("Unexcepted segment " + segment); } case "end": if(inSeqment.length > 0) { throw new Error("Unmatched segment, missing ')'"); } return process(token, initial); default: return process(token, initial); } }; } function createSimple() { return function(token, initial) { switch(token.type) { case "path-sep": return "[\\\\/]+"; case "any-path-segments": return "[\\\\/]+(?:(.+)[\\\\/]+)?"; case "any-path": return "(.*)"; case "any-path-segment": if(initial) { return "\\.[\\\\/]+(?:.*[\\\\/]+)?([^\\\\/]+)"; } else { return "([^\\\\/]*)"; } case "any-char": return "[^\\\\/]"; case "inverted-char-set": return "[^" + token.value + "]"; case "char-set": return "[" + token.value + "]"; case "string": return token.value.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, "\\$&"); case "end": return ""; default: throw new Error("Unsupported token '" + token.type + "'"); } }; } exports.globToRegExp = globToRegExp; enhanced-resolve-4.1.0/lib/node.js000066400000000000000000000111101331515416700167670ustar00rootroot00000000000000/* MIT License http://www.opensource.org/licenses/mit-license.php Author Tobias Koppers @sokra */ "use strict"; const ResolverFactory = require("./ResolverFactory"); const NodeJsInputFileSystem = require("./NodeJsInputFileSystem"); const CachedInputFileSystem = require("./CachedInputFileSystem"); const nodeFileSystem = new CachedInputFileSystem(new NodeJsInputFileSystem(), 4000); const nodeContext = { environments: [ "node+es3+es5+process+native" ] }; const asyncResolver = ResolverFactory.createResolver({ extensions: [".js", ".json", ".node"], fileSystem: nodeFileSystem }); module.exports = function resolve(context, path, request, resolveContext, callback) { if(typeof context === "string") { callback = resolveContext; resolveContext = request; request = path; path = context; context = nodeContext; } if(typeof callback !== "function") { callback = resolveContext; } asyncResolver.resolve(context, path, request, resolveContext, callback); }; const syncResolver = ResolverFactory.createResolver({ extensions: [".js", ".json", ".node"], useSyncFileSystemCalls: true, fileSystem: nodeFileSystem }); module.exports.sync = function resolveSync(context, path, request) { if(typeof context === "string") { request = path; path = context; context = nodeContext; } return syncResolver.resolveSync(context, path, request); }; const asyncContextResolver = ResolverFactory.createResolver({ extensions: [".js", ".json", ".node"], resolveToContext: true, fileSystem: nodeFileSystem }); module.exports.context = function resolveContext(context, path, request, resolveContext, callback) { if(typeof context === "string") { callback = resolveContext; resolveContext = request; request = path; path = context; context = nodeContext; } if(typeof callback !== "function") { callback = resolveContext; } asyncContextResolver.resolve(context, path, request, resolveContext, callback); }; const syncContextResolver = ResolverFactory.createResolver({ extensions: [".js", ".json", ".node"], resolveToContext: true, useSyncFileSystemCalls: true, fileSystem: nodeFileSystem }); module.exports.context.sync = function resolveContextSync(context, path, request) { if(typeof context === "string") { request = path; path = context; context = nodeContext; } return syncContextResolver.resolveSync(context, path, request); }; const asyncLoaderResolver = ResolverFactory.createResolver({ extensions: [".js", ".json", ".node"], moduleExtensions: ["-loader"], mainFields: ["loader", "main"], fileSystem: nodeFileSystem }); module.exports.loader = function resolveLoader(context, path, request, resolveContext, callback) { if(typeof context === "string") { callback = resolveContext; resolveContext = request; request = path; path = context; context = nodeContext; } if(typeof callback !== "function") { callback = resolveContext; } asyncLoaderResolver.resolve(context, path, request, resolveContext, callback); }; const syncLoaderResolver = ResolverFactory.createResolver({ extensions: [".js", ".json", ".node"], moduleExtensions: ["-loader"], mainFields: ["loader", "main"], useSyncFileSystemCalls: true, fileSystem: nodeFileSystem }); module.exports.loader.sync = function resolveLoaderSync(context, path, request) { if(typeof context === "string") { request = path; path = context; context = nodeContext; } return syncLoaderResolver.resolveSync(context, path, request); }; module.exports.create = function create(options) { options = Object.assign({ fileSystem: nodeFileSystem }, options); const resolver = ResolverFactory.createResolver(options); return function(context, path, request, resolveContext, callback) { if(typeof context === "string") { callback = resolveContext; resolveContext = request; request = path; path = context; context = nodeContext; } if(typeof callback !== "function") { callback = resolveContext; } resolver.resolve(context, path, request, resolveContext, callback); }; }; module.exports.create.sync = function createSync(options) { options = Object.assign({ useSyncFileSystemCalls: true, fileSystem: nodeFileSystem }, options); const resolver = ResolverFactory.createResolver(options); return function(context, path, request) { if(typeof context === "string") { request = path; path = context; context = nodeContext; } return resolver.resolveSync(context, path, request); }; }; // Export Resolver, FileSystems and Plugins module.exports.ResolverFactory = ResolverFactory; module.exports.NodeJsInputFileSystem = NodeJsInputFileSystem; module.exports.CachedInputFileSystem = CachedInputFileSystem; enhanced-resolve-4.1.0/open-bot.yaml000066400000000000000000000076711331515416700173660ustar00rootroot00000000000000bot: "webpack-bot" rules: # Add ci-ok, ci-not-ok labels depending on travis status # comment to point the user to the results # comment in case of success - filters: open: true pull_request: mergeable: true status_1: context: "continuous-integration/travis-ci/pr" ensure_1: value: "{{status_1.state}}" equals: "success" actions: label: add: "PR: CI-ok" remove: "PR: CI-not-ok" comment: identifier: "ci-result" message: |- Thank you for your pull request! The most important CI builds succeeded, we’ll review the pull request soon. - filters: open: true pull_request: mergeable: true status_1: context: "continuous-integration/travis-ci/pr" any: ensure_1: value: "{{status_1.state}}" equals: "failure" actions: label: add: "PR: CI-not-ok" remove: "PR: CI-ok" # add conflict label to pull requests with conflict # on conflict all result labels are removed - filters: open: true pull_request: mergeable: false actions: label: add: "PR: conflict" remove: - "PR: tests-needed" - "PR: CI-ok" - "PR: CI-not-ok" - filters: open: true pull_request: mergeable: true actions: label: remove: "PR: conflict" # add unreviewed, reviewed, review-outdated labels # comment to ping reviewer # comment on new PR - filters: open: true in_order: commit: true review: state: APPROVED|CHANGES_REQUESTED ensure: value: "{{review.state}}" equals: APPROVED actions: label: add: "PR: reviewed-approved" remove: - "PR: review-outdated" - "PR: unreviewed" - "PR: reviewed" - filters: open: true in_order: commit: true review: state: APPROVED|CHANGES_REQUESTED ensure: value: "{{review.state}}" equals: CHANGES_REQUESTED actions: label: add: "PR: reviewed-changes-requested" remove: - "PR: review-outdated" - "PR: unreviewed" - "PR: reviewed" - filters: open: true in_order: review: state: APPROVED|CHANGES_REQUESTED commit: true not: label: "review-outdated" ensure: value: "{{commit.author.login}}" notEquals: "{{review.user.login}}" actions: label: add: "PR: review-outdated" remove: - "PR: reviewed-approved" - "PR: reviewed-changes-requested" - "PR: unreviewed" - "PR: reviewed" comment: identifier: "review-outdated" message: |- @{{commit.author.login}} Thanks for your update. I labeled the Pull Request so reviewers will review it again. @{{review.user.login}} Please review the new changes. - filters: open: true commit: true not: review: state: APPROVED|CHANGES_REQUESTED actions: label: "PR: unreviewed" # add non-master label to pull request to other branch - filters: pull_request: base_ref: "^(?!master)" actions: label: "PR: non-master" # add small label to small pull requests - filters: open: true pull_request: additions: "<= 10" deletions: "<= 10" changed_files: "<= 2" actions: label: "PR: small" # Move issue task - filters: open: true comment: "\\s*@webpack-bot\\s+move\\s+(?:to\\s+)?([a-z0-9_\\-\\.]+/[a-z0-9_\\-\\.]+)\\s*([\\s\\S]*)$" not: comment_1: matching: "moved\\-by\\-bot" author: "." permission: user: "{{comment.actor.login}}" actions: new_issue: target: "{{{comment_match.[1]}}}" body: |- {{{issue.body}}} --- This issue was moved from {{owner}}/{{repo}}#{{issue.number}} by @{{comment.actor.login}}. Original issue was by @{{issue.user.login}}. {{{comment_match.[2]}}} comment: identifier: moved-by-bot message: |- I've moved it to {{comment_match.[1]}}. close: true enhanced-resolve-4.1.0/package.json000066400000000000000000000026251331515416700172370ustar00rootroot00000000000000{ "name": "enhanced-resolve", "version": "4.1.0", "author": "Tobias Koppers @sokra", "description": "Offers a async require.resolve function. It's highly configurable.", "files": [ "lib", "LICENSE" ], "dependencies": { "graceful-fs": "^4.1.2", "memory-fs": "^0.4.0", "tapable": "^1.0.0" }, "licenses": [ { "type": "MIT", "url": "http://www.opensource.org/licenses/mit-license.php" } ], "devDependencies": { "beautify-lint": "^1.0.3", "codecov.io": "^0.1.6", "coveralls": "^2.11.6", "eslint": "^3.14.1", "eslint-plugin-node": "^3.0.5", "eslint-plugin-nodeca": "^1.0.3", "istanbul": "^0.4.1", "js-beautify": "^1.5.10", "mocha": "^2.3.4", "should": "^8.0.2" }, "engines": { "node": ">=6.9.0" }, "main": "lib/node.js", "homepage": "http://github.com/webpack/enhanced-resolve", "scripts": { "beautify-lint": "beautify-lint lib/**.js test/*.js", "beautify": "beautify-rewrite lib/**.js test/*.js", "lint": "eslint lib test", "pretest": "npm run lint && npm run beautify-lint", "test": "mocha --full-trace --check-leaks", "precover": "npm run lint && npm run beautify-lint", "cover": "istanbul cover node_modules/mocha/bin/_mocha", "travis": "npm run cover -- --report lcovonly" }, "repository": { "type": "git", "url": "git://github.com/webpack/enhanced-resolve.git" } } enhanced-resolve-4.1.0/test/000077500000000000000000000000001331515416700157235ustar00rootroot00000000000000enhanced-resolve-4.1.0/test/.eslintrc000066400000000000000000000001021331515416700175400ustar00rootroot00000000000000{ "extends": "../.eslintrc", "env": { "mocha": true } } enhanced-resolve-4.1.0/test/CachedInputFileSystem.js000066400000000000000000000047251331515416700224650ustar00rootroot00000000000000var CachedInputFileSystem = require("../lib/CachedInputFileSystem"); var should = require("should"); describe("CachedInputFileSystem", function() { this.timeout(3000); var fs; beforeEach(function() { fs = new CachedInputFileSystem({ stat: function(path, callback) { setTimeout(callback.bind(null, null, { path: path }), 100); } }, 1000); }); afterEach(function() { fs.purge(); }); it("should join accesses", function(done) { fs.stat("a", function(err, result) { result.a = true; }); fs.stat("a", function(err, result) { should.exist(result.a); done(); }); }); it("should cache accesses", function(done) { fs.stat("a", function(err, result) { result.a = true; var sync = true; fs.stat("a", function(err, result) { should.exist(result.a); sync.should.be.eql(true); setTimeout(function() { fs.stat("a", function(err, result) { should.not.exist(result.a); result.b = true; var sync2 = true; fs.stat("a", function(err, result) { should.not.exist(result.a); should.exist(result.b); sync2.should.be.eql(true); done(); }); setTimeout(function() { sync2 = false; }, 50); }); }, 1100); }); setTimeout(function() { sync = false; }, 50); }); }); it("should recover after passive periods", function(done) { fs.stat("a", function(err, result) { result.a = true; setTimeout(function() { fs.stat("a", function(err, result) { should.exist(result.a); setTimeout(function() { fs.stat("a", function(err, result) { should.not.exist(result.a); result.b = true; setTimeout(function() { fs.stat("a", function(err, result) { should.not.exist(result.a); should.exist(result.b); done(); }); }, 500); }); }, 600); }); }, 500); }); }); it("should restart after timeout", function(done) { fs.stat("a", function(err, result) { result.a = true; setTimeout(function() { fs.stat("a", function(err, result) { should.not.exist(result.a); result.b = true; setTimeout(function() { fs.stat("a", function(err, result) { should.not.exist(result.a); should.exist(result.b); done(); }); }, 50); }); }, 1100); }); }); it("should cache undefined value", function(done) { fs.stat(undefined, function(err, result) { fs.purge("a"); fs.purge(); done(); }); }); }); enhanced-resolve-4.1.0/test/alias.js000066400000000000000000000064271331515416700173630ustar00rootroot00000000000000require("should"); var ResolverFactory = require("../lib/ResolverFactory"); var MemoryFileSystem = require("memory-fs"); describe("alias", function() { var resolver; beforeEach(function() { var buf = new Buffer(""); // eslint-disable-line node/no-deprecated-api var fileSystem = new MemoryFileSystem({ "": true, a: { "": true, index: buf, dir: { "": true, index: buf } }, recursive: { "": true, index: buf, dir: { "": true, index: buf } }, b: { "": true, index: buf, dir: { "": true, index: buf } }, c: { "": true, index: buf, dir: { "": true, index: buf } }, d: { "": true, "index.js": buf, dir: { "": true } } }); resolver = ResolverFactory.createResolver({ alias: { aliasA: "a", "b$": "a/index", "c$": "/a/index", "recursive": "recursive/dir", "/d/dir": "/c/dir", "/d/index.js": "/c/index", }, modules: "/", useSyncFileSystemCalls: true, fileSystem: fileSystem }); }); it("should resolve a not aliased module", function() { resolver.resolveSync({}, "/", "a").should.be.eql("/a/index"); resolver.resolveSync({}, "/", "a/index").should.be.eql("/a/index"); resolver.resolveSync({}, "/", "a/dir").should.be.eql("/a/dir/index"); resolver.resolveSync({}, "/", "a/dir/index").should.be.eql("/a/dir/index"); }); it("should resolve an aliased module", function() { resolver.resolveSync({}, "/", "aliasA").should.be.eql("/a/index"); resolver.resolveSync({}, "/", "aliasA/index").should.be.eql("/a/index"); resolver.resolveSync({}, "/", "aliasA/dir").should.be.eql("/a/dir/index"); resolver.resolveSync({}, "/", "aliasA/dir/index").should.be.eql("/a/dir/index"); }); it("should resolve a recursive aliased module", function() { resolver.resolveSync({}, "/", "recursive").should.be.eql("/recursive/dir/index"); resolver.resolveSync({}, "/", "recursive/index").should.be.eql("/recursive/dir/index"); resolver.resolveSync({}, "/", "recursive/dir").should.be.eql("/recursive/dir/index"); resolver.resolveSync({}, "/", "recursive/dir/index").should.be.eql("/recursive/dir/index"); }); it("should resolve a file aliased module", function() { resolver.resolveSync({}, "/", "b").should.be.eql("/a/index"); resolver.resolveSync({}, "/", "c").should.be.eql("/a/index"); }); it("should resolve a file aliased module with a query", function() { resolver.resolveSync({}, "/", "b?query").should.be.eql("/a/index?query"); resolver.resolveSync({}, "/", "c?query").should.be.eql("/a/index?query"); }); it("should resolve a path in a file aliased module", function() { resolver.resolveSync({}, "/", "b/index").should.be.eql("/b/index"); resolver.resolveSync({}, "/", "b/dir").should.be.eql("/b/dir/index"); resolver.resolveSync({}, "/", "b/dir/index").should.be.eql("/b/dir/index"); resolver.resolveSync({}, "/", "c/index").should.be.eql("/c/index"); resolver.resolveSync({}, "/", "c/dir").should.be.eql("/c/dir/index"); resolver.resolveSync({}, "/", "c/dir/index").should.be.eql("/c/dir/index"); }); it("should resolve a file aliased file", function() { resolver.resolveSync({}, "/", "d").should.be.eql("/c/index"); resolver.resolveSync({}, "/", "d/dir/index").should.be.eql("/c/dir/index"); }); }); enhanced-resolve-4.1.0/test/browserField.js000066400000000000000000000037321331515416700207150ustar00rootroot00000000000000var path = require("path"); var ResolverFactory = require("../lib/ResolverFactory"); var NodeJsInputFileSystem = require("../lib/NodeJsInputFileSystem"); var browserModule = path.join(__dirname, "fixtures", "browser-module"); function p() { return path.join.apply(path, [browserModule].concat(Array.prototype.slice.call(arguments))); } describe("browserField", function() { var resolver; beforeEach(function() { resolver = ResolverFactory.createResolver({ aliasFields: ["browser"], useSyncFileSystemCalls: true, fileSystem: new NodeJsInputFileSystem() }); }); it("should ignore", function(done) { resolver.resolve({}, p(), "./lib/ignore", {}, function(err, result) { if(err) throw err; result.should.be.eql(false); done(); }); }); it("should ignore", function() { resolver.resolveSync({}, p(), "./lib/ignore").should.be.eql(false); resolver.resolveSync({}, p(), "./lib/ignore.js").should.be.eql(false); resolver.resolveSync({}, p("lib"), "./ignore").should.be.eql(false); resolver.resolveSync({}, p("lib"), "./ignore.js").should.be.eql(false); }); it("should replace a file", function() { resolver.resolveSync({}, p(), "./lib/replaced").should.be.eql(p("lib", "browser.js")); resolver.resolveSync({}, p(), "./lib/replaced.js").should.be.eql(p("lib", "browser.js")); resolver.resolveSync({}, p("lib"), "./replaced").should.be.eql(p("lib", "browser.js")); resolver.resolveSync({}, p("lib"), "./replaced.js").should.be.eql(p("lib", "browser.js")); }); it("should replace a module with a file", function() { resolver.resolveSync({}, p(), "module-a").should.be.eql(p("browser", "module-a.js")); resolver.resolveSync({}, p("lib"), "module-a").should.be.eql(p("browser", "module-a.js")); }); it("should replace a module with a module", function() { resolver.resolveSync({}, p(), "module-b").should.be.eql(p("node_modules", "module-c.js")); resolver.resolveSync({}, p("lib"), "module-b").should.be.eql(p("node_modules", "module-c.js")); }); }); enhanced-resolve-4.1.0/test/concord-resolve.js000066400000000000000000000107631331515416700213740ustar00rootroot00000000000000var should = require("should"); var path = require("path"); var resolve = require("../").create({ concord: true }); var resolveSync = require("../").create.sync({ concord: true }); var fixtures = path.join(__dirname, "concord"); function testResolve(name, context, moduleName, result) { it(name, function(done) { /*var logData = []; callback.log = function(line) { logData.push(line); }*/ resolve({ environments: [ "web+es5+dom+xhr" ], referrer: "test" }, context, moduleName, callback); function callback(err, filename) { if(err) { console.log(err.details); return done(err); } //console.log(logData.join("\n")); should.exist(filename); filename.should.equal(result); done(); } }); it(name + " (sync)", function() { /*var logData = []; callback.log = function(line) { logData.push(line); }*/ var filename = resolveSync({ environments: [ "web+es5+dom+xhr" ], referrer: "test" }, context, moduleName); should.exist(filename); filename.should.equal(result); }); } describe("concord-resolve", function() { testResolve("should prefer concord main field over normal main field (outside)", fixtures, "./main-field", path.join(fixtures, "main-field", "correct.js")); testResolve("should prefer concord main field over normal main field (inside)", path.join(fixtures, "main-field"), "./", path.join(fixtures, "main-field", "correct.js")); testResolve("should use specified extensions (outside over main)", fixtures, "./extensions", path.join(fixtures, "extensions", "file.css")); testResolve("should use specified extensions (outside)", fixtures, "./extensions/file", path.join(fixtures, "extensions", "file.css")); testResolve("should use specified extensions (inside over main)", path.join(fixtures, "extensions"), "./", path.join(fixtures, "extensions", "file.css")); testResolve("should use specified extensions (inside)", path.join(fixtures, "extensions"), "./file", path.join(fixtures, "extensions", "file.css")); testResolve("should use specified extensions (outside) (dir index)", fixtures, "./extensions/dir", path.join(fixtures, "extensions", "dir", "index.ts")); testResolve("should use specified extensions (inside) (dir index)", path.join(fixtures, "extensions"), "./dir", path.join(fixtures, "extensions", "dir", "index.ts")); testResolve("should use modules configuration, module (over main)", fixtures, "./modules", path.join(fixtures, "modules", "correct.js")); testResolve("should use modules configuration, module (direct)", path.join(fixtures, "modules"), "module-a", path.join(fixtures, "modules", "correct.js")); testResolve("should use modules configuration, file (direct)", path.join(fixtures, "modules"), "./wrong.js", path.join(fixtures, "modules", "correct.js")); testResolve("should use modules configuration, file (without extension)", path.join(fixtures, "modules"), "./wrong", path.join(fixtures, "modules", "correct.js")); testResolve("should use modules configuration, file (from sub dir)", path.join(fixtures, "modules", "sub"), "../wrong.js", path.join(fixtures, "modules", "correct.js")); testResolve("should use modules configuration, directory (direct 1)", path.join(fixtures, "modules"), "./dir1/any", path.join(fixtures, "modules", "correct.js")); testResolve("should use modules configuration, directory (direct 2)", path.join(fixtures, "modules"), "./dir1/any/path", path.join(fixtures, "modules", "correct.js")); testResolve("should use modules configuration, directory (from sub dir)", path.join(fixtures, "modules", "sub"), "../dir1/any/path", path.join(fixtures, "modules", "correct.js")); testResolve("should use modules configuration, files in directory (direct 2)", path.join(fixtures, "modules"), "./dir2/correct.js", path.join(fixtures, "modules", "correct.js")); testResolve("should use modules configuration, files in directory (from dir)", path.join(fixtures, "modules", "dir2"), "./correct.js", path.join(fixtures, "modules", "correct.js")); testResolve("should use modules configuration, module (module)", path.join(fixtures, "modules"), "jquery", path.join(fixtures, "modules", "modules", "jquery", "index.js")); testResolve("should use modules configuration, module (file in module)", path.join(fixtures, "modules"), "jquery/file", path.join(fixtures, "modules", "modules", "jquery", "file.js")); testResolve("should use modules configuration, module (from dir)", path.join(fixtures, "modules", "dir2"), "jquery", path.join(fixtures, "modules", "modules", "jquery", "index.js")); }); enhanced-resolve-4.1.0/test/concord.js000066400000000000000000000253241331515416700177160ustar00rootroot00000000000000var concord = require("../lib/concord"); describe("concord", function() { describe("parseType", function() { var TESTS = { "hello-world": { type: "hello-world", features: [] }, "hello+world": { type: "hello", features: ["world"] }, "node+es5+es6+esmodules": { type: "node", features: ["es5", "es6", "esmodules"] }, "*+dom": { type: null, features: ["dom"] }, "*": { type: null, features: [] }, "*+hello-world": { type: null, features: ["hello-world"] } }; Object.keys(TESTS).forEach(function(key) { it("should parse " + key, function() { concord.parseType(key).should.be.eql(TESTS[key]); }); }); }); describe("isTypeMatched", function() { var TESTS = [ ["node+es5", "node+es5", true], ["node+es5", "node", true], ["node+es5", "node+es6", false], ["node+es5", "web", false], ["node+es5", "web+es5", false], ["node+es5+es6", "node+es6", true], ["node+es5+es6", "node+es7", false], ["node+es5+es6", "node+es6+es5", true], ["node+es5+es6", "node+es6+es7", false], ["node+es5+es6", "*+es5", true], ["node+es5+es6", "*+es6", true], ["node+es5+es6", "*+es7", false], ["node+es5+es6", "*", true], [{ type: "node", features: ["es5", "es6"] }, { type: "node", features: ["es5"] }, true], ["node+es5+es6", { type: "node", features: ["es5"] }, true], [{ type: "node", features: ["es5", "es6"] }, "*+es5", true] ]; TESTS.forEach(function(testCase) { it("should say '" + testCase[1] + "' is " + (testCase[2] ? "matched" : "not matched") + " in '" + testCase[0] + "'", function() { concord.isTypeMatched(testCase[0], testCase[1]).should.be.eql(testCase[2]); }); }); }); describe("isGlobMatched", function() { var TESTS = [ ["module", "module", true], ["moduleA", "moduleB", false], ["./a.js", "./a.js", true], ["./a.js", ".\\a.js", true], ["./*.js", "./abc.js", true], ["./*.js", "./dir/abc.js", false], ["./**/*.js", "./dir/abc.js", true], ["./**/*.js", "./abc.js", true], ["./**.js", "./dir/abc.js", true], ["./**.js", "./abc.js", true], ["./**", "./dir/abc.js", true], ["./**", "./abc.js", true], ["./abc-**.js", "./abc-x.js", true], ["./abc-**.js", "./abc-xyz.js", true], ["./abc-**.js", "./xyz.js", false], ["./???.js", "./abc.js", true], ["./???.js", "./abcd.js", false], ["./???.js", "./ab.js", false], ["*.js", "./abc.js", true], ["*.js", "./dir/abc.js", true], ["*.js", "./dir/abc.jsx", false], ["*.{js,jsx}", "./dir/abc.js", true], ["*.{js,jsx}", "./dir/abc.jsx", true], ["{*.js,*.jsx}", "./dir/abc.jsx", true], ["{*.js,*.jsx}", "./dir/abc.js", true], ["{module,{*.js,*.jsx}}", "module", true], ["{module,{*.js,*.jsx}}", "./dir/abc.js", true], ["{module,{*.js,*.jsx}}", "./dir/abc.jsx", true], ["module[1-5]", "module4", true], ["module[1-5]", "module7", false], ["module[!1-5]", "module4", false], ["module[!1-5]", "module7", true], ["module[!1-5]", "module77", false], ["./a,{b,c},d.js", "./a,b,d.js", true], ["./a,{b,c},d.js", "./a,c,d.js", true], ["./a,{b,c},d.js", "./a.js", false], ["./@(a|b|c).js", "./.js", false], ["./@(a|b|c).js", "./a.js", true], ["./@(a|b|c).js", "./ab.js", false], ["./@(a|b|c).js", "./abc.js", false], ["./?(a|b|c).js", "./.js", true], ["./?(a|b|c).js", "./a.js", true], ["./?(a|b|c).js", "./ab.js", false], ["./?(a|b|c).js", "./abc.js", false], ["./+(a|b|c).js", "./.js", false], ["./+(a|b|c).js", "./a.js", true], ["./+(a|b|c).js", "./ab.js", true], ["./+(a|b|c).js", "./abc.js", true], ["./*(a|b|c).js", "./.js", true], ["./*(a|b|c).js", "./a.js", true], ["./*(a|b|c).js", "./ab.js", true], ["./a|b.js", "./a.js", false], ["./a|b.js", "./a|b.js", true], ["(\\.js$)", "./dir/abc.js", true], ["(\\.js$)", "./dir/abc.js.css", false], ]; TESTS.forEach(function(testCase) { it("should say '" + testCase[1] + "' is " + (testCase[2] ? "matched" : "not matched") + " in '" + testCase[0] + "'", function() { concord.isGlobMatched(testCase[0], testCase[1]).should.be.eql(testCase[2]); }); }); }); describe("isConditionMatched", function() { var context = { supportedResourceTypes: ["promise+lazy/*", "stylesheet/sass+mixins", "stylesheet/sass+functions/incorrect"], environments: ["web+es5+dom+xhr", "web+es5+xhr"], referrer: "./main.css" }; var TESTS = { "web": true, "web+es5": true, "*+es6": false, "*+es5": true, "*+es6|*+es5": true, "*+dom": false, "!*+xhr": false, "!*+es6": true, "!*+es5|!node": true, "!*+es5|!web": false, "promise/*": true, "promise+lazy/*": true, "promise+eager/*": false, "stylesheet/sass": true, "stylesheet/sass+mixins": true, "stylesheet/sass+functions": false, "stylesheet/sass+mixins+functions": false, "referrer:*.css": true, "referrer: *.css": true, "referrer:*.js": false, "referrer: *.js": false, "referrer:./**/*": true, "referrer:./**": true, "referrer:!./**": false, "unknown:any": false, }; Object.keys(TESTS).forEach(function(key) { var expected = TESTS[key]; it("should say '" + key + "' is " + (expected ? "matched" : "not matched"), function() { concord.isConditionMatched(context, key).should.be.eql(expected); }); }); }); describe("getMain", function() { var context = { supportedResourceTypes: [], environments: ["web+es5+dom+xhr"], referrer: "module" }; var TESTS = [{ "main": "yes" }, { "main": "no", "[web]main": "yes" }, { "main": "no", "[ web ] [\t*+es5]\t\tmain": "yes" }, { "[web] main": "yes" }, { "main": "yes", "[ node ] main": "no" }, { "main": "no", "[ web ] main": "yes", "[ node ] main": "no" }, { "main": "no", "[ referrer: module ] main": "yes" }, { "main": "no", "[ web] main": "no", "[*+es5 ] main": "yes" }]; TESTS.forEach(function(testCase) { it("should get the main from " + JSON.stringify(testCase), function() { concord.getMain(context, testCase).should.be.eql("yes"); }); }); }); describe("getExtensions", function() { it("should allow to access the extensions field", function() { concord.getExtensions({}, { extensions: [".js"] }).should.be.eql([".js"]); }); }); describe("matchModule", function() { var context = { supportedResourceTypes: [], environments: ["web+es5+dom+xhr"] }; var config1 = { modules: { "./a.js": "./new-a.js", "./b.js": "./new/b.js", "./ccc/c.js": "./c.js", "./ddd/d.js": "./ddd/dd.js", "./dir/**": "./new/**", "./empty.js": false, "module": "./replacement-module.js", "templates/**": "./templates/**", "fs": "fake-fs", "abc": "./abc", "abc/**": "./dir-abc/**", "jquery**": "./jquery**", "xyz/*.js": "./not-used.js", "xyz/*.css": "./xxx/*.css", "fff/**/*.css": "./ggg/**/*.js" } }; var config2 = { modules: { "./overwrite.*": "./overwritten.*", "./overwrite.js": "./wrong", "./*.css": "./*.match", "./*.match": "./success-*.matched-css", "(regexp-([^\-]*))": "regexp/$1" } }; var TESTS = [ [{}, "./no-field.js", "./no-field.js"], [config1, "./normal.js", "./normal.js"], [config1, "./a.js", "./new-a.js"], [config1, "./b.js", "./new/b.js"], [config1, "./ccc/c.js", "./c.js"], [config1, "./ddd/d.js", "./ddd/dd.js"], [config1, "./dir/c.js", "./new/c.js"], [config1, "./dir/sub/c.js", "./new/sub/c.js"], [config1, "./empty.js", false], [config1, "module", "./replacement-module.js"], [config1, "templates/abc.ring", "./templates/abc.ring"], [config1, "fs", "fake-fs"], [config1, "abc", "./abc"], [config1, "abc/def", "./dir-abc/def"], [config1, "abc/def/ghi", "./dir-abc/def/ghi"], [config1, "jquery", "./jquery"], [config1, "jquery/jquery.js", "./jquery/jquery.js"], [config1, "xyz/rrr.js", "./not-used.js"], [config1, "xyz/rrr.css", "./xxx/rrr.css"], [config1, "fff/wfe.css", "./ggg/wfe.js"], [config1, "fff/jht/wfe.css", "./ggg/jht/wfe.js"], [config1, "fff/jht/222/wfe.css", "./ggg/jht/222/wfe.js"], [config2, "./overwrite.js", "./overwritten.js"], [config2, "./matched-again.css", "./success-matched-again.matched-css"], [config2, "./some/regexp-match.js", "./some/regexp/match.js"], [config2, "./overwrite.regexp-test.css", "./success-overwritten.regexp/test.matched-css"], ]; TESTS.forEach(function(testCase) { it("should map '" + testCase[1] + "' to '" + testCase[2] + "'", function() { var actual = concord.matchModule(context, testCase[0], testCase[1]); actual.should.be.eql(testCase[2]); }); }); it("should throw an exception on recursive configuration", function() { (function() { concord.matchModule({}, { modules: { "a": "b", "b": "c", "c": "a" } }, "b"); }).should.throw("Request 'b' matches recursively"); }); }); describe("matchType", function() { var context = { supportedResourceTypes: [], environments: ["web+es5+dom+xhr"] }; var TESTS = [ ["should get a type", { "types": { "*.test": "hello/world" } }, "hello/world"], ["should get a type from list", { "types": { "*.js": "any/javascript+commonjs", "*.test": "hello/world", "*.css": "stylesheet/css" } }, "hello/world"], ["should get a type with conditions", { "types": { "*.test": "hello/world", "[*+es5] *.test": "hello/es5", "[web] *.test": "hello/web", } }, "hello/web"], ["should get a type with complete override", { "types": { "*.test": "hello/world", "[web] *.test": "hello/wrong" }, "[web] types": { "*.js": "hello/web" } }, undefined], ["should get a type with multiple matches", { "types": { "*.test": "hello/world", "./abc.test": "hello/abs" } }, "hello/abs"], ["should get a type with multiple matches 2", { "types": { "./abc.test": "hello/abs", "*.test": "hello/world" } }, "hello/world"], ["should get a type with star match", { "types": { "./abc.test": "hello/world", "*.test": "super/*" } }, "super/hello/world"], ["should get a type without types field", {}, undefined], ]; TESTS.forEach(function(testCase) { it(testCase[0], function() { var result = concord.matchType(context, testCase[1], "./abc.test"); if(testCase[2]) result.should.be.eql(testCase[2]); else (typeof result).should.be.eql(typeof testCase[2]); }); }); it("should throw an exception on incomplete star match", function() { (function() { concord.matchType({}, { types: { "*.test": "super/*" } }, "./abc.test"); }).should.throw("value ('super/*') of key '*.test' contains '*', but there is no previous value defined"); }); }); }); enhanced-resolve-4.1.0/test/concord/000077500000000000000000000000001331515416700173525ustar00rootroot00000000000000enhanced-resolve-4.1.0/test/concord/extensions/000077500000000000000000000000001331515416700215515ustar00rootroot00000000000000enhanced-resolve-4.1.0/test/concord/extensions/dir/000077500000000000000000000000001331515416700223275ustar00rootroot00000000000000enhanced-resolve-4.1.0/test/concord/extensions/dir/index.js000066400000000000000000000000001331515416700237620ustar00rootroot00000000000000enhanced-resolve-4.1.0/test/concord/extensions/dir/index.ts000066400000000000000000000000001331515416700237740ustar00rootroot00000000000000enhanced-resolve-4.1.0/test/concord/extensions/file.css000066400000000000000000000000001331515416700231700ustar00rootroot00000000000000enhanced-resolve-4.1.0/test/concord/extensions/file.js000066400000000000000000000000001331515416700230140ustar00rootroot00000000000000enhanced-resolve-4.1.0/test/concord/extensions/package.json000066400000000000000000000001161331515416700240350ustar00rootroot00000000000000{ "main": "./file", "concord": { "extensions": [".css", ".ts", ".js"] } }enhanced-resolve-4.1.0/test/concord/main-field/000077500000000000000000000000001331515416700213575ustar00rootroot00000000000000enhanced-resolve-4.1.0/test/concord/main-field/correct.js000066400000000000000000000000001331515416700233440ustar00rootroot00000000000000enhanced-resolve-4.1.0/test/concord/main-field/package.json000066400000000000000000000001021331515416700236360ustar00rootroot00000000000000{ "main": "wrong.js", "concord": { "main": "./correct.js" } }enhanced-resolve-4.1.0/test/concord/main-field/wrong.js000066400000000000000000000000001331515416700230370ustar00rootroot00000000000000enhanced-resolve-4.1.0/test/concord/modules/000077500000000000000000000000001331515416700210225ustar00rootroot00000000000000enhanced-resolve-4.1.0/test/concord/modules/correct.js000066400000000000000000000000001331515416700230070ustar00rootroot00000000000000enhanced-resolve-4.1.0/test/concord/modules/modules/000077500000000000000000000000001331515416700224725ustar00rootroot00000000000000enhanced-resolve-4.1.0/test/concord/modules/modules/jquery/000077500000000000000000000000001331515416700240115ustar00rootroot00000000000000enhanced-resolve-4.1.0/test/concord/modules/modules/jquery/file.js000066400000000000000000000000001331515416700252540ustar00rootroot00000000000000enhanced-resolve-4.1.0/test/concord/modules/modules/jquery/index.js000066400000000000000000000000001331515416700254440ustar00rootroot00000000000000enhanced-resolve-4.1.0/test/concord/modules/package.json000066400000000000000000000003351331515416700233110ustar00rootroot00000000000000{ "concord": { "main": "module-a", "modules": { "module-a": "./correct.js", "./wrong.js": "./correct.js", "./dir1/**": "./correct.js", "./dir2/*.js": "./*.js", "jquery**": "./modules/jquery**" } } }enhanced-resolve-4.1.0/test/concord/modules/sub/000077500000000000000000000000001331515416700216135ustar00rootroot00000000000000enhanced-resolve-4.1.0/test/concord/modules/sub/file.txt000066400000000000000000000000001331515416700232610ustar00rootroot00000000000000enhanced-resolve-4.1.0/test/concord/modules/wrong.js000066400000000000000000000000001331515416700225020ustar00rootroot00000000000000enhanced-resolve-4.1.0/test/extensions.js000066400000000000000000000023361331515416700204640ustar00rootroot00000000000000var path = require("path"); require("should"); var ResolverFactory = require("../lib/ResolverFactory"); var NodeJsInputFileSystem = require("../lib/NodeJsInputFileSystem"); var CachedInputFileSystem = require("../lib/CachedInputFileSystem"); var nodeFileSystem = new CachedInputFileSystem(new NodeJsInputFileSystem(), 4000); var resolver = ResolverFactory.createResolver({ extensions: [".ts", ".js"], fileSystem: nodeFileSystem }); var fixture = path.resolve(__dirname, "fixtures", "extensions"); describe("extensions", function() { it("should resolve according to order of provided extensions", function(done) { resolver.resolve({}, fixture, "./foo", {}, function(err, result) { result.should.equal(path.resolve(fixture, "foo.ts")); done(); }); }); it("should resolve according to order of provided extensions (dir index)", function(done) { resolver.resolve({}, fixture, "./dir", {}, function(err, result) { result.should.equal(path.resolve(fixture, "dir", "index.ts")); done(); }); }); it("should resolve according to main field in module root", function(done) { resolver.resolve({}, fixture, ".", {}, function(err, result) { result.should.equal(path.resolve(fixture, "index.js")); done(); }); }); }); enhanced-resolve-4.1.0/test/fixtures/000077500000000000000000000000001331515416700175745ustar00rootroot00000000000000enhanced-resolve-4.1.0/test/fixtures/a.js000066400000000000000000000000701331515416700203470ustar00rootroot00000000000000module.exports = function a() { return "This is a"; }; enhanced-resolve-4.1.0/test/fixtures/abc.txt000066400000000000000000000000031331515416700210530ustar00rootroot00000000000000abcenhanced-resolve-4.1.0/test/fixtures/b.js000066400000000000000000000000701331515416700203500ustar00rootroot00000000000000module.exports = function b() { return "This is b"; }; enhanced-resolve-4.1.0/test/fixtures/browser-module/000077500000000000000000000000001331515416700225425ustar00rootroot00000000000000enhanced-resolve-4.1.0/test/fixtures/browser-module/browser/000077500000000000000000000000001331515416700242255ustar00rootroot00000000000000enhanced-resolve-4.1.0/test/fixtures/browser-module/browser/module-a.js000066400000000000000000000000001331515416700262540ustar00rootroot00000000000000enhanced-resolve-4.1.0/test/fixtures/browser-module/lib/000077500000000000000000000000001331515416700233105ustar00rootroot00000000000000enhanced-resolve-4.1.0/test/fixtures/browser-module/lib/browser.js000066400000000000000000000000001331515416700253170ustar00rootroot00000000000000enhanced-resolve-4.1.0/test/fixtures/browser-module/lib/ignore.js000066400000000000000000000000001331515416700251170ustar00rootroot00000000000000enhanced-resolve-4.1.0/test/fixtures/browser-module/lib/replaced.js000066400000000000000000000000001331515416700254130ustar00rootroot00000000000000enhanced-resolve-4.1.0/test/fixtures/browser-module/node_modules/000077500000000000000000000000001331515416700252175ustar00rootroot00000000000000enhanced-resolve-4.1.0/test/fixtures/browser-module/node_modules/module-a.js000066400000000000000000000000001331515416700272460ustar00rootroot00000000000000enhanced-resolve-4.1.0/test/fixtures/browser-module/node_modules/module-b.js000066400000000000000000000000001331515416700272470ustar00rootroot00000000000000enhanced-resolve-4.1.0/test/fixtures/browser-module/node_modules/module-c.js000066400000000000000000000000001331515416700272500ustar00rootroot00000000000000enhanced-resolve-4.1.0/test/fixtures/browser-module/package.json000066400000000000000000000002301331515416700250230ustar00rootroot00000000000000{ "browser": { "./lib/ignore.js": false, "./lib/replaced.js": "./lib/browser", "module-a": "./browser/module-a.js", "module-b": "module-c" } }enhanced-resolve-4.1.0/test/fixtures/c.js000066400000000000000000000001111331515416700203450ustar00rootroot00000000000000module.exports = function b() { require("./a"); return "This is c"; }; enhanced-resolve-4.1.0/test/fixtures/complex.js000066400000000000000000000006151331515416700216030ustar00rootroot00000000000000var complex1 = require("./lib/complex1"); require.ensure(["./lib/complex1", "complexm/step2"], function(require) { require("./lib/complex1"); var a = function() {} require.ensure(["complexm/step1"], function(require) { require("./lib/complex1"); var s1 = require("complexm/step1"); var s2 = require("complexm/step2"); console.log(s1); console.log(s2); }); }); console.log(complex1); enhanced-resolve-4.1.0/test/fixtures/dirOrFile.js000066400000000000000000000000311331515416700220030ustar00rootroot00000000000000module.exports = "file"; enhanced-resolve-4.1.0/test/fixtures/dirOrFile/000077500000000000000000000000001331515416700214535ustar00rootroot00000000000000enhanced-resolve-4.1.0/test/fixtures/dirOrFile/index.js000066400000000000000000000000301331515416700231110ustar00rootroot00000000000000module.exports = "dir"; enhanced-resolve-4.1.0/test/fixtures/directory-default/000077500000000000000000000000001331515416700232225ustar00rootroot00000000000000enhanced-resolve-4.1.0/test/fixtures/directory-default/directory-default.js000066400000000000000000000000001331515416700271740ustar00rootroot00000000000000enhanced-resolve-4.1.0/test/fixtures/extensions/000077500000000000000000000000001331515416700217735ustar00rootroot00000000000000enhanced-resolve-4.1.0/test/fixtures/extensions/dir/000077500000000000000000000000001331515416700225515ustar00rootroot00000000000000enhanced-resolve-4.1.0/test/fixtures/extensions/dir/index.js000066400000000000000000000000001331515416700242040ustar00rootroot00000000000000enhanced-resolve-4.1.0/test/fixtures/extensions/dir/index.ts000066400000000000000000000000001331515416700242160ustar00rootroot00000000000000enhanced-resolve-4.1.0/test/fixtures/extensions/foo.js000066400000000000000000000000001331515416700231020ustar00rootroot00000000000000enhanced-resolve-4.1.0/test/fixtures/extensions/foo.ts000066400000000000000000000000001331515416700231140ustar00rootroot00000000000000enhanced-resolve-4.1.0/test/fixtures/extensions/index.js000066400000000000000000000000001331515416700234260ustar00rootroot00000000000000enhanced-resolve-4.1.0/test/fixtures/extensions/index.ts000066400000000000000000000000001331515416700234400ustar00rootroot00000000000000enhanced-resolve-4.1.0/test/fixtures/extensions/package.json000066400000000000000000000000321331515416700242540ustar00rootroot00000000000000{ "main": "./index.js" }enhanced-resolve-4.1.0/test/fixtures/file.load1000066400000000000000000000000001331515416700214230ustar00rootroot00000000000000enhanced-resolve-4.1.0/test/fixtures/file.load2000066400000000000000000000000001331515416700214240ustar00rootroot00000000000000enhanced-resolve-4.1.0/test/fixtures/lib/000077500000000000000000000000001331515416700203425ustar00rootroot00000000000000enhanced-resolve-4.1.0/test/fixtures/lib/complex1.js000066400000000000000000000000411331515416700224230ustar00rootroot00000000000000module.exports = "lib complex1"; enhanced-resolve-4.1.0/test/fixtures/main-field-self/000077500000000000000000000000001331515416700225305ustar00rootroot00000000000000enhanced-resolve-4.1.0/test/fixtures/main-field-self/index.js000066400000000000000000000000001331515416700241630ustar00rootroot00000000000000enhanced-resolve-4.1.0/test/fixtures/main-field-self/package.json000066400000000000000000000000241331515416700250120ustar00rootroot00000000000000{ "main": "./" }enhanced-resolve-4.1.0/test/fixtures/main1.js000066400000000000000000000002231331515416700211340ustar00rootroot00000000000000var a = require("./a"); if(x) { for(var i = 0; i < 100; i++) { while(true) require("./b"); do { i++; } while(require("m1/a")()); } } enhanced-resolve-4.1.0/test/fixtures/main2.js000066400000000000000000000002741331515416700211430ustar00rootroot00000000000000var a = require("./a"); with(x) { switch(a) { case 1: require("./b"); default: require.ensure(["m1/a"], function() { var a = require("m1/a"), b = require("m1/b"); }); } } enhanced-resolve-4.1.0/test/fixtures/main3.js000066400000000000000000000001271331515416700211410ustar00rootroot00000000000000var a = require("./a"); require.ensure([], function(require) { require("./c.js"); }); enhanced-resolve-4.1.0/test/fixtures/multiple_modules/000077500000000000000000000000001331515416700231575ustar00rootroot00000000000000enhanced-resolve-4.1.0/test/fixtures/multiple_modules/node_modules/000077500000000000000000000000001331515416700256345ustar00rootroot00000000000000enhanced-resolve-4.1.0/test/fixtures/multiple_modules/node_modules/m1/000077500000000000000000000000001331515416700261515ustar00rootroot00000000000000enhanced-resolve-4.1.0/test/fixtures/multiple_modules/node_modules/m1/a.js000066400000000000000000000001021331515416700267200ustar00rootroot00000000000000module.exports = function a() { return "This is nested m1/a"; }; enhanced-resolve-4.1.0/test/fixtures/node_modules/000077500000000000000000000000001331515416700222515ustar00rootroot00000000000000enhanced-resolve-4.1.0/test/fixtures/node_modules/complexm/000077500000000000000000000000001331515416700240755ustar00rootroot00000000000000enhanced-resolve-4.1.0/test/fixtures/node_modules/complexm/node_modules/000077500000000000000000000000001331515416700265525ustar00rootroot00000000000000enhanced-resolve-4.1.0/test/fixtures/node_modules/complexm/node_modules/m1/000077500000000000000000000000001331515416700270675ustar00rootroot00000000000000enhanced-resolve-4.1.0/test/fixtures/node_modules/complexm/node_modules/m1/a.js000066400000000000000000000000451331515416700276440ustar00rootroot00000000000000module.exports = "the correct a.js"; enhanced-resolve-4.1.0/test/fixtures/node_modules/complexm/node_modules/m1/index.js000066400000000000000000000000561331515416700305350ustar00rootroot00000000000000module.exports = " :) " + require("m2/b.js"); enhanced-resolve-4.1.0/test/fixtures/node_modules/complexm/step1.js000066400000000000000000000000621331515416700254650ustar00rootroot00000000000000module.exports = require("m1/a") + require("m1"); enhanced-resolve-4.1.0/test/fixtures/node_modules/complexm/step2.js000066400000000000000000000000321331515416700254630ustar00rootroot00000000000000module.exports = "Step2"; enhanced-resolve-4.1.0/test/fixtures/node_modules/invalidPackageJson/000077500000000000000000000000001331515416700260055ustar00rootroot00000000000000enhanced-resolve-4.1.0/test/fixtures/node_modules/invalidPackageJson/package.json000066400000000000000000000000001331515416700302610ustar00rootroot00000000000000enhanced-resolve-4.1.0/test/fixtures/node_modules/l-loader.js000066400000000000000000000000001331515416700242740ustar00rootroot00000000000000enhanced-resolve-4.1.0/test/fixtures/node_modules/m1/000077500000000000000000000000001331515416700225665ustar00rootroot00000000000000enhanced-resolve-4.1.0/test/fixtures/node_modules/m1/a.js000066400000000000000000000000731331515416700233440ustar00rootroot00000000000000module.exports = function a() { return "This is m1/a"; }; enhanced-resolve-4.1.0/test/fixtures/node_modules/m1/b.js000066400000000000000000000000731331515416700233450ustar00rootroot00000000000000module.exports = function a() { return "This is m1/b"; }; enhanced-resolve-4.1.0/test/fixtures/node_modules/m2-loader/000077500000000000000000000000001331515416700240335ustar00rootroot00000000000000enhanced-resolve-4.1.0/test/fixtures/node_modules/m2-loader/b.js000066400000000000000000000001141331515416700246060ustar00rootroot00000000000000module.exports = function() { "module.exports = 'This is m2-loader/b';"; } enhanced-resolve-4.1.0/test/fixtures/node_modules/m2-loader/c.js000066400000000000000000000000001331515416700246010ustar00rootroot00000000000000enhanced-resolve-4.1.0/test/fixtures/node_modules/m2/000077500000000000000000000000001331515416700225675ustar00rootroot00000000000000enhanced-resolve-4.1.0/test/fixtures/node_modules/m2/b.js000066400000000000000000000000411331515416700233410ustar00rootroot00000000000000module.exports = "This is m2/b"; enhanced-resolve-4.1.0/test/fixtures/node_modules/recursive-module/000077500000000000000000000000001331515416700255435ustar00rootroot00000000000000enhanced-resolve-4.1.0/test/fixtures/node_modules/recursive-module/file.js000066400000000000000000000000001331515416700270060ustar00rootroot00000000000000enhanced-resolve-4.1.0/test/fixtures/node_modules/recursive-module/index.js000066400000000000000000000000001331515416700271760ustar00rootroot00000000000000enhanced-resolve-4.1.0/test/fixtures/shortcutdir.js/000077500000000000000000000000001331515416700225615ustar00rootroot00000000000000enhanced-resolve-4.1.0/test/fixtures/shortcutdir.js/a.js000066400000000000000000000000001331515416700233250ustar00rootroot00000000000000enhanced-resolve-4.1.0/test/missing.js000066400000000000000000000076301331515416700177400ustar00rootroot00000000000000var resolve = require("../"); var path = require("path"); var should = require("should"); describe("missing", function() { var testCases = [ [path.join(__dirname, "fixtures"), "./missing-file", [ path.join(__dirname, "fixtures", "missing-file"), path.join(__dirname, "fixtures", "missing-file.js"), path.join(__dirname, "fixtures", "missing-file.node"), ]], [path.join(__dirname, "fixtures"), "missing-module", [ path.join(__dirname, "fixtures", "node_modules", "missing-module"), path.join(__dirname, "..", "node_modules", "missing-module"), ]], [path.join(__dirname, "fixtures"), "missing-module/missing-file", [ path.join(__dirname, "fixtures", "node_modules", "missing-module", "missing-file.js"), path.join(__dirname, "..", "node_modules", "missing-module", "missing-file"), ]], [path.join(__dirname, "fixtures"), "m1/missing-file", [ path.join(__dirname, "fixtures", "node_modules", "m1", "missing-file"), path.join(__dirname, "fixtures", "node_modules", "m1", "missing-file.js"), path.join(__dirname, "fixtures", "node_modules", "m1", "missing-file.node"), path.join(__dirname, "..", "node_modules", "m1", "missing-file"), ]], [path.join(__dirname, "fixtures"), "m1/", [ path.join(__dirname, "fixtures", "node_modules", "m1", "index"), path.join(__dirname, "fixtures", "node_modules", "m1", "index.js"), path.join(__dirname, "fixtures", "node_modules", "m1", "index.json"), path.join(__dirname, "fixtures", "node_modules", "m1", "index.node"), ]], [path.join(__dirname, "fixtures"), "m1/a", [ path.join(__dirname, "fixtures", "node_modules", "m1", "a") ]], ]; testCases.forEach(function(testCase) { it("should tell about missing file when trying to resolve " + testCase[1], function(done) { var callback = function(err, filename) { if(err) { err.missing.sort().should.containDeep(testCase[2].sort()); Array.from(callback.missing).sort().should.containDeep(testCase[2].sort()); resolve(testCase[0], testCase[1], function(err) { err.missing.sort().should.containDeep(testCase[2].sort()); done(); }); return; } Array.from(callback.missing).sort().should.containDeep(testCase[2].sort()); done(); }; callback.missing = new Set(); resolve(testCase[0], testCase[1], callback); }); it("should tell about missing file in the callback's error object when trying to resolve " + testCase[1], function(done) { var callback = function(err, filename) { if(err) { err.missing.sort().should.containDeep(testCase[2].sort()); resolve(testCase[0], testCase[1], function(err) { err.missing.sort().should.containDeep(testCase[2].sort()); done(); }); return; } done(); }; resolve(testCase[0], testCase[1], callback); }); it("should report error details exactly once when trying to resolve " + testCase[1], function(done) { var callback = function(err, filename) { if(err) { var details = err.details.split("\n"); var firstDetail = details.shift(); should.notEqual(firstDetail.indexOf(testCase[1]), -1); details.should.not.containDeep([firstDetail]); } done(); }; resolve(testCase[0], testCase[1], callback); }); it("should report missing files exactly once when trying to resolve " + testCase[1], function(done) { var callback = function(err, filename) { if(err) { var missing = err.missing.sort(); var isSame = true; for(var i = 0; i < missing.length - 1; i += 2) { isSame = isSame && (missing[i] === missing[i + 1]); } isSame.should.not.be.true("missing file names should not be repeated"); } done(); }; resolve(testCase[0], testCase[1], callback); }); it("should tell about missing file when trying to resolve sync " + testCase[1], function() { try { resolve.sync(testCase[0], testCase[1]); } catch(err) { err.missing.sort().should.containDeep(testCase[2].sort()); } }); }); }); enhanced-resolve-4.1.0/test/plugins.js000066400000000000000000000013041331515416700177400ustar00rootroot00000000000000"use strict"; const ResolverFactory = require("../").ResolverFactory; const CloneBasenamePlugin = require("../lib/CloneBasenamePlugin"); const path = require("path"); describe("plugins", function() { it("should resolve with the CloneBasenamePlugin", function(done) { const resolver = ResolverFactory.createResolver({ fileSystem: require("fs"), plugins: [ new CloneBasenamePlugin("after-existing-directory", "undescribed-raw-file") ] }); resolver.resolve({}, __dirname, "./fixtures/directory-default", {}, function(err, result) { if(err) return done(err); result.should.be.eql(path.resolve(__dirname, "fixtures/directory-default/directory-default.js")); done(); }); }); }); enhanced-resolve-4.1.0/test/pr-53.js000066400000000000000000000005571331515416700171360ustar00rootroot00000000000000var CachedInputFileSystem = require("../lib/CachedInputFileSystem"); describe("pr-53", function() { it("should allow to readJsonSync in CachedInputFileSystem", function() { var cfs = new CachedInputFileSystem({ readFileSync: function(path) { return JSON.stringify("abc" + path); } }, 1000); cfs.readJsonSync("xyz").should.be.eql("abcxyz"); }); }); enhanced-resolve-4.1.0/test/resolve.js000066400000000000000000000114441331515416700177440ustar00rootroot00000000000000/* MIT License http://www.opensource.org/licenses/mit-license.php Author Tobias Koppers @sokra */ var should = require("should"); var path = require("path"); var resolve = require("../"); var fixtures = path.join(__dirname, "fixtures"); function testResolve(name, context, moduleName, result) { describe(name, function() { it("should resolve sync correctly", function() { var filename = resolve.sync(context, moduleName); should.exist(filename); filename.should.equal(result); }); it("should resolve async correctly", function(done) { resolve(context, moduleName, function(err, filename) { if(err) return done(err); should.exist(filename); filename.should.equal(result); done(); }); }); }); } function testResolveLoader(name, context, moduleName, result) { describe(name, function() { it("should resolve sync correctly", function() { var filename = resolve.loader.sync(context, moduleName); should.exist(filename); filename.should.equal(result); }); it("should resolve async correctly", function(done) { resolve.loader(context, moduleName, function(err, filename) { if(err) return done(err); should.exist(filename); filename.should.equal(result); done(); }); }); }); } function testResolveContext(name, context, moduleName, result) { describe(name, function() { it("should resolve async correctly", function(done) { resolve.context(context, moduleName, function(err, filename) { if(err) done(err); should.exist(filename); filename.should.equal(result); done(); }); }); it("should resolve sync correctly", function() { var filename = resolve.context.sync(context, moduleName); should.exist(filename); filename.should.equal(result); }); }); } describe("resolve", function() { testResolve("absolute path", fixtures, path.join(fixtures, "main1.js"), path.join(fixtures, "main1.js")); testResolve("file with .js", fixtures, "./main1.js", path.join(fixtures, "main1.js")); testResolve("file without extension", fixtures, "./main1", path.join(fixtures, "main1.js")); testResolve("another file with .js", fixtures, "./a.js", path.join(fixtures, "a.js")); testResolve("another file without extension", fixtures, "./a", path.join(fixtures, "a.js")); testResolve("file in module with .js", fixtures, "m1/a.js", path.join(fixtures, "node_modules", "m1", "a.js")); testResolve("file in module without extension", fixtures, "m1/a", path.join(fixtures, "node_modules", "m1", "a.js")); testResolve("another file in module without extension", fixtures, "complexm/step1", path.join(fixtures, "node_modules", "complexm", "step1.js")); testResolve("from submodule to file in sibling module", path.join(fixtures, "node_modules", "complexm"), "m2/b.js", path.join(fixtures, "node_modules", "m2", "b.js")); testResolve("from submodule to file in sibling of parent module", path.join(fixtures, "node_modules", "complexm", "web_modules", "m1"), "m2/b.js", path.join(fixtures, "node_modules", "m2", "b.js")); testResolve("from nested directory to overwritten file in module", path.join(fixtures, "multiple_modules"), "m1/a.js", path.join(fixtures, "multiple_modules", "node_modules", "m1", "a.js")); testResolve("from nested directory to not overwritten file in module", path.join(fixtures, "multiple_modules"), "m1/b.js", path.join(fixtures, "node_modules", "m1", "b.js")); testResolve("file with query", fixtures, "./main1.js?query", path.join(fixtures, "main1.js") + "?query"); testResolve("file in module with query", fixtures, "m1/a?query", path.join(fixtures, "node_modules", "m1", "a.js") + "?query"); testResolveContext("context for fixtures", fixtures, "./", fixtures); testResolveContext("context for fixtures/lib", fixtures, "./lib", path.join(fixtures, "lib")); testResolveContext("context for fixtures with ..", fixtures, "./lib/../../fixtures/./lib/..", fixtures); testResolveContext("context for fixtures with query", fixtures, "./?query", fixtures + "?query"); testResolve("differ between directory and file, resolve file", fixtures, "./dirOrFile", path.join(fixtures, "dirOrFile.js")); testResolve("differ between directory and file, resolve directory", fixtures, "./dirOrFile/", path.join(fixtures, "dirOrFile", "index.js")); testResolveLoader("loader with template without extension", fixtures, "m2/b", path.join(fixtures, "node_modules", "m2-loader", "b.js")); testResolveLoader("loader with template as file", fixtures, "l", path.join(fixtures, "node_modules", "l-loader.js")); testResolve("find node_modules outside of node_modules", path.join(fixtures, "browser-module", "node_modules"), "m1/a", path.join(fixtures, "node_modules", "m1", "a.js")); testResolve("don't crash on main field pointing to self", fixtures, "./main-field-self", path.join(fixtures, "main-field-self", "index.js")); }); enhanced-resolve-4.1.0/test/simple.js000066400000000000000000000020621331515416700175520ustar00rootroot00000000000000var resolve = require("../"); var should = require("should"); var path = require("path"); describe("simple", function() { var pathsToIt = [ [__dirname, "../lib/node", "direct"], [__dirname, "../", "as directory"], [path.join(__dirname, "..", ".."), "./enhanced-resolve", "as module"], [path.join(__dirname, "..", ".."), "./enhanced-resolve/lib/node", "in module"] ]; pathsToIt.forEach(function(pathToIt) { it("should resolve itself " + pathToIt[2], function(done) { resolve(pathToIt[0], pathToIt[1], function(err, filename) { if(err) return done(new Error([err.message, err.stack, err.details].join("\n"))); should.exist(filename); filename.should.have.type("string"); filename.should.be.eql(path.join(__dirname, "..", "lib", "node.js")); done(); }); }); it("should resolve itself sync " + pathToIt[2], function() { var filename = resolve.sync(pathToIt[0], pathToIt[1]); should.exist(filename); filename.should.have.type("string"); filename.should.be.eql(path.join(__dirname, "..", "lib", "node.js")); }); }); }); enhanced-resolve-4.1.0/test/symlink.js000066400000000000000000000134151331515416700177530ustar00rootroot00000000000000var resolve = require("../"); var should = require("should"); var path = require("path"); var fs = require("fs"); const { // eslint-disable-line keyword-spacing platform } = require("os"); var tempPath = path.join(__dirname, "temp"); describe("symlink", function() { var isAdmin = true; try { fs.mkdirSync(tempPath); fs.symlinkSync(path.join(__dirname, "..", "lib", "node.js"), path.join(tempPath, "test"), "file"); fs.symlinkSync(path.join(__dirname, "..", "lib"), path.join(tempPath, "test2"), "dir"); } catch(e) { isAdmin = false; } try { fs.unlinkSync(path.join(tempPath, "test")); } catch(e) { isAdmin = false; } try { fs.unlinkSync(path.join(tempPath, "test2")); } catch(e) { isAdmin = false; } try { fs.rmdirSync(tempPath); } catch(e) { isAdmin = false; } if(isAdmin) { // PR #150: Detect Windows and preserve current working directory. const isWindows = (platform() === "win32"); const oldCWD = isWindows && process.cwd(); before(function() { // Create some cool symlinks try { fs.mkdirSync(tempPath); fs.symlinkSync(path.join(__dirname, "..", "lib", "node.js"), path.join(tempPath, "node.js"), "file"); fs.symlinkSync(path.join(__dirname, "..", "lib"), path.join(tempPath, "lib"), "dir"); fs.symlinkSync(path.join(__dirname, ".."), path.join(tempPath, "this"), "dir"); fs.symlinkSync(path.join(tempPath, "this"), path.join(tempPath, "that"), "dir"); fs.symlinkSync(path.join("..", "..", "lib", "node.js"), path.join(tempPath, "node.relative.js"), "file"); fs.symlinkSync(path.join(".", "node.relative.js"), path.join(tempPath, "node.relative.sym.js"), "file"); // PR #150: Set the current working directory so that tests will fail if changes get reverted. if(isWindows) { process.chdir(path.join(tempPath, "that")); } } catch(e) {} }); after(function() { // PR #150: Restore the original working directory. if(isWindows) { process.chdir(oldCWD); } fs.unlinkSync(path.join(tempPath, "node.js")); fs.unlinkSync(path.join(tempPath, "node.relative.js")); fs.unlinkSync(path.join(tempPath, "node.relative.sym.js")); fs.unlinkSync(path.join(tempPath, "lib")); fs.unlinkSync(path.join(tempPath, "this")); fs.unlinkSync(path.join(tempPath, "that")); fs.rmdirSync(tempPath); }); var resolveWithoutSymlinks = resolve.create({ symlinks: false }); var resolveSyncWithoutSymlinks = resolve.create.sync({ symlinks: false }); [ [tempPath, "./node.js", "with a symlink to a file"], [tempPath, "./node.relative.js", "with a relative symlink to a file"], [tempPath, "./node.relative.sym.js", "with a relative symlink to a symlink to a file"], [tempPath, "./lib/node.js", "with a symlink to a directory 1"], [tempPath, "./this/lib/node.js", "with a symlink to a directory 2"], [tempPath, "./this/test/temp/node.js", "with multiple symlinks in the path 1"], [tempPath, "./this/test/temp/lib/node.js", "with multiple symlinks in the path 2"], [tempPath, "./this/test/temp/this/lib/node.js", "with multiple symlinks in the path 3"], [tempPath, "./that/lib/node.js", "with a symlink to a directory 2 (chained)"], [tempPath, "./that/test/temp/node.js", "with multiple symlinks in the path 1 (chained)"], [tempPath, "./that/test/temp/lib/node.js", "with multiple symlinks in the path 2 (chained)"], [tempPath, "./that/test/temp/that/lib/node.js", "with multiple symlinks in the path 3 (chained)"], [path.join(tempPath, "lib"), "./node.js", "with symlinked directory as context 1"], [path.join(tempPath, "this"), "./lib/node.js", "with symlinked directory as context 2"], [path.join(tempPath, "this"), "./test/temp/lib/node.js", "with symlinked directory as context and in path"], [path.join(tempPath, "this", "lib"), "./node.js", "with symlinked directory in context path"], [path.join(tempPath, "this", "test"), "./temp/node.js", "with symlinked directory in context path and symlinked file"], [path.join(tempPath, "this", "test"), "./temp/lib/node.js", "with symlinked directory in context path and symlinked directory"], [path.join(tempPath, "that"), "./lib/node.js", "with symlinked directory as context 2 (chained)"], [path.join(tempPath, "that"), "./test/temp/lib/node.js", "with symlinked directory as context and in path (chained)"], [path.join(tempPath, "that", "lib"), "./node.js", "with symlinked directory in context path (chained)"], [path.join(tempPath, "that", "test"), "./temp/node.js", "with symlinked directory in context path and symlinked file (chained)"], [path.join(tempPath, "that", "test"), "./temp/lib/node.js", "with symlinked directory in context path and symlinked directory (chained)"], ].forEach(function(pathToIt) { it("should resolve symlink to itself " + pathToIt[2], function(done) { resolve(pathToIt[0], pathToIt[1], function(err, filename) { if(err) return done(err); should.exist(filename); filename.should.have.type("string"); filename.should.be.eql(path.join(__dirname, "..", "lib", "node.js")); resolveWithoutSymlinks(pathToIt[0], pathToIt[1], function(err, filename) { if(err) return done(err); filename.should.have.type("string"); filename.should.be.eql(path.resolve(pathToIt[0], pathToIt[1])); done(); }); }); }); it("should resolve symlink to itself sync " + pathToIt[2], function() { var filename = resolve.sync(pathToIt[0], pathToIt[1]); should.exist(filename); filename.should.have.type("string"); filename.should.be.eql(path.join(__dirname, "..", "lib", "node.js")); filename = resolveSyncWithoutSymlinks(pathToIt[0], pathToIt[1]); filename.should.have.type("string"); filename.should.be.eql(path.resolve(pathToIt[0], pathToIt[1])); }); }); } else { it("cannot test symlinks because we have no permission to create them"); } }); enhanced-resolve-4.1.0/test/unsafe-cache.js000066400000000000000000000063231331515416700206070ustar00rootroot00000000000000var resolve = require("../"); var path = require("path"); describe("unsafe-cache", function() { var cache; var cachedResolve; var context; var otherContext; beforeEach(function() { context = { some: "context" }; otherContext = { someOther: "context" }; }); describe("with no other options", function() { beforeEach(function() { cache = {}; cachedResolve = resolve.create({ unsafeCache: cache }); }); it("should cache request", function(done) { cachedResolve(path.join(__dirname, "fixtures"), "m2/b", function(err, result) { if(err) return done(err); Object.keys(cache).should.have.length(2); Object.keys(cache).forEach(function(key) { cache[key] = { path: "yep" }; }); cachedResolve(path.join(__dirname, "fixtures"), "m2/b", function(err, result) { if(err) return done(err); result.should.be.eql("yep"); done(); }); }); }); it("should not return from cache if context does not match", function(done) { cachedResolve(context, path.join(__dirname, "fixtures"), "m2/b", function(err, result) { if(err) return done(err); Object.keys(cache).should.have.length(2); Object.keys(cache).forEach(function(key) { cache[key] = { path: "yep" }; }); cachedResolve(otherContext, path.join(__dirname, "fixtures"), "m2/b", function(err, result) { if(err) return done(err); result.should.not.be.eql("yep"); done(); }); }); }); it("should not return from cache if query does not match", function(done) { cachedResolve(path.join(__dirname, "fixtures"), "m2/b?query", function(err, result) { if(err) return done(err); Object.keys(cache).should.have.length(2); Object.keys(cache).forEach(function(key) { cache[key] = { path: "yep" }; }); cachedResolve(path.join(__dirname, "fixtures"), "m2/b?query2", function(err, result) { if(err) return done(err); result.should.not.be.eql("yep"); done(); }); }); }); }); describe("with cacheWithContext false", function() { beforeEach(function() { cache = {}; cachedResolve = resolve.create({ unsafeCache: cache, cacheWithContext: false }); }); it("should cache request", function(done) { cachedResolve(context, path.join(__dirname, "fixtures"), "m2/b", function(err, result) { if(err) return done(err); Object.keys(cache).should.have.length(2); Object.keys(cache).forEach(function(key) { cache[key] = { path: "yep" }; }); cachedResolve(context, path.join(__dirname, "fixtures"), "m2/b", function(err, result) { if(err) return done(err); result.should.be.eql("yep"); done(); }); }); }); it("should return from cache even if context does not match", function(done) { cachedResolve(context, path.join(__dirname, "fixtures"), "m2/b", function(err, result) { if(err) return done(err); Object.keys(cache).should.have.length(2); Object.keys(cache).forEach(function(key) { cache[key] = { path: "yep" }; }); cachedResolve(otherContext, path.join(__dirname, "fixtures"), "m2/b", function(err, result) { if(err) return done(err); result.should.be.eql("yep"); done(); }); }); }); }); }); enhanced-resolve-4.1.0/yarn.lock000066400000000000000000001623211331515416700165740ustar00rootroot00000000000000# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. # yarn lockfile v1 abbrev@1: version "1.1.0" resolved "https://registry.yarnpkg.com/abbrev/-/abbrev-1.1.0.tgz#d0554c2256636e2f56e7c2e5ad183f859428d81f" abbrev@1.0.x: version "1.0.9" resolved "https://registry.yarnpkg.com/abbrev/-/abbrev-1.0.9.tgz#91b4792588a7738c25f35dd6f63752a2f8776135" acorn-jsx@^3.0.0: version "3.0.1" resolved "https://registry.yarnpkg.com/acorn-jsx/-/acorn-jsx-3.0.1.tgz#afdf9488fb1ecefc8348f6fb22f464e32a58b36b" dependencies: acorn "^3.0.4" acorn@^3.0.4: version "3.3.0" resolved "https://registry.yarnpkg.com/acorn/-/acorn-3.3.0.tgz#45e37fb39e8da3f25baee3ff5369e2bb5f22017a" acorn@^5.1.1: version "5.1.2" resolved "https://registry.yarnpkg.com/acorn/-/acorn-5.1.2.tgz#911cb53e036807cf0fa778dc5d370fbd864246d7" ajv-keywords@^1.0.0: version "1.5.1" resolved "https://registry.yarnpkg.com/ajv-keywords/-/ajv-keywords-1.5.1.tgz#314dd0a4b3368fad3dfcdc54ede6171b886daf3c" ajv@^4.7.0: version "4.11.8" resolved "https://registry.yarnpkg.com/ajv/-/ajv-4.11.8.tgz#82ffb02b29e662ae53bdc20af15947706739c536" dependencies: co "^4.6.0" json-stable-stringify "^1.0.1" align-text@^0.1.1, align-text@^0.1.3: version "0.1.4" resolved "https://registry.yarnpkg.com/align-text/-/align-text-0.1.4.tgz#0cd90a561093f35d0a99256c22b7069433fad117" dependencies: kind-of "^3.0.2" longest "^1.0.1" repeat-string "^1.5.2" amdefine@>=0.0.4: version "1.0.1" resolved "https://registry.yarnpkg.com/amdefine/-/amdefine-1.0.1.tgz#4a5282ac164729e93619bcfd3ad151f817ce91f5" ansi-escapes@^1.1.0: version "1.4.0" resolved "https://registry.yarnpkg.com/ansi-escapes/-/ansi-escapes-1.4.0.tgz#d3a8a83b319aa67793662b13e761c7911422306e" ansi-regex@^2.0.0: version "2.1.1" resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-2.1.1.tgz#c3b33ab5ee360d86e0e628f0468ae7ef27d654df" ansi-regex@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-3.0.0.tgz#ed0317c322064f79466c02966bddb605ab37d998" ansi-styles@^2.2.1: version "2.2.1" resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-2.2.1.tgz#b432dd3358b634cf75e1e4664368240533c1ddbe" argparse@^1.0.7: version "1.0.9" resolved "https://registry.yarnpkg.com/argparse/-/argparse-1.0.9.tgz#73d83bc263f86e97f8cc4f6bae1b0e90a7d22c86" dependencies: sprintf-js "~1.0.2" array-union@^1.0.1: version "1.0.2" resolved "https://registry.yarnpkg.com/array-union/-/array-union-1.0.2.tgz#9a34410e4f4e3da23dea375be5be70f24778ec39" dependencies: array-uniq "^1.0.1" array-uniq@^1.0.1: version "1.0.3" resolved "https://registry.yarnpkg.com/array-uniq/-/array-uniq-1.0.3.tgz#af6ac877a25cc7f74e058894753858dfdb24fdb6" arrify@^1.0.0: version "1.0.1" resolved "https://registry.yarnpkg.com/arrify/-/arrify-1.0.1.tgz#898508da2226f380df904728456849c1501a4b0d" asn1@0.1.11: version "0.1.11" resolved "https://registry.yarnpkg.com/asn1/-/asn1-0.1.11.tgz#559be18376d08a4ec4dbe80877d27818639b2df7" asn1@~0.2.3: version "0.2.3" resolved "https://registry.yarnpkg.com/asn1/-/asn1-0.2.3.tgz#dac8787713c9966849fc8180777ebe9c1ddf3b86" assert-plus@1.0.0, assert-plus@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/assert-plus/-/assert-plus-1.0.0.tgz#f12e0f3c5d77b0b1cdd9146942e4e96c1e4dd525" assert-plus@^0.1.5: version "0.1.5" resolved "https://registry.yarnpkg.com/assert-plus/-/assert-plus-0.1.5.tgz#ee74009413002d84cec7219c6ac811812e723160" assert-plus@^0.2.0: version "0.2.0" resolved "https://registry.yarnpkg.com/assert-plus/-/assert-plus-0.2.0.tgz#d74e1b87e7affc0db8aadb7021f3fe48101ab234" async@1.x, async@^1.4.0, async@^1.5.0: version "1.5.2" resolved "https://registry.yarnpkg.com/async/-/async-1.5.2.tgz#ec6a61ae56480c0c3cb241c95618e20892f9672a" async@~0.9.0: version "0.9.2" resolved "https://registry.yarnpkg.com/async/-/async-0.9.2.tgz#aea74d5e61c1f899613bf64bda66d4c78f2fd17d" asynckit@^0.4.0: version "0.4.0" resolved "https://registry.yarnpkg.com/asynckit/-/asynckit-0.4.0.tgz#c79ed97f7f34cb8f2ba1bc9790bcc366474b4b79" aws-sign2@~0.5.0: version "0.5.0" resolved "https://registry.yarnpkg.com/aws-sign2/-/aws-sign2-0.5.0.tgz#c57103f7a17fc037f02d7c2e64b602ea223f7d63" aws-sign2@~0.6.0: version "0.6.0" resolved "https://registry.yarnpkg.com/aws-sign2/-/aws-sign2-0.6.0.tgz#14342dd38dbcc94d0e5b87d763cd63612c0e794f" aws4@^1.2.1: version "1.6.0" resolved "https://registry.yarnpkg.com/aws4/-/aws4-1.6.0.tgz#83ef5ca860b2b32e4a0deedee8c771b9db57471e" babel-code-frame@^6.16.0: version "6.26.0" resolved "https://registry.yarnpkg.com/babel-code-frame/-/babel-code-frame-6.26.0.tgz#63fd43f7dc1e3bb7ce35947db8fe369a3f58c74b" dependencies: chalk "^1.1.3" esutils "^2.0.2" js-tokens "^3.0.2" balanced-match@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/balanced-match/-/balanced-match-1.0.0.tgz#89b4d199ab2bee49de164ea02b89ce462d71b767" bcrypt-pbkdf@^1.0.0: version "1.0.1" resolved "https://registry.yarnpkg.com/bcrypt-pbkdf/-/bcrypt-pbkdf-1.0.1.tgz#63bc5dcb61331b92bc05fd528953c33462a06f8d" dependencies: tweetnacl "^0.14.3" beautify-lint@^1.0.3: version "1.0.4" resolved "https://registry.yarnpkg.com/beautify-lint/-/beautify-lint-1.0.4.tgz#954b10f0bcd0a93dd17d0ed519b8996b701247db" dependencies: async "^1.5.0" diff "^2.2.1" glob "^6.0.1" js-beautify "^1.5.10" bl@~0.9.0: version "0.9.5" resolved "https://registry.yarnpkg.com/bl/-/bl-0.9.5.tgz#c06b797af085ea00bc527afc8efcf11de2232054" dependencies: readable-stream "~1.0.26" bluebird@^3.0.5: version "3.5.0" resolved "https://registry.yarnpkg.com/bluebird/-/bluebird-3.5.0.tgz#791420d7f551eea2897453a8a77653f96606d67c" boom@0.4.x: version "0.4.2" resolved "https://registry.yarnpkg.com/boom/-/boom-0.4.2.tgz#7a636e9ded4efcefb19cef4947a3c67dfaee911b" dependencies: hoek "0.9.x" boom@2.x.x: version "2.10.1" resolved "https://registry.yarnpkg.com/boom/-/boom-2.10.1.tgz#39c8918ceff5799f83f9492a848f625add0c766f" dependencies: hoek "2.x.x" brace-expansion@^1.1.7: version "1.1.8" resolved "https://registry.yarnpkg.com/brace-expansion/-/brace-expansion-1.1.8.tgz#c07b211c7c952ec1f8efd51a77ef0d1d3990a292" dependencies: balanced-match "^1.0.0" concat-map "0.0.1" caller-path@^0.1.0: version "0.1.0" resolved "https://registry.yarnpkg.com/caller-path/-/caller-path-0.1.0.tgz#94085ef63581ecd3daa92444a8fe94e82577751f" dependencies: callsites "^0.2.0" callsites@^0.2.0: version "0.2.0" resolved "https://registry.yarnpkg.com/callsites/-/callsites-0.2.0.tgz#afab96262910a7f33c19a5775825c69f34e350ca" camelcase@^1.0.2: version "1.2.1" resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-1.2.1.tgz#9bb5304d2e0b56698b2c758b08a3eaa9daa58a39" caseless@~0.11.0: version "0.11.0" resolved "https://registry.yarnpkg.com/caseless/-/caseless-0.11.0.tgz#715b96ea9841593cc33067923f5ec60ebda4f7d7" caseless@~0.6.0: version "0.6.0" resolved "https://registry.yarnpkg.com/caseless/-/caseless-0.6.0.tgz#8167c1ab8397fb5bb95f96d28e5a81c50f247ac4" center-align@^0.1.1: version "0.1.3" resolved "https://registry.yarnpkg.com/center-align/-/center-align-0.1.3.tgz#aa0d32629b6ee972200411cbd4461c907bc2b7ad" dependencies: align-text "^0.1.3" lazy-cache "^1.0.3" chalk@^1.0.0, chalk@^1.1.1, chalk@^1.1.3: version "1.1.3" resolved "https://registry.yarnpkg.com/chalk/-/chalk-1.1.3.tgz#a8115c55e4a702fe4d150abd3872822a7e09fc98" dependencies: ansi-styles "^2.2.1" escape-string-regexp "^1.0.2" has-ansi "^2.0.0" strip-ansi "^3.0.0" supports-color "^2.0.0" circular-json@^0.3.1: version "0.3.3" resolved "https://registry.yarnpkg.com/circular-json/-/circular-json-0.3.3.tgz#815c99ea84f6809529d2f45791bdf82711352d66" cli-cursor@^1.0.1: version "1.0.2" resolved "https://registry.yarnpkg.com/cli-cursor/-/cli-cursor-1.0.2.tgz#64da3f7d56a54412e59794bd62dc35295e8f2987" dependencies: restore-cursor "^1.0.1" cli-width@^2.0.0: version "2.2.0" resolved "https://registry.yarnpkg.com/cli-width/-/cli-width-2.2.0.tgz#ff19ede8a9a5e579324147b0c11f0fbcbabed639" cliui@^2.1.0: version "2.1.0" resolved "https://registry.yarnpkg.com/cliui/-/cliui-2.1.0.tgz#4b475760ff80264c762c3a1719032e91c7fea0d1" dependencies: center-align "^0.1.1" right-align "^0.1.1" wordwrap "0.0.2" co@^4.6.0: version "4.6.0" resolved "https://registry.yarnpkg.com/co/-/co-4.6.0.tgz#6ea6bdf3d853ae54ccb8e47bfa0bf3f9031fb184" code-point-at@^1.0.0: version "1.1.0" resolved "https://registry.yarnpkg.com/code-point-at/-/code-point-at-1.1.0.tgz#0d070b4d043a5bea33a2f1a40e2edb3d9a4ccf77" codecov.io@^0.1.6: version "0.1.6" resolved "https://registry.yarnpkg.com/codecov.io/-/codecov.io-0.1.6.tgz#59dfd02da1ff31c2fb2b952ad8ad16fd3781b728" dependencies: request "2.42.0" urlgrey "0.4.0" combined-stream@^1.0.5, combined-stream@~1.0.5: version "1.0.5" resolved "https://registry.yarnpkg.com/combined-stream/-/combined-stream-1.0.5.tgz#938370a57b4a51dea2c77c15d5c5fdf895164009" dependencies: delayed-stream "~1.0.0" combined-stream@~0.0.4: version "0.0.7" resolved "https://registry.yarnpkg.com/combined-stream/-/combined-stream-0.0.7.tgz#0137e657baa5a7541c57ac37ac5fc07d73b4dc1f" dependencies: delayed-stream "0.0.5" commander@0.6.1: version "0.6.1" resolved "https://registry.yarnpkg.com/commander/-/commander-0.6.1.tgz#fa68a14f6a945d54dbbe50d8cdb3320e9e3b1a06" commander@2.3.0: version "2.3.0" resolved "https://registry.yarnpkg.com/commander/-/commander-2.3.0.tgz#fd430e889832ec353b9acd1de217c11cb3eef873" commander@^2.9.0: version "2.11.0" resolved "https://registry.yarnpkg.com/commander/-/commander-2.11.0.tgz#157152fd1e7a6c8d98a5b715cf376df928004563" concat-map@0.0.1: version "0.0.1" resolved "https://registry.yarnpkg.com/concat-map/-/concat-map-0.0.1.tgz#d8a96bd77fd68df7793a73036a3ba0d5405d477b" concat-stream@^1.5.2: version "1.6.0" resolved "https://registry.yarnpkg.com/concat-stream/-/concat-stream-1.6.0.tgz#0aac662fd52be78964d5532f694784e70110acf7" dependencies: inherits "^2.0.3" readable-stream "^2.2.2" typedarray "^0.0.6" config-chain@~1.1.5: version "1.1.11" resolved "https://registry.yarnpkg.com/config-chain/-/config-chain-1.1.11.tgz#aba09747dfbe4c3e70e766a6e41586e1859fc6f2" dependencies: ini "^1.3.4" proto-list "~1.2.1" core-util-is@1.0.2, core-util-is@~1.0.0: version "1.0.2" resolved "https://registry.yarnpkg.com/core-util-is/-/core-util-is-1.0.2.tgz#b5fd54220aa2bc5ab57aab7140c940754503c1a7" coveralls@^2.11.6: version "2.13.1" resolved "https://registry.yarnpkg.com/coveralls/-/coveralls-2.13.1.tgz#d70bb9acc1835ec4f063ff9dac5423c17b11f178" dependencies: js-yaml "3.6.1" lcov-parse "0.0.10" log-driver "1.2.5" minimist "1.2.0" request "2.79.0" cryptiles@0.2.x: version "0.2.2" resolved "https://registry.yarnpkg.com/cryptiles/-/cryptiles-0.2.2.tgz#ed91ff1f17ad13d3748288594f8a48a0d26f325c" dependencies: boom "0.4.x" cryptiles@2.x.x: version "2.0.5" resolved "https://registry.yarnpkg.com/cryptiles/-/cryptiles-2.0.5.tgz#3bdfecdc608147c1c67202fa291e7dca59eaa3b8" dependencies: boom "2.x.x" ctype@0.5.3: version "0.5.3" resolved "https://registry.yarnpkg.com/ctype/-/ctype-0.5.3.tgz#82c18c2461f74114ef16c135224ad0b9144ca12f" d@1: version "1.0.0" resolved "https://registry.yarnpkg.com/d/-/d-1.0.0.tgz#754bb5bfe55451da69a58b94d45f4c5b0462d58f" dependencies: es5-ext "^0.10.9" dashdash@^1.12.0: version "1.14.1" resolved "https://registry.yarnpkg.com/dashdash/-/dashdash-1.14.1.tgz#853cfa0f7cbe2fed5de20326b8dd581035f6e2f0" dependencies: assert-plus "^1.0.0" debug@2.2.0: version "2.2.0" resolved "https://registry.yarnpkg.com/debug/-/debug-2.2.0.tgz#f87057e995b1a1f6ae6a4960664137bc56f039da" dependencies: ms "0.7.1" debug@^2.1.1: version "2.6.9" resolved "https://registry.yarnpkg.com/debug/-/debug-2.6.9.tgz#5d128515df134ff327e90a4c93f4e077a536341f" dependencies: ms "2.0.0" decamelize@^1.0.0: version "1.2.0" resolved "https://registry.yarnpkg.com/decamelize/-/decamelize-1.2.0.tgz#f6534d15148269b20352e7bee26f501f9a191290" deep-equal@~0.1.0: version "0.1.2" resolved "https://registry.yarnpkg.com/deep-equal/-/deep-equal-0.1.2.tgz#b246c2b80a570a47c11be1d9bd1070ec878b87ce" deep-is@~0.1.3: version "0.1.3" resolved "https://registry.yarnpkg.com/deep-is/-/deep-is-0.1.3.tgz#b369d6fb5dbc13eecf524f91b070feedc357cf34" defined@~0.0.0: version "0.0.0" resolved "https://registry.yarnpkg.com/defined/-/defined-0.0.0.tgz#f35eea7d705e933baf13b2f03b3f83d921403b3e" del@^2.0.2: version "2.2.2" resolved "https://registry.yarnpkg.com/del/-/del-2.2.2.tgz#c12c981d067846c84bcaf862cff930d907ffd1a8" dependencies: globby "^5.0.0" is-path-cwd "^1.0.0" is-path-in-cwd "^1.0.0" object-assign "^4.0.1" pify "^2.0.0" pinkie-promise "^2.0.0" rimraf "^2.2.8" delayed-stream@0.0.5: version "0.0.5" resolved "https://registry.yarnpkg.com/delayed-stream/-/delayed-stream-0.0.5.tgz#d4b1f43a93e8296dfe02694f4680bc37a313c73f" delayed-stream@~1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/delayed-stream/-/delayed-stream-1.0.0.tgz#df3ae199acadfb7d440aaae0b29e2272b24ec619" diff@1.4.0: version "1.4.0" resolved "https://registry.yarnpkg.com/diff/-/diff-1.4.0.tgz#7f28d2eb9ee7b15a97efd89ce63dcfdaa3ccbabf" diff@^2.2.1: version "2.2.3" resolved "https://registry.yarnpkg.com/diff/-/diff-2.2.3.tgz#60eafd0d28ee906e4e8ff0a52c1229521033bf99" doctrine@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/doctrine/-/doctrine-2.0.0.tgz#c73d8d2909d22291e1a007a395804da8b665fe63" dependencies: esutils "^2.0.2" isarray "^1.0.0" duplexer@~0.1.1: version "0.1.1" resolved "https://registry.yarnpkg.com/duplexer/-/duplexer-0.1.1.tgz#ace6ff808c1ce66b57d1ebf97977acb02334cfc1" ecc-jsbn@~0.1.1: version "0.1.1" resolved "https://registry.yarnpkg.com/ecc-jsbn/-/ecc-jsbn-0.1.1.tgz#0fc73a9ed5f0d53c38193398523ef7e543777505" dependencies: jsbn "~0.1.0" editorconfig@^0.13.2: version "0.13.3" resolved "https://registry.yarnpkg.com/editorconfig/-/editorconfig-0.13.3.tgz#e5219e587951d60958fd94ea9a9a008cdeff1b34" dependencies: bluebird "^3.0.5" commander "^2.9.0" lru-cache "^3.2.0" semver "^5.1.0" sigmund "^1.0.1" errno@^0.1.3: version "0.1.4" resolved "https://registry.yarnpkg.com/errno/-/errno-0.1.4.tgz#b896e23a9e5e8ba33871fc996abd3635fc9a1c7d" dependencies: prr "~0.0.0" es5-ext@^0.10.14, es5-ext@^0.10.9, es5-ext@~0.10.14: version "0.10.30" resolved "https://registry.yarnpkg.com/es5-ext/-/es5-ext-0.10.30.tgz#7141a16836697dbabfaaaeee41495ce29f52c939" dependencies: es6-iterator "2" es6-symbol "~3.1" es6-iterator@2, es6-iterator@^2.0.1, es6-iterator@~2.0.1: version "2.0.1" resolved "https://registry.yarnpkg.com/es6-iterator/-/es6-iterator-2.0.1.tgz#8e319c9f0453bf575d374940a655920e59ca5512" dependencies: d "1" es5-ext "^0.10.14" es6-symbol "^3.1" es6-map@^0.1.3: version "0.1.5" resolved "https://registry.yarnpkg.com/es6-map/-/es6-map-0.1.5.tgz#9136e0503dcc06a301690f0bb14ff4e364e949f0" dependencies: d "1" es5-ext "~0.10.14" es6-iterator "~2.0.1" es6-set "~0.1.5" es6-symbol "~3.1.1" event-emitter "~0.3.5" es6-set@~0.1.5: version "0.1.5" resolved "https://registry.yarnpkg.com/es6-set/-/es6-set-0.1.5.tgz#d2b3ec5d4d800ced818db538d28974db0a73ccb1" dependencies: d "1" es5-ext "~0.10.14" es6-iterator "~2.0.1" es6-symbol "3.1.1" event-emitter "~0.3.5" es6-symbol@3.1.1, es6-symbol@^3.1, es6-symbol@^3.1.1, es6-symbol@~3.1, es6-symbol@~3.1.1: version "3.1.1" resolved "https://registry.yarnpkg.com/es6-symbol/-/es6-symbol-3.1.1.tgz#bf00ef4fdab6ba1b46ecb7b629b4c7ed5715cc77" dependencies: d "1" es5-ext "~0.10.14" es6-weak-map@^2.0.1: version "2.0.2" resolved "https://registry.yarnpkg.com/es6-weak-map/-/es6-weak-map-2.0.2.tgz#5e3ab32251ffd1538a1f8e5ffa1357772f92d96f" dependencies: d "1" es5-ext "^0.10.14" es6-iterator "^2.0.1" es6-symbol "^3.1.1" escape-string-regexp@1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-1.0.2.tgz#4dbc2fe674e71949caf3fb2695ce7f2dc1d9a8d1" escape-string-regexp@^1.0.2, escape-string-regexp@^1.0.5: version "1.0.5" resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz#1b61c0562190a8dff6ae3bb2cf0200ca130b86d4" escodegen@1.8.x: version "1.8.1" resolved "https://registry.yarnpkg.com/escodegen/-/escodegen-1.8.1.tgz#5a5b53af4693110bebb0867aa3430dd3b70a1018" dependencies: esprima "^2.7.1" estraverse "^1.9.1" esutils "^2.0.2" optionator "^0.8.1" optionalDependencies: source-map "~0.2.0" escope@^3.6.0: version "3.6.0" resolved "https://registry.yarnpkg.com/escope/-/escope-3.6.0.tgz#e01975e812781a163a6dadfdd80398dc64c889c3" dependencies: es6-map "^0.1.3" es6-weak-map "^2.0.1" esrecurse "^4.1.0" estraverse "^4.1.1" eslint-plugin-node@^3.0.5: version "3.0.5" resolved "https://registry.yarnpkg.com/eslint-plugin-node/-/eslint-plugin-node-3.0.5.tgz#03c8e23c6011eabd240e7ebf3556ec6e50fc734e" dependencies: ignore "^3.0.11" minimatch "^3.0.2" object-assign "^4.0.1" resolve "^1.1.7" semver "5.3.0" eslint-plugin-nodeca@^1.0.3: version "1.0.3" resolved "https://registry.yarnpkg.com/eslint-plugin-nodeca/-/eslint-plugin-nodeca-1.0.3.tgz#66c85663ee910a8baed7a505d2b9241bb7037b5b" eslint@^3.14.1: version "3.19.0" resolved "https://registry.yarnpkg.com/eslint/-/eslint-3.19.0.tgz#c8fc6201c7f40dd08941b87c085767386a679acc" dependencies: babel-code-frame "^6.16.0" chalk "^1.1.3" concat-stream "^1.5.2" debug "^2.1.1" doctrine "^2.0.0" escope "^3.6.0" espree "^3.4.0" esquery "^1.0.0" estraverse "^4.2.0" esutils "^2.0.2" file-entry-cache "^2.0.0" glob "^7.0.3" globals "^9.14.0" ignore "^3.2.0" imurmurhash "^0.1.4" inquirer "^0.12.0" is-my-json-valid "^2.10.0" is-resolvable "^1.0.0" js-yaml "^3.5.1" json-stable-stringify "^1.0.0" levn "^0.3.0" lodash "^4.0.0" mkdirp "^0.5.0" natural-compare "^1.4.0" optionator "^0.8.2" path-is-inside "^1.0.1" pluralize "^1.2.1" progress "^1.1.8" require-uncached "^1.0.2" shelljs "^0.7.5" strip-bom "^3.0.0" strip-json-comments "~2.0.1" table "^3.7.8" text-table "~0.2.0" user-home "^2.0.0" espree@^3.4.0: version "3.5.1" resolved "https://registry.yarnpkg.com/espree/-/espree-3.5.1.tgz#0c988b8ab46db53100a1954ae4ba995ddd27d87e" dependencies: acorn "^5.1.1" acorn-jsx "^3.0.0" esprima@2.7.x, esprima@^2.6.0, esprima@^2.7.1: version "2.7.3" resolved "https://registry.yarnpkg.com/esprima/-/esprima-2.7.3.tgz#96e3b70d5779f6ad49cd032673d1c312767ba581" esprima@^4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/esprima/-/esprima-4.0.0.tgz#4499eddcd1110e0b218bacf2fa7f7f59f55ca804" esquery@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/esquery/-/esquery-1.0.0.tgz#cfba8b57d7fba93f17298a8a006a04cda13d80fa" dependencies: estraverse "^4.0.0" esrecurse@^4.1.0: version "4.2.0" resolved "https://registry.yarnpkg.com/esrecurse/-/esrecurse-4.2.0.tgz#fa9568d98d3823f9a41d91e902dcab9ea6e5b163" dependencies: estraverse "^4.1.0" object-assign "^4.0.1" estraverse@^1.9.1: version "1.9.3" resolved "https://registry.yarnpkg.com/estraverse/-/estraverse-1.9.3.tgz#af67f2dc922582415950926091a4005d29c9bb44" estraverse@^4.0.0, estraverse@^4.1.0, estraverse@^4.1.1, estraverse@^4.2.0: version "4.2.0" resolved "https://registry.yarnpkg.com/estraverse/-/estraverse-4.2.0.tgz#0dee3fed31fcd469618ce7342099fc1afa0bdb13" esutils@^2.0.2: version "2.0.2" resolved "https://registry.yarnpkg.com/esutils/-/esutils-2.0.2.tgz#0abf4f1caa5bcb1f7a9d8acc6dea4faaa04bac9b" event-emitter@~0.3.5: version "0.3.5" resolved "https://registry.yarnpkg.com/event-emitter/-/event-emitter-0.3.5.tgz#df8c69eef1647923c7157b9ce83840610b02cc39" dependencies: d "1" es5-ext "~0.10.14" exit-hook@^1.0.0: version "1.1.1" resolved "https://registry.yarnpkg.com/exit-hook/-/exit-hook-1.1.1.tgz#f05ca233b48c05d54fff07765df8507e95c02ff8" extend@~3.0.0: version "3.0.1" resolved "https://registry.yarnpkg.com/extend/-/extend-3.0.1.tgz#a755ea7bc1adfcc5a31ce7e762dbaadc5e636444" extsprintf@1.3.0, extsprintf@^1.2.0: version "1.3.0" resolved "https://registry.yarnpkg.com/extsprintf/-/extsprintf-1.3.0.tgz#96918440e3041a7a414f8c52e3c574eb3c3e1e05" fast-levenshtein@~2.0.4: version "2.0.6" resolved "https://registry.yarnpkg.com/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz#3d8a5c66883a16a30ca8643e851f19baa7797917" figures@^1.3.5: version "1.7.0" resolved "https://registry.yarnpkg.com/figures/-/figures-1.7.0.tgz#cbe1e3affcf1cd44b80cadfed28dc793a9701d2e" dependencies: escape-string-regexp "^1.0.5" object-assign "^4.1.0" file-entry-cache@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/file-entry-cache/-/file-entry-cache-2.0.0.tgz#c392990c3e684783d838b8c84a45d8a048458361" dependencies: flat-cache "^1.2.1" object-assign "^4.0.1" flat-cache@^1.2.1: version "1.2.2" resolved "https://registry.yarnpkg.com/flat-cache/-/flat-cache-1.2.2.tgz#fa86714e72c21db88601761ecf2f555d1abc6b96" dependencies: circular-json "^0.3.1" del "^2.0.2" graceful-fs "^4.1.2" write "^0.2.1" forever-agent@~0.5.0: version "0.5.2" resolved "https://registry.yarnpkg.com/forever-agent/-/forever-agent-0.5.2.tgz#6d0e09c4921f94a27f63d3b49c5feff1ea4c5130" forever-agent@~0.6.1: version "0.6.1" resolved "https://registry.yarnpkg.com/forever-agent/-/forever-agent-0.6.1.tgz#fbc71f0c41adeb37f96c577ad1ed42d8fdacca91" form-data@~0.1.0: version "0.1.4" resolved "https://registry.yarnpkg.com/form-data/-/form-data-0.1.4.tgz#91abd788aba9702b1aabfa8bc01031a2ac9e3b12" dependencies: async "~0.9.0" combined-stream "~0.0.4" mime "~1.2.11" form-data@~2.1.1: version "2.1.4" resolved "https://registry.yarnpkg.com/form-data/-/form-data-2.1.4.tgz#33c183acf193276ecaa98143a69e94bfee1750d1" dependencies: asynckit "^0.4.0" combined-stream "^1.0.5" mime-types "^2.1.12" fs.realpath@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/fs.realpath/-/fs.realpath-1.0.0.tgz#1504ad2523158caa40db4a2787cb01411994ea4f" generate-function@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/generate-function/-/generate-function-2.0.0.tgz#6858fe7c0969b7d4e9093337647ac79f60dfbe74" generate-object-property@^1.1.0: version "1.2.0" resolved "https://registry.yarnpkg.com/generate-object-property/-/generate-object-property-1.2.0.tgz#9c0e1c40308ce804f4783618b937fa88f99d50d0" dependencies: is-property "^1.0.0" getpass@^0.1.1: version "0.1.7" resolved "https://registry.yarnpkg.com/getpass/-/getpass-0.1.7.tgz#5eff8e3e684d569ae4cb2b1282604e8ba62149fa" dependencies: assert-plus "^1.0.0" glob@3.2.11: version "3.2.11" resolved "https://registry.yarnpkg.com/glob/-/glob-3.2.11.tgz#4a973f635b9190f715d10987d5c00fd2815ebe3d" dependencies: inherits "2" minimatch "0.3" glob@^5.0.15: version "5.0.15" resolved "https://registry.yarnpkg.com/glob/-/glob-5.0.15.tgz#1bc936b9e02f4a603fcc222ecf7633d30b8b93b1" dependencies: inflight "^1.0.4" inherits "2" minimatch "2 || 3" once "^1.3.0" path-is-absolute "^1.0.0" glob@^6.0.1: version "6.0.4" resolved "https://registry.yarnpkg.com/glob/-/glob-6.0.4.tgz#0f08860f6a155127b2fadd4f9ce24b1aab6e4d22" dependencies: inflight "^1.0.4" inherits "2" minimatch "2 || 3" once "^1.3.0" path-is-absolute "^1.0.0" glob@^7.0.0, glob@^7.0.3, glob@^7.0.5: version "7.1.2" resolved "https://registry.yarnpkg.com/glob/-/glob-7.1.2.tgz#c19c9df9a028702d678612384a6552404c636d15" dependencies: 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" globals@^9.14.0: version "9.18.0" resolved "https://registry.yarnpkg.com/globals/-/globals-9.18.0.tgz#aa3896b3e69b487f17e31ed2143d69a8e30c2d8a" globby@^5.0.0: version "5.0.0" resolved "https://registry.yarnpkg.com/globby/-/globby-5.0.0.tgz#ebd84667ca0dbb330b99bcfc68eac2bc54370e0d" dependencies: array-union "^1.0.1" arrify "^1.0.0" glob "^7.0.3" object-assign "^4.0.1" pify "^2.0.0" pinkie-promise "^2.0.0" graceful-fs@^4.1.2: version "4.1.11" resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.1.11.tgz#0e8bdfe4d1ddb8854d64e04ea7c00e2a026e5658" growl@1.9.2: version "1.9.2" resolved "https://registry.yarnpkg.com/growl/-/growl-1.9.2.tgz#0ea7743715db8d8de2c5ede1775e1b45ac85c02f" handlebars@^4.0.1: version "4.0.10" resolved "https://registry.yarnpkg.com/handlebars/-/handlebars-4.0.10.tgz#3d30c718b09a3d96f23ea4cc1f403c4d3ba9ff4f" dependencies: async "^1.4.0" optimist "^0.6.1" source-map "^0.4.4" optionalDependencies: uglify-js "^2.6" har-validator@~2.0.6: version "2.0.6" resolved "https://registry.yarnpkg.com/har-validator/-/har-validator-2.0.6.tgz#cdcbc08188265ad119b6a5a7c8ab70eecfb5d27d" dependencies: chalk "^1.1.1" commander "^2.9.0" is-my-json-valid "^2.12.4" pinkie-promise "^2.0.0" has-ansi@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/has-ansi/-/has-ansi-2.0.0.tgz#34f5049ce1ecdf2b0649af3ef24e45ed35416d91" dependencies: ansi-regex "^2.0.0" has-flag@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/has-flag/-/has-flag-1.0.0.tgz#9d9e793165ce017a00f00418c43f942a7b1d11fa" hawk@1.1.1: version "1.1.1" resolved "https://registry.yarnpkg.com/hawk/-/hawk-1.1.1.tgz#87cd491f9b46e4e2aeaca335416766885d2d1ed9" dependencies: boom "0.4.x" cryptiles "0.2.x" hoek "0.9.x" sntp "0.2.x" hawk@~3.1.3: version "3.1.3" resolved "https://registry.yarnpkg.com/hawk/-/hawk-3.1.3.tgz#078444bd7c1640b0fe540d2c9b73d59678e8e1c4" dependencies: boom "2.x.x" cryptiles "2.x.x" hoek "2.x.x" sntp "1.x.x" hoek@0.9.x: version "0.9.1" resolved "https://registry.yarnpkg.com/hoek/-/hoek-0.9.1.tgz#3d322462badf07716ea7eb85baf88079cddce505" hoek@2.x.x: version "2.16.3" resolved "https://registry.yarnpkg.com/hoek/-/hoek-2.16.3.tgz#20bb7403d3cea398e91dc4710a8ff1b8274a25ed" http-signature@~0.10.0: version "0.10.1" resolved "https://registry.yarnpkg.com/http-signature/-/http-signature-0.10.1.tgz#4fbdac132559aa8323121e540779c0a012b27e66" dependencies: asn1 "0.1.11" assert-plus "^0.1.5" ctype "0.5.3" http-signature@~1.1.0: version "1.1.1" resolved "https://registry.yarnpkg.com/http-signature/-/http-signature-1.1.1.tgz#df72e267066cd0ac67fb76adf8e134a8fbcf91bf" dependencies: assert-plus "^0.2.0" jsprim "^1.2.2" sshpk "^1.7.0" ignore@^3.0.11, ignore@^3.2.0: version "3.3.5" resolved "https://registry.yarnpkg.com/ignore/-/ignore-3.3.5.tgz#c4e715455f6073a8d7e5dae72d2fc9d71663dba6" imurmurhash@^0.1.4: version "0.1.4" resolved "https://registry.yarnpkg.com/imurmurhash/-/imurmurhash-0.1.4.tgz#9218b9b2b928a238b13dc4fb6b6d576f231453ea" inflight@^1.0.4: version "1.0.6" resolved "https://registry.yarnpkg.com/inflight/-/inflight-1.0.6.tgz#49bd6331d7d02d0c09bc910a1075ba8165b56df9" dependencies: once "^1.3.0" wrappy "1" inherits@2, inherits@^2.0.3, inherits@~2.0.1, inherits@~2.0.3: version "2.0.3" resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.3.tgz#633c2c83e3da42a502f52466022480f4208261de" ini@^1.3.4: version "1.3.4" resolved "https://registry.yarnpkg.com/ini/-/ini-1.3.4.tgz#0537cb79daf59b59a1a517dff706c86ec039162e" inquirer@^0.12.0: version "0.12.0" resolved "https://registry.yarnpkg.com/inquirer/-/inquirer-0.12.0.tgz#1ef2bfd63504df0bc75785fff8c2c41df12f077e" dependencies: ansi-escapes "^1.1.0" ansi-regex "^2.0.0" chalk "^1.0.0" cli-cursor "^1.0.1" cli-width "^2.0.0" figures "^1.3.5" lodash "^4.3.0" readline2 "^1.0.1" run-async "^0.1.0" rx-lite "^3.1.2" string-width "^1.0.1" strip-ansi "^3.0.0" through "^2.3.6" interpret@^1.0.0: version "1.0.4" resolved "https://registry.yarnpkg.com/interpret/-/interpret-1.0.4.tgz#820cdd588b868ffb191a809506d6c9c8f212b1b0" is-buffer@^1.1.5: version "1.1.5" resolved "https://registry.yarnpkg.com/is-buffer/-/is-buffer-1.1.5.tgz#1f3b26ef613b214b88cbca23cc6c01d87961eecc" is-fullwidth-code-point@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/is-fullwidth-code-point/-/is-fullwidth-code-point-1.0.0.tgz#ef9e31386f031a7f0d643af82fde50c457ef00cb" dependencies: number-is-nan "^1.0.0" is-fullwidth-code-point@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz#a3b30a5c4f199183167aaab93beefae3ddfb654f" is-my-json-valid@^2.10.0, is-my-json-valid@^2.12.4: version "2.16.1" resolved "https://registry.yarnpkg.com/is-my-json-valid/-/is-my-json-valid-2.16.1.tgz#5a846777e2c2620d1e69104e5d3a03b1f6088f11" dependencies: generate-function "^2.0.0" generate-object-property "^1.1.0" jsonpointer "^4.0.0" xtend "^4.0.0" is-path-cwd@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/is-path-cwd/-/is-path-cwd-1.0.0.tgz#d225ec23132e89edd38fda767472e62e65f1106d" is-path-in-cwd@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/is-path-in-cwd/-/is-path-in-cwd-1.0.0.tgz#6477582b8214d602346094567003be8a9eac04dc" dependencies: is-path-inside "^1.0.0" is-path-inside@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/is-path-inside/-/is-path-inside-1.0.0.tgz#fc06e5a1683fbda13de667aff717bbc10a48f37f" dependencies: path-is-inside "^1.0.1" is-property@^1.0.0: version "1.0.2" resolved "https://registry.yarnpkg.com/is-property/-/is-property-1.0.2.tgz#57fe1c4e48474edd65b09911f26b1cd4095dda84" is-resolvable@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/is-resolvable/-/is-resolvable-1.0.0.tgz#8df57c61ea2e3c501408d100fb013cf8d6e0cc62" dependencies: tryit "^1.0.1" is-typedarray@~1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/is-typedarray/-/is-typedarray-1.0.0.tgz#e479c80858df0c1b11ddda6940f96011fcda4a9a" isarray@0.0.1: version "0.0.1" resolved "https://registry.yarnpkg.com/isarray/-/isarray-0.0.1.tgz#8a18acfca9a8f4177e09abfc6038939b05d1eedf" isarray@^1.0.0, isarray@~1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/isarray/-/isarray-1.0.0.tgz#bb935d48582cba168c06834957a54a3e07124f11" isexe@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/isexe/-/isexe-2.0.0.tgz#e8fbf374dc556ff8947a10dcb0572d633f2cfa10" isstream@~0.1.2: version "0.1.2" resolved "https://registry.yarnpkg.com/isstream/-/isstream-0.1.2.tgz#47e63f7af55afa6f92e1500e690eb8b8529c099a" istanbul@^0.4.1: version "0.4.5" resolved "https://registry.yarnpkg.com/istanbul/-/istanbul-0.4.5.tgz#65c7d73d4c4da84d4f3ac310b918fb0b8033733b" dependencies: abbrev "1.0.x" async "1.x" escodegen "1.8.x" esprima "2.7.x" glob "^5.0.15" handlebars "^4.0.1" js-yaml "3.x" mkdirp "0.5.x" nopt "3.x" once "1.x" resolve "1.1.x" supports-color "^3.1.0" which "^1.1.1" wordwrap "^1.0.0" jade@0.26.3: version "0.26.3" resolved "https://registry.yarnpkg.com/jade/-/jade-0.26.3.tgz#8f10d7977d8d79f2f6ff862a81b0513ccb25686c" dependencies: commander "0.6.1" mkdirp "0.3.0" js-beautify@^1.5.10: version "1.7.3" resolved "https://registry.yarnpkg.com/js-beautify/-/js-beautify-1.7.3.tgz#3f563067162cd0635c8611686d1fa0bb1448773a" dependencies: config-chain "~1.1.5" editorconfig "^0.13.2" mkdirp "~0.5.0" nopt "~3.0.1" js-tokens@^3.0.2: version "3.0.2" resolved "https://registry.yarnpkg.com/js-tokens/-/js-tokens-3.0.2.tgz#9866df395102130e38f7f996bceb65443209c25b" js-yaml@3.6.1: version "3.6.1" resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-3.6.1.tgz#6e5fe67d8b205ce4d22fad05b7781e8dadcc4b30" dependencies: argparse "^1.0.7" esprima "^2.6.0" js-yaml@3.x, js-yaml@^3.5.1: version "3.10.0" resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-3.10.0.tgz#2e78441646bd4682e963f22b6e92823c309c62dc" dependencies: argparse "^1.0.7" esprima "^4.0.0" jsbn@~0.1.0: version "0.1.1" resolved "https://registry.yarnpkg.com/jsbn/-/jsbn-0.1.1.tgz#a5e654c2e5a2deb5f201d96cefbca80c0ef2f513" json-schema@0.2.3: version "0.2.3" resolved "https://registry.yarnpkg.com/json-schema/-/json-schema-0.2.3.tgz#b480c892e59a2f05954ce727bd3f2a4e882f9e13" json-stable-stringify@^1.0.0, json-stable-stringify@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/json-stable-stringify/-/json-stable-stringify-1.0.1.tgz#9a759d39c5f2ff503fd5300646ed445f88c4f9af" dependencies: jsonify "~0.0.0" json-stringify-safe@~5.0.0, json-stringify-safe@~5.0.1: version "5.0.1" resolved "https://registry.yarnpkg.com/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz#1296a2d58fd45f19a0f6ce01d65701e2c735b6eb" jsonify@~0.0.0: version "0.0.0" resolved "https://registry.yarnpkg.com/jsonify/-/jsonify-0.0.0.tgz#2c74b6ee41d93ca51b7b5aaee8f503631d252a73" jsonpointer@^4.0.0: version "4.0.1" resolved "https://registry.yarnpkg.com/jsonpointer/-/jsonpointer-4.0.1.tgz#4fd92cb34e0e9db3c89c8622ecf51f9b978c6cb9" jsprim@^1.2.2: version "1.4.1" resolved "https://registry.yarnpkg.com/jsprim/-/jsprim-1.4.1.tgz#313e66bc1e5cc06e438bc1b7499c2e5c56acb6a2" dependencies: assert-plus "1.0.0" extsprintf "1.3.0" json-schema "0.2.3" verror "1.10.0" kind-of@^3.0.2: version "3.2.2" resolved "https://registry.yarnpkg.com/kind-of/-/kind-of-3.2.2.tgz#31ea21a734bab9bbb0f32466d893aea51e4a3c64" dependencies: is-buffer "^1.1.5" lazy-cache@^1.0.3: version "1.0.4" resolved "https://registry.yarnpkg.com/lazy-cache/-/lazy-cache-1.0.4.tgz#a1d78fc3a50474cb80845d3b3b6e1da49a446e8e" lcov-parse@0.0.10: version "0.0.10" resolved "https://registry.yarnpkg.com/lcov-parse/-/lcov-parse-0.0.10.tgz#1b0b8ff9ac9c7889250582b70b71315d9da6d9a3" levn@^0.3.0, levn@~0.3.0: version "0.3.0" resolved "https://registry.yarnpkg.com/levn/-/levn-0.3.0.tgz#3b09924edf9f083c0490fdd4c0bc4421e04764ee" dependencies: prelude-ls "~1.1.2" type-check "~0.3.2" lodash@^4.0.0, lodash@^4.3.0: version "4.17.4" resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.4.tgz#78203a4d1c328ae1d86dca6460e369b57f4055ae" log-driver@1.2.5: version "1.2.5" resolved "https://registry.yarnpkg.com/log-driver/-/log-driver-1.2.5.tgz#7ae4ec257302fd790d557cb10c97100d857b0056" longest@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/longest/-/longest-1.0.1.tgz#30a0b2da38f73770e8294a0d22e6625ed77d0097" lru-cache@2: version "2.7.3" resolved "https://registry.yarnpkg.com/lru-cache/-/lru-cache-2.7.3.tgz#6d4524e8b955f95d4f5b58851ce21dd72fb4e952" lru-cache@^3.2.0: version "3.2.0" resolved "https://registry.yarnpkg.com/lru-cache/-/lru-cache-3.2.0.tgz#71789b3b7f5399bec8565dda38aa30d2a097efee" dependencies: pseudomap "^1.0.1" memory-fs@^0.4.0: version "0.4.1" resolved "https://registry.yarnpkg.com/memory-fs/-/memory-fs-0.4.1.tgz#3a9a20b8462523e447cfbc7e8bb80ed667bfc552" dependencies: errno "^0.1.3" readable-stream "^2.0.1" mime-db@~1.30.0: version "1.30.0" resolved "https://registry.yarnpkg.com/mime-db/-/mime-db-1.30.0.tgz#74c643da2dd9d6a45399963465b26d5ca7d71f01" mime-types@^2.1.12, mime-types@~2.1.7: version "2.1.17" resolved "https://registry.yarnpkg.com/mime-types/-/mime-types-2.1.17.tgz#09d7a393f03e995a79f8af857b70a9e0ab16557a" dependencies: mime-db "~1.30.0" mime-types@~1.0.1: version "1.0.2" resolved "https://registry.yarnpkg.com/mime-types/-/mime-types-1.0.2.tgz#995ae1392ab8affcbfcb2641dd054e943c0d5dce" mime@~1.2.11: version "1.2.11" resolved "https://registry.yarnpkg.com/mime/-/mime-1.2.11.tgz#58203eed86e3a5ef17aed2b7d9ebd47f0a60dd10" minimatch@0.3: version "0.3.0" resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-0.3.0.tgz#275d8edaac4f1bb3326472089e7949c8394699dd" dependencies: lru-cache "2" sigmund "~1.0.0" "minimatch@2 || 3", minimatch@^3.0.2, minimatch@^3.0.4: version "3.0.4" resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-3.0.4.tgz#5166e286457f03306064be5497e8dbb0c3d32083" dependencies: brace-expansion "^1.1.7" minimist@0.0.8: version "0.0.8" resolved "https://registry.yarnpkg.com/minimist/-/minimist-0.0.8.tgz#857fcabfc3397d2625b8228262e86aa7a011b05d" minimist@1.2.0: version "1.2.0" resolved "https://registry.yarnpkg.com/minimist/-/minimist-1.2.0.tgz#a35008b20f41383eec1fb914f4cd5df79a264284" minimist@~0.0.1: version "0.0.10" resolved "https://registry.yarnpkg.com/minimist/-/minimist-0.0.10.tgz#de3f98543dbf96082be48ad1a0c7cda836301dcf" mkdirp@0.3.0: version "0.3.0" resolved "https://registry.yarnpkg.com/mkdirp/-/mkdirp-0.3.0.tgz#1bbf5ab1ba827af23575143490426455f481fe1e" mkdirp@0.5.1, mkdirp@0.5.x, mkdirp@^0.5.0, mkdirp@^0.5.1, mkdirp@~0.5.0: version "0.5.1" resolved "https://registry.yarnpkg.com/mkdirp/-/mkdirp-0.5.1.tgz#30057438eac6cf7f8c4767f38648d6697d75c903" dependencies: minimist "0.0.8" mocha@^2.3.4: version "2.5.3" resolved "https://registry.yarnpkg.com/mocha/-/mocha-2.5.3.tgz#161be5bdeb496771eb9b35745050b622b5aefc58" dependencies: commander "2.3.0" debug "2.2.0" diff "1.4.0" escape-string-regexp "1.0.2" glob "3.2.11" growl "1.9.2" jade "0.26.3" mkdirp "0.5.1" supports-color "1.2.0" to-iso-string "0.0.2" ms@0.7.1: version "0.7.1" resolved "https://registry.yarnpkg.com/ms/-/ms-0.7.1.tgz#9cd13c03adbff25b65effde7ce864ee952017098" ms@2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/ms/-/ms-2.0.0.tgz#5608aeadfc00be6c2901df5f9861788de0d597c8" mute-stream@0.0.5: version "0.0.5" resolved "https://registry.yarnpkg.com/mute-stream/-/mute-stream-0.0.5.tgz#8fbfabb0a98a253d3184331f9e8deb7372fac6c0" natural-compare@^1.4.0: version "1.4.0" resolved "https://registry.yarnpkg.com/natural-compare/-/natural-compare-1.4.0.tgz#4abebfeed7541f2c27acfb29bdbbd15c8d5ba4f7" node-uuid@~1.4.0: version "1.4.8" resolved "https://registry.yarnpkg.com/node-uuid/-/node-uuid-1.4.8.tgz#b040eb0923968afabf8d32fb1f17f1167fdab907" nopt@3.x, nopt@~3.0.1: version "3.0.6" resolved "https://registry.yarnpkg.com/nopt/-/nopt-3.0.6.tgz#c6465dbf08abcd4db359317f79ac68a646b28ff9" dependencies: abbrev "1" number-is-nan@^1.0.0: version "1.0.1" resolved "https://registry.yarnpkg.com/number-is-nan/-/number-is-nan-1.0.1.tgz#097b602b53422a522c1afb8790318336941a011d" oauth-sign@~0.4.0: version "0.4.0" resolved "https://registry.yarnpkg.com/oauth-sign/-/oauth-sign-0.4.0.tgz#f22956f31ea7151a821e5f2fb32c113cad8b9f69" oauth-sign@~0.8.1: version "0.8.2" resolved "https://registry.yarnpkg.com/oauth-sign/-/oauth-sign-0.8.2.tgz#46a6ab7f0aead8deae9ec0565780b7d4efeb9d43" object-assign@^4.0.1, object-assign@^4.1.0: version "4.1.1" resolved "https://registry.yarnpkg.com/object-assign/-/object-assign-4.1.1.tgz#2109adc7965887cfc05cbbd442cac8bfbb360863" once@1.x, once@^1.3.0: version "1.4.0" resolved "https://registry.yarnpkg.com/once/-/once-1.4.0.tgz#583b1aa775961d4b113ac17d9c50baef9dd76bd1" dependencies: wrappy "1" onetime@^1.0.0: version "1.1.0" resolved "https://registry.yarnpkg.com/onetime/-/onetime-1.1.0.tgz#a1f7838f8314c516f05ecefcbc4ccfe04b4ed789" optimist@^0.6.1: version "0.6.1" resolved "https://registry.yarnpkg.com/optimist/-/optimist-0.6.1.tgz#da3ea74686fa21a19a111c326e90eb15a0196686" dependencies: minimist "~0.0.1" wordwrap "~0.0.2" optionator@^0.8.1, optionator@^0.8.2: version "0.8.2" resolved "https://registry.yarnpkg.com/optionator/-/optionator-0.8.2.tgz#364c5e409d3f4d6301d6c0b4c05bba50180aeb64" dependencies: deep-is "~0.1.3" fast-levenshtein "~2.0.4" levn "~0.3.0" prelude-ls "~1.1.2" type-check "~0.3.2" wordwrap "~1.0.0" os-homedir@^1.0.0: version "1.0.2" resolved "https://registry.yarnpkg.com/os-homedir/-/os-homedir-1.0.2.tgz#ffbc4988336e0e833de0c168c7ef152121aa7fb3" path-is-absolute@^1.0.0: version "1.0.1" resolved "https://registry.yarnpkg.com/path-is-absolute/-/path-is-absolute-1.0.1.tgz#174b9268735534ffbc7ace6bf53a5a9e1b5c5f5f" path-is-inside@^1.0.1: version "1.0.2" resolved "https://registry.yarnpkg.com/path-is-inside/-/path-is-inside-1.0.2.tgz#365417dede44430d1c11af61027facf074bdfc53" path-parse@^1.0.5: version "1.0.5" resolved "https://registry.yarnpkg.com/path-parse/-/path-parse-1.0.5.tgz#3c1adf871ea9cd6c9431b6ea2bd74a0ff055c4c1" pify@^2.0.0: version "2.3.0" resolved "https://registry.yarnpkg.com/pify/-/pify-2.3.0.tgz#ed141a6ac043a849ea588498e7dca8b15330e90c" pinkie-promise@^2.0.0: version "2.0.1" resolved "https://registry.yarnpkg.com/pinkie-promise/-/pinkie-promise-2.0.1.tgz#2135d6dfa7a358c069ac9b178776288228450ffa" dependencies: pinkie "^2.0.0" pinkie@^2.0.0: version "2.0.4" resolved "https://registry.yarnpkg.com/pinkie/-/pinkie-2.0.4.tgz#72556b80cfa0d48a974e80e77248e80ed4f7f870" pluralize@^1.2.1: version "1.2.1" resolved "https://registry.yarnpkg.com/pluralize/-/pluralize-1.2.1.tgz#d1a21483fd22bb41e58a12fa3421823140897c45" prelude-ls@~1.1.2: version "1.1.2" resolved "https://registry.yarnpkg.com/prelude-ls/-/prelude-ls-1.1.2.tgz#21932a549f5e52ffd9a827f570e04be62a97da54" process-nextick-args@~1.0.6: version "1.0.7" resolved "https://registry.yarnpkg.com/process-nextick-args/-/process-nextick-args-1.0.7.tgz#150e20b756590ad3f91093f25a4f2ad8bff30ba3" progress@^1.1.8: version "1.1.8" resolved "https://registry.yarnpkg.com/progress/-/progress-1.1.8.tgz#e260c78f6161cdd9b0e56cc3e0a85de17c7a57be" proto-list@~1.2.1: version "1.2.4" resolved "https://registry.yarnpkg.com/proto-list/-/proto-list-1.2.4.tgz#212d5bfe1318306a420f6402b8e26ff39647a849" prr@~0.0.0: version "0.0.0" resolved "https://registry.yarnpkg.com/prr/-/prr-0.0.0.tgz#1a84b85908325501411853d0081ee3fa86e2926a" pseudomap@^1.0.1: version "1.0.2" resolved "https://registry.yarnpkg.com/pseudomap/-/pseudomap-1.0.2.tgz#f052a28da70e618917ef0a8ac34c1ae5a68286b3" punycode@^1.4.1: version "1.4.1" resolved "https://registry.yarnpkg.com/punycode/-/punycode-1.4.1.tgz#c0d5a63b2718800ad8e1eb0fa5269c84dd41845e" qs@~1.2.0: version "1.2.2" resolved "https://registry.yarnpkg.com/qs/-/qs-1.2.2.tgz#19b57ff24dc2a99ce1f8bdf6afcda59f8ef61f88" qs@~6.3.0: version "6.3.2" resolved "https://registry.yarnpkg.com/qs/-/qs-6.3.2.tgz#e75bd5f6e268122a2a0e0bda630b2550c166502c" readable-stream@^2.0.1, readable-stream@^2.2.2: version "2.3.3" resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-2.3.3.tgz#368f2512d79f9d46fdfc71349ae7878bbc1eb95c" dependencies: core-util-is "~1.0.0" inherits "~2.0.3" isarray "~1.0.0" process-nextick-args "~1.0.6" safe-buffer "~5.1.1" string_decoder "~1.0.3" util-deprecate "~1.0.1" readable-stream@~1.0.26: version "1.0.34" resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-1.0.34.tgz#125820e34bc842d2f2aaafafe4c2916ee32c157c" dependencies: core-util-is "~1.0.0" inherits "~2.0.1" isarray "0.0.1" string_decoder "~0.10.x" readline2@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/readline2/-/readline2-1.0.1.tgz#41059608ffc154757b715d9989d199ffbf372e35" dependencies: code-point-at "^1.0.0" is-fullwidth-code-point "^1.0.0" mute-stream "0.0.5" rechoir@^0.6.2: version "0.6.2" resolved "https://registry.yarnpkg.com/rechoir/-/rechoir-0.6.2.tgz#85204b54dba82d5742e28c96756ef43af50e3384" dependencies: resolve "^1.1.6" repeat-string@^1.5.2: version "1.6.1" resolved "https://registry.yarnpkg.com/repeat-string/-/repeat-string-1.6.1.tgz#8dcae470e1c88abc2d600fff4a776286da75e637" request@2.42.0: version "2.42.0" resolved "https://registry.yarnpkg.com/request/-/request-2.42.0.tgz#572bd0148938564040ac7ab148b96423a063304a" dependencies: bl "~0.9.0" caseless "~0.6.0" forever-agent "~0.5.0" json-stringify-safe "~5.0.0" mime-types "~1.0.1" node-uuid "~1.4.0" qs "~1.2.0" tunnel-agent "~0.4.0" optionalDependencies: aws-sign2 "~0.5.0" form-data "~0.1.0" hawk "1.1.1" http-signature "~0.10.0" oauth-sign "~0.4.0" stringstream "~0.0.4" tough-cookie ">=0.12.0" request@2.79.0: version "2.79.0" resolved "https://registry.yarnpkg.com/request/-/request-2.79.0.tgz#4dfe5bf6be8b8cdc37fcf93e04b65577722710de" dependencies: aws-sign2 "~0.6.0" aws4 "^1.2.1" caseless "~0.11.0" combined-stream "~1.0.5" extend "~3.0.0" forever-agent "~0.6.1" form-data "~2.1.1" har-validator "~2.0.6" hawk "~3.1.3" http-signature "~1.1.0" is-typedarray "~1.0.0" isstream "~0.1.2" json-stringify-safe "~5.0.1" mime-types "~2.1.7" oauth-sign "~0.8.1" qs "~6.3.0" stringstream "~0.0.4" tough-cookie "~2.3.0" tunnel-agent "~0.4.1" uuid "^3.0.0" require-uncached@^1.0.2: version "1.0.3" resolved "https://registry.yarnpkg.com/require-uncached/-/require-uncached-1.0.3.tgz#4e0d56d6c9662fd31e43011c4b95aa49955421d3" dependencies: caller-path "^0.1.0" resolve-from "^1.0.0" resolve-from@^1.0.0: version "1.0.1" resolved "https://registry.yarnpkg.com/resolve-from/-/resolve-from-1.0.1.tgz#26cbfe935d1aeeeabb29bc3fe5aeb01e93d44226" resolve@1.1.x: version "1.1.7" resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.1.7.tgz#203114d82ad2c5ed9e8e0411b3932875e889e97b" resolve@^1.1.6, resolve@^1.1.7: version "1.4.0" resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.4.0.tgz#a75be01c53da25d934a98ebd0e4c4a7312f92a86" dependencies: path-parse "^1.0.5" restore-cursor@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/restore-cursor/-/restore-cursor-1.0.1.tgz#34661f46886327fed2991479152252df92daa541" dependencies: exit-hook "^1.0.0" onetime "^1.0.0" resumer@~0.0.0: version "0.0.0" resolved "https://registry.yarnpkg.com/resumer/-/resumer-0.0.0.tgz#f1e8f461e4064ba39e82af3cdc2a8c893d076759" dependencies: through "~2.3.4" right-align@^0.1.1: version "0.1.3" resolved "https://registry.yarnpkg.com/right-align/-/right-align-0.1.3.tgz#61339b722fe6a3515689210d24e14c96148613ef" dependencies: align-text "^0.1.1" rimraf@^2.2.8: version "2.6.2" resolved "https://registry.yarnpkg.com/rimraf/-/rimraf-2.6.2.tgz#2ed8150d24a16ea8651e6d6ef0f47c4158ce7a36" dependencies: glob "^7.0.5" run-async@^0.1.0: version "0.1.0" resolved "https://registry.yarnpkg.com/run-async/-/run-async-0.1.0.tgz#c8ad4a5e110661e402a7d21b530e009f25f8e389" dependencies: once "^1.3.0" rx-lite@^3.1.2: version "3.1.2" resolved "https://registry.yarnpkg.com/rx-lite/-/rx-lite-3.1.2.tgz#19ce502ca572665f3b647b10939f97fd1615f102" safe-buffer@~5.1.0, safe-buffer@~5.1.1: version "5.1.1" resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.1.1.tgz#893312af69b2123def71f57889001671eeb2c853" semver@5.3.0: version "5.3.0" resolved "https://registry.yarnpkg.com/semver/-/semver-5.3.0.tgz#9b2ce5d3de02d17c6012ad326aa6b4d0cf54f94f" semver@^5.1.0: version "5.4.1" resolved "https://registry.yarnpkg.com/semver/-/semver-5.4.1.tgz#e059c09d8571f0540823733433505d3a2f00b18e" shelljs@^0.7.5: version "0.7.8" resolved "https://registry.yarnpkg.com/shelljs/-/shelljs-0.7.8.tgz#decbcf874b0d1e5fb72e14b164a9683048e9acb3" dependencies: glob "^7.0.0" interpret "^1.0.0" rechoir "^0.6.2" should-equal@0.8.0: version "0.8.0" resolved "https://registry.yarnpkg.com/should-equal/-/should-equal-0.8.0.tgz#a3f05732ff45bac1b7ba412f8408856819641299" dependencies: should-type "0.2.0" should-format@0.3.2: version "0.3.2" resolved "https://registry.yarnpkg.com/should-format/-/should-format-0.3.2.tgz#a59831e01a2ddee149911bc7148be5c80319e1ff" dependencies: should-type "0.2.0" should-type@0.2.0: version "0.2.0" resolved "https://registry.yarnpkg.com/should-type/-/should-type-0.2.0.tgz#6707ef95529d989dcc098fe0753ab1f9136bb7f6" should@^8.0.2: version "8.4.0" resolved "https://registry.yarnpkg.com/should/-/should-8.4.0.tgz#5e60889d3e644bbdd397a30cd34fad28fcf90bc0" dependencies: should-equal "0.8.0" should-format "0.3.2" should-type "0.2.0" sigmund@^1.0.1, sigmund@~1.0.0: version "1.0.1" resolved "https://registry.yarnpkg.com/sigmund/-/sigmund-1.0.1.tgz#3ff21f198cad2175f9f3b781853fd94d0d19b590" slice-ansi@0.0.4: version "0.0.4" resolved "https://registry.yarnpkg.com/slice-ansi/-/slice-ansi-0.0.4.tgz#edbf8903f66f7ce2f8eafd6ceed65e264c831b35" sntp@0.2.x: version "0.2.4" resolved "https://registry.yarnpkg.com/sntp/-/sntp-0.2.4.tgz#fb885f18b0f3aad189f824862536bceeec750900" dependencies: hoek "0.9.x" sntp@1.x.x: version "1.0.9" resolved "https://registry.yarnpkg.com/sntp/-/sntp-1.0.9.tgz#6541184cc90aeea6c6e7b35e2659082443c66198" dependencies: hoek "2.x.x" source-map@^0.4.4: version "0.4.4" resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.4.4.tgz#eba4f5da9c0dc999de68032d8b4f76173652036b" dependencies: amdefine ">=0.0.4" source-map@~0.2.0: version "0.2.0" resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.2.0.tgz#dab73fbcfc2ba819b4de03bd6f6eaa48164b3f9d" dependencies: amdefine ">=0.0.4" source-map@~0.5.1: version "0.5.7" resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.5.7.tgz#8a039d2d1021d22d1ea14c80d8ea468ba2ef3fcc" split@~0.2.10: version "0.2.10" resolved "https://registry.yarnpkg.com/split/-/split-0.2.10.tgz#67097c601d697ce1368f418f06cd201cf0521a57" dependencies: through "2" sprintf-js@~1.0.2: version "1.0.3" resolved "https://registry.yarnpkg.com/sprintf-js/-/sprintf-js-1.0.3.tgz#04e6926f662895354f3dd015203633b857297e2c" sshpk@^1.7.0: version "1.13.1" resolved "https://registry.yarnpkg.com/sshpk/-/sshpk-1.13.1.tgz#512df6da6287144316dc4c18fe1cf1d940739be3" dependencies: asn1 "~0.2.3" assert-plus "^1.0.0" dashdash "^1.12.0" getpass "^0.1.1" optionalDependencies: bcrypt-pbkdf "^1.0.0" ecc-jsbn "~0.1.1" jsbn "~0.1.0" tweetnacl "~0.14.0" stream-combiner@~0.0.2: version "0.0.4" resolved "https://registry.yarnpkg.com/stream-combiner/-/stream-combiner-0.0.4.tgz#4d5e433c185261dde623ca3f44c586bcf5c4ad14" dependencies: duplexer "~0.1.1" string-width@^1.0.1: version "1.0.2" resolved "https://registry.yarnpkg.com/string-width/-/string-width-1.0.2.tgz#118bdf5b8cdc51a2a7e70d211e07e2b0b9b107d3" dependencies: code-point-at "^1.0.0" is-fullwidth-code-point "^1.0.0" strip-ansi "^3.0.0" string-width@^2.0.0: version "2.1.1" resolved "https://registry.yarnpkg.com/string-width/-/string-width-2.1.1.tgz#ab93f27a8dc13d28cac815c462143a6d9012ae9e" dependencies: is-fullwidth-code-point "^2.0.0" strip-ansi "^4.0.0" string_decoder@~0.10.x: version "0.10.31" resolved "https://registry.yarnpkg.com/string_decoder/-/string_decoder-0.10.31.tgz#62e203bc41766c6c28c9fc84301dab1c5310fa94" string_decoder@~1.0.3: version "1.0.3" resolved "https://registry.yarnpkg.com/string_decoder/-/string_decoder-1.0.3.tgz#0fc67d7c141825de94282dd536bec6b9bce860ab" dependencies: safe-buffer "~5.1.0" stringstream@~0.0.4: version "0.0.5" resolved "https://registry.yarnpkg.com/stringstream/-/stringstream-0.0.5.tgz#4e484cd4de5a0bbbee18e46307710a8a81621878" strip-ansi@^3.0.0: version "3.0.1" resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-3.0.1.tgz#6a385fb8853d952d5ff05d0e8aaf94278dc63dcf" dependencies: ansi-regex "^2.0.0" strip-ansi@^4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-4.0.0.tgz#a8479022eb1ac368a871389b635262c505ee368f" dependencies: ansi-regex "^3.0.0" strip-bom@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/strip-bom/-/strip-bom-3.0.0.tgz#2334c18e9c759f7bdd56fdef7e9ae3d588e68ed3" strip-json-comments@~2.0.1: version "2.0.1" resolved "https://registry.yarnpkg.com/strip-json-comments/-/strip-json-comments-2.0.1.tgz#3c531942e908c2697c0ec344858c286c7ca0a60a" supports-color@1.2.0: version "1.2.0" resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-1.2.0.tgz#ff1ed1e61169d06b3cf2d588e188b18d8847e17e" supports-color@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-2.0.0.tgz#535d045ce6b6363fa40117084629995e9df324c7" supports-color@^3.1.0: version "3.2.3" resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-3.2.3.tgz#65ac0504b3954171d8a64946b2ae3cbb8a5f54f6" dependencies: has-flag "^1.0.0" table@^3.7.8: version "3.8.3" resolved "https://registry.yarnpkg.com/table/-/table-3.8.3.tgz#2bbc542f0fda9861a755d3947fefd8b3f513855f" dependencies: ajv "^4.7.0" ajv-keywords "^1.0.0" chalk "^1.1.1" lodash "^4.0.0" slice-ansi "0.0.4" string-width "^2.0.0" tapable@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/tapable/-/tapable-1.0.0.tgz#cbb639d9002eed9c6b5975eb20598d7936f1f9f2" tape@2.3.0: version "2.3.0" resolved "https://registry.yarnpkg.com/tape/-/tape-2.3.0.tgz#0dfeec709227fbcc9170abe7f046962b271431db" dependencies: deep-equal "~0.1.0" defined "~0.0.0" inherits "~2.0.1" jsonify "~0.0.0" resumer "~0.0.0" split "~0.2.10" stream-combiner "~0.0.2" through "~2.3.4" text-table@~0.2.0: version "0.2.0" resolved "https://registry.yarnpkg.com/text-table/-/text-table-0.2.0.tgz#7f5ee823ae805207c00af2df4a84ec3fcfa570b4" through@2, through@^2.3.6, through@~2.3.4: version "2.3.8" resolved "https://registry.yarnpkg.com/through/-/through-2.3.8.tgz#0dd4c9ffaabc357960b1b724115d7e0e86a2e1f5" to-iso-string@0.0.2: version "0.0.2" resolved "https://registry.yarnpkg.com/to-iso-string/-/to-iso-string-0.0.2.tgz#4dc19e664dfccbe25bd8db508b00c6da158255d1" tough-cookie@>=0.12.0, tough-cookie@~2.3.0: version "2.3.3" resolved "https://registry.yarnpkg.com/tough-cookie/-/tough-cookie-2.3.3.tgz#0b618a5565b6dea90bf3425d04d55edc475a7561" dependencies: punycode "^1.4.1" tryit@^1.0.1: version "1.0.3" resolved "https://registry.yarnpkg.com/tryit/-/tryit-1.0.3.tgz#393be730a9446fd1ead6da59a014308f36c289cb" tunnel-agent@~0.4.0, tunnel-agent@~0.4.1: version "0.4.3" resolved "https://registry.yarnpkg.com/tunnel-agent/-/tunnel-agent-0.4.3.tgz#6373db76909fe570e08d73583365ed828a74eeeb" tweetnacl@^0.14.3, tweetnacl@~0.14.0: version "0.14.5" resolved "https://registry.yarnpkg.com/tweetnacl/-/tweetnacl-0.14.5.tgz#5ae68177f192d4456269d108afa93ff8743f4f64" type-check@~0.3.2: version "0.3.2" resolved "https://registry.yarnpkg.com/type-check/-/type-check-0.3.2.tgz#5884cab512cf1d355e3fb784f30804b2b520db72" dependencies: prelude-ls "~1.1.2" typedarray@^0.0.6: version "0.0.6" resolved "https://registry.yarnpkg.com/typedarray/-/typedarray-0.0.6.tgz#867ac74e3864187b1d3d47d996a78ec5c8830777" uglify-js@^2.6: version "2.8.29" resolved "https://registry.yarnpkg.com/uglify-js/-/uglify-js-2.8.29.tgz#29c5733148057bb4e1f75df35b7a9cb72e6a59dd" dependencies: source-map "~0.5.1" yargs "~3.10.0" optionalDependencies: uglify-to-browserify "~1.0.0" uglify-to-browserify@~1.0.0: version "1.0.2" resolved "https://registry.yarnpkg.com/uglify-to-browserify/-/uglify-to-browserify-1.0.2.tgz#6e0924d6bda6b5afe349e39a6d632850a0f882b7" urlgrey@0.4.0: version "0.4.0" resolved "https://registry.yarnpkg.com/urlgrey/-/urlgrey-0.4.0.tgz#f065357040fb35c3b311d4e5dc36484d96dbea06" dependencies: tape "2.3.0" user-home@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/user-home/-/user-home-2.0.0.tgz#9c70bfd8169bc1dcbf48604e0f04b8b49cde9e9f" dependencies: os-homedir "^1.0.0" util-deprecate@~1.0.1: version "1.0.2" resolved "https://registry.yarnpkg.com/util-deprecate/-/util-deprecate-1.0.2.tgz#450d4dc9fa70de732762fbd2d4a28981419a0ccf" uuid@^3.0.0: version "3.1.0" resolved "https://registry.yarnpkg.com/uuid/-/uuid-3.1.0.tgz#3dd3d3e790abc24d7b0d3a034ffababe28ebbc04" verror@1.10.0: version "1.10.0" resolved "https://registry.yarnpkg.com/verror/-/verror-1.10.0.tgz#3a105ca17053af55d6e270c1f8288682e18da400" dependencies: assert-plus "^1.0.0" core-util-is "1.0.2" extsprintf "^1.2.0" which@^1.1.1: version "1.3.0" resolved "https://registry.yarnpkg.com/which/-/which-1.3.0.tgz#ff04bdfc010ee547d780bec38e1ac1c2777d253a" dependencies: isexe "^2.0.0" window-size@0.1.0: version "0.1.0" resolved "https://registry.yarnpkg.com/window-size/-/window-size-0.1.0.tgz#5438cd2ea93b202efa3a19fe8887aee7c94f9c9d" wordwrap@0.0.2: version "0.0.2" resolved "https://registry.yarnpkg.com/wordwrap/-/wordwrap-0.0.2.tgz#b79669bb42ecb409f83d583cad52ca17eaa1643f" wordwrap@^1.0.0, wordwrap@~1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/wordwrap/-/wordwrap-1.0.0.tgz#27584810891456a4171c8d0226441ade90cbcaeb" wordwrap@~0.0.2: version "0.0.3" resolved "https://registry.yarnpkg.com/wordwrap/-/wordwrap-0.0.3.tgz#a3d5da6cd5c0bc0008d37234bbaf1bed63059107" wrappy@1: version "1.0.2" resolved "https://registry.yarnpkg.com/wrappy/-/wrappy-1.0.2.tgz#b5243d8f3ec1aa35f1364605bc0d1036e30ab69f" write@^0.2.1: version "0.2.1" resolved "https://registry.yarnpkg.com/write/-/write-0.2.1.tgz#5fc03828e264cea3fe91455476f7a3c566cb0757" dependencies: mkdirp "^0.5.1" xtend@^4.0.0: version "4.0.1" resolved "https://registry.yarnpkg.com/xtend/-/xtend-4.0.1.tgz#a5c6d532be656e23db820efb943a1f04998d63af" yargs@~3.10.0: version "3.10.0" resolved "https://registry.yarnpkg.com/yargs/-/yargs-3.10.0.tgz#f7ee7bd857dd7c1d2d38c0e74efbd681d1431fd1" dependencies: camelcase "^1.0.2" cliui "^2.1.0" decamelize "^1.0.0" window-size "0.1.0"