@@ -137,28 +137,28 @@ replaced.
137
137
```
138
138
139
139
The dependencies are keyed by the requested specifier string and have values
140
- of either ` true ` , ` null ` , a string pointing to a module that will be resolved,
140
+ of either ` true ` , ` null ` , a string pointing to a module to be resolved,
141
141
or a conditions object.
142
142
143
143
The specifier string does not perform any searching and must match exactly
144
144
what is provided to the ` require() ` or ` import ` . Therefore, multiple specifiers
145
145
may be needed in the policy if it uses multiple different strings to point
146
146
to the same module (such as excluding the extension).
147
147
148
- If the value of the redirection is ` true ` the default searching algorithms will
149
- be used to find the module.
148
+ If the value of the redirection is ` true ` the default searching algorithms are
149
+ used to find the module.
150
150
151
- If the value of the redirection is a string, it will be resolved relative to
152
- the manifest and then immediately be used without searching.
151
+ If the value of the redirection is a string, it is resolved relative to
152
+ the manifest and then immediately used without searching.
153
153
154
- Any specifier string that is attempted to resolve and not listed in the
155
- dependencies will result in an error according to the policy.
154
+ Any specifier string for which resolution is attempted and that is not listed in
155
+ the dependencies results in an error according to the policy.
156
156
157
- Redirection will not prevent access to APIs through means such as direct access
158
- to ` require.cache ` and/ or through ` module.constructor ` which allow access to
157
+ Redirection does not prevent access to APIs through means such as direct access
158
+ to ` require.cache ` or through ` module.constructor ` which allow access to
159
159
loading modules. Policy redirection only affects specifiers to ` require() ` and
160
- ` import ` . Other means such as to prevent undesired access to APIs through
161
- variables are necessary to lock down that path of loading modules.
160
+ ` import ` . Other means, such as to prevent undesired access to APIs through
161
+ variables, are necessary to lock down that path of loading modules.
162
162
163
163
A boolean value of ` true ` for the dependencies map can be specified to allow a
164
164
module to load any specifier without redirection. This can be useful for local
@@ -167,14 +167,14 @@ only with care after auditing a module to ensure its behavior is valid.
167
167
168
168
Similar to ` "exports" ` in ` package.json ` , dependencies can also be specified to
169
169
be objects containing conditions which branch how dependencies are loaded. In
170
- the preceding example, ` "http" ` will be allowed when the ` "import" ` condition is
170
+ the preceding example, ` "http" ` is allowed when the ` "import" ` condition is
171
171
part of loading it.
172
172
173
- A value of ` null ` for the resolved value will cause the resolution to fail. This
173
+ A value of ` null ` for the resolved value causes the resolution to fail. This
174
174
can be used to ensure some kinds of dynamic access are explicitly prevented.
175
175
176
- Unknown values for the resolved module location will cause failure but are
177
- not guaranteed to be forwards compatible.
176
+ Unknown values for the resolved module location cause failures but are
177
+ not guaranteed to be forward compatible.
178
178
179
179
#### Example: Patched dependency
180
180
0 commit comments