@valbuild/tanstack-build 0.150.9 → 0.150.12

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 CHANGED
@@ -1,5 +1,11 @@
1
1
  # @valbuild/tanstack-build
2
2
 
3
+ ## 0.150.12
4
+
5
+ ### Patch Changes
6
+
7
+ - [#980](https://github.com/valbuild/val/pull/980) [`46f07c7`](https://github.com/valbuild/val/commit/46f07c77f71b0d3b1f3964d648ff31eaf8e5eec3) Thanks [@freekh](https://github.com/freekh)! - Building a site in Safari (and every browser on an iPhone) no longer fails with "Cannot access '…' before initialization". The browser build loaded rolldown's bundler and its parser at the same time, and Safari could hand back the bundler before it had finished loading; they now load one after the other.
8
+
3
9
  ## 0.150.9
4
10
 
5
11
  ### Patch Changes
@@ -457,4 +457,4 @@ function _regeneratorValues(e) {
457
457
  throw new TypeError(typeof e + " is not iterable");
458
458
  }
459
459
 
460
- export { ASSET_BASE as A, INLINE_LIMIT as I, _slicedToArray as _, _createForOfIteratorHelper as a, _asyncToGenerator as b, _regenerator as c, _toConsumableArray as d, _typeof as e, _objectSpread2 as f, _defineProperty as g, _regeneratorValues as h, assetModule as i, isAsset as j, base64Bytes as k, _toPropertyKey as l, resolveAsset as r, sha256Hex as s };
460
+ export { ASSET_BASE as A, INLINE_LIMIT as I, _asyncToGenerator as _, _regenerator as a, _createForOfIteratorHelper as b, _toConsumableArray as c, _slicedToArray as d, _typeof as e, _objectSpread2 as f, _defineProperty as g, _regeneratorValues as h, assetModule as i, isAsset as j, base64Bytes as k, _toPropertyKey as l, resolveAsset as r, sha256Hex as s };
@@ -64,15 +64,40 @@ function useRolldown(rolldown) {
64
64
  */
65
65
  function loadRolldown() {
66
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
67
+ /*
68
+ * One after the other, never together. Both import the WASI binding,
69
+ * whose top-level `await` fetches and instantiates the WebAssembly, and
70
+ * Safari (every iPhone browser) can settle the second import of a graph
71
+ * whose shared module is still awaiting before that import's own body
72
+ * has run. `build` is a hoisted function there and `rolldown` a `const`,
73
+ * so the build got a `build` it could call, which threw "Cannot access
74
+ * 'Ha' before initialization." (minified) on its first line -- home's
75
+ * upgrade page, on an iPhone, while Chrome built the same upgrade. Once
76
+ * the bundler has loaded, the binding has finished, and the parser's
77
+ * import has nothing left to wait for.
78
+ */
79
+ var loading = Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require('@rolldown/browser')); }).then(/*#__PURE__*/function () {
80
+ var _ref = regeneratorValues._asyncToGenerator(/*#__PURE__*/regeneratorValues._regenerator().m(function _callee(bundler) {
81
+ var _t, _t2;
82
+ return regeneratorValues._regenerator().w(function (_context) {
83
+ while (1) switch (_context.n) {
84
+ case 0:
85
+ _t = bundler.build;
86
+ _context.n = 1;
87
+ return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require('@rolldown/browser/parseAst')); });
88
+ case 1:
89
+ _t2 = _context.v.parseAstAsync;
90
+ return _context.a(2, {
91
+ build: _t,
92
+ parseAstAsync: _t2
93
+ });
94
+ }
95
+ }, _callee);
96
+ }));
97
+ return function (_x) {
98
+ return _ref.apply(this, arguments);
74
99
  };
75
- });
100
+ }());
76
101
  // A load that failed is tried again by the next caller, not kept.
77
102
  loading["catch"](function () {
78
103
  if (chosen === loading) chosen = null;
@@ -1185,7 +1210,7 @@ var packageJson = {
1185
1210
  url: "git+https://github.com/valbuild/val.git"
1186
1211
  },
1187
1212
  license: "MIT",
1188
- version: "0.150.9",
1213
+ version: "0.150.12",
1189
1214
  sideEffects: false,
1190
1215
  main: "dist/valbuild-tanstack-build.cjs.js",
1191
1216
  module: "dist/valbuild-tanstack-build.esm.js",
@@ -64,15 +64,40 @@ function useRolldown(rolldown) {
64
64
  */
65
65
  function loadRolldown() {
66
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
67
+ /*
68
+ * One after the other, never together. Both import the WASI binding,
69
+ * whose top-level `await` fetches and instantiates the WebAssembly, and
70
+ * Safari (every iPhone browser) can settle the second import of a graph
71
+ * whose shared module is still awaiting before that import's own body
72
+ * has run. `build` is a hoisted function there and `rolldown` a `const`,
73
+ * so the build got a `build` it could call, which threw "Cannot access
74
+ * 'Ha' before initialization." (minified) on its first line -- home's
75
+ * upgrade page, on an iPhone, while Chrome built the same upgrade. Once
76
+ * the bundler has loaded, the binding has finished, and the parser's
77
+ * import has nothing left to wait for.
78
+ */
79
+ var loading = Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require('@rolldown/browser')); }).then(/*#__PURE__*/function () {
80
+ var _ref = regeneratorValues._asyncToGenerator(/*#__PURE__*/regeneratorValues._regenerator().m(function _callee(bundler) {
81
+ var _t, _t2;
82
+ return regeneratorValues._regenerator().w(function (_context) {
83
+ while (1) switch (_context.n) {
84
+ case 0:
85
+ _t = bundler.build;
86
+ _context.n = 1;
87
+ return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require('@rolldown/browser/parseAst')); });
88
+ case 1:
89
+ _t2 = _context.v.parseAstAsync;
90
+ return _context.a(2, {
91
+ build: _t,
92
+ parseAstAsync: _t2
93
+ });
94
+ }
95
+ }, _callee);
96
+ }));
97
+ return function (_x) {
98
+ return _ref.apply(this, arguments);
74
99
  };
