mirror of
https://github.com/hanzoai/insights-js.git
synced 2026-11-03 00:53:53 +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)
25 lines
794 B
JavaScript
25 lines
794 B
JavaScript
const repoRoot = __dirname + '/../../..'
|
|
/** @type {import('pnpm').Hooks} */
|
|
module.exports = {
|
|
hooks: {
|
|
readPackage(pkg) {
|
|
function rewriteLocalDeps(deps) {
|
|
if (deps) {
|
|
for (const dep in deps) {
|
|
if (dep.startsWith('insights') || dep.startsWith('@insights')) {
|
|
const tarballName = dep.replace('@', '').replace('/', '-')
|
|
deps[dep] = `file:${repoRoot}/target/${tarballName}.tgz`
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
rewriteLocalDeps(pkg.dependencies)
|
|
rewriteLocalDeps(pkg.devDependencies)
|
|
rewriteLocalDeps(pkg.optionalDependencies)
|
|
|
|
return pkg
|
|
},
|
|
},
|
|
}
|