zarro 1.131.0 → 1.132.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.
@@ -82,7 +82,7 @@
82
82
  pushFlag(args, opts.noRestore, "--no-restore");
83
83
  pushFlag(args, opts.selfContained, "--self-contained");
84
84
  pushVersionSuffix(args, opts);
85
- pushProperties(args, opts);
85
+ pushMsbuildProperties(args, opts);
86
86
  pushAdditionalArgs(args, opts);
87
87
  return runDotNetWith(args, opts);
88
88
  }
@@ -98,25 +98,32 @@
98
98
  pushNoBuild(args, opts);
99
99
  pushNoRestore(args, opts);
100
100
  pushLoggers(args, opts.loggers);
101
- pushProperties(args, opts);
101
+ pushMsbuildProperties(args, opts);
102
102
  pushEnvVars(args, opts.env);
103
103
  pushAdditionalArgs(args, opts);
104
104
  return runDotNetWith(args, opts);
105
105
  }
106
106
  async function pack(opts) {
107
+ validate(opts);
108
+ const copy = Object.assign(Object.assign({}, opts), { msbuildProperties: Object.assign({}, opts.msbuildProperties) });
107
109
  const args = [
108
110
  "pack",
109
- q(opts.target)
111
+ q(copy.target)
110
112
  ];
111
- pushVerbosity(args, opts);
112
- pushOutput(args, opts);
113
- pushConfiguration(args, opts);
114
- pushNoBuild(args, opts);
115
- pushFlag(args, opts.includeSymbols, "--include-symbols");
116
- pushFlag(args, opts.includeSource, "--include-source");
117
- pushNoRestore(args, opts);
118
- pushVersionSuffix(args, opts);
119
- return runDotNetWith(args, opts);
113
+ pushVerbosity(args, copy);
114
+ pushOutput(args, copy);
115
+ pushConfiguration(args, copy);
116
+ pushNoBuild(args, copy);
117
+ pushFlag(args, copy.includeSymbols, "--include-symbols");
118
+ pushFlag(args, copy.includeSource, "--include-source");
119
+ pushNoRestore(args, copy);
120
+ pushVersionSuffix(args, copy);
121
+ if (copy.nuspec) {
122
+ copy.msbuildProperties = copy.msbuildProperties || {};
123
+ copy.msbuildProperties["NuspecFile"] = copy.nuspec;
124
+ }
125
+ pushMsbuildProperties(args, copy);
126
+ return runDotNetWith(args, copy);
120
127
  }
121
128
  function pushCommonBuildArgs(args, opts) {
122
129
  pushVerbosity(args, opts);
@@ -172,12 +179,12 @@
172
179
  throw e;
173
180
  }
174
181
  }
175
- function pushProperties(args, opts) {
182
+ function pushMsbuildProperties(args, opts) {
176
183
  if (!opts.msbuildProperties) {
177
184
  return;
178
185
  }
179
186
  for (const key of Object.keys(opts.msbuildProperties)) {
180
- args.push(`/p:${q(key)}=${q(opts.msbuildProperties[key])}`);
187
+ args.push(`-p:${q(key)}=${q(opts.msbuildProperties[key])}`);
181
188
  }
182
189
  }
183
190
  function pushEnvVars(args, env) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "zarro",
3
- "version": "1.131.0",
3
+ "version": "1.132.0",
4
4
  "description": "Some glue to make gulp easier, perhaps even zero- or close-to-zero-conf",
5
5
  "bin": {
6
6
  "zarro": "./index.js"
package/types.d.ts CHANGED
@@ -572,6 +572,7 @@ declare global {
572
572
  includeSource?: boolean;
573
573
  noRestore?: boolean;
574
574
  versionSuffix?: string;
575
+ nuspec?: string;
575
576
  }
576
577
 
577
578
  interface DotNetBuildOptions extends DotNetCommonBuildOptions {