@barefootjs/test 0.28.0 → 0.29.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.
Files changed (2) hide show
  1. package/dist/index.js +17 -10
  2. package/package.json +2 -2
package/dist/index.js CHANGED
@@ -189819,6 +189819,7 @@ var ErrorCodes = {
189819
189819
  SHARED_PROGRAM_REQUIRED: "BF050",
189820
189820
  WRONG_PACKAGE_IMPORT: "BF051",
189821
189821
  BUILTIN_REQUIRES_IMPORT: "BF054",
189822
+ INLINED_IMPORT_MISSING_EXPORT: "BF055",
189822
189823
  UNDECLARED_INIT_STATEMENT_REFERENCE: "BF052",
189823
189824
  STRIPPED_CLIENT_IMPORT_REFERENCED: "BF053",
189824
189825
  STAGE_REACTIVE_IN_TEMPLATE: "BF060",
@@ -189849,6 +189850,7 @@ var errorMessages = {
189849
189850
  [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.",
189850
189851
  [ErrorCodes.UNDECLARED_INIT_STATEMENT_REFERENCE]: "Init statement references an undeclared identifier. Declare it at module scope, inside the component, or import it — otherwise ESM strict mode throws ReferenceError at runtime.",
189851
189852
  [ErrorCodes.STRIPPED_CLIENT_IMPORT_REFERENCED]: "Import was stripped from the client bundle but its binding is still referenced. Client components ('use client' .tsx) are not callable as plain functions from imperative .ts modules — render them as JSX from a 'use client' parent instead. If the flagged name is a local shadow rather than the stripped import, please file an issue.",
189853
+ [ErrorCodes.INLINED_IMPORT_MISSING_EXPORT]: "An inlined relative import requests a name the target module does not export. The client bundle would throw ReferenceError at load.",
189852
189854
  [ErrorCodes.STAGE_REACTIVE_IN_TEMPLATE]: "Reactive binding (signal getter or memo) referenced from template scope. The template lambda runs at module scope without the reactive context, so the value cannot be evaluated at SSR. Wrap the JSX expression in /* @client */ to defer it to hydrate, or restructure so the template uses a prop or static value.",
189853
189855
  [ErrorCodes.STAGE_INIT_LOCAL_IN_TEMPLATE]: "Init-scope local referenced from template scope. The template lambda runs at module scope (via render() / renderChild()) and cannot reach init-body locals. Wrap the JSX expression in /* @client */, or lift the value to a prop or module-scope const.",
189854
189856
  [ErrorCodes.STAGE_AWAIT_IN_TEMPLATE]: "AwaitExpression in template scope. The generated template and init functions are synchronous — a bare `await` produces a SyntaxError at parse time. Move the await into the component body (before the return) or into an onMount/effect callback, and pass the resolved value to JSX.",
@@ -192326,6 +192328,8 @@ function importsBrowserOnlyClientApi(ctx) {
192326
192328
  if (imp.isTypeOnly)
192327
192329
  continue;
192328
192330
  for (const spec of imp.specifiers) {
192331
+ if (spec.isTypeOnly)
192332
+ continue;
192329
192333
  const importedName = spec.name;
192330
192334
  if (BROWSER_ONLY_CLIENT_APIS.has(importedName))
192331
192335
  return true;
@@ -197938,9 +197942,12 @@ var KEYWORDS_AND_GLOBALS = new Set([
197938
197942
  // ../jsx/src/ir-to-client-js/walk-prop-accesses.ts
197939
197943
  var import_typescript12 = __toESM(require_typescript(), 1);
197940
197944
 
197941
- // ../jsx/src/relocate.ts
197945
+ // ../jsx/src/value-references.ts
197942
197946
  var import_typescript13 = __toESM(require_typescript(), 1);
197943
197947
 
197948
+ // ../jsx/src/relocate.ts
197949
+ var import_typescript14 = __toESM(require_typescript(), 1);
197950
+
197944
197951
  // ../jsx/src/lowering-registry.ts
197945
197952
  var plugins = [];
197946
197953
  function registerLoweringPlugin(plugin) {
@@ -198161,7 +198168,7 @@ var INERT_BINDING_GLOBALS = new Set([
198161
198168
  ]);
198162
198169
 
198163
198170
  // ../jsx/src/ir-to-client-js/emit-reactive.ts
198164
- var import_typescript14 = __toESM(require_typescript(), 1);
198171
+ var import_typescript15 = __toESM(require_typescript(), 1);
198165
198172
 
198166
198173
  // ../jsx/src/ir-to-client-js/control-flow/stringify/event-delegation.ts
198167
198174
  var NON_BUBBLING_EVENTS = new Set([
@@ -198176,7 +198183,7 @@ var NON_BUBBLING_EVENTS = new Set([
198176
198183
  ]);
198177
198184
 
198178
198185
  // ../jsx/src/ir-to-client-js/rewrite-props-object.ts
198179
- var import_typescript15 = __toESM(require_typescript(), 1);
198186
+ var import_typescript16 = __toESM(require_typescript(), 1);
198180
198187
 
198181
198188
  // ../jsx/src/ir-to-client-js/source-map.ts
198182
198189
  var BASE64_CHARS = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
@@ -198267,21 +198274,21 @@ class SourceMapGenerator {
198267
198274
  }
198268
198275
 
198269
198276
  // ../jsx/src/preprocess-inline-jsx-callbacks.ts
198270
- var import_typescript16 = __toESM(require_typescript(), 1);
198277
+ var import_typescript17 = __toESM(require_typescript(), 1);
198271
198278
 
198272
198279
  // ../jsx/src/ssr-defaults.ts
198273
- var import_typescript17 = __toESM(require_typescript(), 1);
198280
+ var import_typescript18 = __toESM(require_typescript(), 1);
198274
198281
  var UNRESOLVED = Symbol("unresolved");
198275
198282
  var NO_RETURN = Symbol("no-return");
198276
198283
 
198277
198284
  // ../jsx/src/augment-inherited-props.ts
198278
- var import_typescript18 = __toESM(require_typescript(), 1);
198285
+ var import_typescript19 = __toESM(require_typescript(), 1);
198279
198286
 
198280
198287
  // ../jsx/src/rich-type-refusal.ts
198281
198288
  var EMPTY_BINDINGS2 = new Map;
198282
198289
  // ../jsx/src/shared-program.ts
198283
198290
  init_path();
198284
- var import_typescript19 = __toESM(require_typescript(), 1);
198291
+ var import_typescript20 = __toESM(require_typescript(), 1);
198285
198292
  // ../jsx/src/adapters/interface.ts
198286
198293
  class BaseAdapter {
198287
198294
  renderChildren(children) {
@@ -198820,9 +198827,9 @@ function registerBuiltinLoweringPlugins() {
198820
198827
  registerLoweringPlugin(plugin);
198821
198828
  }
198822
198829
  // ../jsx/src/combine-client-js.ts
198823
- var import_typescript20 = __toESM(require_typescript(), 1);
198824
- // ../jsx/src/debug.ts
198825
198830
  var import_typescript21 = __toESM(require_typescript(), 1);
198831
+ // ../jsx/src/debug.ts
198832
+ var import_typescript22 = __toESM(require_typescript(), 1);
198826
198833
  function escapeForIdBoundary(name) {
198827
198834
  return name.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
198828
198835
  }
@@ -198914,7 +198921,7 @@ function resolveSetters(handler, setterToSignal, fnSetters) {
198914
198921
  return refs;
198915
198922
  }
198916
198923
  // ../jsx/src/profiler.ts
198917
- var import_typescript22 = __toESM(require_typescript(), 1);
198924
+ var import_typescript23 = __toESM(require_typescript(), 1);
198918
198925
 
198919
198926
  // ../jsx/src/index.ts
198920
198927
  registerBuiltinLoweringPlugins();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@barefootjs/test",
3
- "version": "0.28.0",
3
+ "version": "0.29.0",
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.28.0"
42
+ "@barefootjs/jsx": "0.29.0"
43
43
  },
44
44
  "devDependencies": {
45
45
  "typescript": "^5.0.0"