75
- });
100
+ }());
76
101
  // A load that failed is tried again by the next caller, not kept.
77
102
  loading["catch"](function () {
78
103
  if (chosen === loading) chosen = null;
@@ -1185,7 +1210,7 @@ var packageJson = {
1185
1210
  url: "git+https://github.com/valbuild/val.git"
1186
1211
  },
1187
1212
  license: "MIT",
1188
- version: "0.150.9",
1213
+ version: "0.150.12",
1189
1214
  sideEffects: false,
1190
1215
  main: "dist/valbuild-tanstack-build.cjs.js",
1191
1216
  module: "dist/valbuild-tanstack-build.esm.js",
@@ -1,5 +1,5 @@
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';
1
+ import { _ as _asyncToGenerator, a as _regenerator, b as _createForOfIteratorHelper, c as _toConsumableArray, d as _slicedToArray, 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-56b72784.esm.js';
2
+ export { I as INLINE_LIMIT, k as base64Bytes, j as isAsset } from './regeneratorValues-56b72784.esm.js';
3
3
  import { T as TREE, E as ENTRY } from './projectPaths-5e4defea.esm.js';
4
4
  export { E as ENTRY, R as ROUTES_DIR, T as TREE } from './projectPaths-5e4defea.esm.js';
5
5
  import { compile } from 'tailwindcss';
@@ -45,15 +45,40 @@ function useRolldown(rolldown) {
45
45
  */
46
46
  function loadRolldown() {
47
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
48
+ /*
49
+ * One after the other, never together. Both import the WASI binding,
50
+ * whose top-level `await` fetches and instantiates the WebAssembly, and
51
+ * Safari (every iPhone browser) can settle the second import of a graph
52
+ * whose shared module is still awaiting before that import's own body
53
+ * has run. `build` is a hoisted function there and `rolldown` a `const`,
54
+ * so the build got a `build` it could call, which threw "Cannot access
55
+ * 'Ha' before initialization." (minified) on its first line -- home's
56
+ * upgrade page, on an iPhone, while Chrome built the same upgrade. Once
57
+ * the bundler has loaded, the binding has finished, and the parser's
58
+ * import has nothing left to wait for.
59
+ */
60
+ var loading = import('@rolldown/browser').then(/*#__PURE__*/function () {
61
+ var _ref = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee(bundler) {
62
+ var _t, _t2;
63
+ return _regenerator().w(function (_context) {
64
+ while (1) switch (_context.n) {
65
+ case 0:
66
+ _t = bundler.build;
67
+ _context.n = 1;
68
+ return import('@rolldown/browser/parseAst');
69
+ case 1:
70
+ _t2 = _context.v.parseAstAsync;
71
+ return _context.a(2, {
72
+ build: _t,
73
+ parseAstAsync: _t2
74
+ });
75
+ }
76
+ }, _callee);
77
+ }));
78
+ return function (_x) {
79
+ return _ref.apply(this, arguments);
55
80
  };
56
- });
81
+ }());
57
82
  // A load that failed is tried again by the next caller, not kept.
58
83
  loading["catch"](function () {
59
84
  if (chosen === loading) chosen = null;
@@ -1166,7 +1191,7 @@ var packageJson = {
1166
1191
  url: "git+https://github.com/valbuild/val.git"
1167
1192
  },
1168
1193
  license: "MIT",
1169
- version: "0.150.9",
1194
+ version: "0.150.12",
1170
1195
  sideEffects: false,
1171
1196
  main: "dist/valbuild-tanstack-build.cjs.js",
1172
1197
  module: "dist/valbuild-tanstack-build.esm.js",
@@ -1,4 +1,4 @@
1
- import { l as _toPropertyKey, b as _asyncToGenerator, c as _regenerator, d as _toConsumableArray, f as _objectSpread2, a as _createForOfIteratorHelper, _ as _slicedToArray, A as ASSET_BASE, h as _regeneratorValues, g as _defineProperty, e as _typeof } from '../../dist/regeneratorValues-a8bd356a.esm.js';
1
+ import { l as _toPropertyKey, _ as _asyncToGenerator, a as _regenerator, c as _toConsumableArray, f as _objectSpread2, b as _createForOfIteratorHelper, d as _slicedToArray, A as ASSET_BASE, h as _regeneratorValues, g as _defineProperty, e as _typeof } from '../../dist/regeneratorValues-56b72784.esm.js';
2
2
  import { build } from 'rolldown';
3
3
  import { createHash } from 'node:crypto';
4
4
  import { createRequire } from 'node:module';
package/package.json CHANGED
@@ -7,7 +7,7 @@
7
7
  "url": "git+https://github.com/valbuild/val.git"
8
8
  },
9
9
  "license": "MIT",
10
- "version": "0.150.9",
10
+ "version": "0.150.12",
11
11
  "sideEffects": false,
12
12
  "main": "dist/valbuild-tanstack-build.cjs.js",
13
13
  "module": "dist/valbuild-tanstack-build.esm.js",