Skip to content

Commit 5f3ea56

Browse files
committed
Update package.json to specify yarn as the package manager and modify test to conditionally read from memfs
1 parent 0c3f3b7 commit 5f3ea56

File tree

2 files changed

+13
-10
lines changed

2 files changed

+13
-10
lines changed

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,5 +82,6 @@
8282
"prettier --write",
8383
"git add"
8484
]
85-
}
85+
},
86+
"packageManager": "yarn@1.22.22+sha512.a6b2f7906b721bba3d67d4aff083df04dad64c399707841b7acf00f6b133b7ac24255f2652fa22ae3534329dc6180534e98d17432037ff6fd140556e2bb3137e"
8687
}

src/__tests__/plugin.test.ts

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -43,15 +43,17 @@ function compile(config: Configuration): Promise<string> {
4343
return reject(stats.toString("errors-only"));
4444
}
4545

46-
memfs.readFile(
47-
"./dist/main.js",
48-
{
49-
encoding: "utf-8",
50-
},
51-
// eslint-disable-next-line
52-
// @ts-ignore: Type mismatch again
53-
(err, data) => (err ? reject(err) : resolve(data))
54-
);
46+
if (memfs) {
47+
memfs.readFile(
48+
"./dist/main.js",
49+
{
50+
encoding: "utf-8",
51+
},
52+
// eslint-disable-next-line
53+
// @ts-ignore: Type mismatch again
54+
(err, data) => (err ? reject(err) : resolve(data))
55+
);
56+
}
5557

5658
return undefined;
5759
});

0 commit comments

Comments
 (0)