Skip to content
Closed
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
18 changes: 18 additions & 0 deletions tasks/run-e2e
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,24 @@ const createRedwoodJSApp = ({ yarn1 }) => {
stdio: 'inherit',
}
)

// Add prisma resolutions
const packageJSONPath = path.join(REDWOOD_PROJECT_DIRECTORY, 'package.json')
const packageJSON = fs.readJSONSync(packageJSONPath)

const getVersionFrmRwPkg = (dep, pkg) => {
return fs.readJSONSync(
path.join(REDWOODJS_FRAMEWORK_PATH, 'packages', pkg, 'package.json')
).dependencies[dep]
}

packageJSON.resolutions = {
prisma: getVersionFrmRwPkg('prisma', 'cli'),
'@prisma/client': getVersionFrmRwPkg('@prisma/client', 'api'),
'@prisma/internals': getVersionFrmRwPkg('@prisma/internals', 'cli'),
}

fs.writeFileSync(packageJSONPath, JSON.stringify(packageJSON, null, 2))
} catch (e) {
console.error('Error: Could not create Redwood Project')
console.error(e)
Expand Down