diff --git a/.scripts/dependencies.ts b/.scripts/dependencies.ts index ca27e9b..efcc5d2 100644 --- a/.scripts/dependencies.ts +++ b/.scripts/dependencies.ts @@ -266,7 +266,7 @@ function writePackageJson(packageJson: any, packageJsonFilePath: string): void { fs.writeFileSync(packageJsonFilePath, JSON.stringify(packageJson, undefined, " ") + "\n"); } -export function updateLocalDependencies(packageFolders: PackageFolder[], localDependencyNPMScript: string, getNewDependencyVersion: (dependencyName: string) => string): void { +export function updateLocalDependencies(packageFolders: PackageFolder[], localDependencyNPMScript: string, getNewDependencyVersion: (dependencyName: string) => string | undefined): void { const forceRefresh: boolean = shouldForceRefresh(process.argv); for (const packageFolder of packageFolders) { @@ -309,8 +309,8 @@ export function updateLocalDependencies(packageFolders: PackageFolder[], localDe } } -function updateLocalDependency(packageFolder: PackageFolder, dependencyName: string, getNewDependencyVersion: (dependencyName: string) => string): boolean { - const newDependencyVersion: string = getNewDependencyVersion(dependencyName); +function updateLocalDependency(packageFolder: PackageFolder, dependencyName: string, getNewDependencyVersion: (dependencyName: string) => string | undefined): boolean { + const newDependencyVersion: string = getNewDependencyVersion(dependencyName) || ""; const packageFolderPath: string = packageFolder.folderPath; diff --git a/.scripts/tsconfig.json b/.scripts/tsconfig.json new file mode 100644 index 0000000..d354dde --- /dev/null +++ b/.scripts/tsconfig.json @@ -0,0 +1,11 @@ +{ + "extends": "../tsconfig.json", + "compilerOptions": { + "noEmit": true, + "strict": true + }, + "include": [ + "*.ts", + "*.js" + ] +} diff --git a/package.json b/package.json index 6564184..ee3a52f 100644 --- a/package.json +++ b/package.json @@ -84,7 +84,8 @@ "url": "http://github.com/Azure/ms-rest-js/issues" }, "scripts": { - "build": "run-p build:node build:es build:browser", + "build": "run-p build:scripts build:node build:es build:browser", + "build:scripts": "tsc -p ./.scripts/", "build:node": "tsc", "build:es": "tsc -p tsconfig.es.json", "build:browser": "webpack && node node_modules/uglify-es/bin/uglifyjs --source-map -c -m -o msRestBundle.min.js msRestBundle.js",