(require: NodeJS.Require, entry: string)
| 74 | [join(cwd, "package.json"), import.meta.url].map(from => createRequire(from)) |
| 75 | |
| 76 | const nativeVersionOf = (require: NodeJS.Require, entry: string) => { |
| 77 | const name = entry.split("/")[0] |
| 78 | try { |
| 79 | return require(`${name}/package.json`).version as string |
| 80 | } catch { |
| 81 | return |
| 82 | } |
| 83 | } |
| 84 | |
| 85 | // TypeScript 7.0 has no API |
| 86 | const isNativeVersion = (version: string) => |
no outgoing calls
no test coverage detected