MCPcopy Index your code
hub / github.com/vercel/hyper / getPluginVersion

Function getPluginVersion

lib/utils/plugins.ts:223–231  ·  view source on GitHub ↗
(path: string)

Source from the content-addressed store, hash-verified

221const getPluginName = (path: string) => pathModule.basename(path);
222
223const getPluginVersion = (path: string): string | null => {
224 let version = null;
225 try {
226 version = window.require(pathModule.resolve(path, 'package.json')).version as string;
227 } catch (err) {
228 console.warn(`No package.json found in ${path}`);
229 }
230 return version;
231};
232
233const loadModules = () => {
234 console.log('(re)loading renderer plugins');

Callers 1

loadModulesFunction · 0.85

Calls 2

resolveMethod · 0.45
warnMethod · 0.45

Tested by

no test coverage detected