Skip to content

Commit 6b94e78

Browse files
author
nickpape-msft
authored
Merge pull request microsoft#92 from Microsoft/nickpape/export-log
Ensure the log() function is exported
2 parents f33dbb0 + 99a6797 commit 6b94e78

8 files changed

Lines changed: 18 additions & 61 deletions

File tree

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
{
2+
"changes": [
3+
{
4+
"packageName": "@microsoft/gulp-core-build",
5+
"comment": "Ensure the log function is exported",
6+
"type": "patch"
7+
}
8+
],
9+
"email": "nickpape@users.noreply.github.com"
10+
}

common/reviews/api/gulp-core-build.api.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -117,6 +117,8 @@ interface IExecutable {
117117

118118
export function initialize(gulp: gulp.Gulp): void;
119119

120+
export function log(...args: Array<string | Chalk.ChalkChain>): void;
121+
120122
export function logSummary(value: string): void;
121123

122124
export function mergeConfig(config: IBuildConfig): void;

common/reviews/api/node-library-build.api.ts

Lines changed: 2 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,9 @@
11
export declare function addSuppression(str: string): void;
22

33
class ApiExtractorTask extends GulpTask<IApiExtractorTaskConfig> {
4-
// (undocumented)
54
executeTask(gulp: gulp.Gulp, completeCallback: (error?: string) => void): NodeJS.ReadWriteStream;
6-
// (undocumented)
75
loadSchema(): Object;
8-
// (undocumented)
96
name: string;
10-
// (undocumented)
117
taskConfig: IApiExtractorTaskConfig;
128
}
139

@@ -74,7 +70,6 @@ class GulpTask<TASK_CONFIG> implements IExecutable {
7470
taskConfig: TASK_CONFIG;
7571
}
7672

77-
// (undocumented)
7873
interface IBuildConfig {
7974
args?: {
8075
[ name: string ]: string | boolean;
@@ -111,11 +106,9 @@ interface ICopyConfig {
111106
}
112107

113108
interface ICustomGulpTask {
114-
// (undocumented)
115109
(gulp: gulp.Gulp | GulpProxy, buildConfig: IBuildConfig, done: (failure?: Object) => void): Promise<Object> | NodeJS.ReadWriteStream | void;
116110
}
117111

118-
// (undocumented)
119112
interface IExecutable {
120113
execute: (config: IBuildConfig) => Promise<void>;
121114
getCleanMatch?: (config: IBuildConfig, taskConfig?: any) => string[];
@@ -126,12 +119,12 @@ interface IExecutable {
126119

127120
export declare function initialize(gulp: gulp.Gulp): void;
128121

129-
// (undocumented)
130122
interface ITsConfigFile<T> {
131-
// (undocumented)
132123
compilerOptions: T;
133124
}
134125

126+
export declare function log(...args: Array<string | Chalk.ChalkChain>): void;
127+
135128
export declare function logSummary(value: string): void;
136129

137130
export declare function mergeConfig(config: IBuildConfig): void;
@@ -144,10 +137,8 @@ export declare function replaceConfig(config: IBuildConfig): void;
144137
export declare function reset(): void;
145138

146139
class SchemaValidator {
147-
// (undocumented)
148140
static getFormattedErrorMessage(errors: Validator.SchemaErrorDetail[], dataFilePath?: string): string;
149141
static readAndValidateJson < TResult >(dataFilePath: string, schemaFilePath: string): TResult;
150-
// (undocumented)
151142
static readCommentedJsonFile < TResult >(filename: string): TResult;
152143
static validate(data: Object, schema: Object, dataFilePath?: string): void;
153144
}
@@ -161,37 +152,25 @@ export declare function subTask(taskName: string, fn: ICustomGulpTask): IExecuta
161152
export declare function task(taskName: string, task: IExecutable): IExecutable;
162153

163154
enum TestResultState {
164-
// (undocumented)
165155
Failed = 1,
166-
// (undocumented)
167156
FlakyFailed = 2,
168-
// (undocumented)
169157
Passed = 0,
170-
// (undocumented)
171158
Skipped = 3
172159
}
173160

174-
// (undocumented)
175161
class TypeScriptConfiguration {
176162
static getGulpTypescriptOptions(buildConfig: IBuildConfig): ITsConfigFile<ts.Settings>;
177163
static getTypescriptCompiler(): any;
178-
// (undocumented)
179164
static getTypescriptOptions(buildConfig: IBuildConfig): ITsConfigFile<typescript.CompilerOptions>;
180165
static setTypescriptCompiler(typescript: any): void;
181166
}
182167

183-
// (undocumented)
184168
class TypeScriptTask extends GulpTask<ITypeScriptTaskConfig> {
185-
// (undocumented)
186169
executeTask(gulp: gulpType.Gulp, completeCallback: (result?: string) => void): void;
187-
// (undocumented)
188170
getCleanMatch(buildConfig: IBuildConfig, taskConfig?: ITypeScriptTaskConfig): string[];
189-
// (undocumented)
190171
loadSchema(): Object;
191172
mergeConfig(config: ITypeScriptTaskConfig): void;
192-
// (undocumented)
193173
name: string;
194-
// (undocumented)
195174
taskConfig: ITypeScriptTaskConfig;
196175
}
197176

common/reviews/api/package-deps-hash.api.ts

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,6 @@
1-
// (undocumented)
21
export function getPackageDeps(packagePath: string = process.cwd(), excludedPaths?: string[]): IPackageDeps;
32

4-
// (undocumented)
53
interface IPackageDeps {
6-
// (undocumented)
74
files: {
85
[ key: string ]: string
96
}
Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,7 @@
1-
// (undocumented)
21
export function add(num1: number, num2: number): number;
32

4-
// (undocumented)
53
export function log(message: string): void;
64

7-
// (undocumented)
85
export function logClass(): void;
96

107
// (No packageDescription for this package)

common/reviews/api/web-library-build.api.ts

Lines changed: 2 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,9 @@
11
export declare function addSuppression(str: string): void;
22

33
class ApiExtractorTask extends GulpTask<IApiExtractorTaskConfig> {
4-
// (undocumented)
54
executeTask(gulp: gulp.Gulp, completeCallback: (error?: string) => void): NodeJS.ReadWriteStream;
6-
// (undocumented)
75
loadSchema(): Object;
8-
// (undocumented)
96
name: string;
10-
// (undocumented)
117
taskConfig: IApiExtractorTaskConfig;
128
}
139

@@ -74,7 +70,6 @@ class GulpTask<TASK_CONFIG> implements IExecutable {
7470
taskConfig: TASK_CONFIG;
7571
}
7672

77-
// (undocumented)
7873
interface IBuildConfig {
7974
args?: {
8075
[ name: string ]: string | boolean;
@@ -111,11 +106,9 @@ interface ICopyConfig {
111106
}
112107

113108
interface ICustomGulpTask {
114-
// (undocumented)
115109
(gulp: gulp.Gulp | GulpProxy, buildConfig: IBuildConfig, done: (failure?: Object) => void): Promise<Object> | NodeJS.ReadWriteStream | void;
116110
}
117111

118-
// (undocumented)
119112
interface IExecutable {
120113
execute: (config: IBuildConfig) => Promise<void>;
121114
getCleanMatch?: (config: IBuildConfig, taskConfig?: any) => string[];
@@ -126,20 +119,19 @@ interface IExecutable {
126119

127120
export declare function initialize(gulp: gulp.Gulp): void;
128121

129-
// (undocumented)
130122
interface ITsConfigFile<T> {
131-
// (undocumented)
132123
compilerOptions: T;
133124
}
134125

135-
// (undocumented)
136126
interface IWebpackTaskConfig {
137127
config?: Webpack.Configuration;
138128
configPath: string;
139129
suppressWarnings?: (string | RegExp)[];
140130
webpack?: typeof Webpack;
141131
}
142132

133+
export declare function log(...args: Array<string | Chalk.ChalkChain>): void;
134+
143135
export declare function logSummary(value: string): void;
144136

145137
export declare function mergeConfig(config: IBuildConfig): void;
@@ -152,10 +144,8 @@ export declare function replaceConfig(config: IBuildConfig): void;
152144
export declare function reset(): void;
153145

154146
class SchemaValidator {
155-
// (undocumented)
156147
static getFormattedErrorMessage(errors: Validator.SchemaErrorDetail[], dataFilePath?: string): string;
157148
static readAndValidateJson < TResult >(dataFilePath: string, schemaFilePath: string): TResult;
158-
// (undocumented)
159149
static readCommentedJsonFile < TResult >(filename: string): TResult;
160150
static validate(data: Object, schema: Object, dataFilePath?: string): void;
161151
}
@@ -169,37 +159,25 @@ export declare function subTask(taskName: string, fn: ICustomGulpTask): IExecuta
169159
export declare function task(taskName: string, task: IExecutable): IExecutable;
170160

171161
enum TestResultState {
172-
// (undocumented)
173162
Failed = 1,
174-
// (undocumented)
175163
FlakyFailed = 2,
176-
// (undocumented)
177164
Passed = 0,
178-
// (undocumented)
179165
Skipped = 3
180166
}
181167

182-
// (undocumented)
183168
class TypeScriptConfiguration {
184169
static getGulpTypescriptOptions(buildConfig: IBuildConfig): ITsConfigFile<ts.Settings>;
185170
static getTypescriptCompiler(): any;
186-
// (undocumented)
187171
static getTypescriptOptions(buildConfig: IBuildConfig): ITsConfigFile<typescript.CompilerOptions>;
188172
static setTypescriptCompiler(typescript: any): void;
189173
}
190174

191-
// (undocumented)
192175
class TypeScriptTask extends GulpTask<ITypeScriptTaskConfig> {
193-
// (undocumented)
194176
executeTask(gulp: gulpType.Gulp, completeCallback: (result?: string) => void): void;
195-
// (undocumented)
196177
getCleanMatch(buildConfig: IBuildConfig, taskConfig?: ITypeScriptTaskConfig): string[];
197-
// (undocumented)
198178
loadSchema(): Object;
199179
mergeConfig(config: ITypeScriptTaskConfig): void;
200-
// (undocumented)
201180
name: string;
202-
// (undocumented)
203181
taskConfig: ITypeScriptTaskConfig;
204182
}
205183

@@ -214,19 +192,12 @@ export declare function warn(...args: Array<string | Chalk.ChalkChain>): void;
214192

215193
export declare function watch(watchMatch: string | string[], task: IExecutable): IExecutable;
216194

217-
// (undocumented)
218195
class WebpackTask extends GulpTask<IWebpackTaskConfig> {
219-
// (undocumented)
220196
executeTask(gulp: gulp.Gulp, completeCallback: (result?: Object) => void): void;
221-
// (undocumented)
222197
isEnabled(buildConfig: IBuildConfig): boolean;
223-
// (undocumented)
224198
loadSchema(): Object;
225-
// (undocumented)
226199
name: string;
227-
// (undocumented)
228200
resources: Object;
229-
// (undocumented)
230201
taskConfig: IWebpackTaskConfig;
231202
}
232203

gulp-core-build/src/index.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ export {
3131
fileLog,
3232
fileWarning,
3333
reset,
34+
log,
3435
logSummary
3536
} from './logging';
3637
export * from './tasks/CopyTask';

gulp-core-build/src/logging.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -346,7 +346,7 @@ export function logSummary(value: string): void {
346346

347347
/**
348348
* Log a message to the console
349-
* @param args... - the messages to log to the console
349+
* @param args - the messages to log to the console
350350
*/
351351
export function log(...args: Array<string | Chalk.ChalkChain>): void {
352352
'use strict';

0 commit comments

Comments
 (0)