@dotcom-tool-kit/prettier 4.0.2 → 4.1.1
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.
package/lib/tasks/prettier.d.ts
CHANGED
|
@@ -3,7 +3,7 @@ import { Task, TaskRunContext } from '@dotcom-tool-kit/base';
|
|
|
3
3
|
export default class Prettier extends Task<{
|
|
4
4
|
task: typeof PrettierSchema;
|
|
5
5
|
}> {
|
|
6
|
-
run({ files }: TaskRunContext): Promise<void>;
|
|
6
|
+
run({ files, cwd }: TaskRunContext): Promise<void>;
|
|
7
7
|
formatFile: (filepath: string, options: PrettierOptions) => Promise<void>;
|
|
8
8
|
}
|
|
9
9
|
//# sourceMappingURL=prettier.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"prettier.d.ts","sourceRoot":"","sources":["../../src/tasks/prettier.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,eAAe,EAAE,cAAc,EAAE,MAAM,6CAA6C,CAAA;AAI7F,OAAO,EAAE,IAAI,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAA;AAG5D,MAAM,CAAC,OAAO,OAAO,QAAS,SAAQ,IAAI,CAAC;IAAE,IAAI,EAAE,OAAO,cAAc,CAAA;CAAE,CAAC;IACnE,GAAG,CAAC,EAAE,KAAK,EAAE,EAAE,cAAc,GAAG,OAAO,CAAC,IAAI,CAAC;
|
|
1
|
+
{"version":3,"file":"prettier.d.ts","sourceRoot":"","sources":["../../src/tasks/prettier.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,eAAe,EAAE,cAAc,EAAE,MAAM,6CAA6C,CAAA;AAI7F,OAAO,EAAE,IAAI,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAA;AAG5D,MAAM,CAAC,OAAO,OAAO,QAAS,SAAQ,IAAI,CAAC;IAAE,IAAI,EAAE,OAAO,cAAc,CAAA;CAAE,CAAC;IACnE,GAAG,CAAC,EAAE,KAAK,EAAE,GAAG,EAAE,EAAE,cAAc,GAAG,OAAO,CAAC,IAAI,CAAC;IAkBxD,UAAU,aAAoB,MAAM,WAAW,eAAe,KAAG,QAAQ,IAAI,CAAC,CA2B7E;CACF"}
|
package/lib/tasks/prettier.js
CHANGED
|
@@ -38,9 +38,9 @@ class Prettier extends base_1.Task {
|
|
|
38
38
|
}
|
|
39
39
|
};
|
|
40
40
|
}
|
|
41
|
-
async run({ files }) {
|
|
41
|
+
async run({ files, cwd }) {
|
|
42
42
|
try {
|
|
43
|
-
const filepaths = await (0, fast_glob_1.default)(files ?? this.options.files);
|
|
43
|
+
const filepaths = await (0, fast_glob_1.default)(files ?? this.options.files, { cwd });
|
|
44
44
|
for (const filepath of filepaths) {
|
|
45
45
|
const { ignored } = await prettier_1.default.getFileInfo(filepath);
|
|
46
46
|
if (!ignored) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dotcom-tool-kit/prettier",
|
|
3
|
-
"version": "4.
|
|
3
|
+
"version": "4.1.1",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "lib",
|
|
6
6
|
"scripts": {
|
|
@@ -10,10 +10,10 @@
|
|
|
10
10
|
"author": "FT.com Platforms Team <platforms-team.customer-products@ft.com>",
|
|
11
11
|
"license": "ISC",
|
|
12
12
|
"dependencies": {
|
|
13
|
-
"@dotcom-tool-kit/base": "^1.
|
|
14
|
-
"@dotcom-tool-kit/error": "^4.0.
|
|
15
|
-
"@dotcom-tool-kit/logger": "^4.0.
|
|
16
|
-
"@dotcom-tool-kit/package-json-hook": "^5.0.
|
|
13
|
+
"@dotcom-tool-kit/base": "^1.1.1",
|
|
14
|
+
"@dotcom-tool-kit/error": "^4.0.1",
|
|
15
|
+
"@dotcom-tool-kit/logger": "^4.0.1",
|
|
16
|
+
"@dotcom-tool-kit/package-json-hook": "^5.0.4",
|
|
17
17
|
"fast-glob": "^3.2.7",
|
|
18
18
|
"hook-std": "^2.0.0",
|
|
19
19
|
"prettier": "^2.2.1",
|