Use tsc --build in map package
Description
While learning about package references in TypeScript I came across tsc --build, which automatically builds dependencies (the referenced packages) before building the specified project. I remembered a comment from @markfields saying his usual way of quickly rebuilding code + running tests was npm run tsc; npm run build:test; npm run test which led me to realize that our npm scripts are not leveraging tsc --build, making the doube tsc invocation necessary (or at least the safer option, in case there were changes to the functional code and not just the tests).
This change updates the npm scripts for the map package to use tsc --build for a slightly improved dev experience.
Reviewer Guidance
I want to check with the team if we've tried to use this in the past and ran into issues (documented caveats here and here), or if we're good to make this change across all packages that use references.
Any relevant logs or outputs
This shows what happens with the current build:test npm script (which uses --project) after making a change in the framework code that should make a test fail, and what happens with the new approach (--build instead of --project). In the first scenario the tests build but the application code does not, so the test still passes; in the second, the application code is also built due to being referenced by the test project, and the test now fails.

Is this going to make repo-policy-check or fluid-build or whatever complain that your package.json scripts are not complying to the expected standard?
which automatically builds dependencies
What exactly does it do for each dependency? e.g. How does it know which tsconfig to use when building?
Is this going to make repo-policy-check or fluid-build or whatever complain that your package.json scripts are not complying to the expected standard?
Good point, I'll check.
What exactly does it do for each dependency? e.g. How does it know which tsconfig to use when building?
For the target project it'll use the tsconfig we pass to the command, and for the dependencies it'll use whatever that one points to in its references. In this example, the default tsconfig.json from the root of the package:

If the dependency has several tsconfig files, pointing to a folder will use the default tsconfig.json (like it does in this case), but we could also point to a specific file (e.g. ../../tsconfig.esnext.json instead).
Also, @anthony-murphy it seems to be smart enough to not rebuild the source project if it doesn't need to:

The flow you had mentioned about building, generating tests, then building the tests project, in the build:commonjs script, seems to me like it wouldn't be affected if we start using --build? At least in this particular scenario. Calling npm run build:test on its own is what would have different behavior now.
The latest commit updates fluidPackageCheck in fluid-build so it supports several possible expected versions for a given script (e.g. test:build can be tsc --project ./src/test/tsconfig.json or tsc --build ./src/test/tsconfig.json).
That works fine, but then if I change the build:test scripts to tsc --build the build now fails with a different error (coming from here) that I haven't looked into yet:
ERROR: Unexpected error. @fluidframework/map: Unable to find tsc task matching /home/alex/code/FluidFramework/packages/dds/map/src/test/tsconfig.json for dependent task eslint --format stylish src
Error: @fluidframework/map: Unable to find tsc task matching /home/alex/code/FluidFramework/packages/dds/map/src/test/tsconfig.json for dependent task eslint --format stylish src
at EsLintTask.addTscTask (/home/alex/code/FluidFramework/build-tools/packages/build-tools/dist/fluidBuild/tasks/leaf/tscTask.js:370:23)
at EsLintTask.addDependentTasks (/home/alex/code/FluidFramework/build-tools/packages/build-tools/dist/fluidBuild/tasks/leaf/lintTasks.js:92:22)
at EsLintTask.initializeDependentTask (/home/alex/code/FluidFramework/build-tools/packages/build-tools/dist/fluidBuild/tasks/leaf/leafTask.js:74:14)
at NPMTask.initializeDependentTask (/home/alex/code/FluidFramework/build-tools/packages/build-tools/dist/fluidBuild/tasks/npmTask.js:23:18)
at NPMTask.initializeDependentTask (/home/alex/code/FluidFramework/build-tools/packages/build-tools/dist/fluidBuild/tasks/npmTask.js:23:18)
at ConcurrentNPMTask.initializeDependentTask (/home/alex/code/FluidFramework/build-tools/packages/build-tools/dist/fluidBuild/tasks/npmTask.js:23:18)
at NPMTask.initializeDependentTask (/home/alex/code/FluidFramework/build-tools/packages/build-tools/dist/fluidBuild/tasks/npmTask.js:23:18)
at /home/alex/code/FluidFramework/build-tools/packages/build-tools/dist/fluidBuild/buildGraph.js:270:27
at Map.forEach (<anonymous>)
at BuildGraph.filterPackagesAndInitializeTasks (/home/alex/code/FluidFramework/build-tools/packages/build-tools/dist/fluidBuild/buildGraph.js:262:28)