mirror of
https://github.com/hanzoai/insights-js.git
synced 2026-11-03 00:53:53 +00:00
* chore: add Vercel config for Next.js app router example * chore: trigger Vercel build * fix: skip frozen lockfile for example install on Vercel * chore: drop lockfile and match playground vercel pattern * fix: add [email protected] to example/playground pnpmfile excludes Fixes Vercel builds failing due to minimumReleaseAge constraint on [email protected], which was already excluded in the root workspace but not in the example and playground pnpmfiles. * fix: set explicit buildCommand to avoid turbo auto-detection
39 lines
1.4 KiB
JavaScript
39 lines
1.4 KiB
JavaScript
/** @type {import('pnpm').Hooks} */
|
|
// Overrides insights dependencies to local versions
|
|
module.exports = {
|
|
hooks: {
|
|
readPackage(pkg) {
|
|
function rewriteLocalDeps(deps) {
|
|
if (deps) {
|
|
for (const dep in deps) {
|
|
if (['@hanzo/cli', '@hanzo/insights-react-native-session-replay'].includes(dep)) {
|
|
continue
|
|
}
|
|
if (dep.startsWith('insights') || dep.startsWith('@insights')) {
|
|
const tarballName = dep.replace('@', '').replace('/', '-')
|
|
deps[dep] = `file:../../target/${tarballName}.tgz`
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
rewriteLocalDeps(pkg.dependencies)
|
|
rewriteLocalDeps(pkg.devDependencies)
|
|
rewriteLocalDeps(pkg.optionalDependencies)
|
|
|
|
return pkg
|
|
},
|
|
updateConfig(config) {
|
|
return Object.assign(config, {
|
|
lockfile: false,
|
|
packages: ['.'],
|
|
preferFrozenLockfile: false,
|
|
verifyDepsBeforeRun: true,
|
|
minimumReleaseAge: 4320,
|
|
minimumReleaseAgeExclude: ['[email protected]', '@hanzo/cli'],
|
|
onlyBuiltDependencies: ['@hanzo/cli'],
|
|
})
|
|
},
|
|
},
|
|
}
|