vike 0.4.238-commit-d48a597 → 0.4.239-commit-050a4a3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (60) hide show
  1. package/dist/cjs/node/runtime/globalContext.js +1 -0
  2. package/dist/cjs/node/vite/onLoad.js +1 -1
  3. package/dist/cjs/node/vite/plugins/pluginBaseUrls.js +32 -28
  4. package/dist/cjs/node/vite/plugins/pluginBuild/pluginBuildApp.js +24 -20
  5. package/dist/cjs/node/vite/plugins/pluginBuild/pluginBuildConfig.js +4 -2
  6. package/dist/cjs/node/vite/plugins/pluginBuild/pluginDistFileNames.js +76 -74
  7. package/dist/cjs/node/vite/plugins/pluginBuild/pluginDistPackageJsonFile.js +18 -14
  8. package/dist/cjs/node/vite/plugins/pluginBuild/pluginModuleBanner.js +4 -2
  9. package/dist/cjs/node/vite/plugins/pluginBuild/pluginProdBuildEntry.js +4 -2
  10. package/dist/cjs/node/vite/plugins/pluginBuild/pluginSuppressRollupWarning.js +20 -18
  11. package/dist/cjs/node/vite/plugins/pluginCommon.js +7 -21
  12. package/dist/cjs/node/vite/plugins/pluginDev.js +51 -47
  13. package/dist/cjs/node/vite/plugins/pluginEnvVars.js +63 -57
  14. package/dist/cjs/node/vite/plugins/pluginExtractAssets.js +101 -91
  15. package/dist/cjs/node/vite/plugins/pluginExtractExportNames.js +24 -16
  16. package/dist/cjs/node/vite/plugins/pluginFileEnv.js +67 -57
  17. package/dist/cjs/node/vite/plugins/pluginNonRunnableDev.js +26 -20
  18. package/dist/cjs/node/vite/plugins/pluginPreview.js +30 -24
  19. package/dist/cjs/node/vite/plugins/pluginReplaceConstants.js +41 -33
  20. package/dist/cjs/node/vite/plugins/pluginSetGlobalContext.js +4 -2
  21. package/dist/cjs/node/vite/plugins/pluginVirtualFiles/generateVirtualFileGlobalEntryWithOldDesign.js +1 -1
  22. package/dist/cjs/node/vite/plugins/pluginVirtualFiles.js +50 -37
  23. package/dist/cjs/node/vite/plugins/pluginWorkaroundCssModuleHmr.js +8 -6
  24. package/dist/cjs/node/vite/shared/resolveVikeConfigInternal/crawlPlusFiles.js +1 -1
  25. package/dist/cjs/utils/PROJECT_VERSION.js +1 -1
  26. package/dist/cjs/utils/assertNodeVersion.js +3 -1
  27. package/dist/cjs/utils/assertVersion.js +26 -5
  28. package/dist/cjs/utils/joinEnglish.js +2 -1
  29. package/dist/esm/node/runtime/globalContext.d.ts +2 -0
  30. package/dist/esm/node/runtime/globalContext.js +1 -0
  31. package/dist/esm/node/vite/onLoad.js +1 -1
  32. package/dist/esm/node/vite/plugins/pluginBaseUrls.js +32 -28
  33. package/dist/esm/node/vite/plugins/pluginBuild/pluginBuildApp.js +24 -20
  34. package/dist/esm/node/vite/plugins/pluginBuild/pluginBuildConfig.js +4 -2
  35. package/dist/esm/node/vite/plugins/pluginBuild/pluginDistFileNames.js +76 -74
  36. package/dist/esm/node/vite/plugins/pluginBuild/pluginDistPackageJsonFile.js +18 -14
  37. package/dist/esm/node/vite/plugins/pluginBuild/pluginModuleBanner.js +4 -2
  38. package/dist/esm/node/vite/plugins/pluginBuild/pluginProdBuildEntry.js +4 -2
  39. package/dist/esm/node/vite/plugins/pluginBuild/pluginSuppressRollupWarning.js +20 -18
  40. package/dist/esm/node/vite/plugins/pluginCommon.js +8 -22
  41. package/dist/esm/node/vite/plugins/pluginDev.js +51 -47
  42. package/dist/esm/node/vite/plugins/pluginEnvVars.js +63 -57
  43. package/dist/esm/node/vite/plugins/pluginExtractAssets.js +101 -91
  44. package/dist/esm/node/vite/plugins/pluginExtractExportNames.js +24 -16
  45. package/dist/esm/node/vite/plugins/pluginFileEnv.js +67 -57
  46. package/dist/esm/node/vite/plugins/pluginNonRunnableDev.js +26 -20
  47. package/dist/esm/node/vite/plugins/pluginPreview.js +30 -24
  48. package/dist/esm/node/vite/plugins/pluginReplaceConstants.js +41 -33
  49. package/dist/esm/node/vite/plugins/pluginSetGlobalContext.js +4 -2
  50. package/dist/esm/node/vite/plugins/pluginVirtualFiles/generateVirtualFileGlobalEntryWithOldDesign.js +2 -2
  51. package/dist/esm/node/vite/plugins/pluginVirtualFiles.js +51 -38
  52. package/dist/esm/node/vite/plugins/pluginWorkaroundCssModuleHmr.js +8 -6
  53. package/dist/esm/node/vite/shared/resolveVikeConfigInternal/crawlPlusFiles.js +2 -2
  54. package/dist/esm/utils/PROJECT_VERSION.d.ts +1 -1
  55. package/dist/esm/utils/PROJECT_VERSION.js +1 -1
  56. package/dist/esm/utils/assertNodeVersion.js +3 -1
  57. package/dist/esm/utils/assertVersion.d.ts +4 -3
  58. package/dist/esm/utils/assertVersion.js +23 -5
  59. package/dist/esm/utils/joinEnglish.js +2 -1
  60. package/package.json +2 -2
