Skip to content

Commit 24e2acc

Browse files
authored
Merge pull request #24 from PolymerLabs/morebugs
Fix glob and prettier plugin bugs
2 parents b873cf7 + 820be08 commit 24e2acc

File tree

3 files changed

+6
-2
lines changed

3 files changed

+6
-2
lines changed

CHANGELOG.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,10 @@ All notable changes to this project will be documented in this file.
55
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
66
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
77

8-
<!-- ## Unreleased -->
8+
## Unreleased
9+
10+
- Fix incorrect path resolution when loading XLB files.
11+
- Fix errors relating to prettier xml plugin resolution.
912

1013
## [0.2.1] - 2020-05-13
1114

src/formatters/xlb.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ class XlbFormatter implements Formatter {
7979
const files = await new Promise<string[]>((resolve, reject) =>
8080
glob(
8181
this.xlbConfig.translationsGlob,
82-
{cwd: this.config.baseDir},
82+
{cwd: this.config.baseDir, absolute: true},
8383
(err, files) => {
8484
if (err) {
8585
reject(err);

src/formatters/xml-utils.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,7 @@ export function getNonEmptyAttributeOrThrow(
5353
export function formatXml(xmlStr: string): string {
5454
// TODO(aomarks) Types for the xml-parser plugin.
5555
return prettier.format(xmlStr, ({
56+
plugins: ['@prettier/plugin-xml'],
5657
parser: 'xml',
5758
xmlWhitespaceSensitivity: 'ignore',
5859
} as unknown) as prettier.Options);

0 commit comments

Comments
 (0)