1

We have a lightning component along with js controller and apex controller in our managed package patch. Now we need to introduce helper js for this already existent component.

From my perspective since this aura bundle is already in the patch, we could do whatever we want inside bundle boundaries, i.e. package.xml file wouldn't be changed in any way.

Adding .css and .design files to this aura bundle works in the scope of patch. But trying to add even empty helper js fails with the following error:

    Cause(UNKNOWN_EXCEPTION): UNKNOWN_EXCEPTION: Managed Package Patch Modification Exception: 
    A change was made to the patch release that will change the visible behavior of the application: 
    Component can't be created because it will be automatically included in the package

Could you please shed some light on patch restrictions regarding aura bundles in particular - why one type of files are allowed, but not the other? Maybe there are some resources with a good description of patch restrictions mentioning concrete type of artifacts (desirably with examples), cause official docs are very general.

1

As far as I can tell, there's no decent resource for this level of granularity. However, I will say that, in the general case, adding a new code file (e.g. a renderer or helper) typically indicates that you're doing a major refactoring or introducing new features, not simply fixing a bug. Patches are meant to be used only for fixing bugs. You should not be trying to add new features or doing major refactoring in a patch release. That's why there's a bunch of rules about how you can't add new components, delete components, etc.

I would encourage you to file a feedback report on the Create and Upload Patches page so that they can get more details in there about what's allowed and not for Lightning. For now, I would strongly recommend that you do not try to do refactoring in a patch release, because that is not the intended purpose of patching.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.