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

Circular dependencies giving rollup fits #1311

Closed
GreenGremlin opened this issue May 22, 2019 · 7 comments
Closed

Circular dependencies giving rollup fits #1311

GreenGremlin opened this issue May 22, 2019 · 7 comments

Comments

@GreenGremlin
Copy link

GreenGremlin commented May 22, 2019

Circular dependencies are valid in cjs, but create all kinds of issues when converted to es6. I'm not familiar with the Cheerio code, but wanted to open this issue to see how feasible it may be to factor out Cheerio's circular dependencies.

Rollup output (slightly re-formatted)

Circular dependency: node_modules/cheerio/lib/cheerio.js ->
        node_modules/cheerio/lib/api/attributes.js ->
        node_modules/cheerio/lib/static.js ->
        node_modules/cheerio/lib/cheerio.js
Circular dependency: node_modules/cheerio/lib/cheerio.js ->
        node_modules/cheerio/lib/api/attributes.js ->
        node_modules/cheerio/lib/static.js ->
        commonjs-proxy-/Users/jonathan/my-package/node_modules/cheerio/lib/cheerio.js ->
        node_modules/cheerio/lib/cheerio.js
@fb55
Copy link
Member

fb55 commented Jun 26, 2019

Happy to accept PRs :)

@Sureiya
Copy link

Sureiya commented Oct 11, 2019

This doesn't exist in 1.0.0 branch but does exist in 1.0.0rc.3, there is another circular dependency happening with html2parser versions less than 4.0.0 as well.

@tobiasmuehl
Copy link

Any updates on this?

@fb55
Copy link
Member

fb55 commented Dec 21, 2020

Just published a new release, which should resolve this if it is resolved on the master branch.

@fb55 fb55 closed this as completed Dec 21, 2020
fb55 pushed a commit that referenced this issue Jan 25, 2021
Moves `.load()` function to its own file, then loads `load.js` file after the Cheerio class is created.

Fixes #1311
Fixes #1689
@tvanc
Copy link

tvanc commented Mar 17, 2021

I'm still getting this exact issue on 1.0.0-rc5

@5saviahv
Copy link
Contributor

5saviahv commented Apr 3, 2021

It is not fixed in 1.0.0-rc5, fix is currently available only in github

@fb55
Copy link
Member

fb55 commented Apr 9, 2021

Fixed in RC6.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

6 participants