zarro 1.170.22 → 1.170.26
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.
|
@@ -397,10 +397,10 @@
|
|
|
397
397
|
path: absoluteNuspecPath,
|
|
398
398
|
version: await readNuspecVersion(absoluteNuspecPath)
|
|
399
399
|
};
|
|
400
|
-
log.warn(`
|
|
401
|
-
WARNING: 'dotnet pack' ignores --version-suffix when a nuspec file is provided.
|
|
402
|
-
The version in '${copy.nuspec}' will be temporarily set to ${opts.versionSuffix} whilst
|
|
403
|
-
packing and reverted later.
|
|
400
|
+
log.warn(`
|
|
401
|
+
WARNING: 'dotnet pack' ignores --version-suffix when a nuspec file is provided.
|
|
402
|
+
The version in '${copy.nuspec}' will be temporarily set to ${opts.versionSuffix} whilst
|
|
403
|
+
packing and reverted later.
|
|
404
404
|
`.trim());
|
|
405
405
|
await updateNuspecVersion(absoluteNuspecPath, opts.versionSuffix);
|
|
406
406
|
// TODO: hook into "after dotnet run" to revert
|
|
@@ -766,6 +766,10 @@ WARNING: 'dotnet pack' ignores --version-suffix when a nuspec file is provided.
|
|
|
766
766
|
pushFlag(args, opts.exactMatch, "--exact-match");
|
|
767
767
|
pushFlag(args, opts.preRelease, "--prerelease");
|
|
768
768
|
pushIfSet(args, opts.configFile, "--configfile");
|
|
769
|
+
const skip = opts.skip === undefined ? 0 : opts.skip;
|
|
770
|
+
const take = opts.take === undefined ? 1024 : opts.take;
|
|
771
|
+
args.push("--skip", `${skip}`);
|
|
772
|
+
args.push("--take", `${take}`);
|
|
769
773
|
args.push("--format", "json");
|
|
770
774
|
if (opts.search) {
|
|
771
775
|
args.push(opts.search);
|
|
@@ -779,7 +783,6 @@ WARNING: 'dotnet pack' ignores --version-suffix when a nuspec file is provided.
|
|
|
779
783
|
}
|
|
780
784
|
const allText = stdout.join(" "), parsed = JSON.parse(allText);
|
|
781
785
|
const finalResult = [];
|
|
782
|
-
const limit = opts.take || Number.MAX_VALUE;
|
|
783
786
|
for (const sourceResult of parsed.searchResult) {
|
|
784
787
|
for (const pkg of sourceResult.packages) {
|
|
785
788
|
finalResult.push({
|
|
@@ -796,12 +799,12 @@ WARNING: 'dotnet pack' ignores --version-suffix when a nuspec file is provided.
|
|
|
796
799
|
// 2. dotnet returns results in ascending version order
|
|
797
800
|
// - where the most useful, especially for paging, is reverse-ordered
|
|
798
801
|
finalResult.sort((a, b) => a.version.compareWith(b.version)).reverse();
|
|
799
|
-
|
|
802
|
+
// some registries don't honor paging (looking at you, GitHub)
|
|
800
803
|
if (skip > 0) {
|
|
801
804
|
finalResult.splice(0, skip);
|
|
802
805
|
}
|
|
803
|
-
if (finalResult.length >
|
|
804
|
-
finalResult.splice(
|
|
806
|
+
if (finalResult.length > take) {
|
|
807
|
+
finalResult.splice(take);
|
|
805
808
|
}
|
|
806
809
|
return finalResult;
|
|
807
810
|
}
|
|
@@ -727,9 +727,14 @@
|
|
|
727
727
|
});
|
|
728
728
|
env.register({
|
|
729
729
|
name: "NUGET_PUSH_SOURCE",
|
|
730
|
-
help: "
|
|
730
|
+
help: "Specify nuget source to push to. Will fall back on NUGET_SOURCE or first of NUGET_SOURCES.",
|
|
731
731
|
default: env.resolve("NUGET_SOURCE")
|
|
732
732
|
});
|
|
733
|
+
env.register({
|
|
734
|
+
name: "PACKAGE_REGISTRY",
|
|
735
|
+
help: "Specify npm source to push to. Will default to npmjs.com",
|
|
736
|
+
default: "nuget.org"
|
|
737
|
+
});
|
|
733
738
|
debug("-- env registration complete --");
|
|
734
739
|
};
|
|
735
740
|
})();
|
package/package.json
CHANGED
package/types.d.ts
CHANGED
|
@@ -446,6 +446,7 @@ declare global {
|
|
|
446
446
|
"TAG" |
|
|
447
447
|
"GIT_TAG" |
|
|
448
448
|
"GIT_VERSION_INCREMENT_MESSAGE" |
|
|
449
|
+
"PACKAGE_REGISTRY" |
|
|
449
450
|
string; // allow client-side extension, encourage usage of env.associate & env.register
|
|
450
451
|
|
|
451
452
|
type NumericEnvVar =
|
|
@@ -641,6 +642,7 @@ declare global {
|
|
|
641
642
|
TAG: StringEnvVar;
|
|
642
643
|
GIT_TAG: StringEnvVar;
|
|
643
644
|
GIT_VERSION_INCREMENT_MESSAGE: StringEnvVar;
|
|
645
|
+
PACKAGE_REGISTRY: StringEnvVar;
|
|
644
646
|
|
|
645
647
|
ENABLE_NUGET_PARALLEL_PROCESSING: FlagEnvVar;
|
|
646
648
|
BUILD_SHOW_INFO: FlagEnvVar;
|