@nerest/nerest 1.7.4 → 1.8.0
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.
- package/build/configs/development.ts +1 -1
- package/build/configs/production.ts +2 -2
- package/build/configs/vite-logger.development.ts +2 -2
- package/build/excludes/index.ts +1 -1
- package/dist/build/configs/development.js +1 -1
- package/dist/build/configs/production.js +2 -2
- package/dist/build/configs/vite-logger.development.js +2 -2
- package/dist/build/excludes/index.d.ts +1 -1
- package/dist/build/excludes/index.js +1 -1
- package/dist/server/development.js +1 -1
- package/package.json +18 -18
- package/server/development.ts +4 -4
|
@@ -16,7 +16,7 @@ export async function viteConfigDevelopmentClient(
|
|
|
16
16
|
manifest: true,
|
|
17
17
|
modulePreload: false,
|
|
18
18
|
watch: {},
|
|
19
|
-
|
|
19
|
+
rolldownOptions: {
|
|
20
20
|
input: [
|
|
21
21
|
'/node_modules/@nerest/nerest/client/index.ts',
|
|
22
22
|
...args.appDirectories.map((dir) => path.join(dir, 'index.tsx')),
|
|
@@ -16,7 +16,7 @@ export async function viteConfigProductionClient(
|
|
|
16
16
|
// Manifest is needed to report used assets in SSR handles
|
|
17
17
|
manifest: true,
|
|
18
18
|
modulePreload: false,
|
|
19
|
-
|
|
19
|
+
rolldownOptions: {
|
|
20
20
|
input: [
|
|
21
21
|
'/node_modules/@nerest/nerest/client/index.ts',
|
|
22
22
|
...args.appDirectories.map((dir) => path.join(dir, 'index.tsx')),
|
|
@@ -51,7 +51,7 @@ export async function viteConfigProductionServer(
|
|
|
51
51
|
modulePreload: false,
|
|
52
52
|
// This is an important setting for producing a server build
|
|
53
53
|
ssr: true,
|
|
54
|
-
|
|
54
|
+
rolldownOptions: {
|
|
55
55
|
input: '/node_modules/@nerest/nerest/server/production.ts',
|
|
56
56
|
output: {
|
|
57
57
|
dir: 'build',
|
|
@@ -17,8 +17,8 @@ export default logger;
|
|
|
17
17
|
const ignoredErrors = [
|
|
18
18
|
// Hook files are optional, but in development vite logs an error even though
|
|
19
19
|
// we suppress the exception. Silence these logs manually.
|
|
20
|
-
['
|
|
21
|
-
['
|
|
20
|
+
['Error when evaluating SSR module', 'props.ts'],
|
|
21
|
+
['Error when evaluating SSR module', 'runtime.ts'],
|
|
22
22
|
];
|
|
23
23
|
|
|
24
24
|
function isIgnoredError(msg: string) {
|
package/build/excludes/index.ts
CHANGED
|
@@ -10,7 +10,7 @@ export async function viteConfigDevelopmentClient(args) {
|
|
|
10
10
|
manifest: true,
|
|
11
11
|
modulePreload: false,
|
|
12
12
|
watch: {},
|
|
13
|
-
|
|
13
|
+
rolldownOptions: {
|
|
14
14
|
input: [
|
|
15
15
|
'/node_modules/@nerest/nerest/client/index.ts',
|
|
16
16
|
...args.appDirectories.map((dir) => path.join(dir, 'index.tsx')),
|
|
@@ -10,7 +10,7 @@ export async function viteConfigProductionClient(args) {
|
|
|
10
10
|
// Manifest is needed to report used assets in SSR handles
|
|
11
11
|
manifest: true,
|
|
12
12
|
modulePreload: false,
|
|
13
|
-
|
|
13
|
+
rolldownOptions: {
|
|
14
14
|
input: [
|
|
15
15
|
'/node_modules/@nerest/nerest/client/index.ts',
|
|
16
16
|
...args.appDirectories.map((dir) => path.join(dir, 'index.tsx')),
|
|
@@ -42,7 +42,7 @@ export async function viteConfigProductionServer(args) {
|
|
|
42
42
|
modulePreload: false,
|
|
43
43
|
// This is an important setting for producing a server build
|
|
44
44
|
ssr: true,
|
|
45
|
-
|
|
45
|
+
rolldownOptions: {
|
|
46
46
|
input: '/node_modules/@nerest/nerest/server/production.ts',
|
|
47
47
|
output: {
|
|
48
48
|
dir: 'build',
|
|
@@ -13,8 +13,8 @@ export default logger;
|
|
|
13
13
|
const ignoredErrors = [
|
|
14
14
|
// Hook files are optional, but in development vite logs an error even though
|
|
15
15
|
// we suppress the exception. Silence these logs manually.
|
|
16
|
-
['
|
|
17
|
-
['
|
|
16
|
+
['Error when evaluating SSR module', 'props.ts'],
|
|
17
|
+
['Error when evaluating SSR module', 'runtime.ts'],
|
|
18
18
|
];
|
|
19
19
|
function isIgnoredError(msg) {
|
|
20
20
|
for (const markers of ignoredErrors) {
|
|
@@ -76,7 +76,7 @@ async function startClientBuildWatcher(config) {
|
|
|
76
76
|
const watcher = (await build(config));
|
|
77
77
|
return new Promise((resolve) => {
|
|
78
78
|
// We need to have a built manifest.json to provide assets
|
|
79
|
-
// links in SSR. We will wait for
|
|
79
|
+
// links in SSR. We will wait for rolldown to report when it
|
|
80
80
|
// has finished the build
|
|
81
81
|
const listener = (ev) => {
|
|
82
82
|
if (ev.code === 'END') {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nerest/nerest",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.8.0",
|
|
4
4
|
"description": "React micro frontend framework",
|
|
5
5
|
"homepage": "https://github.com/nerestjs/nerest",
|
|
6
6
|
"repository": {
|
|
@@ -49,39 +49,39 @@
|
|
|
49
49
|
]
|
|
50
50
|
},
|
|
51
51
|
"dependencies": {
|
|
52
|
-
"@apidevtools/json-schema-ref-parser": "^15.3.
|
|
53
|
-
"@fastify/middie": "^9.
|
|
54
|
-
"@fastify/static": "^9.
|
|
52
|
+
"@apidevtools/json-schema-ref-parser": "^15.3.5",
|
|
53
|
+
"@fastify/middie": "^9.3.1",
|
|
54
|
+
"@fastify/static": "^9.1.0",
|
|
55
55
|
"@fastify/swagger": "^9.7.0",
|
|
56
56
|
"@fastify/swagger-ui": "^5.2.5",
|
|
57
|
-
"@vitejs/plugin-react": "^
|
|
57
|
+
"@vitejs/plugin-react": "^6.0.1",
|
|
58
58
|
"ajv": "^8.18.0",
|
|
59
59
|
"ajv-formats": "^3.0.1",
|
|
60
|
-
"dotenv": "^17.
|
|
60
|
+
"dotenv": "^17.4.1",
|
|
61
61
|
"fast-glob": "^3.3.3",
|
|
62
62
|
"fast-uri": "^3.1.0",
|
|
63
|
-
"fastify": "^5.
|
|
63
|
+
"fastify": "^5.8.4",
|
|
64
64
|
"fastify-graceful-shutdown": "^5.0.0",
|
|
65
65
|
"json-schema-to-typescript": "^15.0.4",
|
|
66
|
-
"vite": "^
|
|
66
|
+
"vite": "^8.0.7",
|
|
67
67
|
"vite-plugin-externals": "^0.6.2"
|
|
68
68
|
},
|
|
69
69
|
"devDependencies": {
|
|
70
|
-
"@commitlint/cli": "^20.
|
|
71
|
-
"@commitlint/config-conventional": "^20.
|
|
72
|
-
"@playwright/test": "^1.
|
|
73
|
-
"@tinkoff/eslint-config": "^5.0
|
|
74
|
-
"@tinkoff/eslint-config-react": "^5.0
|
|
70
|
+
"@commitlint/cli": "^20.5.0",
|
|
71
|
+
"@commitlint/config-conventional": "^20.5.0",
|
|
72
|
+
"@playwright/test": "^1.59.1",
|
|
73
|
+
"@tinkoff/eslint-config": "^5.2.0",
|
|
74
|
+
"@tinkoff/eslint-config-react": "^5.2.0",
|
|
75
75
|
"@tinkoff/prettier-config": "^5.0.0",
|
|
76
76
|
"@types/react": "^19.2.14",
|
|
77
77
|
"@types/react-dom": "^19.2.3",
|
|
78
|
-
"lint-staged": "^16.
|
|
79
|
-
"react": "^19.2.
|
|
80
|
-
"react-dom": "^19.2.
|
|
78
|
+
"lint-staged": "^16.4.0",
|
|
79
|
+
"react": "^19.2.5",
|
|
80
|
+
"react-dom": "^19.2.5",
|
|
81
81
|
"simple-git-hooks": "^2.13.1",
|
|
82
82
|
"sort-package-json": "^3.6.1",
|
|
83
|
-
"typescript": "^
|
|
84
|
-
"vitest": "^4.
|
|
83
|
+
"typescript": "^6.0.2",
|
|
84
|
+
"vitest": "^4.1.4"
|
|
85
85
|
},
|
|
86
86
|
"peerDependencies": {
|
|
87
87
|
"react": "^18.0.0 || ^19.0.0",
|
package/server/development.ts
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import path from 'path';
|
|
3
3
|
import { build, createServer as createViteServer } from 'vite';
|
|
4
4
|
import type { InlineConfig } from 'vite';
|
|
5
|
-
import type {
|
|
5
|
+
import type { RolldownWatcher, RolldownWatcherEvent } from 'rolldown';
|
|
6
6
|
import fastifyStatic from '@fastify/static';
|
|
7
7
|
import fastifyMiddie from '@fastify/middie';
|
|
8
8
|
import { createServer } from './shared.js';
|
|
@@ -103,12 +103,12 @@ export async function runDevelopmentServer(port: number) {
|
|
|
103
103
|
}
|
|
104
104
|
|
|
105
105
|
async function startClientBuildWatcher(config: InlineConfig) {
|
|
106
|
-
const watcher = (await build(config)) as
|
|
106
|
+
const watcher = (await build(config)) as RolldownWatcher;
|
|
107
107
|
return new Promise<void>((resolve) => {
|
|
108
108
|
// We need to have a built manifest.json to provide assets
|
|
109
|
-
// links in SSR. We will wait for
|
|
109
|
+
// links in SSR. We will wait for rolldown to report when it
|
|
110
110
|
// has finished the build
|
|
111
|
-
const listener = (ev:
|
|
111
|
+
const listener = (ev: RolldownWatcherEvent) => {
|
|
112
112
|
if (ev.code === 'END') {
|
|
113
113
|
watcher.off('event', listener);
|
|
114
114
|
resolve();
|