|
20 | 20 | process.exit(0);
|
21 | 21 | }
|
22 | 22 |
|
23 |
| -const {set, cd, sed, echo, ls} = require('shelljs'); |
| 23 | +const {set, cd, sed, echo, ls, rm} = require('shelljs'); |
24 | 24 | const {readFileSync} = require('fs');
|
25 | 25 | const path = require('path');
|
26 | 26 | const log = console.log;
|
@@ -68,4 +68,37 @@ ls('node_modules/@types').filter(f => f.startsWith('babel__')).forEach(pkg => {
|
68 | 68 | }
|
69 | 69 | });
|
70 | 70 |
|
| 71 | +log('\n# patch: delete d.ts files refering to rxjs-compat'); |
| 72 | +// more info in https://github.com/angular/angular/pull/33786 |
| 73 | +rm('-rf', [ |
| 74 | + 'node_modules/rxjs/add/', |
| 75 | + 'node_modules/rxjs/observable/', |
| 76 | + 'node_modules/rxjs/operator/', |
| 77 | + // rxjs/operators is a public entry point that also contains files to support legacy deep import |
| 78 | + // paths, so we need to preserve index.* and package.json files that are required for module |
| 79 | + // resolution. |
| 80 | + 'node_modules/rxjs/operators/!(index.*|package.json)', |
| 81 | + 'node_modules/rxjs/scheduler/', |
| 82 | + 'node_modules/rxjs/symbol/', |
| 83 | + 'node_modules/rxjs/util/', |
| 84 | + 'node_modules/rxjs/internal/Rx.d.ts', |
| 85 | + 'node_modules/rxjs/AsyncSubject.*', |
| 86 | + 'node_modules/rxjs/BehaviorSubject.*', |
| 87 | + 'node_modules/rxjs/InnerSubscriber.*', |
| 88 | + 'node_modules/rxjs/interfaces.*', |
| 89 | + 'node_modules/rxjs/Notification.*', |
| 90 | + 'node_modules/rxjs/Observable.*', |
| 91 | + 'node_modules/rxjs/Observer.*', |
| 92 | + 'node_modules/rxjs/Operator.*', |
| 93 | + 'node_modules/rxjs/OuterSubscriber.*', |
| 94 | + 'node_modules/rxjs/ReplaySubject.*', |
| 95 | + 'node_modules/rxjs/Rx.*', |
| 96 | + 'node_modules/rxjs/Scheduler.*', |
| 97 | + 'node_modules/rxjs/Subject.*', |
| 98 | + 'node_modules/rxjs/SubjectSubscription.*', |
| 99 | + 'node_modules/rxjs/Subscriber.*', |
| 100 | + 'node_modules/rxjs/Subscription.*', |
| 101 | +]); |
| 102 | + |
| 103 | + |
71 | 104 | log('===== finished running the postinstall-patches.js script =====');
|
0 commit comments