npm-pkgbuild 22.2.2 → 22.2.3

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": "22.2.2",
3
+ "version": "22.2.3",
4
4
  "publishConfig": {
5
5
  "access": "public",
6
6
  "provenance": false
@@ -134,11 +134,13 @@ export class ALPM extends Packager {
134
134
  source: {
135
135
  ...string_collection_attribute_writable,
136
136
  name: "source",
137
+ separator: undefined,
137
138
  skipEmpty: true
138
139
  },
139
140
  validpgpkeys: {
140
141
  ...string_collection_attribute_writable,
141
142
  name: "validpgpkeys",
143
+ separator: undefined,
142
144
  skipEmpty: true
143
145
  },
144
146
  noextract: { ...default_attribute, name: "noextract", skipEmpty: true },
@@ -150,32 +152,37 @@ export class ALPM extends Packager {
150
152
  md5sums: {
151
153
  ...string_collection_attribute_writable,
152
154
  name: "md5sums",
155
+ separator: undefined,
153
156
  default: ["SKIP"]
154
- // skipEmpty: true
155
157
  },
156
158
  sha1sums: {
157
159
  ...string_collection_attribute_writable,
158
160
  name: "sha1sums",
161
+ separator: undefined,
159
162
  skipEmpty: true
160
163
  },
161
164
  sha256sums: {
162
165
  ...string_collection_attribute_writable,
163
166
  name: "sha256sums",
167
+ separator: undefined,
164
168
  skipEmpty: true
165
169
  },
166
170
  sha384sums: {
167
171
  ...string_collection_attribute_writable,
168
172
  name: "sha384sums",
173
+ separator: undefined,
169
174
  skipEmpty: true
170
175
  },
171
176
  sha512sums: {
172
177
  ...string_collection_attribute_writable,
173
178
  name: "sha512sums",
179
+ separator: undefined,
174
180
  skipEmpty: true
175
181
  },
176
182
  groups: {
177
183
  ...string_collection_attribute_writable,
178
184
  name: "groups",
185
+ separator: undefined,
179
186
  skipEmpty: true
180
187
  },
181
188
  arch: {
@@ -185,6 +192,7 @@ export class ALPM extends Packager {
185
192
  backup: {
186
193
  ...string_collection_attribute_writable,
187
194
  name: "backup",
195
+ separator: undefined,
188
196
  skipEmpty: true
189
197
  },
190
198
  dependencies: {
@@ -223,7 +231,12 @@ export class ALPM extends Packager {
223
231
  name: "replaces",
224
232
  skipEmpty: true
225
233
  },
226
- options: { ...default_attribute, name: "options", skipEmpty: true }
234
+ options: {
235
+ ...default_attribute,
236
+ name: "options",
237
+ separator: undefined,
238
+ skipEmpty: true
239
+ }
227
240
  };
228
241
 
229
242
  static async prepare(options = {}, variant = {}) {
@@ -2,7 +2,12 @@ import { join } from "node:path";
2
2
  import { tmpdir } from "node:os";
3
3
  import { mkdtemp, mkdir } from "node:fs/promises";
4
4
  import { createReadStream } from "node:fs";
5
- import { expand, expandContextDoubbleCurly, iterateToExternal } from "pacc";
5
+ import {
6
+ expand,
7
+ expandContextDoubbleCurly,
8
+ attributeIterator,
9
+ iterateToExternal
10
+ } from "pacc";
6
11
  import { StringContentEntry } from "content-entry";
7
12
  import { publish } from "../publish.mjs";
8
13
  import {
@@ -60,6 +65,14 @@ export class Packager {
60
65
  */
61
66
  constructor(properties) {
62
67
  this.properties = { ...properties, type: this.constructor.name };
68
+
69
+ for (const [path, attribute] of attributeIterator(
70
+ this.constructor.attributes,
71
+ attribute => attribute.default !== undefined
72
+ )) {
73
+ const name = path.join(".");
74
+ this.properties[name] ??= attribute.default;
75
+ }
63
76
  }
64
77
 
65
78
  get externalProperties() {
@@ -5,8 +5,7 @@ import { execa } from "execa";
5
5
  import {
6
6
  integer_attribute_writable,
7
7
  url_attribute_writable,
8
- string_attribute_writable,
9
- string_collection_attribute_writable
8
+ string_attribute_writable
10
9
  } from "pacc";
11
10
  import { ContentEntry, IteratorContentEntry } from "content-entry";
12
11
  import { transform } from "content-entry-transform";
@@ -82,7 +81,8 @@ export class RPM extends Packager {
82
81
  source: {
83
82
  ...string_attribute_writable,
84
83
  externalName: "Source0",
85
- name: "source"
84
+ name: "source",
85
+ skipEmpty: true
86
86
  },
87
87
  groups: {
88
88
  ...string_attribute_writable,
@@ -115,10 +115,19 @@ export class RPM extends Packager {
115
115
  },
116
116
  dependencies: {
117
117
  ...dependency_attribute_collection_writable,
118
- externalName: "Requires"
118
+ externalName: "Requires",
119
+ skipEmpty: true
120
+ },
121
+ Obsoletes: {
122
+ ...dependency_attribute_collection_writable,
123
+ name: "Obsoletes",
124
+ skipEmpty: true
119
125
  },
120
- Obsoletes: { ...dependency_attribute_collection_writable, name: "Obsoletes" },
121
- Conflicts: { ...dependency_attribute_collection_writable, name: "Conflicts" }
126
+ Conflicts: {
127
+ ...dependency_attribute_collection_writable,
128
+ name: "Conflicts",
129
+ skipEmpty: true
130
+ }
122
131
  };
123
132
 
124
133
  static get workspaceLayout() {