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

fix: resolve circular dependency in pack.js #266

Closed
wants to merge 1 commit into from

Conversation

addaleax
Copy link
Contributor

lib/pack.js and lib/config/figgy-config.js load each other,
making figgy-config.js grab the original module.exports value
and not the intended one. In particular, this always sets the
dirPacker value to undefined in the config generation step.

Fix this by setting module.exports early.

Refs: nodejs/node#29935

`lib/pack.js` and `lib/config/figgy-config.js` load each other,
making `figgy-config.js` grab the original `module.exports` value
and not the intended one. In particular, this always sets the
`dirPacker` value to `undefined` in the config generation step.

Fix this by setting `module.exports` early.

Refs: nodejs/node#29935
@addaleax addaleax requested a review from a team as a code owner October 11, 2019 22:04
@isaacs isaacs added the semver:patch semver patch level for changes label Oct 11, 2019
@isaacs
Copy link
Contributor

isaacs commented Oct 11, 2019

Huh. That explains why the original attempt to pull dirPacker into libcipm required more work than initially expected.

Good catch!

@mikemimik mikemimik closed this in d5dfe57 Oct 29, 2019
@addaleax addaleax deleted the pack-circular-dependency branch October 29, 2019 21:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
semver:patch semver patch level for changes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants