mirror of
https://github.com/hanzoai/insights-js.git
synced 2026-10-30 18:34:19 +00:00
Bulk rename across 989 files: - Package names: posthog-js → @hanzo/insights, posthog-node → @hanzo/insights-node, etc. - Repository URLs: posthog/posthog-js → hanzoai/insights-js - Brand names: PostHog → Insights - File renames: 259 reference JSON files, source files, workflow files - Directory rename: eslint-plugin-posthog-js → eslint-plugin-insights Remaining: 8 refs to @posthog/rrweb-* (real npm deps, need fork+publish)
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'],
|
|
})
|
|
},
|
|
},
|
|
}
|