npm-pkgbuild 10.5.1 → 10.6.0

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": "10.5.1",
3
+ "version": "10.6.0",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
@@ -40,7 +40,7 @@
40
40
  "lint:docs": "documentation lint ./src/**/*.mjs"
41
41
  },
42
42
  "dependencies": {
43
- "@npmcli/arborist": "^5.1.1",
43
+ "@npmcli/arborist": "^5.2.0",
44
44
  "aggregate-async-iterator": "^1.1.10",
45
45
  "commander": "^9.2.0",
46
46
  "content-entry": "^5.0.0",
@@ -103,7 +103,10 @@ program
103
103
 
104
104
  Object.assign(
105
105
  properties,
106
- { type: outputFactory.name },
106
+ {
107
+ type: outputFactory.name,
108
+ "user-agent": `npm-pkgbuild-${version}`
109
+ },
107
110
  options.define
108
111
  );
109
112
 
package/src/publish.mjs CHANGED
@@ -20,7 +20,7 @@ export async function publish(fileName, destination, properties) {
20
20
  return;
21
21
  }
22
22
 
23
- const publish = analysePublish(destination, properties);
23
+ const publish = analysePublish(Object.assign({}, destination), properties);
24
24
 
25
25
  const url = publish.url + "/" + basename(fileName);
26
26
 
@@ -28,7 +28,7 @@ export async function publish(fileName, destination, properties) {
28
28
 
29
29
  if (publish.scheme === "http:" || publish.scheme === "https:") {
30
30
  const headers = {
31
- "user-agent": "npm-pkgbuild"
31
+ "user-agent": properties["user-agent"] || "npm-pkgbuild"
32
32
  };
33
33
 
34
34
  if (publish.user) {