-
Notifications
You must be signed in to change notification settings - Fork 58
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: new article on the pnpm hoisting #438
Conversation
This pull request is automatically being deployed by Amplify Hosting (learn more). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Franchement un super article, bien joué 👏
_posts/2023-12-08-journal-de-l-alternant-comment-jai-perdu-mes-dependences-pnpm.md
Outdated
Show resolved
Hide resolved
_posts/2023-12-08-journal-de-l-alternant-comment-jai-perdu-mes-dependences-pnpm.md
Outdated
Show resolved
Hide resolved
|
||
# Comprendre la configuration de pnpm | ||
## Hoisting des dépendances | ||
Pour comprendre la configuration `public-hoist-pattern` il faut d’abord comprendre comment sont formés les `node_modules` par pnpm. Pnpm ne va mettre dans le dossier `node_modules` en racine uniquement les dépendances directes du projet, toutes les sous-dépendances seront placées dans un dossier caché .pnpm et un lien symbolique sera créé. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pour comprendre la configuration `public-hoist-pattern` il faut d’abord comprendre comment sont formés les `node_modules` par pnpm. Pnpm ne va mettre dans le dossier `node_modules` en racine uniquement les dépendances directes du projet, toutes les sous-dépendances seront placées dans un dossier caché .pnpm et un lien symbolique sera créé. | |
Pour comprendre la configuration `public-hoist-pattern` il faut d’abord comprendre comment sont formés les `node_modules` par pnpm. Pnpm ne va mettre dans le dossier `node_modules` en racine qu'uniquement les dépendances directes du projet, toutes les sous-dépendances seront placées dans un dossier caché .pnpm et un lien symbolique sera créé. |
_posts/2023-12-08-journal-de-l-alternant-comment-jai-perdu-mes-dependences-pnpm.md
Outdated
Show resolved
Hide resolved
Co-authored-by: Etienne D. <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👏 Bravo pour ce premier petit traité de debuggage 💪
_posts/2023-12-08-journal-de-l-alternant-comment-jai-perdu-mes-dependences-pnpm.md
Outdated
Show resolved
Hide resolved
_posts/2023-12-08-journal-de-l-alternant-comment-jai-perdu-mes-dependences-pnpm.md
Outdated
Show resolved
Hide resolved
_posts/2023-12-08-journal-de-l-alternant-comment-jai-perdu-mes-dependences-pnpm.md
Outdated
Show resolved
Hide resolved
_posts/2023-12-08-journal-de-l-alternant-comment-jai-perdu-mes-dependences-pnpm.md
Outdated
Show resolved
Hide resolved
_posts/2023-12-08-journal-de-l-alternant-comment-jai-perdu-mes-dependences-pnpm.md
Outdated
Show resolved
Hide resolved
|
||
`public-hoist-pattern` permet d’indiquer quelles dépendances on veut forcer à être dans le dossier `node_modules` racine plutôt que `node_modules/.pnpm`. | ||
|
||
La ligne `public-hoist-pattern[]=*jest*` veut donc dire qu’on ajoute jest aux dépendances qui sont accessibles depuis la racine et ainsi l’exécutable dans `node_modules/.bin` . Cela permet par exemple de déléguer la configuration et l’import de jest dans un package enfant du repository. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Top l'explication 👍
_posts/2023-12-08-journal-de-l-alternant-comment-jai-perdu-mes-dependences-pnpm.md
Outdated
Show resolved
Hide resolved
_posts/2023-12-08-journal-de-l-alternant-comment-jai-perdu-mes-dependences-pnpm.md
Outdated
Show resolved
Hide resolved
_posts/2023-12-08-journal-de-l-alternant-comment-jai-perdu-mes-dependences-pnpm.md
Outdated
Show resolved
Hide resolved
_posts/2023-12-08-journal-de-l-alternant-comment-jai-perdu-mes-dependences-pnpm.md
Outdated
Show resolved
Hide resolved
Co-authored-by: Florent Dubost <[email protected]>
_posts/2023-12-08-journal-de-l-alternant-comment-jai-perdu-mes-dependences-pnpm.md
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👏
_posts/2023-12-08-journal-de-l-alternant-comment-jai-perdu-mes-dependences-pnpm.md
Outdated
Show resolved
Hide resolved
_posts/2023-12-08-journal-de-l-alternant-comment-jai-perdu-mes-dependences-pnpm.md
Outdated
Show resolved
Hide resolved
_posts/2023-12-08-journal-de-l-alternant-comment-jai-perdu-mes-dependences-pnpm.md
Outdated
Show resolved
Hide resolved
Co-authored-by: Thierry Geindre <[email protected]>
I had trouble with an expected behaviour using the node package manager pnpm. I tell the story in this article