mirror of
https://github.com/pnpm/pnpm.git
synced 2026-04-10 18:18:56 -04:00
6
.changeset/kind-cups-rescue.md
Normal file
6
.changeset/kind-cups-rescue.md
Normal file
@@ -0,0 +1,6 @@
|
||||
---
|
||||
"pnpm": patch
|
||||
"@pnpm/pnpmfile": patch
|
||||
---
|
||||
|
||||
Don't print any info messages about .pnpmfile.cjs [#5027](https://github.com/pnpm/pnpm/issues/5027).
|
||||
@@ -1,6 +1,5 @@
|
||||
import path from 'path'
|
||||
import { hookLogger } from '@pnpm/core-loggers'
|
||||
import logger from '@pnpm/logger'
|
||||
import pathAbsolute from 'path-absolute'
|
||||
import type { Lockfile } from '@pnpm/lockfile-types'
|
||||
import type { Log } from '@pnpm/core-loggers'
|
||||
@@ -48,12 +47,6 @@ export default function requireHooks (
|
||||
globalHooks = globalHooks || {}
|
||||
hooks = hooks || {}
|
||||
const cookedHooks: CookedHooks = {}
|
||||
if ((globalHooks.readPackage != null) || (hooks.readPackage != null)) {
|
||||
logger.info({
|
||||
message: 'readPackage hook is declared. Manifests of dependencies might get overridden',
|
||||
prefix,
|
||||
})
|
||||
}
|
||||
for (const hookName of ['readPackage', 'afterAllResolved']) {
|
||||
if (globalHooks[hookName] && hooks[hookName]) {
|
||||
const globalHookContext = createReadPackageHookContext(globalPnpmfile.filename, prefix, hookName)
|
||||
|
||||
@@ -27,10 +27,6 @@ class PnpmFileFailError extends PnpmError {
|
||||
export default (pnpmFilePath: string, prefix: string) => {
|
||||
try {
|
||||
const pnpmfile = require(pnpmFilePath) // eslint-disable-line
|
||||
logger.info({
|
||||
message: `Using hooks from: ${pnpmFilePath}`,
|
||||
prefix,
|
||||
})
|
||||
if (typeof pnpmfile === 'undefined') {
|
||||
logger.warn({
|
||||
message: `Ignoring the pnpmfile at "${pnpmFilePath}". It exports "undefined".`,
|
||||
|
||||
Reference in New Issue
Block a user