vike 0.4.223-commit-6f064ad → 0.4.223-commit-586dbfb

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.
@@ -2,4 +2,4 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.PROJECT_VERSION = void 0;
4
4
  // Automatically updated by @brillout/release-me
5
- exports.PROJECT_VERSION = '0.4.223-commit-6f064ad';
5
+ exports.PROJECT_VERSION = '0.4.223-commit-586dbfb';
@@ -47,14 +47,14 @@ function addFileExtensionsToRequireResolve() {
47
47
  isScriptFile_js_1.scriptFileExtensionList.forEach((ext) => {
48
48
  (0, assert_js_1.assert)(!ext.includes('.'));
49
49
  ext = `.${ext}`;
50
- if (!require.extensions[ext]) {
51
- require.extensions[ext] = require.extensions['.js'];
50
+ if (!require_.extensions[ext]) {
51
+ require_.extensions[ext] = require_.extensions['.js'];
52
52
  added.push(ext);
53
53
  }
54
54
  });
55
55
  const clean = () => {
56
56
  added.forEach((ext) => {
57
- delete require.extensions[ext];
57
+ delete require_.extensions[ext];
58
58
  });
59
59
  };
60
60
  return clean;
@@ -1 +1 @@
1
- export declare const PROJECT_VERSION: "0.4.223-commit-6f064ad";
1
+ export declare const PROJECT_VERSION: "0.4.223-commit-586dbfb";
@@ -1,2 +1,2 @@
1
1
  // Automatically updated by @brillout/release-me
2
- export const PROJECT_VERSION = '0.4.223-commit-6f064ad';
2
+ export const PROJECT_VERSION = '0.4.223-commit-586dbfb';
@@ -1,4 +1,4 @@
1
1
  export declare const projectInfo: {
2
2
  projectName: "Vike";
3
- projectVersion: "0.4.223-commit-6f064ad";
3
+ projectVersion: "0.4.223-commit-586dbfb";
4
4
  };
@@ -45,14 +45,14 @@ function addFileExtensionsToRequireResolve() {
45
45
  scriptFileExtensionList.forEach((ext) => {
46
46
  assert(!ext.includes('.'));
47
47
  ext = `.${ext}`;
48
- if (!require.extensions[ext]) {
49
- require.extensions[ext] = require.extensions['.js'];
48
+ if (!require_.extensions[ext]) {
49
+ require_.extensions[ext] = require_.extensions['.js'];
50
50
  added.push(ext);
51
51
  }
52
52
  });
53
53
  const clean = () => {
54
54
  added.forEach((ext) => {
55
- delete require.extensions[ext];
55
+ delete require_.extensions[ext];
56
56
  });
57
57
  };
58
58
  return clean;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "vike",
3
- "version": "0.4.223-commit-6f064ad",
3
+ "version": "0.4.223-commit-586dbfb",
4
4
  "repository": "https://github.com/vikejs/vike",
5
5
  "exports": {
6
6
  "./server": {
@@ -128,9 +128,9 @@
128
128
  }
129
129
  },
130
130
  "dependencies": {
131
- "@brillout/import": "^0.2.3",
131
+ "@brillout/import": "^0.2.4",
132
132
  "@brillout/json-serializer": "^0.5.15",
133
- "@brillout/picocolors": "^1.0.15",
133
+ "@brillout/picocolors": "^1.0.23",
134
134
  "@brillout/require-shim": "^0.1.2",
135
135
  "@brillout/vite-plugin-server-entry": "^0.6.0",
136
136
  "acorn": "^8.0.0",
@@ -237,7 +237,6 @@
237
237
  "./client.js",
238
238
  "./client/router.js",
239
239
  "./cli.js",
240
- "./dist-cjs-fixup.mjs",
241
240
  "./getPageContext.js",
242
241
  "./__internal.js",
243
242
  "./__internal/setup.js",
@@ -1,41 +0,0 @@
1
- import fs from 'fs/promises'
2
- import path from 'path'
3
- const distCjs = 'dist/cjs'
4
-
5
- main()
6
-
7
- async function main() {
8
- await generatePackageJson()
9
- await shimImportMetaUrl()
10
- }
11
-
12
- async function generatePackageJson() {
13
- await fs.writeFile(distCjs + '/package.json', '{ "type": "commonjs" }\n', 'utf8')
14
- console.log(`✅ ${distCjs}/package.json generated`)
15
- }
16
-
17
- async function shimImportMetaUrl() {
18
- const files = await getFiles(distCjs)
19
- files.forEach(replaceImportMetaWithFilename)
20
- console.log(`✅ ${distCjs}/ shimmed import.meta.url`)
21
- }
22
-
23
- async function replaceImportMetaWithFilename(filePath) {
24
- const fileContent = await fs.readFile(filePath, 'utf8')
25
- const modifiedContent = fileContent.replaceAll('import.meta.url', '`file://${__filename}`')
26
- await fs.writeFile(filePath, modifiedContent, 'utf8')
27
- }
28
-
29
- async function getFiles(directoryPath) {
30
- const files = []
31
- for (const file of await fs.readdir(directoryPath)) {
32
- const filePath = path.join(directoryPath, file)
33
- const stats = await fs.stat(filePath)
34
- if (stats.isDirectory()) {
35
- files.push(...(await getFiles(filePath)))
36
- } else if (stats.isFile() && filePath.endsWith('.js')) {
37
- files.push(filePath)
38
- }
39
- }
40
- return files
41
- }