@@ -14,32 +14,38 @@ function pluginPreview() {
14
14
  return {
15
15
  name: 'vike:pluginPreview',
16
16
  apply: applyPreview,
17
- config() {
18
- return {
19
- appType: 'custom',
20
- };
17
+ config: {
18
+ handler() {
19
+ return {
20
+ appType: 'custom',
21
+ };
22
+ },
21
23
  },
22
- async configResolved(config_) {
23
- config = config_;
24
- vikeConfig = await getVikeConfigInternal();
25
- logDockerHint(config.preview.host);
26
- // vikeConfig = await getVikeConfig(config)
24
+ configResolved: {
25
+ async handler(config_) {
26
+ config = config_;
27
+ vikeConfig = await getVikeConfigInternal();
28
+ logDockerHint(config.preview.host);
29
+ // vikeConfig = await getVikeConfig(config)
30
+ },
27
31
  },
28
- configurePreviewServer(server) {
29
- /* - Couldn't make `appType: 'mpa'` work as of npm:@brillout/vite@5.0.0-beta.14.0426910c
30
- - This ugly hack to set appType for preview won't be need once https://github.com/vitejs/vite/pull/14855 is merged.
31
- config.appType = 'mpa'
32
- */
33
- return () => {
34
- const { isPrerenderingEnabledForAllPages, isPrerenderingEnabled } = vikeConfig.prerenderContext;
35
- assertDist(isPrerenderingEnabledForAllPages);
36
- // We cannot re-use Vite's static middleware: https://github.com/vitejs/vite/pull/14836#issuecomment-1788540300
37
- addStaticAssetsMiddleware(server.middlewares);
38
- if (!isPrerenderingEnabledForAllPages) {
39
- addSsrMiddleware(server.middlewares, config, true, isPrerenderingEnabled);
40
- }
41
- addStatic404Middleware(server.middlewares);
42
- };
32
+ configurePreviewServer: {
33
+ handler(server) {
34
+ /* - Couldn't make `appType: 'mpa'` work as of npm:@brillout/vite@5.0.0-beta.14.0426910c
35
+ - This ugly hack to set appType for preview won't be need once https://github.com/vitejs/vite/pull/14855 is merged.
36
+ config.appType = 'mpa'
37
+ */
38
+ return () => {
39
+ const { isPrerenderingEnabledForAllPages, isPrerenderingEnabled } = vikeConfig.prerenderContext;
40
+ assertDist(isPrerenderingEnabledForAllPages);
41
+ // We cannot re-use Vite's static middleware: https://github.com/vitejs/vite/pull/14836#issuecomment-1788540300
42
+ addStaticAssetsMiddleware(server.middlewares);
43
+ if (!isPrerenderingEnabledForAllPages) {
44
+ addSsrMiddleware(server.middlewares, config, true, isPrerenderingEnabled);
45
+ }
46
+ addStatic404Middleware(server.middlewares);
47
+ };
48
+ },
43
49
  },
44
50
  };
45
51
  function assertDist(isPrerenderingEnabledForAllPages) {
@@ -9,41 +9,49 @@ function pluginReplaceConstants() {
9
9
  name: 'vike:pluginReplaceConstants',
10
10
  enforce: 'post',
11
11
  apply: 'build',
12
- configResolved(config_) {
13
- config = config_;
12
+ configResolved: {
13
+ handler(config_) {
14
+ config = config_;
15
+ },
14
16
  },
15
- transform(code, id, options) {
16
- id = normalizeId(id);
17
- assertPosixPath(id);
18
- if (id.includes('/node_modules/'))
19
- return;
20
- assertPosixPath(config.root);
21
- if (!id.startsWith(config.root))
22
- return;
23
- if (!code.includes('import.meta.env.'))
24
- return;
25
- const isBuild = config.command === 'build';
26
- assert(isBuild);
27
- // Used by vike.dev
28
- // https://github.com/vikejs/vike/blob/08a1ff55c80ddca64ca6d4417fefd45fefeb4ffb/docs/vite.config.ts#L12
29
- // @ts-expect-error
30
- if (config._skipVikeReplaceConstants?.(id))
31
- return;
32
- const { magicString, getMagicStringResult } = getMagicString(code, id);
33
- const constantsMap = [];
34
- constantsMap.push({
35
- constants: ['pageContext.isClientSide', 'globalContext.isClientSide', 'pageContext.globalContext.isClientSide'],
36
- replacement: !isViteServerSide_extraSafe(config, this.environment, options),
37
- });
38
- constantsMap.forEach(({ constants, replacement }) => {
39
- if (!constants.some((c) => code.includes(c)))
17
+ transform: {
18
+ handler(code, id, options) {
19
+ id = normalizeId(id);
20
+ assertPosixPath(id);
21
+ if (id.includes('/node_modules/'))
40
22
  return;
41
- const regExp = getConstantRegExp(constants);
42
- magicString.replaceAll(regExp, JSON.stringify(replacement));
43
- });
44
- if (!magicString.hasChanged())
45
- return null;
46
- return getMagicStringResult();
23
+ assertPosixPath(config.root);
24
+ if (!id.startsWith(config.root))
25
+ return;
26
+ if (!code.includes('import.meta.env.'))
27
+ return;
28
+ const isBuild = config.command === 'build';
29
+ assert(isBuild);
30
+ // Used by vike.dev
31
+ // https://github.com/vikejs/vike/blob/08a1ff55c80ddca64ca6d4417fefd45fefeb4ffb/docs/vite.config.ts#L12
32
+ // @ts-expect-error
33
+ if (config._skipVikeReplaceConstants?.(id))
34
+ return;
35
+ const { magicString, getMagicStringResult } = getMagicString(code, id);
36
+ const constantsMap = [];
37
+ constantsMap.push({
38
+ constants: [
39
+ 'pageContext.isClientSide',
40
+ 'globalContext.isClientSide',
41
+ 'pageContext.globalContext.isClientSide',
42
+ ],
43
+ replacement: !isViteServerSide_extraSafe(config, this.environment, options),
44
+ });
45
+ constantsMap.forEach(({ constants, replacement }) => {
46
+ if (!constants.some((c) => code.includes(c)))
47
+ return;
48
+ const regExp = getConstantRegExp(constants);
49
+ magicString.replaceAll(regExp, JSON.stringify(replacement));
50
+ });
51
+ if (!magicString.hasChanged())
52
+ return null;
53
+ return getMagicStringResult();
54
+ },
47
55
  },
48
56
  };
49
57
  }
@@ -20,8 +20,10 @@ function pluginSetGlobalContext() {
20
20
  markSetup_viteDevServer();
21
21
  },
22
22
  },
23
- configurePreviewServer() {
24
- markSetup_vitePreviewServer();
23
+ configurePreviewServer: {
24
+ handler() {
25
+ markSetup_vitePreviewServer();
26
+ },
25
27
  },
26
28
  config: {
27
29
  order: 'pre',
@@ -1,5 +1,5 @@
1
1
  export { generateVirtualFileGlobalEntryWithOldDesign };
2
- import { assert, assertPosixPath, scriptFileExtensionPattern, debugGlob, isVersionOrAbove, assertWarning, } from '../../utils.js';
2
+ import { assert, assertPosixPath, scriptFileExtensionPattern, debugGlob, isVersionMatch, assertWarning, } from '../../utils.js';
3
3
  import { parseVirtualFileId } from '../../../shared/virtualFileId.js';
4
4
  import { version as viteVersion } from 'vite';
5
5
  import { fileTypes } from '../../../../shared/getPageFiles/fileTypes.js';
@@ -139,7 +139,7 @@ function getGlobs(globRoots, isBuild, fileType, query, isV1Design) {
139
139
  const globExcludePath = globRoot.excludeDir ? `'!${getGlobPath(globRoot.excludeDir, fileType)}'` : null;
140
140
  const globOptions = { eager: isEager };
141
141
  if (query) {
142
- const isNewViteInterface = isVersionOrAbove(viteVersion, '5.1.0');
142
+ const isNewViteInterface = isVersionMatch(viteVersion, ['5.1.0']);
143
143
  if (isNewViteInterface &&
144
144
  // When used for the old design, the new syntax breaks Vike's CI (surprinsigly so). I couldn't reproduce locally (I didn't dig much).
145
145
  isV1Design) {
@@ -8,7 +8,7 @@ import { reloadVikeConfig, isV1Design, getVikeConfigInternalOptional } from '../
8
8
  import pc from '@brillout/picocolors';
9
9
  import { logConfigInfo } from '../shared/loggerNotProd.js';
10
10
  import { getModuleFilePathAbsolute } from '../shared/getFilePath.js';
11
- import { updateUserFiles } from '../../runtime/globalContext.js';
11
+ import { isRunnable, updateUserFiles } from '../../runtime/globalContext.js';
12
12
  import { isPlusFile } from '../shared/resolveVikeConfigInternal/crawlPlusFiles.js';
13
13
  import { isTemporaryBuildFile } from '../shared/resolveVikeConfigInternal/transpileAndExecuteFile.js';
14
14
  import { getVikeConfigError } from '../../shared/getVikeConfigError.js';
@@ -16,47 +16,57 @@ function pluginVirtualFiles() {
16
16
  let config;
17
17
  return {
18
18
  name: 'vike:pluginVirtualFiles',
19
- async configResolved(config_) {
20
- config = config_;
21
- // TO-DO/next-major-release: remove
22
- if (!isV1Design())
23
- config.experimental.importGlobRestoreExtension = true;
19
+ configResolved: {
20
+ async handler(config_) {
21
+ config = config_;
22
+ // TO-DO/next-major-release: remove
23
+ if (!isV1Design())
24
+ config.experimental.importGlobRestoreExtension = true;
25
+ },
24
26
  },
25
- resolveId(id) {
26
- if (isVirtualFileId(id)) {
27
- return addVirtualFileIdPrefix(id);
28
- }
29
- },
30
- async handleHotUpdate(ctx) {
31
- try {
32
- return await handleHotUpdate(ctx, config);
33
- }
34
- catch (err) {
35
- // Vite swallows errors thrown by handleHotUpdate()
36
- console.error(err);
37
- throw err;
38
- }
27
+ resolveId: {
28
+ handler(id) {
29
+ if (isVirtualFileId(id)) {
30
+ return addVirtualFileIdPrefix(id);
31
+ }
32
+ },
39
33
  },
40
- async load(id, options) {
41
- if (!isVirtualFileId(id))
42
- return undefined;
43
- id = removeVirtualFileIdPrefix(id);
44
- const isDev = config._isDev;
45
- assert(typeof isDev === 'boolean');
46
- const idParsed = parseVirtualFileId(id);
47
- if (idParsed) {
48
- if (idParsed.type === 'page-entry') {
49
- const code = await generateVirtualFilePageEntry(id, isDev);
50
- return code;
34
+ handleHotUpdate: {
35
+ async handler(ctx) {
36
+ try {
37
+ return await handleHotUpdate(ctx, config);
51
38
  }
52
- if (idParsed.type === 'global-entry') {
53
- const code = await generateVirtualFileGlobalEntryWithOldDesign(id, options, config, this.environment, isDev);
54
- return code;
39
+ catch (err) {
40
+ // Vite swallows errors thrown by handleHotUpdate()
41
+ console.error(err);
42
+ throw err;
55
43
  }
56
- }
44
+ },
45
+ },
46
+ load: {
47
+ async handler(id, options) {
48
+ if (!isVirtualFileId(id))
49
+ return undefined;
50
+ id = removeVirtualFileIdPrefix(id);
51
+ const isDev = config._isDev;
52
+ assert(typeof isDev === 'boolean');
53
+ const idParsed = parseVirtualFileId(id);
54
+ if (idParsed) {
55
+ if (idParsed.type === 'page-entry') {
56
+ const code = await generateVirtualFilePageEntry(id, isDev);
57
+ return code;
58
+ }
59
+ if (idParsed.type === 'global-entry') {
60
+ const code = await generateVirtualFileGlobalEntryWithOldDesign(id, options, config, this.environment, isDev);
61
+ return code;
62
+ }
63
+ }
64
+ },
57
65
  },
58
- configureServer(server) {
59
- handleFileAddRemove(server, config);
66
+ configureServer: {
67
+ handler(server) {
68
+ handleFileAddRemove(server, config);
69
+ },
60
70
  },
61
71
  };
62
72
  }
@@ -125,7 +135,10 @@ async function handleHotUpdate(ctx, config) {
125
135
  // Ensure we invalidate `file` *before* server.ssrLoadModule() in updateUserFiles()
126
136
  // Vite already invalidates it, but *after* handleHotUpdate() and thus after server.ssrLoadModule()
127
137
  ctx.modules.forEach((mod) => server.moduleGraph.invalidateModule(mod));
128
- updateUserFiles();
138
+ if (isRunnable(server)) {
139
+ // TODO/now: await
140
+ updateUserFiles();
141
+ }
129
142
  }
130
143
  }
131
144
  }
@@ -2,12 +2,14 @@ export { pluginWorkaroundCssModuleHmr };
2
2
  function pluginWorkaroundCssModuleHmr() {
3
3
  return {
4
4
  name: 'vike:pluginWorkaroundCssModuleHmr',
5
- handleHotUpdate(ctx) {
6
- // prevent full reload due to non self-accepting css module.
7
- // here only "?direct" module should be filtered out as it doesn't have a parent module.
8
- if (ctx.file.includes('module.css')) {
9
- return ctx.modules.filter((m) => !m.id?.includes('?direct'));
10
- }
5
+ handleHotUpdate: {
6
+ handler(ctx) {
7
+ // prevent full reload due to non self-accepting css module.
8
+ // here only "?direct" module should be filtered out as it doesn't have a parent module.
9
+ if (ctx.file.includes('module.css')) {
10
+ return ctx.modules.filter((m) => !m.id?.includes('?direct'));
11
+ }
12
+ },
11
13
  },
12
14
  };
13
15
  }
@@ -1,7 +1,7 @@
1
1
  export { crawlPlusFiles };
2
2
  export { isPlusFile };
3
3
  export { getPlusFileValueConfigName };
4
- import { assertPosixPath, assert, scriptFileExtensionPattern, assertIsNotProductionRuntime, isVersionOrAbove, isScriptFile, scriptFileExtensionList, createDebugger, deepEqual, assertUsage, assertFilePathAbsoluteFilesystem, assertWarning, hasProp, isNotNullish, getGlobalObject, } from '../../utils.js';
4
+ import { assertPosixPath, assert, scriptFileExtensionPattern, assertIsNotProductionRuntime, isVersionMatch, isScriptFile, scriptFileExtensionList, createDebugger, deepEqual, assertUsage, assertFilePathAbsoluteFilesystem, assertWarning, hasProp, isNotNullish, getGlobalObject, } from '../../utils.js';
5
5
  import path from 'node:path';
6
6
  import { glob } from 'tinyglobby';
7
7
  import { exec } from 'node:child_process';
@@ -147,7 +147,7 @@ async function isGitNotUsable(userRootDir) {
147
147
  // - We didn't bother test which is the earliest version that works.
148
148
  // - Git 2.32.0 doesn't seem to work: https://github.com/vikejs/vike/discussions/1549
149
149
  // - Maybe it's because of StackBlitz: looking at the release notes, Git 2.32.0 should be working.
150
- if (!isVersionOrAbove(gitVersion, '2.43.1'))
150
+ if (!isVersionMatch(gitVersion, ['2.43.1']))
151
151
  return true;
152
152
  }
153
153
  // Is userRootDir inside a Git repository?
@@ -1 +1 @@
1
- export declare const PROJECT_VERSION: "0.4.238-commit-d48a597";
1
+ export declare const PROJECT_VERSION: "0.4.239-commit-050a4a3";
@@ -1,2 +1,2 @@
1
1
  // Automatically updated by @brillout/release-me
2
- export const PROJECT_VERSION = '0.4.238-commit-d48a597';
2
+ export const PROJECT_VERSION = '0.4.239-commit-050a4a3';
@@ -6,5 +6,7 @@ function assertNodeVersion() {
6
6
  if (!isNodeJS())
7
7
  return;
8
8
  const version = process.versions.node;
9
- assertVersion('Node.js', version, '18.0.0');
9
+ assertVersion('Node.js', version,
10
+ // https://gist.github.com/brillout/8e0133716e169b981b6c4e8a938b0134
11
+ ['20.19.0', '22.12.0', '23.0.0']);
10
12
  }
@@ -1,4 +1,5 @@
1
1
  export { assertVersion };
2
- export { isVersionOrAbove };
3
- declare function assertVersion(dependencyName: 'Vite' | 'Node.js', versionActual: string, versionExpected: `${number}.${number}.${number}`): void;
4
- declare function isVersionOrAbove(versionActual: string, versionExpected: `${number}.${number}.${number}`): boolean;
2
+ export { isVersionMatch };
3
+ type Version = `${number}.${number}.${number}`;
4
+ declare function assertVersion(dependencyName: 'Vite' | 'Node.js', versionActual: string, versionExpectedList: Version[]): void;
5
+ declare function isVersionMatch(versionActual: string, versionExpectedList: Version[]): boolean;
@@ -1,14 +1,32 @@
1
1
  export { assertVersion };
2
- export { isVersionOrAbove };
2
+ export { isVersionMatch };
3
+ import pc from '@brillout/picocolors';
3
4
  import { assert, assertUsage } from './assert.js';
4
5
  import { assertIsNotBrowser } from './assertIsNotBrowser.js';
6
+ import { joinEnglish } from './joinEnglish.js';
5
7
  assertIsNotBrowser();
6
- function assertVersion(dependencyName, versionActual, versionExpected) {
8
+ function assertVersion(dependencyName, versionActual, versionExpectedList) {
9
+ assertUsage(isVersionMatch(versionActual, versionExpectedList), `${pc.bold(dependencyName)} ${pc.red(pc.bold(versionActual))} isn't supported, use ${pc.bold(dependencyName)} ${joinEnglish([...versionExpectedList, 'above'].map((v) => pc.green(pc.bold(v))), 'or')}.`);
10
+ }
11
+ function isVersionMatch(versionActual, versionExpectedList) {
7
12
  assert(versionActual);
8
- assert(versionExpected);
9
- assertUsage(isVersionOrAbove(versionActual, versionExpected), `${dependencyName} ${versionActual} isn't supported, use ${dependencyName} >= ${versionExpected} instead.`);
13
+ assert(versionExpectedList);
14
+ assert(versionExpectedList.length > 0);
15
+ const versionActualMajor = parseVersion(versionActual)[0];
16
+ const versionExpectedListSameMajor = versionExpectedList.filter((versionExpected) => {
17
+ const versionExpectedMajor = parseVersion(versionExpected)[0];
18
+ return versionExpectedMajor === versionActualMajor;
19
+ });
20
+ assert(versionExpectedListSameMajor.length <= 1);
21
+ const versionExpectedSameMajor = versionExpectedListSameMajor[0];
22
+ if (versionExpectedSameMajor) {
23
+ return isSameOrAbove(versionActual, versionExpectedSameMajor);
24
+ }
25
+ else {
26
+ return versionExpectedList.every((versionExpected) => isSameOrAbove(versionActual, versionExpected));
27
+ }
10
28
  }
11
- function isVersionOrAbove(versionActual, versionExpected) {
29
+ function isSameOrAbove(versionActual, versionExpected) {
12
30
  const p1 = parseVersion(versionActual);
13
31
  const p2 = parseVersion(versionExpected);
14
32
  // major
@@ -7,5 +7,6 @@ function joinEnglish(arr, conjunction, colorizer = (s) => s) {
7
7
  return colorizer(arr[0]);
8
8
  const firsts = arr.slice(0, arr.length - 1);
9
9
  const last = arr[arr.length - 1];
10
- return firsts.map(colorizer).join(', ') + `, ${conjunction} ` + colorizer(last);
10
+ const lastComma = arr.length > 2 ? ',' : '';
11
+ return firsts.map(colorizer).join(', ') + `${lastComma} ${conjunction} ` + colorizer(last);
11
12
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "vike",
3
- "version": "0.4.238-commit-d48a597",
3
+ "version": "0.4.239-commit-050a4a3",
4
4
  "repository": "https://github.com/vikejs/vike",
5
5
  "exports": {
6
6
  "./server": {
@@ -159,7 +159,7 @@
159
159
  }
160
160
  },
161
161
  "engines": {
162
- "node": ">=18.0.0"
162
+ "node": ">=20.19.0"
163
163
  },
164
164
  "license": "MIT",
165
165
  "description": "The Framework *You* Control - Next.js & Nuxt alternative for unprecedented flexibility and dependability.",