diff --git a/packages/grpc-health-check/gulpfile.ts b/packages/grpc-health-check/gulpfile.ts index 9f436dfd..28e21dc6 100644 --- a/packages/grpc-health-check/gulpfile.ts +++ b/packages/grpc-health-check/gulpfile.ts @@ -26,25 +26,17 @@ const healthCheckDir = __dirname; const baseDir = path.resolve(healthCheckDir, '..', '..'); const testDir = path.resolve(healthCheckDir, 'test'); -const cleanLinks = () => { - return del(path.resolve(healthCheckDir, 'node_modules/grpc')); -} +const cleanLinks = () => del(path.resolve(healthCheckDir, 'node_modules/grpc')); const cleanAll = gulp.parallel(cleanLinks); -const runInstall = () => { - return execa('npm', ['install', '--unsafe-perm'], {cwd: healthCheckDir, stdio: 'inherit'}); -}; +const runInstall = () => execa('npm', ['install', '--unsafe-perm'], {cwd: healthCheckDir, stdio: 'inherit'}); const install = gulp.series(cleanLinks, runInstall); -const linkAdd = () => { - linkSync(healthCheckDir, './node_modules/grpc', '../grpc-native-core'); -}; +const linkAdd = () => linkSync(healthCheckDir, './node_modules/grpc', '../grpc-native-core'); -const test = () => { - return gulp.src(`${testDir}/*.js`).pipe(mocha({reporter: 'mocha-jenkins-reporter'})); -}; +const test = () => gulp.src(`${testDir}/*.js`).pipe(mocha({reporter: 'mocha-jenkins-reporter'})); export { cleanLinks, diff --git a/packages/grpc-js/gulpfile.ts b/packages/grpc-js/gulpfile.ts index f0626405..817b2a36 100644 --- a/packages/grpc-js/gulpfile.ts +++ b/packages/grpc-js/gulpfile.ts @@ -40,20 +40,14 @@ const execNpmVerb = (verb: string, ...args: string[]) => execa('npm', [verb, ...args], {cwd: jsCoreDir, stdio: 'inherit'}); const execNpmCommand = execNpmVerb.bind(null, 'run'); -const install = () => { - execNpmVerb('install', '--unsafe-perm'); -}; +const install = () => execNpmVerb('install', '--unsafe-perm'); /** * Runs tslint on files in src/, with linting rules defined in tslint.json. */ -const lint = () => { - execNpmCommand('check'); -}; +const lint = () => execNpmCommand('check'); -const clean = () => { - execNpmCommand('clean'); -}; +const clean = () => execNpmCommand('clean'); const cleanAll = gulp.parallel(clean); @@ -61,13 +55,9 @@ const cleanAll = gulp.parallel(clean); * Transpiles TypeScript files in src/ to JavaScript according to the settings * found in tsconfig.json. */ -const compile = () => { - execNpmCommand('compile'); -} +const compile = () => execNpmCommand('compile'); -const copyTestFixtures = () => { - return ncpP(`${jsCoreDir}/test/fixtures`, `${outDir}/test/fixtures`); -} +const copyTestFixtures = () => ncpP(`${jsCoreDir}/test/fixtures`, `${outDir}/test/fixtures`); const runTests = () => { if (semver.satisfies(process.version, '^8.11.2 || >=9.4')) { diff --git a/packages/grpc-native-core/gulpfile.ts b/packages/grpc-native-core/gulpfile.ts index 4828981c..cfb601d0 100644 --- a/packages/grpc-native-core/gulpfile.ts +++ b/packages/grpc-native-core/gulpfile.ts @@ -30,10 +30,8 @@ const testDir = path.resolve(nativeCoreDir, 'test'); const pkg = require('./package'); const jshintConfig = pkg.jshintConfig; -const clean = () => { - return del([path.resolve(nativeCoreDir, 'build'), - path.resolve(nativeCoreDir, 'ext/node')]); -}; +const clean = () => del([path.resolve(nativeCoreDir, 'build'), + path.resolve(nativeCoreDir, 'ext/node')]); const cleanAll = gulp.parallel(clean); @@ -69,8 +67,8 @@ const test = gulp.series(build, runTests); const docGen = (cb) => { var config = require('./jsdoc_conf.json'); - gulp.src([`${nativeCoreDir}/README.md`, `${nativeCoreDir}/index.js`, `${srcDir}/*.js`], {read: false}) - .pipe(jsdoc(config, cb)); + return gulp.src([`${nativeCoreDir}/README.md`, `${nativeCoreDir}/index.js`, `${srcDir}/*.js`], {read: false}) + .pipe(jsdoc(config, cb)); }; export { diff --git a/packages/proto-loader/gulpfile.ts b/packages/proto-loader/gulpfile.ts index 21bb7fde..04fd131b 100644 --- a/packages/proto-loader/gulpfile.ts +++ b/packages/proto-loader/gulpfile.ts @@ -36,22 +36,14 @@ const execNpmVerb = (verb: string, ...args: string[]) => execa('npm', [verb, ...args], {cwd: protojsDir, stdio: 'inherit'}); const execNpmCommand = execNpmVerb.bind(null, 'run'); -const install = () => { - execNpmVerb('install', '--unsafe-perm'); -}; +const install = () => execNpmVerb('install', '--unsafe-perm'); /** * Runs tslint on files in src/, with linting rules defined in tslint.json. */ -const lint = () => { - execNpmCommand('check'); -}; +const lint = () => execNpmCommand('check'); -const cleanFiles = () => { - execNpmCommand('clean'); -}; - -const clean = gulp.series(install, cleanFiles); +const clean = () => execNpmCommand('clean'); const cleanAll = gulp.parallel(clean); @@ -59,9 +51,7 @@ const cleanAll = gulp.parallel(clean); * Transpiles TypeScript files in src/ and test/ to JavaScript according to the settings * found in tsconfig.json. */ -const compile = () => { - execNpmCommand('compile'); -}; +const compile = () => execNpmCommand('compile'); /** * Transpiles src/ and test/, and then runs all tests. diff --git a/test/gulpfile.ts b/test/gulpfile.ts index 73843354..3fde9d9e 100644 --- a/test/gulpfile.ts +++ b/test/gulpfile.ts @@ -30,7 +30,7 @@ const install = () => { return execa('npm', ['install'], {cwd: testDir, stdio: 'inherit'}); }; -const cleanAll = () => {}; +const cleanAll = () => Promise.resolve(); const test = () => { // run mocha tests matching a glob with a pre-required fixture,