avoid lazy race conditions (#1364)

We had a few issues with lazy race conditions failing CI. This came from
scripts configured to invoke lazy again, rather than through expressing
dependencies between scripts.

This diff reconfigures lazy to articulate these sorts of things as
dependencies instead of through self-invocation. Instead of having lots
of separate `build-package`, `build-docs`, etc commands, we now just
have a build command with package overrides to express more specific
options

### Change Type
- [x] `internal` — Any other changes that don't affect the published
package (will not publish a new version)

### Release Notes
[internal only]
This commit is contained in:
alex 2023-05-12 16:41:40 +01:00 committed by GitHub
parent 6aa7f9957f
commit 0bd6410d9f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
19 changed files with 44 additions and 52 deletions

View file

@ -12,7 +12,7 @@ export async function preparePackage({ sourcePackageDir }: { sourcePackageDir: s
const manifest = JSON.parse(readFileSync(path.join(sourcePackageDir, 'package.json'), 'utf8'))
execSync('yarn run -T lazy build-package', { cwd: sourcePackageDir, stdio: 'inherit' })
execSync('yarn run -T lazy build', { cwd: sourcePackageDir, stdio: 'inherit' })
// save package.json and reinstate it in postpack
copyFileSync(