File tree Expand file tree Collapse file tree 4 files changed +26
-3
lines changed Expand file tree Collapse file tree 4 files changed +26
-3
lines changed Original file line number Diff line number Diff line change 8
8
/** @typedef {import("./Resolver").FileSystem } FileSystem */
9
9
/** @typedef {import("./Resolver").SyncFileSystem } SyncFileSystem */
10
10
11
+ const nextTick = require ( "process" ) . nextTick ;
12
+
11
13
const dirname = path => {
12
14
let idx = path . length - 1 ;
13
15
while ( idx >= 0 ) {
@@ -175,8 +177,8 @@ class CacheBackend {
175
177
// Check in cache
176
178
let cacheEntry = this . _data . get ( path ) ;
177
179
if ( cacheEntry !== undefined ) {
178
- if ( cacheEntry . err ) return process . nextTick ( callback , cacheEntry . err ) ;
179
- return process . nextTick ( callback , null , cacheEntry . result ) ;
180
+ if ( cacheEntry . err ) return nextTick ( callback , cacheEntry . err ) ;
181
+ return nextTick ( callback , null , cacheEntry . result ) ;
180
182
}
181
183
182
184
// Check if there is already the same operation running
Original file line number Diff line number Diff line change 5
5
6
6
"use strict" ;
7
7
8
+ const versions = require ( "process" ) . versions ;
8
9
const Resolver = require ( "./Resolver" ) ;
9
10
const { getType, PathType } = require ( "./util/path" ) ;
10
11
@@ -112,7 +113,7 @@ const UseFilePlugin = require("./UseFilePlugin");
112
113
function processPnpApiOption ( option ) {
113
114
if (
114
115
option === undefined &&
115
- /** @type {NodeJS.ProcessVersions & {pnp: string} } */ ( process . versions ) . pnp
116
+ /** @type {NodeJS.ProcessVersions & {pnp: string} } */ ( versions ) . pnp
116
117
) {
117
118
// @ts -ignore
118
119
return require ( "pnpapi" ) ; // eslint-disable-line node/no-missing-require
Original file line number Diff line number Diff line change
1
+ /*
2
+ MIT License http://www.opensource.org/licenses/mit-license.php
3
+ Author Tobias Koppers @sokra
4
+ */
5
+
6
+ "use strict" ;
7
+
8
+ exports . process = {
9
+ versions : { } ,
10
+ nextTick ( fn ) {
11
+ const args = Array . prototype . slice . call ( arguments , 1 ) ;
12
+ Promise . resolve ( ) . then ( function ( ) {
13
+ fn . apply ( null , args ) ;
14
+ } ) ;
15
+ }
16
+ } ;
Original file line number Diff line number Diff line change 8
8
" types.d.ts" ,
9
9
" LICENSE"
10
10
],
11
+ "browser" : {
12
+ "pnpapi" : false ,
13
+ "process" : " ./lib/util/process-browser.js"
14
+ },
11
15
"dependencies" : {
12
16
"graceful-fs" : " ^4.2.4" ,
13
17
"tapable" : " ^2.0.0"
You can’t perform that action at this time.
0 commit comments