Skip to content

Commit 4fd7706

Browse files
committed
re-add q
1 parent 9114d20 commit 4fd7706

File tree

13 files changed

+22
-17
lines changed

13 files changed

+22
-17
lines changed

.eslintrc.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ module.exports = {
33
plugins: ['@typescript-eslint'],
44
extends: ['plugin:@typescript-eslint/recommended'],
55
rules: {
6+
'@typescript-eslint/no-parameter-properties': 'off',
67
'@typescript-eslint/indent': ['error', 2],
78
'@typescript-eslint/explicit-function-return-type': [
89
'error',

Common/Node/patchProcess.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import { Operation } from 'fast-json-patch';
99
var slickPatchParser = new patch.SlickPatchParser();
1010
var varRegex = /\$\((.*?)\)/g;
1111

12-
function expandVariable(str: string) {
12+
function expandVariable(str: string): string {
1313
return str.replace(varRegex, (match, varName, offset, string) =>
1414
tl.getVariable(varName)
1515
);
@@ -32,14 +32,14 @@ export function apply(
3232
outputPatchedFile: boolean,
3333
failIfNoPatchApplied: boolean,
3434
treatErrors: string
35-
) {
35+
): void {
3636
var files = matcher.getMatches(workingDirectory, filters);
3737

3838
for (var index = 0; index < patcher.patches.length; index++) {
3939
var patch = patcher.patches[index];
4040
if (
4141
(patch.path && patch.path[0] != '/') ||
42-
((<any>patch).from && (<any>patch).from[0] != '/')
42+
((patch as any).from && (patch as any).from[0] != '/')
4343
) {
4444
throw new Error(
4545
'All path must start with a leading slash. Please verify patch at index ' +

Tasks/JsonPatch/json5Patcher.ts

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,18 @@
1-
import jsonPatcher = require("./common/jsonPatcher");
2-
import { Operation } from "fast-json-patch";
1+
import jsonPatcher = require('./common/jsonPatcher');
2+
import { Operation } from 'fast-json-patch';
33

4-
import JSON5 = require("json5");
4+
import JSON5 = require('json5');
55

66
export class Json5Patcher extends jsonPatcher.JsonPatcher {
7-
constructor(patches: Operation[], private outputJson5: boolean) {
7+
public constructor(patches: Operation[], private outputJson5: boolean) {
88
super(patches);
99
}
1010

11-
parse(content: string): any {
11+
public parse(content: string): any {
1212
return JSON5.parse(content);
1313
}
1414

15-
stringify(content: any): string {
15+
public stringify(content: any): string {
1616
if (this.outputJson5) {
1717
return JSON5.stringify(content, null, 4);
1818
} else {

Tasks/JsonPatch/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
"private": true,
44
"version": "0.1.0",
55
"dependencies": {
6+
"q": "^1.5.1",
67
"fs-extra": "8.0.1",
78
"micromatch": "^4.0.2",
89
"fast-json-patch": "2.1.0",

Tasks/JsonPatch/yarn.lock

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,7 @@ picomatch@^2.0.5:
158158
version "2.0.7"
159159
resolved "https://registry.yarnpkg.com/picomatch/-/picomatch-2.0.7.tgz#514169d8c7cd0bdbeecc8a2609e34a7163de69f6"
160160

161-
q@^1.1.2:
161+
q@^1.1.2, q@^1.5.1:
162162
version "1.5.1"
163163
resolved "https://registry.yarnpkg.com/q/-/q-1.5.1.tgz#7e32f75b41381291d04611f1bf14109ac00651d7"
164164

Tasks/PlistPatch/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
"private": true,
44
"version": "0.1.0",
55
"dependencies": {
6+
"q": "^1.5.1",
67
"fs-extra": "8.0.1",
78
"micromatch": "^4.0.2",
89
"fast-json-patch": "2.1.0",

Tasks/PlistPatch/yarn.lock

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,7 @@ plist@3.0.1:
160160
xmlbuilder "^9.0.7"
161161
xmldom "0.1.x"
162162

163-
q@^1.1.2:
163+
q@^1.1.2, q@^1.5.1:
164164
version "1.5.1"
165165
resolved "https://registry.yarnpkg.com/q/-/q-1.5.1.tgz#7e32f75b41381291d04611f1bf14109ac00651d7"
166166

Tasks/XmlPatch/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
"private": true,
44
"version": "0.1.0",
55
"dependencies": {
6+
"q": "^1.5.1",
67
"fs-extra": "8.0.1",
78
"micromatch": "^4.0.2",
89
"xmldom": "0.1.27",

Tasks/XmlPatch/yarn.lock

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,7 @@ picomatch@^2.0.5:
138138
version "2.0.7"
139139
resolved "https://registry.yarnpkg.com/picomatch/-/picomatch-2.0.7.tgz#514169d8c7cd0bdbeecc8a2609e34a7163de69f6"
140140

141-
q@^1.1.2:
141+
q@^1.1.2, q@^1.5.1:
142142
version "1.5.1"
143143
resolved "https://registry.yarnpkg.com/q/-/q-1.5.1.tgz#7e32f75b41381291d04611f1bf14109ac00651d7"
144144

Tasks/YamlPatch/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
"private": true,
44
"version": "0.1.0",
55
"dependencies": {
6+
"q": "^1.5.1",
67
"fs-extra": "8.0.1",
78
"micromatch": "^4.0.2",
89
"fast-json-patch": "2.1.0",

0 commit comments

Comments
 (0)