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

feat(core): allow mutating packageJSON on load #513

Merged
merged 1 commit into from
May 27, 2018
Merged

Conversation

MarshallOfSound
Copy link
Member

@MarshallOfSound MarshallOfSound commented May 26, 2018

  • I have read the contribution documentation for this project.
  • I agree to follow the code of conduct that this project follows, as appropriate.
  • The changes are appropriately documented (if applicable).
  • The changes have sufficient test coverage (if applicable).
  • The testsuite passes successfully on my local machine (if applicable).

Summarize your changes:

In order to override fields like "version" at build time. This provides the ability
to intercept forge loading your package.json file and modify the JS object we read in

Docs: https://v6.electronforge.io/configuration#readpackagejson

In order to override fields like "version" at build time this provides the ability
to intercept forge loading your package.json file and modify the JS files we read
Copy link
Member

@malept malept left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems OK. Just one question below.


// TODO: Move this check to inside the forge config resolver and use
// mutatedPackageJson reader
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this for a different PR then?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yup

@malept malept merged commit 1b7e411 into master May 27, 2018
@malept malept deleted the allow-mutating-pj branch May 27, 2018 19:16
d(`hook triggered: ${hookName}`);
if (typeof hooks[hookName] === 'function') {
d('calling mutating hook:', hookName, 'with item:', item);
const result = await hooks[hookName](forgeConfig, item);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why pass the forgeConfig into the hook first? This was a bit cryptic to find from the docs.

dsanders11 pushed a commit that referenced this pull request Jan 14, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants