npm-pkgbuild 20.8.0 → 20.8.1

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": "20.8.0",
3
+ "version": "20.8.1",
4
4
  "publishConfig": {
5
5
  "access": "public",
6
6
  "provenance": false
@@ -213,15 +213,12 @@ export class Packager {
213
213
  * @param {Object} options
214
214
  * @param {string} [options.staging]
215
215
  * @param {string} [options.destination]
216
- * @param {boolean} [options.noPreserve] do not preserve (tmp) directories
217
216
  * @param {Object} [publishingDetail]
218
217
  * @returns {Promise<{properties:Object, destination:string, tmpdir:string, staging:string}>}
219
218
  */
220
219
  async prepare(options, publishingDetail) {
221
- if (!options.noPreserve) {
222
- if (this.#prepared) {
223
- return this.#prepared;
224
- }
220
+ if (this.#prepared) {
221
+ return this.#prepared;
225
222
  }
226
223
 
227
224
  const tmpdir = await this.tmpdir;
@@ -255,9 +252,7 @@ export class Packager {
255
252
  await mkdir(out.destination, mdo);
256
253
  }
257
254
 
258
- if (!options.noPreserve) {
259
- this.#prepared = out;
260
- }
255
+ this.#prepared = out;
261
256
  return out;
262
257
  }
263
258
 
@@ -61,30 +61,37 @@ export class RPM extends Packager {
61
61
  * @see https://rpm-packaging-guide.github.io
62
62
  */
63
63
  static attributes = {
64
- Name: pkgbuild_name_attribute,
65
- Summary: pkgbuild_description_attribute,
66
- License: { ...string_attribute, alias: "license", mandatory: true },
67
- Version: pkgbuild_version_attribute,
64
+ Name: { ...pkgbuild_name_attribute, name: "Name" },
65
+ Summary: { ...pkgbuild_description_attribute, name: "Summary" },
66
+ License: {
67
+ ...string_attribute,
68
+ name: "License",
69
+ alias: "license",
70
+ mandatory: true
71
+ },
72
+ Version: { ...pkgbuild_version_attribute, name: "Version" },
68
73
  Release: {
69
74
  ...integer_attribute,
75
+ name: "Release",
70
76
  alias: "release",
71
77
  default: 1,
72
78
  mandatory: true
73
79
  },
74
- Source0: { ...string_attribute, alias: "source" },
75
- Group: { ...string_attribute, alias: "groups" },
76
- Packager: { ...string_attribute, alias: "maintainer" },
77
- Vendor: { ...string_attribute, alias: "vendor" },
80
+ Source0: { ...string_attribute, name: "Source0", alias: "source" },
81
+ Group: { ...string_attribute, name: "Group", alias: "groups" },
82
+ Packager: { ...string_attribute, name: "Packager", alias: "maintainer" },
83
+ Vendor: { ...string_attribute, name: "Vendor", alias: "vendor" },
78
84
  BuildArch: {
79
85
  ...string_attribute,
86
+ name: "BuildArch",
80
87
  alias: "arch",
81
88
  default: "noarch",
82
89
  mandatory: true
83
90
  },
84
- URL: { ...url_attribute, alias: "homepage" },
85
- Requires: string_collection_attribute_writable,
86
- Obsoletes: string_collection_attribute_writable,
87
- Conflicts: string_collection_attribute_writable
91
+ URL: { ...url_attribute, name: "URL", alias: "homepage" },
92
+ Requires: { ...string_collection_attribute_writable, name: "Requires" },
93
+ Obsoletes: { ...string_collection_attribute_writable, name: "Obsoletes" },
94
+ Conflicts: { ...string_collection_attribute_writable, name: "Conflicts" }
88
95
  };
89
96
 
90
97
  static get workspaceLayout() {