check-package.ts (material2-7.3.6) | : | check-package.ts (material2-7.3.7) | ||
---|---|---|---|---|
import {bold, red, yellow} from 'chalk'; | import {bold, red, yellow} from 'chalk'; | |||
import {existsSync} from 'fs'; | import {existsSync} from 'fs'; | |||
import {sync as glob} from 'glob'; | import {sync as glob} from 'glob'; | |||
import {join} from 'path'; | import {join} from 'path'; | |||
import { | import { | |||
checkCdkPackage, | ||||
checkMaterialPackage, | checkMaterialPackage, | |||
checkReleaseBundle, | checkReleaseBundle, | |||
checkTypeDefinitionFile | checkTypeDefinitionFile | |||
} from './output-validations'; | } from './output-validations'; | |||
/** Glob that matches all JavaScript bundle files within a release package. */ | /** Glob that matches all JavaScript bundle files within a release package. */ | |||
const releaseBundlesGlob = '+(esm5|esm2015|bundles)/*.js'; | const releaseBundlesGlob = '+(esm5|esm2015|bundles)/*.js'; | |||
/** Glob that matches all TypeScript definition files within a release package. */ | /** Glob that matches all TypeScript definition files within a release package. */ | |||
const releaseTypeDefinitionsGlob = '**/*.d.ts'; | const releaseTypeDefinitionsGlob = '**/*.d.ts'; | |||
skipping to change at line 54 | skipping to change at line 56 | |||
}); | }); | |||
// Run output validations for all TypeScript definition files within the relea se output. | // Run output validations for all TypeScript definition files within the relea se output. | |||
typeDefinitions.forEach(filePath => { | typeDefinitions.forEach(filePath => { | |||
checkTypeDefinitionFile(filePath) | checkTypeDefinitionFile(filePath) | |||
.forEach(message => addFailure(message, filePath)); | .forEach(message => addFailure(message, filePath)); | |||
}); | }); | |||
// Special release validation checks for the "material" release package. | // Special release validation checks for the "material" release package. | |||
if (packageName === 'material') { | if (packageName === 'material') { | |||
checkMaterialPackage(join(releasesPath, packageName)) | checkMaterialPackage(join(releasesPath, packageName)).forEach(message => add | |||
.forEach(message => addFailure(message)); | Failure(message)); | |||
} else if (packageName === 'cdk') { | ||||
checkCdkPackage(join(releasesPath, packageName)).forEach(message => addFailu | ||||
re(message)); | ||||
} | } | |||
if (!existsSync(join(packagePath, 'LICENSE'))) { | if (!existsSync(join(packagePath, 'LICENSE'))) { | |||
addFailure('No license file found in package output.'); | addFailure('No license file found in package output.'); | |||
} | } | |||
if (!existsSync(join(packagePath, 'README.md'))) { | if (!existsSync(join(packagePath, 'README.md'))) { | |||
addFailure('No "README.md" file found in package output.'); | addFailure('No "README.md" file found in package output.'); | |||
} | } | |||
End of changes. 3 change blocks. | ||||
2 lines changed or deleted | 7 lines changed or added |