We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 40e64a1 + 5fa3582 commit ce84aceCopy full SHA for ce84ace
src/util/notify.js
@@ -1,16 +1,15 @@
1
-import { resolve } from "node:path";
2
-import { readFile } from "node:fs/promises";
+import { createRequire } from 'node:module';
+const require = createRequire(import.meta.url);
3
4
import updateNotifier from "update-notifier";
5
6
+
7
/**
8
* Notify the user if there is a new version of the package available.
- *
9
- * @return {Promise<void>}
10
- */
+*
+* @return {Promise<void>}
11
+*/
12
export const notify = async () => {
- const packageJson = JSON.parse(
13
- await readFile(resolve("..", "..", "package.json")),
14
- );
+ const packageJson = require("../../package.json");
15
updateNotifier({ pkg: packageJson }).notify();
16
};
0 commit comments