This repository was archived by the owner on Aug 18, 2024. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +10
-5
lines changed Expand file tree Collapse file tree 2 files changed +10
-5
lines changed Original file line number Diff line number Diff line change 3
3
In ` package.json ` :
4
4
```
5
5
"allowScripts": {
6
- "fsevents": "*",
7
- "node-sass": "*"
6
+ "fsevents": "*", # allow install scripts in all versions
7
+ "node-sass": false # ignore install scripts
8
8
}
9
9
```
10
10
Original file line number Diff line number Diff line change @@ -11,10 +11,10 @@ const internals = {};
11
11
12
12
internals . scan = ( tree , parent , map = new Map ( ) , scanned = new Set ( ) ) => {
13
13
14
- for ( const [ k , v ] of tree . dependencies ) {
14
+ for ( const [ , v ] of tree . dependencies ) {
15
15
16
16
if ( v . hasCycle ( ) ) {
17
- console . warn ( `Cycle in ${ k } - skipping ` ) ;
17
+ console . warn ( `==========> skip ${ v . path ( ) } (because it has a cycle in dependencies) ` ) ;
18
18
continue ;
19
19
}
20
20
@@ -69,13 +69,18 @@ exports.run = (cmd = 'install') => {
69
69
70
70
return childPkg . scripts && ( childPkg . scripts [ cmd ] || childPkg . scripts [ `pre${ cmd } ` ] || childPkg . scripts [ `post${ childPkg } ` ] ) ;
71
71
} )
72
- . filter ( ( [ , childPkg ] ) => {
72
+ . filter ( ( [ path , childPkg ] ) => {
73
73
74
74
const name = childPkg . name ;
75
+
75
76
if ( allowed [ name ] === undefined ) {
76
77
throw new Error ( `No entry for ${ name } ` ) ;
77
78
}
78
79
80
+ if ( ! allowed [ name ] ) {
81
+ console . warn ( `==========> skip ${ path } (because it is not allowed in package.json)` ) ;
82
+ }
83
+
79
84
return allowed [ name ] ;
80
85
} )
81
86
. forEach ( ( [ path , childPkg ] ) => {
You can’t perform that action at this time.
0 commit comments