From 4099e059d9d143afa170df965050ef1f9a5a97c0 Mon Sep 17 00:00:00 2001 From: Aleksandr Levochkin <107044793+aleksandrlevochkin@users.noreply.github.com> Date: Mon, 14 Aug 2023 16:47:05 +0200 Subject: [PATCH] refactor: remove Q library from Powershell SDK in favor of native promises (#944) * Removed Q library in favor of native promises from pwsh subfolder * Changed function name inside a block comment to prevent it from being parsed in a test --- powershell/Tests/L0/_suite.ts | 2 - powershell/Tests/lib/psRunner.ts | 17 +- .../VstsTaskSdk/LocalizationFunctions.ps1 | 4 +- .../resources.resjson/en-US/resources.resjson | 4 +- powershell/definitions/Q.d.ts | 386 ------------------ powershell/make.js | 4 +- powershell/package-lock.json | 6 - powershell/package.json | 1 - 8 files changed, 13 insertions(+), 411 deletions(-) delete mode 100644 powershell/definitions/Q.d.ts diff --git a/powershell/Tests/L0/_suite.ts b/powershell/Tests/L0/_suite.ts index 64c97c981..27b9bd0eb 100644 --- a/powershell/Tests/L0/_suite.ts +++ b/powershell/Tests/L0/_suite.ts @@ -1,8 +1,6 @@ /// /// -/// -import Q = require('q'); import assert = require('assert'); import psRunner = require('../lib/psRunner'); import path = require('path'); diff --git a/powershell/Tests/lib/psRunner.ts b/powershell/Tests/lib/psRunner.ts index 4a1dc3c1d..ec143d5f6 100644 --- a/powershell/Tests/lib/psRunner.ts +++ b/powershell/Tests/lib/psRunner.ts @@ -1,7 +1,5 @@ /// -/// -import Q = require('q'); import events = require('events'); import fs = require('fs'); import path = require('path'); @@ -21,7 +19,7 @@ class PSEngineRunner extends events.EventEmitter { private _childProcess: child.ChildProcess; private _errors: string[]; - private _runDeferred: Q.Deferred; + private _runDeferred: Promise; public stderr: string; public stdout: string; @@ -39,7 +37,7 @@ class PSEngineRunner extends events.EventEmitter { .then(() => { done(); }) - .fail((err) => { + .catch((err) => { done(err); }); } @@ -50,7 +48,6 @@ class PSEngineRunner extends events.EventEmitter { } this.emit('starting'); - var defer = Q.defer(); var powershell = shell.which('powershell.exe').stdout; this._childProcess = child.spawn( powershell, // command @@ -74,9 +71,9 @@ class PSEngineRunner extends events.EventEmitter { // Check for special ouput indicating end of test. if (('' + data).indexOf('_END_OF_TEST_ce10a77a_') >= 0) { if (this._errors.length > 0) { - this._runDeferred.reject(this._errors.join('\n')); + this._runDeferred = Promise.reject(this._errors.join('\n')); } else { - this._runDeferred.resolve(null); + this._runDeferred = Promise.resolve(); } } else if (data != '\n') { if (('' + data).match(/##vso\[task.logissue .*type=error/)) { @@ -98,12 +95,12 @@ class PSEngineRunner extends events.EventEmitter { }); } - private runPromise(psPath: string): Q.Promise { + private runPromise(psPath: string): Promise { this.emit('running test'); this._errors = []; - this._runDeferred = Q.defer(); + this._runDeferred = Promise.resolve(); this._childProcess.stdin.write(psPath + '\n') - return >this._runDeferred.promise; + return this._runDeferred; } } diff --git a/powershell/VstsTaskSdk/LocalizationFunctions.ps1 b/powershell/VstsTaskSdk/LocalizationFunctions.ps1 index 6f3b6bb06..b5549700f 100644 --- a/powershell/VstsTaskSdk/LocalizationFunctions.ps1 +++ b/powershell/VstsTaskSdk/LocalizationFunctions.ps1 @@ -60,10 +60,10 @@ function Get-LocString { <# .SYNOPSIS -Imports resource strings for use with Get-VstsLocString. +Imports resource strings for use with GetVstsLocString. .DESCRIPTION -Imports resource strings for use with Get-VstsLocString. The imported strings are stored in an internal resource string dictionary. Optionally, if a separate resource file for the current culture exists, then the localized strings from that file then imported (overlaid) into the same internal resource string dictionary. +Imports resource strings for use with GetVstsLocString. The imported strings are stored in an internal resource string dictionary. Optionally, if a separate resource file for the current culture exists, then the localized strings from that file then imported (overlaid) into the same internal resource string dictionary. Resource strings from the SDK are prefixed with "PSLIB_". This prefix should be avoided for custom resource strings. diff --git a/powershell/VstsTaskSdk/Strings/resources.resjson/en-US/resources.resjson b/powershell/VstsTaskSdk/Strings/resources.resjson/en-US/resources.resjson index fb2fa4e2a..66c17bc8d 100644 --- a/powershell/VstsTaskSdk/Strings/resources.resjson/en-US/resources.resjson +++ b/powershell/VstsTaskSdk/Strings/resources.resjson/en-US/resources.resjson @@ -6,7 +6,7 @@ "loc.messages.PSLIB_EnumeratingSubdirectoriesFailedForPath0": "Enumerating subdirectories failed for path: '{0}'", "loc.messages.PSLIB_FileNotFound0": "File not found: '{0}'", "loc.messages.PSLIB_Input0": "'{0}' input", - "loc.messages.PSLIB_InvalidPattern0": "Path cannot end with a directory separator character: '{0}'", + "loc.messages.PSLIB_InvalidPattern0": "Invalid pattern: '{0}'", "loc.messages.PSLIB_LeafPathNotFound0": "Leaf path not found: '{0}'", "loc.messages.PSLIB_PathLengthNotReturnedFor0": "Path normalization/expansion failed. The path length was not returned by the Kernel32 subsystem for: '{0}'", "loc.messages.PSLIB_PathNotFound0": "Path not found: '{0}'", @@ -15,4 +15,4 @@ "loc.messages.PSLIB_StringFormatFailed": "String format failed.", "loc.messages.PSLIB_StringResourceKeyNotFound0": "String resource key not found: '{0}'", "loc.messages.PSLIB_TaskVariable0": "'{0}' task variable" -} +} \ No newline at end of file diff --git a/powershell/definitions/Q.d.ts b/powershell/definitions/Q.d.ts deleted file mode 100644 index f47aa4f42..000000000 --- a/powershell/definitions/Q.d.ts +++ /dev/null @@ -1,386 +0,0 @@ -// Type definitions for Q -// Project: https://github.com/kriskowal/q -// Definitions by: Barrie Nemetchek , Andrew Gaspar , John Reilly -// Definitions: https://github.com/borisyankov/DefinitelyTyped - -/** - * If value is a Q promise, returns the promise. - * If value is a promise from another library it is coerced into a Q promise (where possible). - */ -declare function Q(promise: Q.IPromise): Q.Promise; -/** - * If value is not a promise, returns a promise that is fulfilled with value. - */ -declare function Q(value: T): Q.Promise; - -declare module Q { - interface IPromise { - then(onFulfill: (value: T) => IPromise, onReject?: (reason: any) => IPromise): IPromise; - then(onFulfill: (value: T) => IPromise, onReject?: (reason: any) => U): IPromise; - then(onFulfill: (value: T) => U, onReject?: (reason: any) => IPromise): IPromise; - then(onFulfill: (value: T) => U, onReject?: (reason: any) => U): IPromise; - } - - interface Deferred { - promise: Promise; - resolve(value: T): void; - reject(reason: any): void; - notify(value: any): void; - makeNodeResolver(): (reason: any, value: T) => void; - } - - interface Promise { - /** - * Like a finally clause, allows you to observe either the fulfillment or rejection of a promise, but to do so without modifying the final value. This is useful for collecting resources regardless of whether a job succeeded, like closing a database connection, shutting a server down, or deleting an unneeded key from an object. - - * finally returns a promise, which will become resolved with the same fulfillment value or rejection reason as promise. However, if callback returns a promise, the resolution of the returned promise will be delayed until the promise returned from callback is finished. - */ - fin(finallyCallback: () => any): Promise; - /** - * Like a finally clause, allows you to observe either the fulfillment or rejection of a promise, but to do so without modifying the final value. This is useful for collecting resources regardless of whether a job succeeded, like closing a database connection, shutting a server down, or deleting an unneeded key from an object. - - * finally returns a promise, which will become resolved with the same fulfillment value or rejection reason as promise. However, if callback returns a promise, the resolution of the returned promise will be delayed until the promise returned from callback is finished. - */ - finally(finallyCallback: () => any): Promise; - - /** - * The then method from the Promises/A+ specification, with an additional progress handler. - */ - then(onFulfill: (value: T) => IPromise, onReject?: (reason: any) => IPromise, onProgress?: Function): Promise; - /** - * The then method from the Promises/A+ specification, with an additional progress handler. - */ - then(onFulfill: (value: T) => IPromise, onReject?: (reason: any) => U, onProgress?: Function): Promise; - /** - * The then method from the Promises/A+ specification, with an additional progress handler. - */ - then(onFulfill: (value: T) => U, onReject?: (reason: any) => IPromise, onProgress?: Function): Promise; - /** - * The then method from the Promises/A+ specification, with an additional progress handler. - */ - then(onFulfill: (value: T) => U, onReject?: (reason: any) => U, onProgress?: Function): Promise; - - /** - * Like then, but "spreads" the array into a variadic fulfillment handler. If any of the promises in the array are rejected, instead calls onRejected with the first rejected promise's rejection reason. - * - * This is especially useful in conjunction with all - */ - spread(onFulfilled: Function, onRejected?: Function): Promise; - - fail(onRejected: (reason: any) => IPromise): Promise; - fail(onRejected: (reason: any) => U): Promise; - /** - * A sugar method, equivalent to promise.then(undefined, onRejected). - */ - catch(onRejected: (reason: any) => U): Promise; - /** - * A sugar method, equivalent to promise.then(undefined, onRejected). - */ - catch(onRejected: (reason: any) => IPromise): Promise; - - /** - * A sugar method, equivalent to promise.then(undefined, undefined, onProgress). - */ - progress(onProgress: (progress: any) => any): Promise; - - /** - * Much like then, but with different behavior around unhandled rejection. If there is an unhandled rejection, either because promise is rejected and no onRejected callback was provided, or because onFulfilled or onRejected threw an error or returned a rejected promise, the resulting rejection reason is thrown as an exception in a future turn of the event loop. - * - * This method should be used to terminate chains of promises that will not be passed elsewhere. Since exceptions thrown in then callbacks are consumed and transformed into rejections, exceptions at the end of the chain are easy to accidentally, silently ignore. By arranging for the exception to be thrown in a future turn of the event loop, so that it won't be caught, it causes an onerror event on the browser window, or an uncaughtException event on Node.js's process object. - * - * Exceptions thrown by done will have long stack traces, if Q.longStackSupport is set to true. If Q.onerror is set, exceptions will be delivered there instead of thrown in a future turn. - * - * The Golden Rule of done vs. then usage is: either return your promise to someone else, or if the chain ends with you, call done to terminate it. - */ - done(onFulfilled?: (value: T) => any, onRejected?: (reason: any) => any, onProgress?: (progress: any) => any): void; - - /** - * If callback is a function, assumes it's a Node.js-style callback, and calls it as either callback(rejectionReason) when/if promise becomes rejected, or as callback(null, fulfillmentValue) when/if promise becomes fulfilled. If callback is not a function, simply returns promise. - */ - nodeify(callback: (reason: any, value: any) => void): Promise; - - /** - * Returns a promise to get the named property of an object. Essentially equivalent to - * - * promise.then(function (o) { - * return o[propertyName]; - * }); - */ - get(propertyName: String): Promise; - set(propertyName: String, value: any): Promise; - delete(propertyName: String): Promise; - /** - * Returns a promise for the result of calling the named method of an object with the given array of arguments. The object itself is this in the function, just like a synchronous method call. Essentially equivalent to - * - * promise.then(function (o) { - * return o[methodName].apply(o, args); - * }); - */ - post(methodName: String, args: any[]): Promise; - /** - * Returns a promise for the result of calling the named method of an object with the given variadic arguments. The object itself is this in the function, just like a synchronous method call. - */ - invoke(methodName: String, ...args: any[]): Promise; - fapply(args: any[]): Promise; - fcall(...args: any[]): Promise; - - /** - * Returns a promise for an array of the property names of an object. Essentially equivalent to - * - * promise.then(function (o) { - * return Object.keys(o); - * }); - */ - keys(): Promise; - - /** - * A sugar method, equivalent to promise.then(function () { return value; }). - */ - thenResolve(value: U): Promise; - /** - * A sugar method, equivalent to promise.then(function () { throw reason; }). - */ - thenReject(reason: any): Promise; - timeout(ms: number, message?: string): Promise; - /** - * Returns a promise that will have the same result as promise, but will only be fulfilled or rejected after at least ms milliseconds have passed. - */ - delay(ms: number): Promise; - - /** - * Returns whether a given promise is in the fulfilled state. When the static version is used on non-promises, the result is always true. - */ - isFulfilled(): boolean; - /** - * Returns whether a given promise is in the rejected state. When the static version is used on non-promises, the result is always false. - */ - isRejected(): boolean; - /** - * Returns whether a given promise is in the pending state. When the static version is used on non-promises, the result is always false. - */ - isPending(): boolean; - - valueOf(): any; - - /** - * Returns a "state snapshot" object, which will be in one of three forms: - * - * - { state: "pending" } - * - { state: "fulfilled", value: } - * - { state: "rejected", reason: } - */ - inspect(): PromiseState; - } - - interface PromiseState { - /** - * "fulfilled", "rejected", "pending" - */ - state: string; - value?: T; - reason?: any; - } - - // If no value provided, returned promise will be of void type - export function when(): Promise; - - // if no fulfill, reject, or progress provided, returned promise will be of same type - export function when(value: IPromise): Promise; - export function when(value: T): Promise; - - // If a non-promise value is provided, it will not reject or progress - export function when(value: T, onFulfilled: (val: T) => IPromise): Promise; - export function when(value: T, onFulfilled: (val: T) => U): Promise; - - export function when(value: IPromise, onFulfilled: (val: T) => IPromise, onRejected?: (reason: any) => IPromise, onProgress?: (progress: any) => any): Promise; - export function when(value: IPromise, onFulfilled: (val: T) => IPromise, onRejected?: (reason: any) => U, onProgress?: (progress: any) => any): Promise; - export function when(value: IPromise, onFulfilled: (val: T) => U, onRejected?: (reason: any) => IPromise, onProgress?: (progress: any) => any): Promise; - export function when(value: IPromise, onFulfilled: (val: T) => U, onRejected?: (reason: any) => U, onProgress?: (progress: any) => any): Promise; - - //export function try(method: Function, ...args: any[]): Promise; // <- This is broken currently - not sure how to fix. - - export function fbind(method: (...args: any[]) => IPromise, ...args: any[]): (...args: any[]) => Promise; - export function fbind(method: (...args: any[]) => T, ...args: any[]): (...args: any[]) => Promise; - - export function fcall(method: (...args: any[]) => T, ...args: any[]): Promise; - - export function send(obj: any, functionName: string, ...args: any[]): Promise; - export function invoke(obj: any, functionName: string, ...args: any[]): Promise; - export function mcall(obj: any, functionName: string, ...args: any[]): Promise; - - export function denodeify(nodeFunction: Function, ...args: any[]): (...args: any[]) => Promise; - export function nbind(nodeFunction: Function, thisArg: any, ...args: any[]): (...args: any[]) => Promise; - export function nfbind(nodeFunction: Function, ...args: any[]): (...args: any[]) => Promise; - export function nfcall(nodeFunction: Function, ...args: any[]): Promise; - export function nfapply(nodeFunction: Function, args: any[]): Promise; - - export function ninvoke(nodeModule: any, functionName: string, ...args: any[]): Promise; - export function npost(nodeModule: any, functionName: string, args: any[]): Promise; - export function nsend(nodeModule: any, functionName: string, ...args: any[]): Promise; - export function nmcall(nodeModule: any, functionName: string, ...args: any[]): Promise; - - /** - * Returns a promise that is fulfilled with an array containing the fulfillment value of each promise, or is rejected with the same rejection reason as the first promise to be rejected. - */ - export function all(promises: IPromise[]): Promise; - /** - * Returns a promise that is fulfilled with an array containing the fulfillment value of each promise, or is rejected with the same rejection reason as the first promise to be rejected. - */ - export function all(promises: any[]): Promise; - - /** - * Returns a promise that is fulfilled with an array of promise state snapshots, but only after all the original promises have settled, i.e. become either fulfilled or rejected. - */ - export function allSettled(promises: IPromise[]): Promise[]>; - /** - * Returns a promise that is fulfilled with an array of promise state snapshots, but only after all the original promises have settled, i.e. become either fulfilled or rejected. - */ - export function allSettled(promises: any[]): Promise[]>; - - export function allResolved(promises: IPromise[]): Promise[]>; - export function allResolved(promises: any[]): Promise[]>; - - /** - * Like then, but "spreads" the array into a variadic fulfillment handler. If any of the promises in the array are rejected, instead calls onRejected with the first rejected promise's rejection reason. - * This is especially useful in conjunction with all. - */ - export function spread(promises: any[], onFulfilled: (...args: any[]) => IPromise, onRejected?: (reason: any) => IPromise): Promise; - /** - * Like then, but "spreads" the array into a variadic fulfillment handler. If any of the promises in the array are rejected, instead calls onRejected with the first rejected promise's rejection reason. - * This is especially useful in conjunction with all. - */ - export function spread(promises: any[], onFulfilled: (...args: any[]) => IPromise, onRejected?: (reason: any) => U): Promise; - /** - * Like then, but "spreads" the array into a variadic fulfillment handler. If any of the promises in the array are rejected, instead calls onRejected with the first rejected promise's rejection reason. - * This is especially useful in conjunction with all. - */ - export function spread(promises: any[], onFulfilled: (...args: any[]) => U, onRejected?: (reason: any) => IPromise): Promise; - /** - * Like then, but "spreads" the array into a variadic fulfillment handler. If any of the promises in the array are rejected, instead calls onRejected with the first rejected promise's rejection reason. - * This is especially useful in conjunction with all. - */ - export function spread(promises: any[], onFulfilled: (...args: any[]) => U, onRejected?: (reason: any) => U): Promise; - - /** - * Like then, but "spreads" the array into a variadic fulfillment handler. If any of the promises in the array are rejected, instead calls onRejected with the first rejected promise's rejection reason. - * This is especially useful in conjunction with all. - */ - export function spread(promises: IPromise[], onFulfilled: (...args: T[]) => IPromise, onRejected?: (reason: any) => IPromise): Promise; - /** - * Like then, but "spreads" the array into a variadic fulfillment handler. If any of the promises in the array are rejected, instead calls onRejected with the first rejected promise's rejection reason. - * This is especially useful in conjunction with all. - */ - export function spread(promises: IPromise[], onFulfilled: (...args: T[]) => IPromise, onRejected?: (reason: any) => U): Promise; - /** - * Like then, but "spreads" the array into a variadic fulfillment handler. If any of the promises in the array are rejected, instead calls onRejected with the first rejected promise's rejection reason. - * This is especially useful in conjunction with all. - */ - export function spread(promises: IPromise[], onFulfilled: (...args: T[]) => U, onRejected?: (reason: any) => IPromise): Promise; - /** - * Like then, but "spreads" the array into a variadic fulfillment handler. If any of the promises in the array are rejected, instead calls onRejected with the first rejected promise's rejection reason. - * This is especially useful in conjunction with all. - */ - export function spread(promises: IPromise[], onFulfilled: (...args: T[]) => U, onRejected?: (reason: any) => U): Promise; - - /** - * Returns a promise that will have the same result as promise, except that if promise is not fulfilled or rejected before ms milliseconds, the returned promise will be rejected with an Error with the given message. If message is not supplied, the message will be "Timed out after " + ms + " ms". - */ - export function timeout(promise: Promise, ms: number, message?: string): Promise; - - /** - * Returns a promise that will have the same result as promise, but will only be fulfilled or rejected after at least ms milliseconds have passed. - */ - export function delay(promise: Promise, ms: number): Promise; - /** - * Returns a promise that will have the same result as promise, but will only be fulfilled or rejected after at least ms milliseconds have passed. - */ - export function delay(value: T, ms: number): Promise; - /** - * Returns a promise that will be fulfilled with undefined after at least ms milliseconds have passed. - */ - export function delay(ms: number): Promise ; - /** - * Returns whether a given promise is in the fulfilled state. When the static version is used on non-promises, the result is always true. - */ - export function isFulfilled(promise: Promise): boolean; - /** - * Returns whether a given promise is in the rejected state. When the static version is used on non-promises, the result is always false. - */ - export function isRejected(promise: Promise): boolean; - /** - * Returns whether a given promise is in the pending state. When the static version is used on non-promises, the result is always false. - */ - export function isPending(promise: Promise): boolean; - - /** - * Returns a "deferred" object with a: - * promise property - * resolve(value) method - * reject(reason) method - * notify(value) method - * makeNodeResolver() method - */ - export function defer(): Deferred; - - /** - * Returns a promise that is rejected with reason. - */ - export function reject(reason?: any): Promise; - - export function Promise(resolver: (resolve: (val: IPromise) => void , reject: (reason: any) => void , notify: (progress: any) => void ) => void ): Promise; - export function Promise(resolver: (resolve: (val: T) => void , reject: (reason: any) => void , notify: (progress: any) => void ) => void ): Promise; - - /** - * Creates a new version of func that accepts any combination of promise and non-promise values, converting them to their fulfillment values before calling the original func. The returned version also always returns a promise: if func does a return or throw, then Q.promised(func) will return fulfilled or rejected promise, respectively. - * - * This can be useful for creating functions that accept either promises or non-promise values, and for ensuring that the function always returns a promise even in the face of unintentional thrown exceptions. - */ - export function promised(callback: (...args: any[]) => T): (...args: any[]) => Promise; - - /** - * Returns whether the given value is a Q promise. - */ - export function isPromise(object: any): boolean; - /** - * Returns whether the given value is a promise (i.e. it's an object with a then function). - */ - export function isPromiseAlike(object: any): boolean; - /** - * Returns whether a given promise is in the pending state. When the static version is used on non-promises, the result is always false. - */ - export function isPending(object: any): boolean; - - /** - * This is an experimental tool for converting a generator function into a deferred function. This has the potential of reducing nested callbacks in engines that support yield. - */ - export function async(generatorFunction: any): (...args: any[]) => Promise; - export function nextTick(callback: Function): void; - - /** - * A settable property that will intercept any uncaught errors that would otherwise be thrown in the next tick of the event loop, usually as a result of done. Can be useful for getting the full stack trace of an error in browsers, which is not usually possible with window.onerror. - */ - export var onerror: (reason: any) => void; - /** - * A settable property that lets you turn on long stack trace support. If turned on, "stack jumps" will be tracked across asynchronous promise operations, so that if an uncaught error is thrown by done or a rejection reason's stack property is inspected in a rejection callback, a long stack trace is produced. - */ - export var longStackSupport: boolean; - - /** - * Calling resolve with a pending promise causes promise to wait on the passed promise, becoming fulfilled with its fulfillment value or rejected with its rejection reason (or staying pending forever, if the passed promise does). - * Calling resolve with a rejected promise causes promise to be rejected with the passed promise's rejection reason. - * Calling resolve with a fulfilled promise causes promise to be fulfilled with the passed promise's fulfillment value. - * Calling resolve with a non-promise value causes promise to be fulfilled with that value. - */ - export function resolve(object: IPromise): Promise; - /** - * Calling resolve with a pending promise causes promise to wait on the passed promise, becoming fulfilled with its fulfillment value or rejected with its rejection reason (or staying pending forever, if the passed promise does). - * Calling resolve with a rejected promise causes promise to be rejected with the passed promise's rejection reason. - * Calling resolve with a fulfilled promise causes promise to be fulfilled with the passed promise's fulfillment value. - * Calling resolve with a non-promise value causes promise to be fulfilled with that value. - */ - export function resolve(object: T): Promise; -} - -declare module "q" { - export = Q; -} diff --git a/powershell/make.js b/powershell/make.js index e5d0b1cde..56c4f66c0 100644 --- a/powershell/make.js +++ b/powershell/make.js @@ -66,8 +66,8 @@ target.test = function() { target.build(); util.mkdir('-p', testPath); - util.run(`tsc --outDir "${testPath}" --module commonjs --rootDir Tests Tests/lib/psRunner.ts`); - util.run(`tsc --outDir "${testPath}" --rootDir Tests Tests/L0/_suite.ts`); + util.run(`tsc --outDir "${testPath}" --module commonjs --target es6 --rootDir Tests Tests/lib/psRunner.ts`); + util.run(`tsc --outDir "${testPath}" --module commonjs --target es6 --rootDir Tests Tests/L0/_suite.ts`); util.cp('-r', path.join('Tests', '*'), testPath); util.run('mocha "' + path.join(testPath, 'L0', '_suite.js') + '"'); } diff --git a/powershell/package-lock.json b/powershell/package-lock.json index 01ac6abef..5712393fb 100644 --- a/powershell/package-lock.json +++ b/powershell/package-lock.json @@ -326,12 +326,6 @@ "asap": "~2.0.3" } }, - "q": { - "version": "1.4.1", - "resolved": "https://registry.npmjs.org/q/-/q-1.4.1.tgz", - "integrity": "sha1-VXBbzZPF82c1MMLCy8DCs63cKG4=", - "dev": true - }, "qs": { "version": "6.10.3", "resolved": "https://registry.npmjs.org/qs/-/qs-6.10.3.tgz", diff --git a/powershell/package.json b/powershell/package.json index 6064ef0c8..95b8d4a56 100644 --- a/powershell/package.json +++ b/powershell/package.json @@ -25,7 +25,6 @@ "devDependencies": { "adm-zip": "^0.5.9", "mocha": "5.2.0", - "q": "1.4.1", "shelljs": "^0.8.5", "sync-request": "3.0.1", "typescript": "1.8.7"