// .pnpmfile.cjs
module.exports = {
  hooks: {
    readPackage(pkg) {
      if (
        pkg.name === "axios" ||
        pkg.dependencies?.axios ||
        pkg.devDependencies?.axios ||
        pkg.peerDependencies?.axios ){
        throw new Error(
          `❌ BLOCKED: ${pkg.name} depends on axios`
        );
      }
      if (pkg.dependencies) {
        for (const dep of Object.keys(pkg.dependencies)) {
          if (dep === "axios") {
            throw new Error(`Blocked axios in ${pkg.name}`);
          }
        }
      }
      return pkg;
    }
  }
};