Skip to content

Commit

Permalink
Remove most pnpm hoisting, fix phantom deps (#24096)
Browse files Browse the repository at this point in the history
We've long had pnpm's public hoisting disabled, but it also privately
hoists everything into `node_modules/.pnpm/node_modules/` for
compatibility with packages that have undeclared dependencies. Let's
disable most of that private hoisting and see what turns up.

Changes of note:

* We still hoist a bunch of eslint plugins (and one prettier plugin) as
  untangling that mess seems like enough work to put off for later.
* Only a few upstream packages have bugs that need working around:
  * `@mdx-js/loader`: mdx-js/mdx#2019
  * `@automattic/components`: Missing dep on `@wordpress/base-styles`.
	And the next version will probably be unusable for us due to added
	`i18n-calypso`.
  * `@automattic/popup-monitor`: Missing dep on `events`.
  * markdown-it`: Missing dep on `punycode`.
    markdown-it/markdown-it#230
  * `@samverschueren/stream-to-observable`: Outdated dep on `any-observable`.
    SamVerschueren/stream-to-observable#9
    Hacking around that should also fix p1649254510834369-slack-CBG1CP4EN.
  * `git-node-fs`: Missing peer dep on `js-git`.
    creationix/git-node-fs#8
* `fetch-mock`'s peer dep on `node-fetch` is optional, but only because
  they also allow running in-browser. It's required for node.
* Added `webpack-cli` alongside `webpack` everywhere to make sure
  p1650571211251179-slack-CBG1CP4EN is fixed. Dropped Webpack entirely
  from Boost instead though, they don't use it.
* Had our webpack-config package point to its own copy of
  `@babel/runtime` instead of making that a peer dep.
* Jetpack's extensions tests use a ton of `@wordpress/` packages that
  weren't being directly depended on.

Committed via a GitHub action: https://github.com/Automattic/jetpack/actions/runs/2234009376
  • Loading branch information
anomiex authored and matticbot committed Apr 27, 2022
1 parent dba7996 commit 7365b12
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 2 deletions.
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,13 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [2.0.6-alpha] - unreleased

This is an alpha version! The changes listed here are not final.

### Added
- Add missing JavaScript dependencies.

## [2.0.5] - 2022-04-26
### Changed
- Update package.json metadata.
Expand Down Expand Up @@ -45,6 +52,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Added
- Initial release.

[2.0.6-alpha]: https://github.com/Automattic/i18n-loader-webpack-plugin/compare/v2.0.5...v2.0.6-alpha
[2.0.5]: https://github.com/Automattic/i18n-loader-webpack-plugin/compare/v2.0.4...v2.0.5
[2.0.4]: https://github.com/Automattic/i18n-loader-webpack-plugin/compare/v2.0.3...v2.0.4
[2.0.3]: https://github.com/Automattic/i18n-loader-webpack-plugin/compare/v2.0.2...v2.0.3
Expand Down
5 changes: 3 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@automattic/i18n-loader-webpack-plugin",
"version": "2.0.5",
"version": "2.0.6-alpha",
"description": "A Webpack plugin to load WordPress i18n when Webpack lazy-loads a bundle.",
"homepage": "https://github.com/Automattic/jetpack/tree/HEAD/projects/js-packages/i18n-loader-webpack-plugin/#readme",
"bugs": {
Expand All @@ -24,7 +24,8 @@
"@wordpress/dependency-extraction-webpack-plugin": "3.4.1",
"@wordpress/i18n": "4.6.0",
"jest": "27.3.1",
"webpack": "5.65.0"
"webpack": "5.65.0",
"webpack-cli": "4.9.1"
},
"peerDependencies": {
"webpack": "^5.29.0"
Expand Down

0 comments on commit 7365b12

Please sign in to comment.