@nerest/nerest 1.7.1 → 1.7.3

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.
@@ -1,4 +1,5 @@
1
1
  import type { InlineConfig } from 'vite';
2
+ import react from '@vitejs/plugin-react';
2
3
 
3
4
  import type { BuildArgs } from './shared.js';
4
5
  import { viteConfigShared } from './shared.js';
@@ -24,6 +25,7 @@ export async function viteConfigDevelopmentClient(
24
25
  },
25
26
  },
26
27
  },
28
+ plugins: [react()],
27
29
  customLogger: logger,
28
30
  };
29
31
  }
@@ -51,6 +53,7 @@ export async function viteConfigDevelopmentServer(
51
53
  noDiscovery: true,
52
54
  include: [],
53
55
  },
56
+ plugins: [react()],
54
57
  customLogger: logger,
55
58
  };
56
59
  }
@@ -1,5 +1,6 @@
1
1
  import type { InlineConfig } from 'vite';
2
2
  import { viteExternalsPlugin } from 'vite-plugin-externals';
3
+ import react from '@vitejs/plugin-react';
3
4
 
4
5
  import type { BuildArgs } from './shared.js';
5
6
  import { viteConfigShared } from './shared.js';
@@ -31,6 +32,7 @@ export async function viteConfigProductionClient(
31
32
  plugins: [
32
33
  // externals - map buildConfig.externals packages to a global variable on window
33
34
  viteExternalsPlugin(args.buildConfig?.externals, { useWindow: false }),
35
+ react(),
34
36
  ],
35
37
  };
36
38
  }
@@ -55,5 +57,6 @@ export async function viteConfigProductionServer(
55
57
  },
56
58
  },
57
59
  },
60
+ plugins: [react()],
58
61
  };
59
62
  }
@@ -1,3 +1,4 @@
1
+ import react from '@vitejs/plugin-react';
1
2
  import { viteConfigShared } from './shared.js';
2
3
  import logger from './vite-logger.development.js';
3
4
  export async function viteConfigDevelopmentClient(args) {
@@ -18,6 +19,7 @@ export async function viteConfigDevelopmentClient(args) {
18
19
  },
19
20
  },
20
21
  },
22
+ plugins: [react()],
21
23
  customLogger: logger,
22
24
  };
23
25
  }
@@ -42,6 +44,7 @@ export async function viteConfigDevelopmentServer(args) {
42
44
  noDiscovery: true,
43
45
  include: [],
44
46
  },
47
+ plugins: [react()],
45
48
  customLogger: logger,
46
49
  };
47
50
  }
@@ -1,4 +1,5 @@
1
1
  import { viteExternalsPlugin } from 'vite-plugin-externals';
2
+ import react from '@vitejs/plugin-react';
2
3
  import { viteConfigShared } from './shared.js';
3
4
  import { excludes } from '../excludes/index.js';
4
5
  export async function viteConfigProductionClient(args) {
@@ -25,6 +26,7 @@ export async function viteConfigProductionClient(args) {
25
26
  plugins: [
26
27
  // externals - map buildConfig.externals packages to a global variable on window
27
28
  viteExternalsPlugin(args.buildConfig?.externals, { useWindow: false }),
29
+ react(),
28
30
  ],
29
31
  };
30
32
  }
@@ -46,5 +48,6 @@ export async function viteConfigProductionServer(args) {
46
48
  },
47
49
  },
48
50
  },
51
+ plugins: [react()],
49
52
  };
50
53
  }
