This repository was archived by the owner on May 16, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +14
-13
lines changed Expand file tree Collapse file tree 2 files changed +14
-13
lines changed Original file line number Diff line number Diff line change @@ -23,9 +23,10 @@ const depFromErr = (err) => {
2323 * - bootswatch/lumen/bootstrap.css
2424 * - lodash.random
2525 */
26- const matches = / (?: (?: C a n n o t r e s o l v e m o d u l e ) | (?: C a n ' t r e s o l v e ) ) ' ( [ @ \w \/ \. - ] + ) ' i n / . exec (
27- err
28- ) ;
26+ const matches =
27+ / (?: (?: C a n n o t r e s o l v e m o d u l e ) | (?: C a n ' t r e s o l v e ) ) ' ( [ @ \w \/ \. - ] + ) ' i n / . exec (
28+ err
29+ ) ;
2930
3031 if ( ! matches ) {
3132 return ;
@@ -141,13 +142,13 @@ class NpmInstallPlugin {
141142 'normal' ,
142143 result ,
143144 // eslint-disable-next-line func-names
144- function ( err ) {
145+ ( err ) => {
145146 if ( err ) {
146147 this . install ( Object . assign ( { } , result , { request : depFromErr ( err ) } ) ) ;
147148 }
148149
149150 callback ( ) ;
150- } . bind ( this )
151+ }
151152 ) ;
152153 }
153154
@@ -173,7 +174,7 @@ class NpmInstallPlugin {
173174 'loader' ,
174175 result ,
175176 // eslint-disable-next-line func-names
176- function ( err ) {
177+ ( err ) => {
177178 this . resolving [ result . request ] = false ;
178179
179180 if ( err ) {
@@ -182,7 +183,7 @@ class NpmInstallPlugin {
182183 }
183184
184185 return next && next ( ) ;
185- } . bind ( this )
186+ }
186187 ) ;
187188 }
188189
@@ -202,15 +203,15 @@ class NpmInstallPlugin {
202203 'normal' ,
203204 result ,
204205 // eslint-disable-next-line func-names
205- function ( err ) {
206+ ( err ) => {
206207 this . resolving [ result . request ] = false ;
207208
208209 if ( err ) {
209210 this . install ( Object . assign ( { } , result , { request : depFromErr ( err ) } ) ) ;
210211 }
211212
212213 return next ( ) ;
213- } . bind ( this )
214+ }
214215 ) ;
215216 }
216217}
Original file line number Diff line number Diff line change @@ -73,7 +73,7 @@ describe('plugin', () => {
7373 this . plugin . preCompile (
7474 compilation ,
7575 // eslint-disable-next-line
76- function ( ) {
76+ function ( ) {
7777 expect ( this . run ) . toHaveBeenCalled ( ) ;
7878 done ( ) ;
7979 } . bind ( this )
@@ -107,7 +107,7 @@ describe('plugin', () => {
107107 'node_modules' ,
108108 'express' ,
109109 // eslint-disable-next-line
110- function ( ) {
110+ function ( ) {
111111 expect ( this . resolve ) . not . toHaveBeenCalled ( ) ;
112112 done ( ) ;
113113 } . bind ( this )
@@ -119,7 +119,7 @@ describe('plugin', () => {
119119 'src' ,
120120 'bundle?lazy!express' ,
121121 // eslint-disable-next-line
122- function ( ) {
122+ function ( ) {
123123 expect ( this . resolve ) . not . toHaveBeenCalled ( ) ;
124124 done ( ) ;
125125 } . bind ( this )
@@ -131,7 +131,7 @@ describe('plugin', () => {
131131 'src' ,
132132 'express' ,
133133 // eslint-disable-next-line
134- function ( ) {
134+ function ( ) {
135135 expect ( this . resolve ) . toHaveBeenCalled ( ) ;
136136 expect ( this . check ) . toHaveBeenCalled ( ) ;
137137 expect ( this . install ) . toHaveBeenCalled ( ) ;
You can’t perform that action at this time.
0 commit comments