npm-pkgbuild 7.3.13 → 7.3.14

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "npm-pkgbuild",
3
- "version": "7.3.13",
3
+ "version": "7.3.14",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
@@ -6,6 +6,9 @@ import { ContentProvider } from "./content-provider.mjs";
6
6
 
7
7
  /**
8
8
  * Content provided form the file system.
9
+ * @param {Object|string} definitions
10
+ * @param {string|string[]} definitions.pattern
11
+ * @param {string} definitions.base base directory where to find the files
9
12
  */
10
13
  export class FileContentProvider extends ContentProvider {
11
14
  constructor(definitions) {
@@ -15,7 +18,7 @@ export class FileContentProvider extends ContentProvider {
15
18
  const base = dirname(definitions);
16
19
  this.definitions = {
17
20
  base,
18
- pattern: [definitions.substring(base.length)]
21
+ pattern: [definitions.substring(base.length + 1)]
19
22
  };
20
23
  } else {
21
24
  this.definitions = { pattern: ["**/*"], ...definitions };
@@ -1,7 +1,7 @@
1
1
  import { ContentProvider } from "./content-provider.mjs";
2
2
 
3
3
  /**
4
- * content from node_modules
4
+ * Content from node_modules
5
5
  */
6
6
  export class NodeModulesContentProvider extends ContentProvider {
7
7
  }
@@ -6,7 +6,7 @@ import { ContentProvider } from "./content-provider.mjs";
6
6
  import { BufferContentEntry } from "content-entry";
7
7
 
8
8
  /**
9
- * content from npm pack
9
+ * Content from npm pack.
10
10
  */
11
11
  export class NPMPackContentProvider extends ContentProvider {
12
12
  async *[Symbol.asyncIterator]() {
@@ -21,7 +21,7 @@ export class PKG extends Packager {
21
21
  return fields;
22
22
  }
23
23
 
24
- async execute(sources,options) {
24
+ async execute(sources, options) {
25
25
  const properties = this.properties;
26
26
  const mandatoryFields = this.mandatoryFields;
27
27
  const staging = await this.tmpdir;
@@ -34,7 +34,7 @@ export class PKG extends Packager {
34
34
 
35
35
  await copyEntries(transform(sources, transformers), staging);
36
36
 
37
- await execa("makepkg", [], { cwd: tmp });
37
+ await execa("makepkg", [], { cwd: staging });
38
38
  }
39
39
 
40
40
  writePkbuild(pkgbuildFileName) {
@@ -200,4 +200,4 @@ function makeDepends(d) {
200
200
  return a;
201
201
  }, []);
202
202
  }
203
- */
203
+ */
package/src/util.mjs CHANGED
@@ -24,7 +24,7 @@ export function asArray(o) {
24
24
  }
25
25
 
26
26
  /**
27
- *
27
+ * Extract package definition from package.json.
28
28
  * @param {Object} pkg package.json content
29
29
  * @returns {Object}
30
30
  */