Skip to content
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 10 additions & 10 deletions Tasks/NuGetRestoreV1/Tests/L0.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ describe('NuGetRestore Suite', function () {

after(() => {
});
it('restore single solution', (done: MochaDone) => {
it('restore single solution', (done: Mocha.Done) => {
this.timeout(1000);

let tp = path.join(__dirname, 'singlesln.js')
Expand All @@ -24,7 +24,7 @@ describe('NuGetRestore Suite', function () {
done();
});

it('restore single solution with CredentialProvider', (done: MochaDone) => {
it('restore single solution with CredentialProvider', (done: Mocha.Done) => {
this.timeout(1000);

let tp = path.join(__dirname, 'singleslnCredentialProvider.js')
Expand All @@ -42,7 +42,7 @@ describe('NuGetRestore Suite', function () {
done();
});

it('restore packages.config', (done: MochaDone) => {
it('restore packages.config', (done: Mocha.Done) => {
this.timeout(1000);

let tp = path.join(__dirname, 'pkgconfig.js')
Expand All @@ -58,7 +58,7 @@ describe('NuGetRestore Suite', function () {
done();
});

it('restore single solution with noCache', (done: MochaDone) => {
it('restore single solution with noCache', (done: Mocha.Done) => {
this.timeout(1000);

let tp = path.join(__dirname, 'singleslnNoCache.js')
Expand All @@ -74,7 +74,7 @@ describe('NuGetRestore Suite', function () {
done();
});

it('restore single solution with nuget config', (done: MochaDone) => {
it('restore single solution with nuget config', (done: Mocha.Done) => {
this.timeout(1000);

let tp = path.join(__dirname, 'singleslnConfigFile.js')
Expand All @@ -91,7 +91,7 @@ describe('NuGetRestore Suite', function () {
done();
});

it('restore multiple solutions', (done: MochaDone) => {
it('restore multiple solutions', (done: Mocha.Done) => {
this.timeout(1000);

let tp = path.join(__dirname, 'multiplesln.js')
Expand All @@ -108,7 +108,7 @@ describe('NuGetRestore Suite', function () {
done();
});

it('restore single solution mono', (done: MochaDone) => {
it('restore single solution mono', (done: Mocha.Done) => {
this.timeout(1000);

let tp = path.join(__dirname, 'singleslnMono.js')
Expand All @@ -123,7 +123,7 @@ describe('NuGetRestore Suite', function () {
done();
});

it('restore select vsts source', (done: MochaDone) => {
it('restore select vsts source', (done: Mocha.Done) => {
this.timeout(1000);

let tp = path.join(__dirname, 'selectSourceVsts.js')
Expand All @@ -138,7 +138,7 @@ describe('NuGetRestore Suite', function () {
done();
});

it('restore select nuget.org source', (done: MochaDone) => {
it('restore select nuget.org source', (done: Mocha.Done) => {
this.timeout(1000);

let tp = path.join(__dirname, 'selectSourceNuGetOrg.js')
Expand All @@ -153,7 +153,7 @@ describe('NuGetRestore Suite', function () {
done();
});

it('restore select multiple sources', (done: MochaDone) => {
it('restore select multiple sources', (done: Mocha.Done) => {
this.timeout(1000);

let tp = path.join(__dirname, 'selectSourceMultiple.js')
Expand Down
14 changes: 7 additions & 7 deletions Tasks/NuGetRestoreV1/Tests/NugetMockHelper.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import tmrm = require('azure-pipelines-task-lib/mock-run');
import VersionInfoVersion from 'packaging-common/pe-parser/VersionInfoVersion'
import {VersionInfo} from 'packaging-common/pe-parser/VersionResource'
import VersionInfoVersion from 'azure-pipelines-tasks-packaging-common/pe-parser/VersionInfoVersion'
import {VersionInfo} from 'azure-pipelines-tasks-packaging-common/pe-parser/VersionResource'

import * as pkgMock from 'packaging-common/Tests/MockHelper';
import * as pkgMock from 'azure-pipelines-tasks-packaging-common/Tests/MockHelper';

export class NugetMockHelper {
private defaultNugetVersion = '3.3.0';
Expand Down Expand Up @@ -30,7 +30,7 @@ export class NugetMockHelper {
}

public registerNugetToolGetterMock() {
this.tmr.registerMock('packaging-common/nuget/NuGetToolGetter', {
this.tmr.registerMock('azure-pipelines-tasks-packaging-common/nuget/NuGetToolGetter', {
getNuGet: function(versionSpec) {
return "c:\\from\\tool\\installer\\nuget.exe";
},
Expand All @@ -50,7 +50,7 @@ export class NugetMockHelper {
}

private registerNugetVersionMockInternal(productVersion: string, versionInfoVersion: number[]) {
this.tmr.registerMock('packaging-common/pe-parser/index', {
this.tmr.registerMock('azure-pipelines-tasks-packaging-common/pe-parser/index', {
getFileVersionInfoAsync: function(nuGetExePath) {
let result: VersionInfo = { strings: {} };
result.fileVersion = new VersionInfoVersion(versionInfoVersion[0], versionInfoVersion[1], versionInfoVersion[2], versionInfoVersion[3]);
Expand All @@ -62,7 +62,7 @@ export class NugetMockHelper {
}

public registerNugetUtilityMock(projectFile: string[]) {
this.tmr.registerMock('packaging-common/nuget/Utility', {
this.tmr.registerMock('azure-pipelines-tasks-packaging-common/nuget/Utility', {
resolveFilterSpec: function(filterSpec, basePath?, allowEmptyMatch?) {
return projectFile;
},
Expand Down Expand Up @@ -94,7 +94,7 @@ export class NugetMockHelper {

public registerNugetConfigMock() {
var nchm = require('./NuGetConfigHelper-mock');
this.tmr.registerMock('packaging-common/nuget/NuGetConfigHelper', nchm);
this.tmr.registerMock('azure-pipelines-tasks-packaging-common/nuget/NuGetConfigHelper', nchm);
}

public registerToolRunnerMock() {
Expand Down
2 changes: 1 addition & 1 deletion Tasks/NuGetRestoreV1/Tests/singleslnMono.ts
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ process.env['ENDPOINT_URL_SYSTEMVSSCONNECTION'] = "https://example.visualstudio.
process.env['SYSTEM_DEFAULTWORKINGDIRECTORY'] = "~/myagent/_work/1/s";
process.env['SYSTEM_TEAMFOUNDATIONCOLLECTIONURI'] = "https://example.visualstudio.com/defaultcollection";

tmr.registerMock('packaging-common/nuget/Utility', {
tmr.registerMock('azure-pipelines-tasks-packaging-common/nuget/Utility', {
resolveFilterSpec: function(filterSpec, basePath?, allowEmptyMatch?) {
return ["~/myagent/_work/1/s/single.sln"];
},
Expand Down
26 changes: 0 additions & 26 deletions Tasks/NuGetRestoreV1/make.json
Original file line number Diff line number Diff line change
@@ -1,30 +1,4 @@
{
"common": [
{
"module": "../Common/utility-common",
"type": "node",
"compile": true
},
{
"module": "../Common/packaging-common",
"type": "node",
"compile": true
}
],
"rm": [
{
"items": [
"node_modules/packaging-common/node_modules/azure-pipelines-task-lib"
],
"options": "-Rf"
},
{
"items": [
"node_modules/utility-common/node_modules/vsts-task-lib"
],
"options": "-Rf"
}
],
"externals": {
"archivePackages": [
{
Expand Down
22 changes: 11 additions & 11 deletions Tasks/NuGetRestoreV1/nugetinstaller.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,17 @@ import * as Q from "q";
import * as tl from "azure-pipelines-task-lib/task";
import {IExecOptions} from "azure-pipelines-task-lib/toolrunner";

import * as auth from "packaging-common/nuget/Authentication";
import INuGetCommandOptions from "packaging-common/nuget/INuGetCommandOptions";
import {IPackageSource, NuGetConfigHelper} from "packaging-common/nuget/NuGetConfigHelper";
import nuGetGetter = require("packaging-common/nuget/NuGetToolGetter");
import * as ngToolRunner from "packaging-common/nuget/NuGetToolRunner";
import * as nutil from "packaging-common/nuget/Utility";
import peParser = require('packaging-common/pe-parser/index');
import {VersionInfo} from "packaging-common/pe-parser/VersionResource";
import * as pkgLocationUtils from "packaging-common/locationUtilities";
import { getProjectAndFeedIdFromInputParam } from "packaging-common/util";
import * as telemetry from "utility-common/telemetry";
import * as auth from "azure-pipelines-tasks-packaging-common/nuget/Authentication";
import INuGetCommandOptions from "azure-pipelines-tasks-packaging-common/nuget/INuGetCommandOptions";
import {IPackageSource, NuGetConfigHelper} from "azure-pipelines-tasks-packaging-common/nuget/NuGetConfigHelper";
import nuGetGetter = require("azure-pipelines-tasks-packaging-common/nuget/NuGetToolGetter");
import * as ngToolRunner from "azure-pipelines-tasks-packaging-common/nuget/NuGetToolRunner";
import * as nutil from "azure-pipelines-tasks-packaging-common/nuget/Utility";
import peParser = require('azure-pipelines-tasks-packaging-common/pe-parser/index');
import {VersionInfo} from "azure-pipelines-tasks-packaging-common/pe-parser/VersionResource";
import * as pkgLocationUtils from "azure-pipelines-tasks-packaging-common/locationUtilities";
import { getProjectAndFeedIdFromInputParam } from "azure-pipelines-tasks-packaging-common/util";
import * as telemetry from "azure-pipelines-tasks-utility-common/telemetry";

const NUGET_ORG_V2_URL: string = "https://www.nuget.org/api/v2/";
const NUGET_ORG_V3_URL: string = "https://api.nuget.org/v3/index.json";
Expand Down
Loading