Environment variables for dart pub and for scripts, so pub uses the project cache in project mode.
dart pub
Map<String, String> get pubEnvironment => { if (isProjectMode) 'PUB_CACHE': cacheDirectory, };