@valbuild/tanstack-build 0.149.2 → 0.150.9
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 +17 -0
- package/dist/declarations/src/contract.d.ts +46 -0
- package/dist/declarations/src/index.d.ts +1 -0
- package/dist/declarations/src/node/index.d.ts +1 -0
- package/dist/declarations/src/node/rolldown.d.ts +6 -0
- package/dist/declarations/src/node/vendorLayer.d.ts +15 -1
- package/dist/declarations/src/rolldown.d.ts +38 -0
- package/dist/{regeneratorValues-77cb8c45.esm.js → regeneratorValues-a8bd356a.esm.js} +1 -1
- package/dist/valbuild-tanstack-build.cjs.dev.js +123 -25
- package/dist/valbuild-tanstack-build.cjs.prod.js +123 -25
- package/dist/valbuild-tanstack-build.esm.js +102 -24
- package/node/dist/valbuild-tanstack-build-node.cjs.dev.js +314 -16
- package/node/dist/valbuild-tanstack-build-node.cjs.prod.js +314 -16
- package/node/dist/valbuild-tanstack-build-node.esm.js +316 -19
- package/package.json +2 -2
|
@@ -3,12 +3,85 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
var regeneratorValues = require('./regeneratorValues-eb61e1b2.cjs.prod.js');
|
|
6
|
-
var browser = require('@rolldown/browser');
|
|
7
6
|
var projectPaths = require('./projectPaths-9cbecebf.cjs.prod.js');
|
|
8
|
-
var parseAst = require('@rolldown/browser/parseAst');
|
|
9
7
|
var tailwindcss = require('tailwindcss');
|
|
10
8
|
var artifactKeys = require('./artifactKeys-700b9044.cjs.prod.js');
|
|
11
9
|
|
|
10
|
+
function _interopNamespace(e) {
|
|
11
|
+
if (e && e.__esModule) return e;
|
|
12
|
+
var n = Object.create(null);
|
|
13
|
+
if (e) {
|
|
14
|
+
Object.keys(e).forEach(function (k) {
|
|
15
|
+
if (k !== 'default') {
|
|
16
|
+
var d = Object.getOwnPropertyDescriptor(e, k);
|
|
17
|
+
Object.defineProperty(n, k, d.get ? d : {
|
|
18
|
+
enumerable: true,
|
|
19
|
+
get: function () { return e[k]; }
|
|
20
|
+
});
|
|
21
|
+
}
|
|
22
|
+
});
|
|
23
|
+
}
|
|
24
|
+
n["default"] = e;
|
|
25
|
+
return Object.freeze(n);
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
/**
|
|
29
|
+
* The bundler the build runs on, chosen by where it runs.
|
|
30
|
+
*
|
|
31
|
+
* The build is the same code in a browser tab and in Node, and rolldown comes
|
|
32
|
+
* in two builds with one API: `@rolldown/browser`, compiled to WebAssembly,
|
|
33
|
+
* and `rolldown`, the native one. A tab can only have the first. Node should
|
|
34
|
+
* not load it: it reaches its WebAssembly through `@napi-rs/wasm-runtime`, a
|
|
35
|
+
* dependency whose version the SITE'S lockfile picks, and rolldown's own
|
|
36
|
+
* ranges have let a release in that does not load (2026-10-26, below). The
|
|
37
|
+
* native one has no such glue. So nothing in this package imports either
|
|
38
|
+
* statically: Node is handed the native one (`useRolldown`, with
|
|
39
|
+
* `nativeRolldown` from `@valbuild/tanstack-build/node`), and anything not
|
|
40
|
+
* handed one gets the browser build, imported on first use.
|
|
41
|
+
*
|
|
42
|
+
* Why not just the browser build in both, as it was until 2026-10-26:
|
|
43
|
+
* `@rolldown/browser` 1.2.15 pins `@emnapi/core` 2.0.0-alpha.5 and asks for
|
|
44
|
+
* `@napi-rs/wasm-runtime` `~1.2.5`, and wasm-runtime 1.2.6 (2026-10-25) only
|
|
45
|
+
* works with `@emnapi/core` 1.x or 2.0.0-beta.2 -- loading it throws
|
|
46
|
+
* "Cannot set properties of undefined (setting 'initWorker')". Any site whose
|
|
47
|
+
* lockfile was resolved after that release (an upgrade, a `pnpm update`)
|
|
48
|
+
* could no longer `val publish`. The Studio's tab and Val Build's upgrade page
|
|
49
|
+
* are not exposed to it: they bundle the browser build from their own
|
|
50
|
+
* lockfiles, where the builder tab's end-to-end specs load it before a
|
|
51
|
+
* release.
|
|
52
|
+
*/
|
|
53
|
+
|
|
54
|
+
var chosen = null;
|
|
55
|
+
|
|
56
|
+
/** Build on `rolldown` from now on. Node calls it with `nativeRolldown`. */
|
|
57
|
+
function useRolldown(rolldown) {
|
|
58
|
+
chosen = Promise.resolve(rolldown);
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
/**
|
|
62
|
+
* The bundler, loading the browser build if nobody chose one. Called early by
|
|
63
|
+
* a tab that wants the WebAssembly compiled before the first build needs it.
|
|
64
|
+
*/
|
|
65
|
+
function loadRolldown() {
|
|
66
|
+
if (chosen === null) {
|
|
67
|
+
var loading = Promise.all([Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require('@rolldown/browser')); }), Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require('@rolldown/browser/parseAst')); })]).then(function (_ref) {
|
|
68
|
+
var _ref2 = regeneratorValues._slicedToArray(_ref, 2),
|
|
69
|
+
bundler = _ref2[0],
|
|
70
|
+
parser = _ref2[1];
|
|
71
|
+
return {
|
|
72
|
+
build: bundler.build,
|
|
73
|
+
parseAstAsync: parser.parseAstAsync
|
|
74
|
+
};
|
|
75
|
+
});
|
|
76
|
+
// A load that failed is tried again by the next caller, not kept.
|
|
77
|
+
loading["catch"](function () {
|
|
78
|
+
if (chosen === loading) chosen = null;
|
|
79
|
+
});
|
|
80
|
+
chosen = loading;
|
|
81
|
+
}
|
|
82
|
+
return chosen;
|
|
83
|
+
}
|
|
84
|
+
|
|
12
85
|
// A minimal posix path resolver. The builder runs in the browser, so node:path
|
|
13
86
|
// is unavailable, and pulling a polyfill in for two functions is not worth it.
|
|
14
87
|
|
|
@@ -63,14 +136,20 @@ function parse(_x, _x2) {
|
|
|
63
136
|
/** Depth-first walk carrying a parent stack, nearest parent last. */
|
|
64
137
|
function _parse() {
|
|
65
138
|
_parse = regeneratorValues._asyncToGenerator(/*#__PURE__*/regeneratorValues._regenerator().m(function _callee(path, code) {
|
|
139
|
+
var _yield$loadRolldown, parseAstAsync;
|
|
66
140
|
return regeneratorValues._regenerator().w(function (_context) {
|
|
67
141
|
while (1) switch (_context.n) {
|
|
68
142
|
case 0:
|
|
69
143
|
_context.n = 1;
|
|
70
|
-
return
|
|
144
|
+
return loadRolldown();
|
|
145
|
+
case 1:
|
|
146
|
+
_yield$loadRolldown = _context.v;
|
|
147
|
+
parseAstAsync = _yield$loadRolldown.parseAstAsync;
|
|
148
|
+
_context.n = 2;
|
|
149
|
+
return parseAstAsync(code, {
|
|
71
150
|
lang: langOf(path)
|
|
72
151
|
}, path);
|
|
73
|
-
case
|
|
152
|
+
case 2:
|
|
74
153
|
return _context.a(2, _context.v);
|
|
75
154
|
}
|
|
76
155
|
}, _callee);
|
|
@@ -620,16 +699,21 @@ function importsOf(_x, _x2) {
|
|
|
620
699
|
}
|
|
621
700
|
function _importsOf() {
|
|
622
701
|
_importsOf = regeneratorValues._asyncToGenerator(/*#__PURE__*/regeneratorValues._regenerator().m(function _callee(path, code) {
|
|
623
|
-
var lang, ast, sources, _iterator, _step, statement, source;
|
|
702
|
+
var lang, _yield$loadRolldown, parseAstAsync, ast, sources, _iterator, _step, statement, source;
|
|
624
703
|
return regeneratorValues._regenerator().w(function (_context) {
|
|
625
704
|
while (1) switch (_context.n) {
|
|
626
705
|
case 0:
|
|
627
706
|
lang = path.endsWith(".tsx") || path.endsWith(".jsx") ? "tsx" : "ts";
|
|
628
707
|
_context.n = 1;
|
|
629
|
-
return
|
|
708
|
+
return loadRolldown();
|
|
709
|
+
case 1:
|
|
710
|
+
_yield$loadRolldown = _context.v;
|
|
711
|
+
parseAstAsync = _yield$loadRolldown.parseAstAsync;
|
|
712
|
+
_context.n = 2;
|
|
713
|
+
return parseAstAsync(code, {
|
|
630
714
|
lang: lang
|
|
631
715
|
}, path);
|
|
632
|
-
case
|
|
716
|
+
case 2:
|
|
633
717
|
ast = _context.v;
|
|
634
718
|
sources = [];
|
|
635
719
|
_iterator = regeneratorValues._createForOfIteratorHelper(ast.body);
|
|
@@ -1101,7 +1185,7 @@ var packageJson = {
|
|
|
1101
1185
|
url: "git+https://github.com/valbuild/val.git"
|
|
1102
1186
|
},
|
|
1103
1187
|
license: "MIT",
|
|
1104
|
-
version: "0.
|
|
1188
|
+
version: "0.150.9",
|
|
1105
1189
|
sideEffects: false,
|
|
1106
1190
|
main: "dist/valbuild-tanstack-build.cjs.js",
|
|
1107
1191
|
module: "dist/valbuild-tanstack-build.esm.js",
|
|
@@ -1166,7 +1250,7 @@ var packageJson = {
|
|
|
1166
1250
|
"@types/jest": "^30.0.0",
|
|
1167
1251
|
"@types/node": "^26.4.0",
|
|
1168
1252
|
"@types/react": "^19.2.18",
|
|
1169
|
-
rolldown: "
|
|
1253
|
+
rolldown: "1.2.9",
|
|
1170
1254
|
tsx: "^4.23.12",
|
|
1171
1255
|
typescript: "^6.0.3"
|
|
1172
1256
|
},
|
|
@@ -3773,6 +3857,8 @@ function _buildOnce() {
|
|
|
3773
3857
|
aliases,
|
|
3774
3858
|
vendor,
|
|
3775
3859
|
projectVendor,
|
|
3860
|
+
_yield$loadRolldown,
|
|
3861
|
+
build,
|
|
3776
3862
|
result,
|
|
3777
3863
|
chunks,
|
|
3778
3864
|
entry,
|
|
@@ -3806,7 +3892,12 @@ function _buildOnce() {
|
|
|
3806
3892
|
// it runs on the server, so server-only code stays and client-only code goes.
|
|
3807
3893
|
// Only the vendor layer differs.
|
|
3808
3894
|
_context2.n = 1;
|
|
3809
|
-
return
|
|
3895
|
+
return loadRolldown();
|
|
3896
|
+
case 1:
|
|
3897
|
+
_yield$loadRolldown = _context2.v;
|
|
3898
|
+
build = _yield$loadRolldown.build;
|
|
3899
|
+
_context2.n = 2;
|
|
3900
|
+
return build({
|
|
3810
3901
|
input: isRsc ? RSC_ENTRY_ID : projectPaths.ENTRY,
|
|
3811
3902
|
// Required in the browser. rolldown computes `cwd: inputOptions.cwd ??
|
|
3812
3903
|
// process.cwd()` unguarded, so omitting this throws "process is not
|
|
@@ -3842,7 +3933,7 @@ function _buildOnce() {
|
|
|
3842
3933
|
},
|
|
3843
3934
|
write: false
|
|
3844
3935
|
});
|
|
3845
|
-
case
|
|
3936
|
+
case 2:
|
|
3846
3937
|
result = _context2.v;
|
|
3847
3938
|
// A type predicate rather than `(chunk: any)`, which is how this read until
|
|
3848
3939
|
// the package moved into a repository that type-checks it: an `any`
|
|
@@ -3857,13 +3948,13 @@ function _buildOnce() {
|
|
|
3857
3948
|
return chunk.fileName === ENTRY_CHUNK;
|
|
3858
3949
|
});
|
|
3859
3950
|
if (entry) {
|
|
3860
|
-
_context2.n =
|
|
3951
|
+
_context2.n = 3;
|
|
3861
3952
|
break;
|
|
3862
3953
|
}
|
|
3863
3954
|
throw new Error("The build produced no ".concat(ENTRY_CHUNK, ". Chunks: ").concat(chunks.map(function (c) {
|
|
3864
3955
|
return c.fileName;
|
|
3865
3956
|
}).join(", "), "."));
|
|
3866
|
-
case
|
|
3957
|
+
case 3:
|
|
3867
3958
|
// Chunk-to-chunk imports come out relative (`./c-abc.js`), which is exactly
|
|
3868
3959
|
// what both sides need and why neither gets a base path here: relative to
|
|
3869
3960
|
// `app.js` in the module map, relative to `/_app/app.js` as a URL.
|
|
@@ -4537,7 +4628,7 @@ function bundleValModules(_x) {
|
|
|
4537
4628
|
function _bundleValModules() {
|
|
4538
4629
|
_bundleValModules = regeneratorValues._asyncToGenerator(/*#__PURE__*/regeneratorValues._regenerator().m(function _callee(input) {
|
|
4539
4630
|
var _input$entry;
|
|
4540
|
-
var files, target, origin, entry, warnings, aliases, base, project, resolveProjectPath, result, chunks, _t;
|
|
4631
|
+
var files, target, origin, entry, warnings, aliases, base, project, resolveProjectPath, _yield$loadRolldown, build, result, chunks, _t;
|
|
4541
4632
|
return regeneratorValues._regenerator().w(function (_context) {
|
|
4542
4633
|
while (1) switch (_context.p = _context.n) {
|
|
4543
4634
|
case 0:
|
|
@@ -4560,9 +4651,14 @@ function _bundleValModules() {
|
|
|
4560
4651
|
resolveProjectPath = function resolveProjectPath(path) {
|
|
4561
4652
|
return resolveInFiles(path, files);
|
|
4562
4653
|
};
|
|
4563
|
-
_context.
|
|
4564
|
-
|
|
4565
|
-
|
|
4654
|
+
_context.n = 2;
|
|
4655
|
+
return loadRolldown();
|
|
4656
|
+
case 2:
|
|
4657
|
+
_yield$loadRolldown = _context.v;
|
|
4658
|
+
build = _yield$loadRolldown.build;
|
|
4659
|
+
_context.p = 3;
|
|
4660
|
+
_context.n = 4;
|
|
4661
|
+
return build({
|
|
4566
4662
|
input: entry,
|
|
4567
4663
|
// See `buildOnce`: required in the browser, inert here.
|
|
4568
4664
|
cwd: "/",
|
|
@@ -4634,31 +4730,31 @@ function _bundleValModules() {
|
|
|
4634
4730
|
},
|
|
4635
4731
|
write: false
|
|
4636
4732
|
});
|
|
4637
|
-
case
|
|
4733
|
+
case 4:
|
|
4638
4734
|
result = _context.v;
|
|
4639
|
-
_context.n =
|
|
4735
|
+
_context.n = 6;
|
|
4640
4736
|
break;
|
|
4641
|
-
case
|
|
4642
|
-
_context.p =
|
|
4737
|
+
case 5:
|
|
4738
|
+
_context.p = 5;
|
|
4643
4739
|
_t = _context.v;
|
|
4644
4740
|
throw new Error(["The Val modules could not be bundled."].concat(warnings, [_t instanceof Error ? _t.message : String(_t)]).join("\n"), {
|
|
4645
4741
|
cause: _t
|
|
4646
4742
|
});
|
|
4647
|
-
case
|
|
4743
|
+
case 6:
|
|
4648
4744
|
chunks = result.output.filter(function (output) {
|
|
4649
4745
|
return output.type === "chunk";
|
|
4650
4746
|
});
|
|
4651
4747
|
if (!(chunks.length !== 1)) {
|
|
4652
|
-
_context.n =
|
|
4748
|
+
_context.n = 7;
|
|
4653
4749
|
break;
|
|
4654
4750
|
}
|
|
4655
4751
|
throw new Error("Bundling the Val modules made ".concat(chunks.length, " chunks rather than one."));
|
|
4656
|
-
case
|
|
4752
|
+
case 7:
|
|
4657
4753
|
return _context.a(2, {
|
|
4658
4754
|
code: chunks[0].code
|
|
4659
4755
|
});
|
|
4660
4756
|
}
|
|
4661
|
-
}, _callee, null, [[
|
|
4757
|
+
}, _callee, null, [[3, 5]]);
|
|
4662
4758
|
}));
|
|
4663
4759
|
return _bundleValModules.apply(this, arguments);
|
|
4664
4760
|
}
|
|
@@ -4686,6 +4782,7 @@ exports.fetchBuildTarget = fetchBuildTarget;
|
|
|
4686
4782
|
exports.fetchBuildTargetRev = fetchBuildTargetRev;
|
|
4687
4783
|
exports.isValProject = isValProject;
|
|
4688
4784
|
exports.isWired = isWired;
|
|
4785
|
+
exports.loadRolldown = loadRolldown;
|
|
4689
4786
|
exports.publishArtifacts = publishArtifacts;
|
|
4690
4787
|
exports.publishPayload = publishPayload;
|
|
4691
4788
|
exports.rebakeGit = rebakeGit;
|
|
@@ -4693,6 +4790,7 @@ exports.resolveInFiles = resolveInFiles;
|
|
|
4693
4790
|
exports.scanCandidates = scanCandidates;
|
|
4694
4791
|
exports.treeSha = treeSha;
|
|
4695
4792
|
exports.treeShaOfText = treeShaOfText;
|
|
4793
|
+
exports.useRolldown = useRolldown;
|
|
4696
4794
|
exports.usesTailwind = usesTailwind;
|
|
4697
4795
|
exports.wireUp = wireUp;
|
|
4698
4796
|
exports.wiredValServer = wiredValServer;
|
|
@@ -1,13 +1,68 @@
|
|
|
1
|
-
import { _ as
|
|
2
|
-
export { I as INLINE_LIMIT, k as base64Bytes, j as isAsset } from './regeneratorValues-
|
|
3
|
-
import { build } from '@rolldown/browser';
|
|
1
|
+
import { _ as _slicedToArray, a as _createForOfIteratorHelper, b as _asyncToGenerator, c as _regenerator, d as _toConsumableArray, s as sha256Hex, e as _typeof, f as _objectSpread2, g as _defineProperty, h as _regeneratorValues, r as resolveAsset, i as assetModule, j as isAsset } from './regeneratorValues-a8bd356a.esm.js';
|
|
2
|
+
export { I as INLINE_LIMIT, k as base64Bytes, j as isAsset } from './regeneratorValues-a8bd356a.esm.js';
|
|
4
3
|
import { T as TREE, E as ENTRY } from './projectPaths-5e4defea.esm.js';
|
|
5
4
|
export { E as ENTRY, R as ROUTES_DIR, T as TREE } from './projectPaths-5e4defea.esm.js';
|
|
6
|
-
import { parseAstAsync } from '@rolldown/browser/parseAst';
|
|
7
5
|
import { compile } from 'tailwindcss';
|
|
8
6
|
import { A as ARTIFACT_KEYS, a as ARTIFACT_PREFIXES } from './artifactKeys-3a40f3a0.esm.js';
|
|
9
7
|
export { A as ARTIFACT_KEYS, a as ARTIFACT_PREFIXES } from './artifactKeys-3a40f3a0.esm.js';
|
|
10
8
|
|
|
9
|
+
/**
|
|
10
|
+
* The bundler the build runs on, chosen by where it runs.
|
|
11
|
+
*
|
|
12
|
+
* The build is the same code in a browser tab and in Node, and rolldown comes
|
|
13
|
+
* in two builds with one API: `@rolldown/browser`, compiled to WebAssembly,
|
|
14
|
+
* and `rolldown`, the native one. A tab can only have the first. Node should
|
|
15
|
+
* not load it: it reaches its WebAssembly through `@napi-rs/wasm-runtime`, a
|
|
16
|
+
* dependency whose version the SITE'S lockfile picks, and rolldown's own
|
|
17
|
+
* ranges have let a release in that does not load (2026-10-26, below). The
|
|
18
|
+
* native one has no such glue. So nothing in this package imports either
|
|
19
|
+
* statically: Node is handed the native one (`useRolldown`, with
|
|
20
|
+
* `nativeRolldown` from `@valbuild/tanstack-build/node`), and anything not
|
|
21
|
+
* handed one gets the browser build, imported on first use.
|
|
22
|
+
*
|
|
23
|
+
* Why not just the browser build in both, as it was until 2026-10-26:
|
|
24
|
+
* `@rolldown/browser` 1.2.15 pins `@emnapi/core` 2.0.0-alpha.5 and asks for
|
|
25
|
+
* `@napi-rs/wasm-runtime` `~1.2.5`, and wasm-runtime 1.2.6 (2026-10-25) only
|
|
26
|
+
* works with `@emnapi/core` 1.x or 2.0.0-beta.2 -- loading it throws
|
|
27
|
+
* "Cannot set properties of undefined (setting 'initWorker')". Any site whose
|
|
28
|
+
* lockfile was resolved after that release (an upgrade, a `pnpm update`)
|
|
29
|
+
* could no longer `val publish`. The Studio's tab and Val Build's upgrade page
|
|
30
|
+
* are not exposed to it: they bundle the browser build from their own
|
|
31
|
+
* lockfiles, where the builder tab's end-to-end specs load it before a
|
|
32
|
+
* release.
|
|
33
|
+
*/
|
|
34
|
+
|
|
35
|
+
var chosen = null;
|
|
36
|
+
|
|
37
|
+
/** Build on `rolldown` from now on. Node calls it with `nativeRolldown`. */
|
|
38
|
+
function useRolldown(rolldown) {
|
|
39
|
+
chosen = Promise.resolve(rolldown);
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
/**
|
|
43
|
+
* The bundler, loading the browser build if nobody chose one. Called early by
|
|
44
|
+
* a tab that wants the WebAssembly compiled before the first build needs it.
|
|
45
|
+
*/
|
|
46
|
+
function loadRolldown() {
|
|
47
|
+
if (chosen === null) {
|
|
48
|
+
var loading = Promise.all([import('@rolldown/browser'), import('@rolldown/browser/parseAst')]).then(function (_ref) {
|
|
49
|
+
var _ref2 = _slicedToArray(_ref, 2),
|
|
50
|
+
bundler = _ref2[0],
|
|
51
|
+
parser = _ref2[1];
|
|
52
|
+
return {
|
|
53
|
+
build: bundler.build,
|
|
54
|
+
parseAstAsync: parser.parseAstAsync
|
|
55
|
+
};
|
|
56
|
+
});
|
|
57
|
+
// A load that failed is tried again by the next caller, not kept.
|
|
58
|
+
loading["catch"](function () {
|
|
59
|
+
if (chosen === loading) chosen = null;
|
|
60
|
+
});
|
|
61
|
+
chosen = loading;
|
|
62
|
+
}
|
|
63
|
+
return chosen;
|
|
64
|
+
}
|
|
65
|
+
|
|
11
66
|
// A minimal posix path resolver. The builder runs in the browser, so node:path
|
|
12
67
|
// is unavailable, and pulling a polyfill in for two functions is not worth it.
|
|
13
68
|
|
|
@@ -62,14 +117,20 @@ function parse(_x, _x2) {
|
|
|
62
117
|
/** Depth-first walk carrying a parent stack, nearest parent last. */
|
|
63
118
|
function _parse() {
|
|
64
119
|
_parse = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee(path, code) {
|
|
120
|
+
var _yield$loadRolldown, parseAstAsync;
|
|
65
121
|
return _regenerator().w(function (_context) {
|
|
66
122
|
while (1) switch (_context.n) {
|
|
67
123
|
case 0:
|
|
68
124
|
_context.n = 1;
|
|
125
|
+
return loadRolldown();
|
|
126
|
+
case 1:
|
|
127
|
+
_yield$loadRolldown = _context.v;
|
|
128
|
+
parseAstAsync = _yield$loadRolldown.parseAstAsync;
|
|
129
|
+
_context.n = 2;
|
|
69
130
|
return parseAstAsync(code, {
|
|
70
131
|
lang: langOf(path)
|
|
71
132
|
}, path);
|
|
72
|
-
case
|
|
133
|
+
case 2:
|
|
73
134
|
return _context.a(2, _context.v);
|
|
74
135
|
}
|
|
75
136
|
}, _callee);
|
|
@@ -619,16 +680,21 @@ function importsOf(_x, _x2) {
|
|
|
619
680
|
}
|
|
620
681
|
function _importsOf() {
|
|
621
682
|
_importsOf = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee(path, code) {
|
|
622
|
-
var lang, ast, sources, _iterator, _step, statement, source;
|
|
683
|
+
var lang, _yield$loadRolldown, parseAstAsync, ast, sources, _iterator, _step, statement, source;
|
|
623
684
|
return _regenerator().w(function (_context) {
|
|
624
685
|
while (1) switch (_context.n) {
|
|
625
686
|
case 0:
|
|
626
687
|
lang = path.endsWith(".tsx") || path.endsWith(".jsx") ? "tsx" : "ts";
|
|
627
688
|
_context.n = 1;
|
|
689
|
+
return loadRolldown();
|
|
690
|
+
case 1:
|
|
691
|
+
_yield$loadRolldown = _context.v;
|
|
692
|
+
parseAstAsync = _yield$loadRolldown.parseAstAsync;
|
|
693
|
+
_context.n = 2;
|
|
628
694
|
return parseAstAsync(code, {
|
|
629
695
|
lang: lang
|
|
630
696
|
}, path);
|
|
631
|
-
case
|
|
697
|
+
case 2:
|
|
632
698
|
ast = _context.v;
|
|
633
699
|
sources = [];
|
|
634
700
|
_iterator = _createForOfIteratorHelper(ast.body);
|
|
@@ -1100,7 +1166,7 @@ var packageJson = {
|
|
|
1100
1166
|
url: "git+https://github.com/valbuild/val.git"
|
|
1101
1167
|
},
|
|
1102
1168
|
license: "MIT",
|
|
1103
|
-
version: "0.
|
|
1169
|
+
version: "0.150.9",
|
|
1104
1170
|
sideEffects: false,
|
|
1105
1171
|
main: "dist/valbuild-tanstack-build.cjs.js",
|
|
1106
1172
|
module: "dist/valbuild-tanstack-build.esm.js",
|
|
@@ -1165,7 +1231,7 @@ var packageJson = {
|
|
|
1165
1231
|
"@types/jest": "^30.0.0",
|
|
1166
1232
|
"@types/node": "^26.4.0",
|
|
1167
1233
|
"@types/react": "^19.2.18",
|
|
1168
|
-
rolldown: "
|
|
1234
|
+
rolldown: "1.2.9",
|
|
1169
1235
|
tsx: "^4.23.12",
|
|
1170
1236
|
typescript: "^6.0.3"
|
|
1171
1237
|
},
|
|
@@ -3772,6 +3838,8 @@ function _buildOnce() {
|
|
|
3772
3838
|
aliases,
|
|
3773
3839
|
vendor,
|
|
3774
3840
|
projectVendor,
|
|
3841
|
+
_yield$loadRolldown,
|
|
3842
|
+
build,
|
|
3775
3843
|
result,
|
|
3776
3844
|
chunks,
|
|
3777
3845
|
entry,
|
|
@@ -3805,6 +3873,11 @@ function _buildOnce() {
|
|
|
3805
3873
|
// it runs on the server, so server-only code stays and client-only code goes.
|
|
3806
3874
|
// Only the vendor layer differs.
|
|
3807
3875
|
_context2.n = 1;
|
|
3876
|
+
return loadRolldown();
|
|
3877
|
+
case 1:
|
|
3878
|
+
_yield$loadRolldown = _context2.v;
|
|
3879
|
+
build = _yield$loadRolldown.build;
|
|
3880
|
+
_context2.n = 2;
|
|
3808
3881
|
return build({
|
|
3809
3882
|
input: isRsc ? RSC_ENTRY_ID : ENTRY,
|
|
3810
3883
|
// Required in the browser. rolldown computes `cwd: inputOptions.cwd ??
|
|
@@ -3841,7 +3914,7 @@ function _buildOnce() {
|
|
|
3841
3914
|
},
|
|
3842
3915
|
write: false
|
|
3843
3916
|
});
|
|
3844
|
-
case
|
|
3917
|
+
case 2:
|
|
3845
3918
|
result = _context2.v;
|
|
3846
3919
|
// A type predicate rather than `(chunk: any)`, which is how this read until
|
|
3847
3920
|
// the package moved into a repository that type-checks it: an `any`
|
|
@@ -3856,13 +3929,13 @@ function _buildOnce() {
|
|
|
3856
3929
|
return chunk.fileName === ENTRY_CHUNK;
|
|
3857
3930
|
});
|
|
3858
3931
|
if (entry) {
|
|
3859
|
-
_context2.n =
|
|
3932
|
+
_context2.n = 3;
|
|
3860
3933
|
break;
|
|
3861
3934
|
}
|
|
3862
3935
|
throw new Error("The build produced no ".concat(ENTRY_CHUNK, ". Chunks: ").concat(chunks.map(function (c) {
|
|
3863
3936
|
return c.fileName;
|
|
3864
3937
|
}).join(", "), "."));
|
|
3865
|
-
case
|
|
3938
|
+
case 3:
|
|
3866
3939
|
// Chunk-to-chunk imports come out relative (`./c-abc.js`), which is exactly
|
|
3867
3940
|
// what both sides need and why neither gets a base path here: relative to
|
|
3868
3941
|
// `app.js` in the module map, relative to `/_app/app.js` as a URL.
|
|
@@ -4536,7 +4609,7 @@ function bundleValModules(_x) {
|
|
|
4536
4609
|
function _bundleValModules() {
|
|
4537
4610
|
_bundleValModules = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee(input) {
|
|
4538
4611
|
var _input$entry;
|
|
4539
|
-
var files, target, origin, entry, warnings, aliases, base, project, resolveProjectPath, result, chunks, _t;
|
|
4612
|
+
var files, target, origin, entry, warnings, aliases, base, project, resolveProjectPath, _yield$loadRolldown, build, result, chunks, _t;
|
|
4540
4613
|
return _regenerator().w(function (_context) {
|
|
4541
4614
|
while (1) switch (_context.p = _context.n) {
|
|
4542
4615
|
case 0:
|
|
@@ -4559,8 +4632,13 @@ function _bundleValModules() {
|
|
|
4559
4632
|
resolveProjectPath = function resolveProjectPath(path) {
|
|
4560
4633
|
return resolveInFiles(path, files);
|
|
4561
4634
|
};
|
|
4562
|
-
_context.
|
|
4563
|
-
|
|
4635
|
+
_context.n = 2;
|
|
4636
|
+
return loadRolldown();
|
|
4637
|
+
case 2:
|
|
4638
|
+
_yield$loadRolldown = _context.v;
|
|
4639
|
+
build = _yield$loadRolldown.build;
|
|
4640
|
+
_context.p = 3;
|
|
4641
|
+
_context.n = 4;
|
|
4564
4642
|
return build({
|
|
4565
4643
|
input: entry,
|
|
4566
4644
|
// See `buildOnce`: required in the browser, inert here.
|
|
@@ -4633,33 +4711,33 @@ function _bundleValModules() {
|
|
|
4633
4711
|
},
|
|
4634
4712
|
write: false
|
|
4635
4713
|
});
|
|
4636
|
-
case
|
|
4714
|
+
case 4:
|
|
4637
4715
|
result = _context.v;
|
|
4638
|
-
_context.n =
|
|
4716
|
+
_context.n = 6;
|
|
4639
4717
|
break;
|
|
4640
|
-
case
|
|
4641
|
-
_context.p =
|
|
4718
|
+
case 5:
|
|
4719
|
+
_context.p = 5;
|
|
4642
4720
|
_t = _context.v;
|
|
4643
4721
|
throw new Error(["The Val modules could not be bundled."].concat(warnings, [_t instanceof Error ? _t.message : String(_t)]).join("\n"), {
|
|
4644
4722
|
cause: _t
|
|
4645
4723
|
});
|
|
4646
|
-
case
|
|
4724
|
+
case 6:
|
|
4647
4725
|
chunks = result.output.filter(function (output) {
|
|
4648
4726
|
return output.type === "chunk";
|
|
4649
4727
|
});
|
|
4650
4728
|
if (!(chunks.length !== 1)) {
|
|
4651
|
-
_context.n =
|
|
4729
|
+
_context.n = 7;
|
|
4652
4730
|
break;
|
|
4653
4731
|
}
|
|
4654
4732
|
throw new Error("Bundling the Val modules made ".concat(chunks.length, " chunks rather than one."));
|
|
4655
|
-
case
|
|
4733
|
+
case 7:
|
|
4656
4734
|
return _context.a(2, {
|
|
4657
4735
|
code: chunks[0].code
|
|
4658
4736
|
});
|
|
4659
4737
|
}
|
|
4660
|
-
}, _callee, null, [[
|
|
4738
|
+
}, _callee, null, [[3, 5]]);
|
|
4661
4739
|
}));
|
|
4662
4740
|
return _bundleValModules.apply(this, arguments);
|
|
4663
4741
|
}
|
|
4664
4742
|
|
|
4665
|
-
export { ENTRY_CHUNK, PROJECT_SOURCE, PUBLIC_PREFIX, VAL_SERVER_PATH, aliasMap, bakedGit, bakedJob, blobSha, buildInputId, buildUserApp, bundleValModules, fetchBuildTarget, fetchBuildTargetRev, isValProject, isWired, publishArtifacts, publishPayload, rebakeGit, resolveInFiles, scanCandidates, treeSha, treeShaOfText, usesTailwind, wireUp, wiredValServer, withoutBakedJob };
|
|
4743
|
+
export { ENTRY_CHUNK, PROJECT_SOURCE, PUBLIC_PREFIX, VAL_SERVER_PATH, aliasMap, bakedGit, bakedJob, blobSha, buildInputId, buildUserApp, bundleValModules, fetchBuildTarget, fetchBuildTargetRev, isValProject, isWired, loadRolldown, publishArtifacts, publishPayload, rebakeGit, resolveInFiles, scanCandidates, treeSha, treeShaOfText, useRolldown, usesTailwind, wireUp, wiredValServer, withoutBakedJob };
|