Skip to content

Commit be84113

Browse files
Deploy website - based on 8079450
1 parent 600192a commit be84113

87 files changed

Lines changed: 136 additions & 101 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

β€Ž404.htmlβ€Ž

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@
1414

1515

1616
<script src="https://buttons.github.io/buttons.js"></script><link rel="stylesheet" href="/assets/css/styles.55c2f78b.css">
17-
<script src="/assets/js/runtime~main.6151763e.js" defer="defer"></script>
18-
<script src="/assets/js/main.74386258.js" defer="defer"></script>
17+
<script src="/assets/js/runtime~main.723b8162.js" defer="defer"></script>
18+
<script src="/assets/js/main.b3ac967a.js" defer="defer"></script>
1919
</head>
2020
<body class="navigation-with-keyboard">
2121
<script>!function(){function t(t){document.documentElement.setAttribute("data-theme",t)}var e=function(){try{return new URLSearchParams(window.location.search).get("docusaurus-theme")}catch(t){}}()||function(){try{return window.localStorage.getItem("theme")}catch(t){}}();t(null!==e?e:"light")}(),function(){try{const n=new URLSearchParams(window.location.search).entries();for(var[t,e]of n)if(t.startsWith("docusaurus-data-")){var a=t.replace("docusaurus-data-","data-");document.documentElement.setAttribute(a,e)}}catch(t){}}()</script>

β€Ž_src/Resolution.mdβ€Ž

Lines changed: 19 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -75,18 +75,21 @@ Parameters: (*context*, *moduleName*, *platform*)
7575
2. If resolved as a Haste package path, then
7676
1. Perform the algorithm for resolving a path (step 2 above). Throw an error if this resolution fails.
7777
For example, if the Haste package path for `'a/b'` is `foo/package.json`, perform step 2 as if _moduleName_ was `foo/c`.
78-
6. If [`context.disableHierarchicalLookup`](#disableHierarchicalLookup-boolean) is not `true`, then
78+
6. If [`context.enablePackageExports`](#enablepackageexports-boolean) is enabled, then
79+
1. Get the result of [**PACKAGE_SELF_RESOLVE**](#package_self_resolve)(*context*, *moduleName*, *platform*).
80+
2. If resolved, return result.
81+
7. If [`context.disableHierarchicalLookup`](#disableHierarchicalLookup-boolean) is not `true`, then
7982
1. Try resolving _moduleName_ under `node_modules` from the current directory (i.e. parent of [`context.originModulePath`](#originmodulepath-string)) up to the root directory.
8083
2. Perform [**RESOLVE_PACKAGE**](#resolve_package)(*context*, *modulePath*, *platform*) for each candidate path.
81-
7. For each element _nodeModulesPath_ of [`context.nodeModulesPaths`](#nodemodulespaths-readonlyarraystring):
84+
8. For each element _nodeModulesPath_ of [`context.nodeModulesPaths`](#nodemodulespaths-readonlyarraystring):
8285
1. Try resolving _moduleName_ under _nodeModulesPath_ as if the latter was another `node_modules` directory (similar to step 5 above).
8386
2. Perform [**RESOLVE_PACKAGE**](#resolve_package)(*context*, *modulePath*, *platform*) for each candidate path.
84-
8. If [`context.extraNodeModules`](#extranodemodules-string-string) is set:
87+
9. If [`context.extraNodeModules`](#extranodemodules-string-string) is set:
8588
1. Split _moduleName_ into a package name (including an optional [scope](https://docs.npmjs.com/cli/v8/using-npm/scope)) and relative path.
8689
2. Look up the package name in [`context.extraNodeModules`](#extranodemodules-string-string). If found, then
8790
1. Construct a path _modulePath_ by replacing the package name part of _moduleName_ with the value found in [`context.extraNodeModules`](#extranodemodules-string-string)
8891
2. Return the result of [**RESOLVE_PACKAGE**](#resolve_package)(*context*, *modulePath*, *platform*).
89-
9. If no valid resolution has been found, throw a resolution failure error.
92+
10. If no valid resolution has been found, throw a resolution failure error.
9093

9194
#### RESOLVE_MODULE
9295

@@ -110,6 +113,18 @@ Parameters: (*context*, *moduleName*, *platform*)
110113
2. Else, log either a package configuration or package encapsulation warning.
111114
2. Return the result of [**RESOLVE_MODULE**](#resolve_module)(*context*, *filePath*, *platform*).
112115

116+
#### PACKAGE_SELF_RESOLVE
117+
118+
Parameters: (*context*, *moduleName*, *platform*)
119+
120+
1. Find the closest package to [`context.originModulePath`](#originmodulepath-string). If no package is found, return no resolution.
121+
2. If the package does not declare both a `"name"` field and an `"exports"` field, return no resolution.
122+
3. Split _moduleName_ into a package name (including an optional [scope](https://docs.npmjs.com/cli/v8/using-npm/scope)) and relative path.
123+
4. If the package name does not match the current package's `"name"` field, return no resolution.
124+
5. Get the result of [**RESOLVE_PACKAGE_EXPORTS**](#resolve_package-exports)(*context*, *packagePath*, *filePath*, *exportsField*, *platform*) against the current package's `"exports"` field.
125+
1. If resolved path exists, return result.
126+
2. Else, log either a package configuration or package encapsulation warning, then continue with normal resolution.
127+
113128
#### RESOLVE_PACKAGE_EXPORTS
114129

115130
Parameters: (*context*, *packagePath*, *filePath*, *exportsField*, *platform*)

β€Žassets/js/1176.8cfd21e1.jsβ€Ž

Lines changed: 0 additions & 1 deletion
This file was deleted.

β€Žassets/js/141.13f4b693.jsβ€Ž

Lines changed: 0 additions & 1 deletion
This file was deleted.
Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

β€Žassets/js/1689.f3455afe.jsβ€Ž

Lines changed: 0 additions & 1 deletion
This file was deleted.

β€Žassets/js/181.1d88c6b3.jsβ€Ž

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
Β (0)