message: Type Validation: Check npm for package before adding dependency
  This fixes an issue around release where we bump the version before we've released the prior version. which this change we will wait for the prior version to become available before trying to generate the tests for it
diff: */
  import * as fs from "fs";
  +import child_process from "child_process";
  export type PackageDetails ={
  readonly name: string;
  @@ -56,19 +57,36 @@ export function getPackageDetails(packageDir: string): PackageDetails {
  pkgJson.version.substring(0, pkgJson.version.indexOf("-")) :
  pkgJson.version;
  - if(normalizedVersion !== pkgJson.typeValidation?.version){
  - if(pkgJson.typeValidation !== undefined){
  + // if the packages has no type validation data, then initialize it
  + if(pkgJson.typeValidation === undefined){
  + pkgJson.typeValidation = {
  + version: normalizedVersion,
  + broken: {}
  + }
  + fs.writeFileSync(packagePath, JSON.stringify(pkgJson, undefined, 2));
  + }else if(normalizedVersion !== pkgJson.typeValidation?.version){
  + // check that the version exists on npm before trying to add the
  + // dev dep and bumping the typeValidation version
  + // if the version does not exist, we will defer updating the package
  + const packageDef = `${pkgJson.name}@${pkgJson.typeValidation.version}`
  + const args = ["view", packageDef,"--json"];
  + const result = child_process.execSync(`npm ${args.join(" ")}`,{cwd:packageDir})
  + const remotePackage: PackageJson | undefined = result.length >0 ? JSON.parse(result.toString()) : undefined;
  +
  + if(remotePackage?.name === pkgJson.name && remotePackage?.version === pkgJson.typeValidation.version){
  +
  pkgJson.devDependencies[`${pkgJson.name}-${pkgJson.typeValidation.version}`] =
  - `npm:${pkgJson.name}@${pkgJson.typeValidation.version}`;
  + `npm:${packageDef}`;
  pkgJson.devDependencies = createSortedObject(pkgJson.devDependencies);
  - }
  +
  pkgJson.typeValidation = {
  version: normalizedVersion,
  broken: pkgJson.typeValidation?.broken ?? {}
  }
  fs.writeFileSync(packagePath, JSON.stringify(pkgJson, undefined, 2));
  }
  + }
  const oldVersions: string[] =
  Object.keys(pkgJson.devDependencies ?? {}).filter((k)=>k.startsWith(pkgJson.name));
  @@ -78,7 +96,7 @@ export function getPackageDetails(packageDir: string): PackageDetails {
  packageDir,
  version: normalizedVersion,
  oldVersions,
  - broken: pkgJson.typeValidation.broken
  + broken: pkgJson.typeValidation?.broken ?? {}
  }
  }
  