summaryrefslogtreecommitdiff
path: root/deps/node/deps/npm/node_modules/resolve-from
diff options
context:
space:
mode:
Diffstat (limited to 'deps/node/deps/npm/node_modules/resolve-from')
-rw-r--r--deps/node/deps/npm/node_modules/resolve-from/index.js47
-rw-r--r--deps/node/deps/npm/node_modules/resolve-from/license9
-rw-r--r--deps/node/deps/npm/node_modules/resolve-from/package.json66
-rw-r--r--deps/node/deps/npm/node_modules/resolve-from/readme.md72
4 files changed, 0 insertions, 194 deletions
diff --git a/deps/node/deps/npm/node_modules/resolve-from/index.js b/deps/node/deps/npm/node_modules/resolve-from/index.js
deleted file mode 100644
index d092447e..00000000
--- a/deps/node/deps/npm/node_modules/resolve-from/index.js
+++ /dev/null
@@ -1,47 +0,0 @@
-'use strict';
-const path = require('path');
-const Module = require('module');
-const fs = require('fs');
-
-const resolveFrom = (fromDir, moduleId, silent) => {
- if (typeof fromDir !== 'string') {
- throw new TypeError(`Expected \`fromDir\` to be of type \`string\`, got \`${typeof fromDir}\``);
- }
-
- if (typeof moduleId !== 'string') {
- throw new TypeError(`Expected \`moduleId\` to be of type \`string\`, got \`${typeof moduleId}\``);
- }
-
- try {
- fromDir = fs.realpathSync(fromDir);
- } catch (err) {
- if (err.code === 'ENOENT') {
- fromDir = path.resolve(fromDir);
- } else if (silent) {
- return null;
- } else {
- throw err;
- }
- }
-
- const fromFile = path.join(fromDir, 'noop.js');
-
- const resolveFileName = () => Module._resolveFilename(moduleId, {
- id: fromFile,
- filename: fromFile,
- paths: Module._nodeModulePaths(fromDir)
- });
-
- if (silent) {
- try {
- return resolveFileName();
- } catch (err) {
- return null;
- }
- }
-
- return resolveFileName();
-};
-
-module.exports = (fromDir, moduleId) => resolveFrom(fromDir, moduleId);
-module.exports.silent = (fromDir, moduleId) => resolveFrom(fromDir, moduleId, true);
diff --git a/deps/node/deps/npm/node_modules/resolve-from/license b/deps/node/deps/npm/node_modules/resolve-from/license
deleted file mode 100644
index e7af2f77..00000000
--- a/deps/node/deps/npm/node_modules/resolve-from/license
+++ /dev/null
@@ -1,9 +0,0 @@
-MIT License
-
-Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (sindresorhus.com)
-
-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.
diff --git a/deps/node/deps/npm/node_modules/resolve-from/package.json b/deps/node/deps/npm/node_modules/resolve-from/package.json
deleted file mode 100644
index 28ff716c..00000000
--- a/deps/node/deps/npm/node_modules/resolve-from/package.json
+++ /dev/null
@@ -1,66 +0,0 @@
-{
- "_from": "resolve-from@^4.0.0",
- "_id": "resolve-from@4.0.0",
- "_inBundle": false,
- "_integrity": "sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==",
- "_location": "/resolve-from",
- "_phantomChildren": {},
- "_requested": {
- "type": "range",
- "registry": true,
- "raw": "resolve-from@^4.0.0",
- "name": "resolve-from",
- "escapedName": "resolve-from",
- "rawSpec": "^4.0.0",
- "saveSpec": null,
- "fetchSpec": "^4.0.0"
- },
- "_requiredBy": [
- "/npm-lifecycle"
- ],
- "_resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-4.0.0.tgz",
- "_shasum": "4abcd852ad32dd7baabfe9b40e00a36db5f392e6",
- "_spec": "resolve-from@^4.0.0",
- "_where": "/Users/rebecca/code/npm/node_modules/npm-lifecycle",
- "author": {
- "name": "Sindre Sorhus",
- "email": "sindresorhus@gmail.com",
- "url": "sindresorhus.com"
- },
- "bugs": {
- "url": "https://github.com/sindresorhus/resolve-from/issues"
- },
- "bundleDependencies": false,
- "deprecated": false,
- "description": "Resolve the path of a module like `require.resolve()` but from a given path",
- "devDependencies": {
- "ava": "*",
- "xo": "*"
- },
- "engines": {
- "node": ">=4"
- },
- "files": [
- "index.js"
- ],
- "homepage": "https://github.com/sindresorhus/resolve-from#readme",
- "keywords": [
- "require",
- "resolve",
- "path",
- "module",
- "from",
- "like",
- "import"
- ],
- "license": "MIT",
- "name": "resolve-from",
- "repository": {
- "type": "git",
- "url": "git+https://github.com/sindresorhus/resolve-from.git"
- },
- "scripts": {
- "test": "xo && ava"
- },
- "version": "4.0.0"
-}
diff --git a/deps/node/deps/npm/node_modules/resolve-from/readme.md b/deps/node/deps/npm/node_modules/resolve-from/readme.md
deleted file mode 100644
index e539f858..00000000
--- a/deps/node/deps/npm/node_modules/resolve-from/readme.md
+++ /dev/null
@@ -1,72 +0,0 @@
-# resolve-from [![Build Status](https://travis-ci.org/sindresorhus/resolve-from.svg?branch=master)](https://travis-ci.org/sindresorhus/resolve-from)
-
-> Resolve the path of a module like [`require.resolve()`](https://nodejs.org/api/globals.html#globals_require_resolve) but from a given path
-
-
-## Install
-
-```
-$ npm install resolve-from
-```
-
-
-## Usage
-
-```js
-const resolveFrom = require('resolve-from');
-
-// There is a file at `./foo/bar.js`
-
-resolveFrom('foo', './bar');
-//=> '/Users/sindresorhus/dev/test/foo/bar.js'
-```
-
-
-## API
-
-### resolveFrom(fromDir, moduleId)
-
-Like `require()`, throws when the module can't be found.
-
-### resolveFrom.silent(fromDir, moduleId)
-
-Returns `null` instead of throwing when the module can't be found.
-
-#### fromDir
-
-Type: `string`
-
-Directory to resolve from.
-
-#### moduleId
-
-Type: `string`
-
-What you would use in `require()`.
-
-
-## Tip
-
-Create a partial using a bound function if you want to resolve from the same `fromDir` multiple times:
-
-```js
-const resolveFromFoo = resolveFrom.bind(null, 'foo');
-
-resolveFromFoo('./bar');
-resolveFromFoo('./baz');
-```
-
-
-## Related
-
-- [resolve-cwd](https://github.com/sindresorhus/resolve-cwd) - Resolve the path of a module from the current working directory
-- [import-from](https://github.com/sindresorhus/import-from) - Import a module from a given path
-- [import-cwd](https://github.com/sindresorhus/import-cwd) - Import a module from the current working directory
-- [resolve-pkg](https://github.com/sindresorhus/resolve-pkg) - Resolve the path of a package regardless of it having an entry point
-- [import-lazy](https://github.com/sindresorhus/import-lazy) - Import a module lazily
-- [resolve-global](https://github.com/sindresorhus/resolve-global) - Resolve the path of a globally installed module
-
-
-## License
-
-MIT © [Sindre Sorhus](https://sindresorhus.com)