@@ -14,8 +14,9 @@ export async function createServer(options) {
14
14
  const { project, root, loadRuntimeHook } = options;
15
15
  const app = fastify({
16
16
  logger: (await runLoggerHook(loadRuntimeHook)) ?? true,
17
- ignoreTrailingSlash: true,
18
- useSemicolonDelimiter: false,
17
+ routerOptions: {
18
+ ignoreTrailingSlash: true,
19
+ },
19
20
  // JSON parsing can take a long time and blocks the event loop,
20
21
  // so we need to limit the size of the body. 10MB is a good compromise
21
22
  // baseline that was chosen by experimenting with real world usage
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nerest/nerest",
3
- "version": "1.7.1",
3
+ "version": "1.7.3",
4
4
  "description": "React micro frontend framework",
5
5
  "homepage": "https://github.com/nerestjs/nerest",
6
6
  "repository": {
@@ -27,8 +27,8 @@
27
27
  "lint": "eslint --ext .ts .",
28
28
  "prepare": "simple-git-hooks",
29
29
  "test": "npm run test:module && npm run test:integration:dev && npm run test:integration:prod",
30
- "test:integration:dev": "node tests/integration/run.development.js",
31
- "test:integration:prod": "node tests/integration/run.production.js",
30
+ "test:integration:dev": "sh tests/integration/run.development.sh",
31
+ "test:integration:prod": "sh tests/integration/run.production.sh",
32
32
  "test:module": "vitest run tests/module/**",
33
33
  "typegen": "json2ts -i 'schemas/**/*.json' -o schemas --bannerComment ''"
34
34
  },
@@ -49,39 +49,39 @@
49
49
  ]
50
50
  },
51
51
  "dependencies": {
52
- "@apidevtools/json-schema-ref-parser": "^15.1.3",
53
- "@fastify/middie": "^9.1.0",
52
+ "@apidevtools/json-schema-ref-parser": "^15.3.1",
53
+ "@fastify/middie": "^9.2.0",
54
54
  "@fastify/static": "^9.0.0",
55
- "@fastify/swagger": "^9.6.1",
56
- "@fastify/swagger-ui": "^5.2.4",
57
- "ajv": "^8.17.1",
55
+ "@fastify/swagger": "^9.7.0",
56
+ "@fastify/swagger-ui": "^5.2.5",
57
+ "@vitejs/plugin-react": "^5.1.4",
58
+ "ajv": "^8.18.0",
58
59
  "ajv-formats": "^3.0.1",
59
- "dotenv": "^17.2.3",
60
+ "dotenv": "^17.3.1",
60
61
  "fast-glob": "^3.3.3",
61
62
  "fast-uri": "^3.1.0",
62
- "fastify": "^5.6.2",
63
+ "fastify": "^5.7.4",
63
64
  "fastify-graceful-shutdown": "^5.0.0",
64
65
  "json-schema-to-typescript": "^15.0.4",
65
66
  "vite": "^7.3.1",
66
67
  "vite-plugin-externals": "^0.6.2"
67
68
  },
68
69
  "devDependencies": {
69
- "@commitlint/cli": "^20.3.1",
70
- "@commitlint/config-conventional": "^20.3.1",
71
- "@playwright/test": "^1.57.0",
70
+ "@commitlint/cli": "^20.4.2",
71
+ "@commitlint/config-conventional": "^20.4.2",
72
+ "@playwright/test": "^1.58.2",
72
73
  "@tinkoff/eslint-config": "^5.0.1",
73
74
  "@tinkoff/eslint-config-react": "^5.0.1",
74
75
  "@tinkoff/prettier-config": "^5.0.0",
75
- "@types/react": "^19.2.8",
76
+ "@types/react": "^19.2.14",
76
77
  "@types/react-dom": "^19.2.3",
77
- "execa": "^9.6.1",
78
- "lint-staged": "^16.2.7",
79
- "react": "^19.2.3",
80
- "react-dom": "^19.2.3",
78
+ "lint-staged": "^16.3.1",
79
+ "react": "^19.2.4",
80
+ "react-dom": "^19.2.4",
81
81
  "simple-git-hooks": "^2.13.1",
82
- "sort-package-json": "^3.6.0",
82
+ "sort-package-json": "^3.6.1",
83
83
  "typescript": "^5.9.3",
84
- "vitest": "^4.0.16"
84
+ "vitest": "^4.0.18"
85
85
  },
86
86
  "peerDependencies": {
87
87
  "react": "^18.0.0 || ^19.0.0",
package/server/shared.ts CHANGED
@@ -35,8 +35,9 @@ export async function createServer(options: ServerOptions) {
35
35
 
36
36
  const app = fastify({
37
37
  logger: (await runLoggerHook(loadRuntimeHook)) ?? true,
38
- ignoreTrailingSlash: true,
39
- useSemicolonDelimiter: false,
38
+ routerOptions: {
39
+ ignoreTrailingSlash: true,
40
+ },
40
41
  // JSON parsing can take a long time and blocks the event loop,
41
42
  // so we need to limit the size of the body. 10MB is a good compromise
42
43
  // baseline that was chosen by experimenting with real world usage