@@ -2,10 +2,11 @@ import { makeTypesVersionsForPackageJson } from "@definitelytyped/header-parser"
2
2
import assert = require( "assert" ) ;
3
3
import { emptyDir , mkdir , mkdirp , readFileSync } from "fs-extra" ;
4
4
import path = require( "path" ) ;
5
+ import process from "process" ;
5
6
import yargs = require( "yargs" ) ;
6
7
7
- import { defaultLocalOptions } from "./lib/common" ;
8
- import { outputDirPath , sourceBranch , cacheDirPath } from "./lib/settings" ;
8
+ import { defaultLocalOptions , defaultRemoteOptions } from "./lib/common" ;
9
+ import { outputDirPath , sourceBranch } from "./lib/settings" ;
9
10
import {
10
11
assertNever ,
11
12
joinPaths ,
@@ -44,7 +45,7 @@ if (!module.parent) {
44
45
const tgz = ! ! yargs . argv . tgz ;
45
46
logUncaughtErrors ( async ( ) => {
46
47
const log = loggerWithErrors ( ) [ 0 ] ;
47
- const dt = await getDefinitelyTyped ( defaultLocalOptions , log ) ;
48
+ const dt = await getDefinitelyTyped ( process . env . GITHUB_ACTIONS ? defaultRemoteOptions : defaultLocalOptions , log ) ;
48
49
const allPackages = await AllPackages . read ( dt ) ;
49
50
await generatePackages ( dt , allPackages , await readChangedPackages ( allPackages ) , tgz ) ;
50
51
} ) ;
@@ -70,16 +71,12 @@ export default async function generatePackages(
70
71
log ( ` * ${ pkg . desc } ` ) ;
71
72
}
72
73
log ( "## Generating deprecated packages" ) ;
73
- await withNpmCache (
74
- new UncachedNpmInfoClient ( ) ,
75
- async ( client ) => {
76
- for ( const pkg of changedPackages . changedNotNeededPackages ) {
77
- log ( ` * ${ pkg . libraryName } ` ) ;
78
- await generateNotNeededPackage ( pkg , client , log ) ;
79
- }
80
- } ,
81
- cacheDirPath
82
- ) ;
74
+ await withNpmCache ( new UncachedNpmInfoClient ( ) , async ( client ) => {
75
+ for ( const pkg of changedPackages . changedNotNeededPackages ) {
76
+ log ( ` * ${ pkg . libraryName } ` ) ;
77
+ await generateNotNeededPackage ( pkg , client , log ) ;
78
+ }
79
+ } ) ;
83
80
await writeLog ( "package-generator.md" , logResult ( ) ) ;
84
81
}
85
82
async function generateTypingPackage (
0 commit comments