Commit 0c3058a8 authored by Tobias Koppers's avatar Tobias Koppers

Keep require('next/package.json').version in getVersionInfo()

This function checks the installed version against npm registry for
staleness detection. It must read from disk at runtime so that the
version-staleness test can mock it by patching node_modules/next/package.json.
parent ca36b00d
...@@ -8,7 +8,7 @@ export async function getVersionInfo(): Promise<VersionInfo> { ...@@ -8,7 +8,7 @@ export async function getVersionInfo(): Promise<VersionInfo> {
let installed = '0.0.0' let installed = '0.0.0'
try { try {
installed = process.env.__NEXT_VERSION as string installed = require('next/package.json').version
let res let res
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment