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

refactor: builder-util-runtime, separate newError to eliminate circular dependency #8251

Conversation

m59peacemaker
Copy link
Contributor

After importing electron-updater, Rollup would log this warning:

(!) Circular dependencies
../../node_modules/.pnpm/builder-util-runtime@9.2.5-alpha.2/node_modules/builder-util-runtime/out/index.js -> ../../node_modules/.pnpm/builder-util-runtime@9.2.5-alpha.2/node_modules/builder-util-runtime/out/httpExecutor.js -> ../../node_modules/.pnpm/builder-util-runtime@9.2.5-alpha.2/node_modules/builder-util-runtime/out/index.js
../../node_modules/.pnpm/builder-util-runtime@9.2.5-alpha.2/node_modules/builder-util-runtime/out/index.js -> ../../node_modules/.pnpm/builder-util-runtime@9.2.5-alpha.2/node_modules/builder-util-runtime/out/uuid.js -> ../../node_modules/.pnpm/builder-util-runtime@9.2.5-alpha.2/node_modules/builder-util-runtime/out/index.js
../../node_modules/.pnpm/builder-util-runtime@9.2.5-alpha.2/node_modules/builder-util-runtime/out/index.js -> ../../node_modules/.pnpm/builder-util-runtime@9.2.5-alpha.2/node_modules/builder-util-runtime/out/xml.js -> ../../node_modules/.pnpm/builder-util-runtime@9.2.5-alpha.2/node_modules/builder-util-runtime/out/index.js
...and 6 more

This is because builder-util-runtime/src/index.ts exports from many other modules, and several of those modules import from it with import { newError } from './index.

This PR removes the circular dependency by extracting newError to error.ts and importing it from there.

Copy link

changeset-bot bot commented Jun 6, 2024

🦋 Changeset detected

Latest commit: 0aa5307

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 12 packages
Name Type
builder-util-runtime Patch
app-builder-lib Patch
builder-util Patch
dmg-builder Patch
electron-builder Patch
electron-publish Patch
electron-updater Patch
electron-builder-squirrel-windows Patch
electron-forge-maker-appimage Patch
electron-forge-maker-nsis-web Patch
electron-forge-maker-nsis Patch
electron-forge-maker-snap Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

Copy link

netlify bot commented Jun 6, 2024

Deploy Preview for car-park-attendant-cleat-11576 ready!

Name Link
🔨 Latest commit 0aa5307
🔍 Latest deploy log https://app.netlify.com/sites/car-park-attendant-cleat-11576/deploys/66620b714105820008ae56d6
😎 Deploy Preview https://deploy-preview-8251--car-park-attendant-cleat-11576.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@m59peacemaker m59peacemaker changed the title builder-util-runtime: separate newError to eliminate circular dependency refactor: builder-util-runtime, separate newError to eliminate circular dependency Jun 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants