Skip to content

App-deps command errors with some commonjs js-patches #1719

Description

@thecapdan

When we a cjs js-patch that needs to require the original class, the app-deps command fails with an error such as

java.lang.RuntimeException: Attempt to map '../../libs/javascript/br/presenter/node/Field.js' to '../../libs/javascript/br/presenter/node/Field.js'.

Example of offending patch:

var Field = require('br/presenter/node/Field');
var WritableProperty = require('br/presenter/property/WritableProperty');
var topiarist = require('topiarist');

function FieldPatch(vValue) {

    // PATCH START

    /**
     * A boolean property that is <code>true</code> if {@link #value} is waiting for validation, and <code>false</code> otherwise.
     * @type br.presenter.property.WritableProperty
     */
    this.pending = new WritableProperty(false);
    // PATCH END

    Field.call(this, vValue);
}

topiarist.extend(FieldPatch, Field);

module.exports = FieldPatch;

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions