@nifrajs/web-solid 5.2.0 → 5.3.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/CHANGELOG.md +33 -0
- package/dist/index.js +3 -4
- package/dist/index.js.map +1 -1
- package/package.json +5 -5
- package/src/index.ts +3 -3
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,38 @@
|
|
|
1
1
|
# @nifrajs/web-solid
|
|
2
2
|
|
|
3
|
+
## 5.3.0
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- 90433ee: Solid server renders no longer read `process.env.NODE_ENV` on every render. The check that keeps a caught server error's text out of the hydration script now runs only when an error is serialized, with the same outcome: outside development and test, including an unset `NODE_ENV`, the browser receives "Internal Server Error". On Node, where each `process.env` read is a native call, the SSR benchmark's catalog page renders about 1.5% faster.
|
|
8
|
+
- Updated dependencies [7ab9692]
|
|
9
|
+
- Updated dependencies [7ab9692]
|
|
10
|
+
- Updated dependencies [0e1d03f]
|
|
11
|
+
- Updated dependencies [808bac8]
|
|
12
|
+
- Updated dependencies [605c246]
|
|
13
|
+
- Updated dependencies [271917a]
|
|
14
|
+
- Updated dependencies [d4bae56]
|
|
15
|
+
- Updated dependencies [007060d]
|
|
16
|
+
- Updated dependencies [69dfb60]
|
|
17
|
+
- Updated dependencies [190ab39]
|
|
18
|
+
- Updated dependencies [605c246]
|
|
19
|
+
- Updated dependencies [13224fe]
|
|
20
|
+
- Updated dependencies [00c266e]
|
|
21
|
+
- Updated dependencies [7cf8df3]
|
|
22
|
+
- @nifrajs/core@5.3.0
|
|
23
|
+
- @nifrajs/i18n@5.3.0
|
|
24
|
+
- @nifrajs/image@5.3.0
|
|
25
|
+
- @nifrajs/web@5.3.0
|
|
26
|
+
|
|
27
|
+
## 5.2.1
|
|
28
|
+
|
|
29
|
+
### Patch Changes
|
|
30
|
+
|
|
31
|
+
- @nifrajs/core@5.2.1
|
|
32
|
+
- @nifrajs/i18n@5.2.1
|
|
33
|
+
- @nifrajs/image@5.2.1
|
|
34
|
+
- @nifrajs/web@5.2.1
|
|
35
|
+
|
|
3
36
|
## 5.2.0
|
|
4
37
|
|
|
5
38
|
### Minor Changes
|
package/dist/index.js
CHANGED
|
@@ -19,17 +19,16 @@ function redactedError() {
|
|
|
19
19
|
/**
|
|
20
20
|
* Render `app` with every Error that Solid serializes for hydration replaced. An `<ErrorBoundary>` that
|
|
21
21
|
* caught on the server, or a failed resource, otherwise ships the message and stack in an inline script.
|
|
22
|
-
* Nested contexts copy this one, so they keep the wrapped `serialize`.
|
|
22
|
+
* Nested contexts copy this one, so they keep the wrapped `serialize`. NODE_ENV is read only when an
|
|
23
|
+
* Error is serialized: on Node every `process.env` read is a native call, and this runs every render.
|
|
23
24
|
*/
|
|
24
25
|
function redactingErrors(app) {
|
|
25
|
-
if (showsErrors())
|
|
26
|
-
return app;
|
|
27
26
|
return () => {
|
|
28
27
|
// biome-ignore lint/plugin/requireSafetyCommentForTypeAssertion: Solid's server renderers set a context with serialize; the check below handles its absence.
|
|
29
28
|
const context = sharedConfig.context;
|
|
30
29
|
const serialize = context?.serialize;
|
|
31
30
|
if (context !== undefined && serialize !== undefined) {
|
|
32
|
-
context.serialize = (id, value) => serialize(id, value instanceof Error ? redactedError() : value);
|
|
31
|
+
context.serialize = (id, value) => serialize(id, value instanceof Error && !showsErrors() ? redactedError() : value);
|
|
33
32
|
}
|
|
34
33
|
return app();
|
|
35
34
|
};
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAOA,OAAO,EAAE,YAAY,EAAE,MAAM,UAAU,CAAA;AACvC,OAAO,EACL,uBAAuB,EACvB,cAAc,IAAI,mBAAmB,EACrC,cAAc,IAAI,mBAAmB,GACtC,MAAM,cAAc,CAAA;AACrB,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAA;A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C3F,6FAA6F;QAC7F,4FAA4F;QAC5F,oGAAoG;QACpG,MAAM,EAAE,GAAG,IAAI,eAAe,EAA0B,CAAA;QACxD,MAAM,GAAG,GAAG,eAAe,CAAC,OAAO,CAAC,KAAK,EAAE,KAAK,CAAC,CAAC,CAAA;QAClD,MAAM,MAAM,GACV,OAAO,EAAE,KAAK,KAAK,SAAS;YAC1B,CAAC,CAAC,mBAAmB,CAAC,GAAG,CAAC;YAC1B,CAAC,CAAC,mBAAmB,CAAC,GAAG,EAAE,EAAE,KAAK,EAAE,OAAO,CAAC,KAAK,EAAE,CAAC,CAAA;QACxD,MAAM,CAAC,MAAM,CAAC,EAAE,CAAC,QAAQ,CAAC,CAAA;QAC1B,OAAO,EAAE,CAAC,QAAQ,CAAA;IACpB,CAAC;IACD,aAAa;QACX,OAAO,cAAc,CAAA;IACvB,CAAC;CACF,CAAA"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nifrajs/web-solid",
|
|
3
|
-
"version": "5.
|
|
3
|
+
"version": "5.3.0",
|
|
4
4
|
"description": "Solid render adapter for @nifrajs/web - SSR + hydration, with the Solid Babel build plugin (@nifrajs/web-solid/plugin).",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"bun",
|
|
@@ -122,10 +122,10 @@
|
|
|
122
122
|
"dependencies": {
|
|
123
123
|
"@babel/core": "^7.26.0",
|
|
124
124
|
"@babel/preset-typescript": "^7.26.0",
|
|
125
|
-
"@nifrajs/core": "5.
|
|
126
|
-
"@nifrajs/i18n": "5.
|
|
127
|
-
"@nifrajs/image": "5.
|
|
128
|
-
"@nifrajs/web": "5.
|
|
125
|
+
"@nifrajs/core": "5.3.0",
|
|
126
|
+
"@nifrajs/i18n": "5.3.0",
|
|
127
|
+
"@nifrajs/image": "5.3.0",
|
|
128
|
+
"@nifrajs/web": "5.3.0",
|
|
129
129
|
"babel-preset-solid": "^1.9.3",
|
|
130
130
|
"solid-refresh": "^0.7.8"
|
|
131
131
|
},
|
package/src/index.ts
CHANGED
|
@@ -34,10 +34,10 @@ function redactedError(): Error {
|
|
|
34
34
|
/**
|
|
35
35
|
* Render `app` with every Error that Solid serializes for hydration replaced. An `<ErrorBoundary>` that
|
|
36
36
|
* caught on the server, or a failed resource, otherwise ships the message and stack in an inline script.
|
|
37
|
-
* Nested contexts copy this one, so they keep the wrapped `serialize`.
|
|
37
|
+
* Nested contexts copy this one, so they keep the wrapped `serialize`. NODE_ENV is read only when an
|
|
38
|
+
* Error is serialized: on Node every `process.env` read is a native call, and this runs every render.
|
|
38
39
|
*/
|
|
39
40
|
function redactingErrors<T>(app: () => T): () => T {
|
|
40
|
-
if (showsErrors()) return app
|
|
41
41
|
return () => {
|
|
42
42
|
// biome-ignore lint/plugin/requireSafetyCommentForTypeAssertion: Solid's server renderers set a context with serialize; the check below handles its absence.
|
|
43
43
|
const context = sharedConfig.context as
|
|
@@ -46,7 +46,7 @@ function redactingErrors<T>(app: () => T): () => T {
|
|
|
46
46
|
const serialize = context?.serialize
|
|
47
47
|
if (context !== undefined && serialize !== undefined) {
|
|
48
48
|
context.serialize = (id, value) =>
|
|
49
|
-
serialize(id, value instanceof Error ? redactedError() : value)
|
|
49
|
+
serialize(id, value instanceof Error && !showsErrors() ? redactedError() : value)
|
|
50
50
|
}
|
|
51
51
|
return app()
|
|
52
52
|
}
|