power-assert-js/espower-typescript

"directories" property in package.json conflicting with other npm package

TomoyukiAota opened this issue · 0 comments

Currently, "directories" property is used to specify the arbitrary test directory.

electron-builder used the same property in the past and it is deprecated now. When I try to use electron-builder with"directories" property specified in package.json, electron-builder asserts that "directories" property is deprecated and aborts.

The problem is that just "directories" is overly general. If the test directory can also be specified like this, it should never conflict with other packages.

{
    "name": "your-module",
    "description": "Your module",
    "version": "0.0.1",
    "espower-typescript": {
        "directories": {
            "test": "spec/"
        }
    },
...
}

Users will have two choices to specify test directory:

  1. The current way (just "directories"). This is for backward compatibility.
  2. The one mentioned above. This is to avoid conflict with other packages.

When both are specified, 2) should be used in espower-typescript because it can be the case of using espower-typescript with another npm package which uses "directories".

Is it possible?