{
  "manifest": {
    "name": "enhanced-resolve",
    "version": "5.16.0",
    "author": {
      "name": "Tobias Koppers @sokra"
    },
    "description": "Offers a async require.resolve function. It's highly configurable.",
    "files": [
      "lib",
      "types.d.ts",
      "LICENSE"
    ],
    "browser": {
      "process": "./lib/util/process-browser.js",
      "module": "./lib/util/module-browser.js"
    },
    "dependencies": {
      "graceful-fs": "^4.2.4",
      "tapable": "^2.2.0"
    },
    "license": "MIT",
    "devDependencies": {
      "@types/graceful-fs": "^4.1.6",
      "@types/jest": "^27.5.1",
      "@types/node": "20.9.5",
      "cspell": "4.2.8",
      "eslint": "^7.9.0",
      "eslint-config-prettier": "^6.11.0",
      "eslint-plugin-jsdoc": "^30.5.1",
      "eslint-plugin-node": "^11.1.0",
      "eslint-plugin-prettier": "^3.1.4",
      "husky": "^6.0.0",
      "jest": "^27.5.1",
      "lint-staged": "^10.4.0",
      "memfs": "^3.2.0",
      "prettier": "^2.1.2",
      "tooling": "webpack/tooling#v1.23.1",
      "typescript": "^5.3.3"
    },
    "engines": {
      "node": ">=10.13.0"
    },
    "main": "lib/index.js",
    "types": "types.d.ts",
    "homepage": "http://github.com/webpack/enhanced-resolve",
    "scripts": {
      "lint": "yarn run code-lint && yarn run type-lint && yarn typings-test && yarn run special-lint && yarn run spelling",
      "fix": "yarn run code-lint-fix && yarn run special-lint-fix",
      "code-lint": "eslint --cache lib test",
      "code-lint-fix": "eslint --cache lib test --fix",
      "type-lint": "tsc",
      "typings-test": "tsc -p tsconfig.types.test.json",
      "type-report": "rimraf coverage && yarn cover:types && yarn cover:report && open-cli coverage/lcov-report/index.html",
      "special-lint": "node node_modules/tooling/lockfile-lint && node node_modules/tooling/inherit-types && node node_modules/tooling/format-file-header && node node_modules/tooling/generate-types",
      "special-lint-fix": "node node_modules/tooling/inherit-types --write && node node_modules/tooling/format-file-header --write && node node_modules/tooling/generate-types --write",
      "pretty": "prettier --loglevel warn --write \"lib/**/*.{js,json}\" \"test/*.js\"",
      "pretest": "yarn lint",
      "spelling": "cspell \"**\"",
      "test:only": "jest",
      "test:watch": "yarn test:only -- --watch",
      "test:coverage": "yarn test:only -- --collectCoverageFrom=\"lib/**/*.js\" --coverage",
      "test": "yarn test:coverage",
      "precover": "yarn lint",
      "prepare": "husky install"
    },
    "lint-staged": {
      "*": "cspell --no-must-find-files",
      "*.js": "eslint --cache"
    },
    "repository": {
      "type": "git",
      "url": "git://github.com/webpack/enhanced-resolve.git"
    },
    "_registry": "npm",
    "_loc": "/homez.1033/heliovt/.cache/yarn/v6/npm-enhanced-resolve-5.16.0-65ec88778083056cb32487faa9aef82ed0864787-integrity/node_modules/enhanced-resolve/package.json",
    "readmeFilename": "README.md",
    "readme": "# enhanced-resolve\n\n[![npm][npm]][npm-url]\n[![Build Status][build-status]][build-status-url]\n[![codecov][codecov-badge]][codecov-url]\n[![Install Size][size]][size-url]\n[![GitHub Discussions][discussion]][discussion-url]\n\nOffers an async require.resolve function. It's highly configurable.\n\n## Features\n\n- plugin system\n- provide a custom filesystem\n- sync and async node.js filesystems included\n\n## Getting Started\n\n### Install\n\n```sh\n# npm\nnpm install enhanced-resolve\n# or Yarn\nyarn add enhanced-resolve\n```\n\n### Resolve\n\nThere is a Node.js API which allows to resolve requests according to the Node.js resolving rules.\nSync and async APIs are offered. A `create` method allows to create a custom resolve function.\n\n```js\nconst resolve = require(\"enhanced-resolve\");\n\nresolve(\"/some/path/to/folder\", \"module/dir\", (err, result) => {\n\tresult; // === \"/some/path/node_modules/module/dir/index.js\"\n});\n\nresolve.sync(\"/some/path/to/folder\", \"../../dir\");\n// === \"/some/path/dir/index.js\"\n\nconst myResolve = resolve.create({\n\t// or resolve.create.sync\n\textensions: [\".ts\", \".js\"]\n\t// see more options below\n});\n\nmyResolve(\"/some/path/to/folder\", \"ts-module\", (err, result) => {\n\tresult; // === \"/some/node_modules/ts-module/index.ts\"\n});\n```\n\n### Creating a Resolver\n\nThe easiest way to create a resolver is to use the `createResolver` function on `ResolveFactory`, along with one of the supplied File System implementations.\n\n```js\nconst fs = require(\"fs\");\nconst { CachedInputFileSystem, ResolverFactory } = require(\"enhanced-resolve\");\n\n// create a resolver\nconst myResolver = ResolverFactory.createResolver({\n\t// Typical usage will consume the `fs` + `CachedInputFileSystem`, which wraps Node.js `fs` to add caching.\n\tfileSystem: new CachedInputFileSystem(fs, 4000),\n\textensions: [\".js\", \".json\"]\n\t/* any other resolver options here. Options/defaults can be seen below */\n});\n\n// resolve a file with the new resolver\nconst context = {};\nconst lookupStartPath = \"/Users/webpack/some/root/dir\";\nconst request = \"./path/to-look-up.js\";\nconst resolveContext = {};\nmyResolver.resolve(context, lookupStartPath, request, resolveContext, (\n\terr /*Error*/,\n\tfilepath /*string*/\n) => {\n\t// Do something with the path\n});\n```\n\n#### Resolver Options\n\n| Field            | Default                     | Description                                                                                                                                               |\n|------------------|-----------------------------| --------------------------------------------------------------------------------------------------------------------------------------------------------- |\n| alias            | []                          | A list of module alias configurations or an object which maps key to value                                                                                |\n| aliasFields      | []                          | A list of alias fields in description files                                                                                                               |\n| extensionAlias   | {}                          | An object which maps extension to extension aliases                                                                                                       |\n| 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.             |\n| cacheWithContext | true                        | If unsafe cache is enabled, includes `request.context` in the cache key                                                                                   |\n| conditionNames   | []                          | A list of exports field condition names                                                                                                                   |\n| descriptionFiles | [\"package.json\"]            | A list of description files to read from                                                                                                                  |\n| enforceExtension | false                       | Enforce that a extension from extensions must be used                                                                                                     |\n| exportsFields    | [\"exports\"]                 | A list of exports fields in description files                                                                                                             |\n| extensions       | [\".js\", \".json\", \".node\"]   | A list of extensions which should be tried for files                                                                                                      |\n| fallback         | []                          | Same as `alias`, but only used if default resolving fails                                                                                                |                                                                                                                                                                                         \n| fileSystem       |                             | The file system which should be used                                                                                                                      |\n| fullySpecified   | false                       | Request passed to resolve is already fully specified and extensions or main files are not resolved for it (they are still resolved for internal requests) |\n| mainFields       | [\"main\"]                    | A list of main fields in description files                                                                                                                |\n| mainFiles        | [\"index\"]                   | A list of main files in directories                                                                                                                       |\n| modules          | [\"node_modules\"]            | A list of directories to resolve modules from, can be absolute path or folder name                                                                        |\n| plugins          | []                          | A list of additional resolve plugins which should be applied                                                                                              |\n| resolver         | undefined                   | A prepared Resolver to which the plugins are attached                                                                                                     |\n| resolveToContext | false                       | Resolve to a context instead of a file                                                                                                                    |\n| preferRelative   | false                       | Prefer to resolve module requests as relative request and fallback to resolving as module                                                                 |\n| preferAbsolute   | false                       | Prefer to resolve server-relative urls as absolute paths before falling back to resolve in roots                                                          |\n| restrictions     | []                          | A list of resolve restrictions                                                                                                                            |\n| roots            | []                          | A list of root paths                                                                                                                                      |\n| symlinks         | true                        | Whether to resolve symlinks to their symlinked location                                                                                                   |\n| unsafeCache      | false                       | Use this cache object to unsafely cache the successful requests                                                                                           |\n\n## Plugins\n\nSimilar to `webpack`, the core of `enhanced-resolve` functionality is implemented as individual plugins that are executed using [`tapable`](https://github.com/webpack/tapable).\nThese plugins can extend the functionality of the library, adding other ways for files/contexts to be resolved.\n\nA 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.\n\n### Plugin Boilerplate\n\n```js\nclass MyResolverPlugin {\n\tconstructor(source, target) {\n\t\tthis.source = source;\n\t\tthis.target = target;\n\t}\n\n\tapply(resolver) {\n\t\tconst target = resolver.ensureHook(this.target);\n\t\tresolver\n\t\t\t.getHook(this.source)\n\t\t\t.tapAsync(\"MyResolverPlugin\", (request, resolveContext, callback) => {\n\t\t\t\t// Any logic you need to create a new `request` can go here\n\t\t\t\tresolver.doResolve(target, request, null, resolveContext, callback);\n\t\t\t});\n\t}\n}\n```\n\nPlugins 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.\n\n## Escaping\n\nIt's allowed to escape `#` as `\\0#` to avoid parsing it as fragment.\n\nenhanced-resolve will try to resolve requests containing `#` as path and as fragment, so it will automatically figure out if `./some#thing` means `.../some.js#thing` or `.../some#thing.js`. When a `#` is resolved as path it will be escaped in the result. Here: `.../some\\0#thing.js`.\n\n## Tests\n\n```javascript\nyarn test\n```\n\n## Passing options from webpack\n\nIf 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.:\n\n```\nresolve: {\n  extensions: ['.js', '.jsx'],\n  modules: [path.resolve(__dirname, 'src'), 'node_modules'],\n  plugins: [new DirectoryNamedWebpackPlugin()]\n  ...\n},\n```\n\n## License\n\nCopyright (c) 2012-2019 JS Foundation and other contributors\n\nMIT (http://www.opensource.org/licenses/mit-license.php)\n\n[npm]: https://img.shields.io/npm/v/enhanced-resolve.svg\n[npm-url]: https://www.npmjs.com/package/enhanced-resolve\n[build-status]: https://github.com/webpack/enhanced-resolve/actions/workflows/test.yml/badge.svg?branch=master\n[build-status-url]: https://github.com/webpack/enhanced-resolve/actions\n[codecov-badge]: https://codecov.io/gh/webpack/enhanced-resolve/branch/main/graph/badge.svg?token=6B6NxtsZc3\n[codecov-url]: https://codecov.io/gh/webpack/enhanced-resolve\n[size]: https://packagephobia.com/badge?p=enhanced-resolve\n[size-url]: https://packagephobia.com/result?p=enhanced-resolve\n[discussion]: https://img.shields.io/github/discussions/webpack/webpack\n[discussion-url]: https://github.com/webpack/webpack/discussions\n",
    "licenseText": "Copyright JS Foundation and other contributors\n\nPermission is hereby granted, free of charge, to any person obtaining\na copy of this software and associated documentation files (the\n'Software'), to deal in the Software without restriction, including\nwithout limitation the rights to use, copy, modify, merge, publish,\ndistribute, sublicense, and/or sell copies of the Software, and to\npermit persons to whom the Software is furnished to do so, subject to\nthe following conditions:\n\nThe above copyright notice and this permission notice shall be\nincluded in all copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,\nEXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\nMERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.\nIN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY\nCLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,\nTORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE\nSOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n"
  },
  "artifacts": [],
  "remote": {
    "resolved": "https://registry.yarnpkg.com/enhanced-resolve/-/enhanced-resolve-5.16.0.tgz#65ec88778083056cb32487faa9aef82ed0864787",
    "type": "tarball",
    "reference": "https://registry.yarnpkg.com/enhanced-resolve/-/enhanced-resolve-5.16.0.tgz",
    "hash": "65ec88778083056cb32487faa9aef82ed0864787",
    "integrity": "sha512-O+QWCviPNSSLAD9Ucn8Awv+poAkqn3T1XY5/N7kR7rQO9yfSGWkYZDwpJ+iKF7B8rxaQKWngSqACpgzeapSyoA==",
    "registry": "npm",
    "packageName": "enhanced-resolve",
    "cacheIntegrity": "sha512-O+QWCviPNSSLAD9Ucn8Awv+poAkqn3T1XY5/N7kR7rQO9yfSGWkYZDwpJ+iKF7B8rxaQKWngSqACpgzeapSyoA== sha1-ZeyId4CDBWyzJIf6qa74LtCGR4c="
  },
  "registry": "npm",
  "hash": "65ec88778083056cb32487faa9aef82ed0864787"
}