@barefootjs/test 0.31.5 → 0.31.7
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/dist/index.js +4 -0
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -190091,6 +190091,7 @@ var ErrorCodes = {
|
|
|
190091
190091
|
COMPONENT_REQUIRED_PROP_MISSING: "BF046",
|
|
190092
190092
|
JSX_BRANCH_LOCAL_IN_CALLBACK: "BF047",
|
|
190093
190093
|
SIBLING_COMPONENT_NOT_COMPILED: "BF048",
|
|
190094
|
+
RICH_TYPE_PROP_NOT_HYDRATABLE: "BF049",
|
|
190094
190095
|
SHARED_PROGRAM_REQUIRED: "BF050",
|
|
190095
190096
|
WRONG_PACKAGE_IMPORT: "BF051",
|
|
190096
190097
|
BUILTIN_REQUIRES_IMPORT: "BF054",
|
|
@@ -190121,6 +190122,7 @@ var errorMessages = {
|
|
|
190121
190122
|
[ErrorCodes.COMPONENT_REQUIRED_PROP_MISSING]: "Built-in component is missing a required prop.",
|
|
190122
190123
|
[ErrorCodes.JSX_BRANCH_LOCAL_IN_CALLBACK]: "JSX-typed local declared inside an `if`-block cannot be referenced from a callback body (ref / event handler). " + "Render it as a child instead: `<div ref={...}>{local}</div>`.",
|
|
190123
190124
|
[ErrorCodes.SIBLING_COMPONENT_NOT_COMPILED]: "Referenced component did not compile to a template, so this reference would throw " + "`ReferenceError` at render time. Multi-return JSX dispatch (a `switch` or `if`/`else` " + "chain across multiple JSX-returning branches) cannot compile as a component in a " + `'use client' file. Extract it to a separate non-"use client" file (where it is preserved ` + "verbatim, see #932), or rewrite it as a single-return ternary/conditional chain so the " + "component pipeline can compile it.",
|
|
190125
|
+
[ErrorCodes.RICH_TYPE_PROP_NOT_HYDRATABLE]: "Rich-typed prop cannot cross the bf-p hydration boundary as JSON.",
|
|
190124
190126
|
[ErrorCodes.SHARED_PROGRAM_REQUIRED]: "Shared ts.Program required for type-based reactivity classification. This source imports a Reactive<T>-branded library (e.g. @barefootjs/form) whose getters cannot be classified by regex alone. Pass `options.program` (built via `createProgramForCorpus`) so the analyzer can resolve the brand through the TypeChecker.",
|
|
190125
190127
|
[ErrorCodes.WRONG_PACKAGE_IMPORT]: "Import from wrong package.",
|
|
190126
190128
|
[ErrorCodes.BUILTIN_REQUIRES_IMPORT]: "Built-in <Async> / <Region> must be imported from '@barefootjs/client'. " + "The compiler recognises these tags by their import (not by tag name), " + "so an unimported tag with this name is treated as an undeclared component.",
|
|
@@ -190180,6 +190182,8 @@ var HOST_RICH_TYPE_NAMES = new Set([
|
|
|
190180
190182
|
"BigInt",
|
|
190181
190183
|
"Function"
|
|
190182
190184
|
]);
|
|
190185
|
+
var JSON_REVIVABLE_RICH_TYPE_NAMES = new Set(["Date", "URL"]);
|
|
190186
|
+
var JSON_UNSAFE_RICH_TYPE_NAMES = new Set([...HOST_RICH_TYPE_NAMES].filter((n) => !JSON_REVIVABLE_RICH_TYPE_NAMES.has(n)));
|
|
190183
190187
|
function baseTypeName(raw) {
|
|
190184
190188
|
const idx = raw.indexOf("<");
|
|
190185
190189
|
return (idx === -1 ? raw : raw.slice(0, idx)).trim();
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@barefootjs/test",
|
|
3
|
-
"version": "0.31.
|
|
3
|
+
"version": "0.31.7",
|
|
4
4
|
"description": "Test utilities for BarefootJS - IR-based component testing without a browser",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -39,7 +39,7 @@
|
|
|
39
39
|
"directory": "packages/test"
|
|
40
40
|
},
|
|
41
41
|
"dependencies": {
|
|
42
|
-
"@barefootjs/jsx": "0.31.
|
|
42
|
+
"@barefootjs/jsx": "0.31.7"
|
|
43
43
|
},
|
|
44
44
|
"devDependencies": {
|
|
45
45
|
"typescript": "^5.0.0"
|