Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 23 additions & 1 deletion tools/pipelines/templates/include-test-real-service.yml
Original file line number Diff line number Diff line change
Expand Up @@ -309,6 +309,8 @@ stages:
tar --extract --verbose --file $TAR_PATH ./dist/test
tar --extract --verbose --file $TAR_PATH ./src/test

# The test workload we are running frequently depends on devDependencies of the package being installed.
# To make sure these are available, copy them to the root package.json and reinstall.
- task: Bash@3
displayName: Copy devDependencies
inputs:
Expand All @@ -321,7 +323,27 @@ stages:
node -e "
const { devDependencies } = require('$testPkgJsonPath');
const pkg = require('$pkgJsonPath');
pkg.devDependencies=devDependencies;
if (!pkg.devDependencies) {
pkg.devDependencies = {};
}
// Avoid copying some common dev dependencies that should only be required at build time.
// Keeping the dependency tree small helps reduce job time and likelihood of install failures, since
// dependencies added as part of this step won't be reproducible via pnpm-lock.
const avoidCopying = new Set([
'@types/node',
'typescript',
'@microsoft/api-extractor',
'@fluid-tools/build-cli',
'@fluidframework/build-common',
'@fluidframework/build-tools'
]);
for (const [k, v] of Object.entries(devDependencies)) {
if (!pkg.devDependencies[k] && !avoidCopying.has(k)) {
// Note that if you use string interpolation, bash interpreting the dollar sign takes precedence.
console.log('Adding devDependency ' + k + '@' + v);
pkg.devDependencies[k] = v;
}
}
require('fs').writeFileSync('$pkgJsonPath', JSON.stringify(pkg));
Comment thread
Abe27342 marked this conversation as resolved.
"

Expand Down