npm-pkgbuild 8.3.12 → 8.3.15

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": "8.3.12",
3
+ "version": "8.3.15",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
@@ -50,8 +50,8 @@
50
50
  "expression-expander": "^7.0.16",
51
51
  "globby": "^13.1.0",
52
52
  "ini": "^3.0.0",
53
- "iterable-string-interceptor": "^1.0.15",
54
- "key-value-transformer": "^2.1.1",
53
+ "iterable-string-interceptor": "^2.0.0",
54
+ "key-value-transformer": "^3.0.0",
55
55
  "node-fetch": "^3.2.3",
56
56
  "npm-package-walker": "^5.0.6",
57
57
  "npm-packlist": "^5.0.0",
@@ -60,7 +60,7 @@
60
60
  "tar-stream": "^2.2.0"
61
61
  },
62
62
  "devDependencies": {
63
- "ava": "^4.1.0",
63
+ "ava": "^4.2.0",
64
64
  "c8": "^7.11.0",
65
65
  "documentation": "^13.2.5",
66
66
  "semantic-release": "^19.0.2",
@@ -88,15 +88,6 @@ program
88
88
 
89
89
  Object.assign(properties, { type: outputFactory.name }, options.define);
90
90
 
91
- for (const [k, v] of Object.entries(properties)) {
92
- if (typeof v === "string") {
93
- properties[k] = v.replace(
94
- /\$\{([^\}]+)\}/m,
95
- (m, k) => properties[k]
96
- );
97
- }
98
- }
99
-
100
91
  sources.push(
101
92
  ...[...options.content, ...options.meta]
102
93
  .filter(x => x)
@@ -121,7 +112,8 @@ program
121
112
  ".service",
122
113
  ".socket"
123
114
  ]),
124
- properties
115
+ context.expand(properties)
116
+ //properties
125
117
  )
126
118
  ];
127
119
 
@@ -22,6 +22,16 @@ import {
22
22
  packageNameMapping
23
23
  } from "../util.mjs";
24
24
 
25
+
26
+
27
+ function* keyValueLines(key, value, options) {
28
+ yield `${keyPrefix(key)}${options.keyValueSeparator}${
29
+ Array.isArray(value)
30
+ ? "(" + value.map(v => quote(v)).join(" ") + ")"
31
+ : quote(value)
32
+ }${options.lineEnding}`;
33
+ }
34
+
25
35
  /**
26
36
  * @type KeyValueTransformOptions
27
37
  * Options to describe key value pair separated by an equal sign '='
@@ -35,16 +45,9 @@ export const pkgKeyValuePairOptions = {
35
45
  return [m[2], m[3] ? m[3].split(/\s*,\s*/) : m[4]];
36
46
  }
37
47
  },
38
- keyValueLines: keyValueLines3
48
+ keyValueLines
39
49
  };
40
50
 
41
- function* keyValueLines3(key, value, lineEnding) {
42
- yield `${keyPrefix(key)}=${
43
- Array.isArray(value)
44
- ? "(" + value.map(v => quote(v)).join(" ") + ")"
45
- : quote(value)
46
- }${lineEnding}`;
47
- }
48
51
 
49
52
  function keyPrefix(key) {
50
53
  const f = fields[key];
@@ -111,6 +114,10 @@ package() {
111
114
  `;
112
115
  }
113
116
 
117
+ if(properties.backup && properties.backup[0] === '/') {
118
+ properties.backup = properties.backup.replace(/\//,'');
119
+ }
120
+
114
121
  if (properties.hooks) {
115
122
  await pipeline(
116
123
  iterableStringInterceptor(
package/src/util.mjs CHANGED
@@ -6,7 +6,7 @@ import { createWriteStream } from "fs";
6
6
  export const utf8StreamOptions = { encoding: "utf8" };
7
7
 
8
8
  /**
9
- * what is the node name in the package eco-system
9
+ * What is the node name in the package eco-system
10
10
  */
11
11
  export const packageNameMapping = {
12
12
  node: "nodejs"
@@ -32,7 +32,7 @@ export function decodePassword(password) {
32
32
  }
33
33
 
34
34
  /**
35
- * Extract shell functions from a given text
35
+ * Extract shell functions from a given text.
36
36
  * @param {AsyncIterator<string>} source
37
37
  * @return {AsyncIterator<FunctionDecl>}
38
38
  */