Skip to content
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

@mdx-js/loader v1 does not work with yarn pnp or pnpm #2019

Closed
4 tasks done
anomiex opened this issue Apr 21, 2022 · 6 comments
Closed
4 tasks done

@mdx-js/loader v1 does not work with yarn pnp or pnpm #2019

anomiex opened this issue Apr 21, 2022 · 6 comments
Labels
🙅 no/wontfix This is not (enough of) an issue for this project 👎 phase/no Post cannot or will not be acted on 💎 v1 Issues related to v1

Comments

@anomiex
Copy link

anomiex commented Apr 21, 2022

Initial checklist

Affected packages and versions

1.6.22

Link to runnable example

No response

Steps to reproduce

  1. Use this project.
  2. Run one of the following commands
    • pnpm install && pnpm build
    • yarn set version stable && yarn install && yarn build
    • yarn install --pnp && yarn build

The problem seems to be that

const DEFAULT_RENDERER = `
import React from 'react'
import { mdx } from '@mdx-js/react'
`

assumes that @mdx-js/react will have been hoisted into the project's node_modules directory so webpack can find it when processing the transformed file later. Changing that to

const DEFAULT_RENDERER = ` 
import React from ${ JSON.stringify( require.resolve( 'react' ) ) }
import { mdx } from ${ JSON.stringify( require.resolve( '@mdx-js/react' ) ) }
`

makes it work (at least in pnpm).

I note this problem doesn't seem to occur with version 2.0.0 or later. However, I'm not using @mdx-js/loader directly, I'm using it via @storybook/addon-docs which still depends on @mdx-js/loader ^1.6.22, so updating to v2 is not currently an option.

Expected behavior

Project should build without error.

Actual behavior

Build fails with this error

ERROR in ./test.mdx 4:0-36
Module not found: Error: Can't resolve '@mdx-js/react' in '/tmp/test'
resolve '@mdx-js/react' in '/tmp/test'
  Parsed request is a module
  using description file: /tmp/test/package.json (relative path: .)
    Field 'browser' doesn't contain a valid alias configuration
    resolve as module
      looking for modules in /tmp/test/node_modules
        single file module
          using description file: /tmp/test/package.json (relative path: ./node_modules/@mdx-js/react)
            no extension
              Field 'browser' doesn't contain a valid alias configuration
              /tmp/test/node_modules/@mdx-js/react doesn't exist
            .js
              Field 'browser' doesn't contain a valid alias configuration
              /tmp/test/node_modules/@mdx-js/react.js doesn't exist
            .json
              Field 'browser' doesn't contain a valid alias configuration
              /tmp/test/node_modules/@mdx-js/react.json doesn't exist
            .wasm
              Field 'browser' doesn't contain a valid alias configuration
              /tmp/test/node_modules/@mdx-js/react.wasm doesn't exist
        /tmp/test/node_modules/@mdx-js/react doesn't exist
      /tmp/node_modules doesn't exist or is not a directory
      /node_modules doesn't exist or is not a directory

Runtime

Node v16

Package manager

yarn v3, yarn v1, pnpm

OS

Linux

Build and bundle tools

webpack

@ChristianMurphy ChristianMurphy added the 💎 v1 Issues related to v1 label Apr 21, 2022
@ChristianMurphy
Copy link
Member

Have you tried using mdx 2?

@anomiex
Copy link
Author

anomiex commented Apr 21, 2022

See this bit in the original report.

I note this problem doesn't seem to occur with version 2.0.0 or later. However, I'm not using @mdx-js/loader directly, I'm using it via @storybook/addon-docs which still depends on @mdx-js/loader ^1.6.22, so updating to v2 is not currently an option.

@ChristianMurphy
Copy link
Member

A similar if not the same issue is being tracked at storybookjs/builder-vite#55
And will be resolved by storybookjs/storybook#14238

MDX 2 was created to untangle the dependencies (among many other benefits).
Backporting the majors changes in version 2 back to version 1, both wouldn't be very practical (if it's possible at all), and would likely break semantic versioning.

If this support is needed, please help the projects using version 1 upgrade to version 2.

@ChristianMurphy ChristianMurphy added the 🙅 no/wontfix This is not (enough of) an issue for this project label Apr 22, 2022
@anomiex
Copy link
Author

anomiex commented Apr 22, 2022

A similar if not the same issue is being tracked at storybookjs/builder-vite#55

Does not appear to be at all the same. I'm using webpack, not vite.

And will be resolved by storybookjs/storybook#14238

They've only been working on that for over a year, let's go with that rather than the simple 1- or 2-line fix in this package. 🙄

@ChristianMurphy
Copy link
Member

There was some discussion of this while version 1 was the active release line, the proposed fix is much more complex than a one line change #1300

@anomiex
Copy link
Author

anomiex commented Apr 22, 2022

Hmm. I did miss the missing react peer dep in the fix I proposed here, and maybe fixing backslashes for Windows compatibility. It's not clear to me why the PR there resolves "react/package,json" then removes the filename though, instead of just resolving the package directly. And I only concerned myself with this loader and not the two others it seems you have.

Too bad it wasn't fixed back then. Not even by doing what someone suggested as an alternative and making the runtime a peer dep of the loader.

anomiex added a commit to Automattic/jetpack that referenced this issue Apr 26, 2022
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.
* `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.
anomiex added a commit to Automattic/jetpack that referenced this issue Apr 27, 2022
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.
matticbot pushed a commit to Automattic/remove-asset-webpack-plugin that referenced this issue Apr 27, 2022
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
matticbot pushed a commit to Automattic/i18n-check-webpack-plugin that referenced this issue Apr 27, 2022
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
matticbot pushed a commit to Automattic/i18n-loader-webpack-plugin that referenced this issue Apr 27, 2022
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
matticbot pushed a commit to Automattic/action-required-review that referenced this issue Apr 27, 2022
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
matticbot pushed a commit to Automattic/action-repo-gardening that referenced this issue Apr 27, 2022
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
matticbot pushed a commit to Automattic/jetpack-assets that referenced this issue Apr 27, 2022
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
matticbot pushed a commit to Automattic/jetpack-lazy-images that referenced this issue Apr 27, 2022
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
matticbot pushed a commit to Automattic/jetpack-identity-crisis that referenced this issue Apr 27, 2022
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
matticbot pushed a commit to Automattic/jetpack-wordads that referenced this issue Apr 27, 2022
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
matticbot pushed a commit to Automattic/jetpack-my-jetpack that referenced this issue Apr 27, 2022
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
matticbot pushed a commit to Automattic/jetpack-starter-plugin that referenced this issue Apr 27, 2022
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
matticbot pushed a commit to Automattic/jetpack-search that referenced this issue Apr 27, 2022
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
matticbot pushed a commit to Automattic/jetpack-boost-production that referenced this issue Apr 27, 2022
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
matticbot pushed a commit to Automattic/jetpack-search-plugin that referenced this issue Apr 27, 2022
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
matticbot pushed a commit to Automattic/jetpack-backup-plugin that referenced this issue Apr 27, 2022
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
matticbot pushed a commit to Automattic/jetpack-storybook that referenced this issue Apr 27, 2022
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
matticbot pushed a commit to Automattic/jetpack-production that referenced this issue Apr 27, 2022
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
samiff pushed a commit to Automattic/jetpack that referenced this issue Apr 27, 2022
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.
@ChristianMurphy ChristianMurphy added the 👎 phase/no Post cannot or will not be acted on label May 17, 2022
@ChristianMurphy ChristianMurphy closed this as not planned Won't fix, can't repro, duplicate, stale May 22, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🙅 no/wontfix This is not (enough of) an issue for this project 👎 phase/no Post cannot or will not be acted on 💎 v1 Issues related to v1
Development

No branches or pull requests

2 participants