@valbuild/tanstack-build 0.148.5 → 0.149.2

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.149.2
4
+
5
+ ### Patch Changes
6
+
7
+ - [#917](https://github.com/valbuild/val/pull/917) [`48ca810`](https://github.com/valbuild/val/commit/48ca810a985af2a0af845c779d39c3da7f7fb0fc) Thanks [@freekh](https://github.com/freekh)! - `val publish` now declares `@valbuild/ui` at the version your project actually runs. A project that does not declare `@valbuild/ui` gets it added when it is wired for the platform, because the Studio's bundle lives there. It used to be added at `@valbuild/core`'s version, which can be an older release than the `@valbuild/ui` your `@valbuild/tanstack` uses. The two are no longer always released together, and the mismatch could install a second, older Studio. It now takes the version installed beside `@valbuild/tanstack`, and if no installed copy can be found it says so in a warning. A project that declares `@valbuild/ui` itself is left unchanged.
8
+
3
9
  ## 0.148.5
4
10
 
5
11
  ### Patch Changes
@@ -41,6 +41,20 @@ export interface WireOptions {
41
41
  commit: string;
42
42
  branch: string;
43
43
  };
44
+ /**
45
+ * The version of `@valbuild/ui` the checkout has installed: the Studio its
46
+ * `@valbuild/tanstack` runs. What `@valbuild/ui` is declared at when the
47
+ * project does not declare it, so the layer ships the Studio the project
48
+ * already runs.
49
+ *
50
+ * Only a caller with the installed packages can say -- this sees source
51
+ * files, never `node_modules` or a lockfile. Without it, `@valbuild/core`'s
52
+ * version stands in, which always names a published `@valbuild/ui` (ui
53
+ * depends on core, so a core release is a ui release) but can name an older
54
+ * one: the packages are versioned together only when they are released
55
+ * together.
56
+ */
57
+ studioVersion?: string;
44
58
  }
45
59
  /**
46
60
  * Where a Val project keeps the module this replaces.
@@ -1101,7 +1101,7 @@ var packageJson = {
1101
1101
  url: "git+https://github.com/valbuild/val.git"
1102
1102
  },
1103
1103
  license: "MIT",
1104
- version: "0.148.5",
1104
+ version: "0.149.2",
1105
1105
  sideEffects: false,
1106
1106
  main: "dist/valbuild-tanstack-build.cjs.js",
1107
1107
  module: "dist/valbuild-tanstack-build.esm.js",
@@ -1557,6 +1557,13 @@ function wireUp(files, options) {
1557
1557
  * a TRANSITIVE dependency, and the vendor layer is built from what a project
1558
1558
  * DECLARES intersected with what it imports. Undeclared, the Studio loads its
1559
1559
  * shell and then 404s on its own bundle.
1560
+ *
1561
+ * At the version the project already runs (`studioVersion`), not at
1562
+ * `@valbuild/core`'s: the two stopped moving together, and a site declaring
1563
+ * an older ui than its `@valbuild/tanstack` installs a second, older Studio
1564
+ * the next time anything installs from this `package.json`. A rewrite also
1565
+ * means the site's `package.json` is no longer its template's, so the
1566
+ * templates declare it themselves and this leaves them alone.
1560
1567
  */
1561
1568
  var manifestRaw = files["package.json"];
1562
1569
  if (manifestRaw) {
@@ -1564,14 +1571,19 @@ function wireUp(files, options) {
1564
1571
  var _manifest$dependencie;
1565
1572
  var manifest = JSON.parse(manifestRaw);
1566
1573
  var deps = (_manifest$dependencie = manifest.dependencies) !== null && _manifest$dependencie !== void 0 ? _manifest$dependencie : {};
1567
- if (deps["@valbuild/core"] && !deps["@valbuild/ui"]) {
1568
- deps["@valbuild/ui"] = deps["@valbuild/core"];
1574
+ var core = deps["@valbuild/core"];
1575
+ if (core && !deps["@valbuild/ui"]) {
1576
+ var _options$studioVersio;
1577
+ deps["@valbuild/ui"] = (_options$studioVersio = options.studioVersion) !== null && _options$studioVersio !== void 0 ? _options$studioVersio : core;
1569
1578
  manifest.dependencies = deps;
1570
1579
  out["package.json"] = "".concat(JSON.stringify(manifest, null, 2), "\n");
1571
1580
  changes.push({
1572
1581
  what: "@valbuild/ui declared as a dependency",
1573
1582
  why: "it carries the Studio bundle and was only a transitive dependency; the vendor " + "layer is built from what the project declares"
1574
1583
  });
1584
+ if (!options.studioVersion) {
1585
+ warnings.push("@valbuild/ui was declared at @valbuild/core's version (".concat(core, "), because the ") + "installed one could not be read. Declare @valbuild/ui in package.json at the " + "version your @valbuild/tanstack depends on to be sure it is the Studio you run.");
1586
+ }
1575
1587
  }
1576
1588
  } catch (_unused3) {
1577
1589
  warnings.push("package.json could not be parsed, so @valbuild/ui was not declared.");
@@ -1101,7 +1101,7 @@ var packageJson = {
1101
1101
  url: "git+https://github.com/valbuild/val.git"
1102
1102
  },
1103
1103
  license: "MIT",
1104
- version: "0.148.5",
1104
+ version: "0.149.2",
1105
1105
  sideEffects: false,
1106
1106
  main: "dist/valbuild-tanstack-build.cjs.js",
1107
1107
  module: "dist/valbuild-tanstack-build.esm.js",
@@ -1557,6 +1557,13 @@ function wireUp(files, options) {
1557
1557
  * a TRANSITIVE dependency, and the vendor layer is built from what a project
1558
1558
  * DECLARES intersected with what it imports. Undeclared, the Studio loads its
1559
1559
  * shell and then 404s on its own bundle.
1560
+ *
1561
+ * At the version the project already runs (`studioVersion`), not at
1562
+ * `@valbuild/core`'s: the two stopped moving together, and a site declaring
1563
+ * an older ui than its `@valbuild/tanstack` installs a second, older Studio
1564
+ * the next time anything installs from this `package.json`. A rewrite also
1565
+ * means the site's `package.json` is no longer its template's, so the
1566
+ * templates declare it themselves and this leaves them alone.
1560
1567
  */
1561
1568
  var manifestRaw = files["package.json"];
1562
1569
  if (manifestRaw) {
@@ -1564,14 +1571,19 @@ function wireUp(files, options) {
1564
1571
  var _manifest$dependencie;
1565
1572
  var manifest = JSON.parse(manifestRaw);
1566
1573
  var deps = (_manifest$dependencie = manifest.dependencies) !== null && _manifest$dependencie !== void 0 ? _manifest$dependencie : {};
1567
- if (deps["@valbuild/core"] && !deps["@valbuild/ui"]) {
1568
- deps["@valbuild/ui"] = deps["@valbuild/core"];
1574
+ var core = deps["@valbuild/core"];
1575
+ if (core && !deps["@valbuild/ui"]) {
1576
+ var _options$studioVersio;
1577
+ deps["@valbuild/ui"] = (_options$studioVersio = options.studioVersion) !== null && _options$studioVersio !== void 0 ? _options$studioVersio : core;
1569
1578
  manifest.dependencies = deps;
1570
1579
  out["package.json"] = "".concat(JSON.stringify(manifest, null, 2), "\n");
1571
1580
  changes.push({
1572
1581
  what: "@valbuild/ui declared as a dependency",
1573
1582
  why: "it carries the Studio bundle and was only a transitive dependency; the vendor " + "layer is built from what the project declares"
1574
1583
  });
1584
+ if (!options.studioVersion) {
1585
+ warnings.push("@valbuild/ui was declared at @valbuild/core's version (".concat(core, "), because the ") + "installed one could not be read. Declare @valbuild/ui in package.json at the " + "version your @valbuild/tanstack depends on to be sure it is the Studio you run.");
1586
+ }
1575
1587
  }
1576
1588
  } catch (_unused3) {
1577
1589
  warnings.push("package.json could not be parsed, so @valbuild/ui was not declared.");
@@ -1100,7 +1100,7 @@ var packageJson = {
1100
1100
  url: "git+https://github.com/valbuild/val.git"
1101
1101
  },
1102
1102
  license: "MIT",
1103
- version: "0.148.5",
1103
+ version: "0.149.2",
1104
1104
  sideEffects: false,
1105
1105
  main: "dist/valbuild-tanstack-build.cjs.js",
1106
1106
  module: "dist/valbuild-tanstack-build.esm.js",
@@ -1556,6 +1556,13 @@ function wireUp(files, options) {
1556
1556
  * a TRANSITIVE dependency, and the vendor layer is built from what a project
1557
1557
  * DECLARES intersected with what it imports. Undeclared, the Studio loads its
1558
1558
  * shell and then 404s on its own bundle.
1559
+ *
1560
+ * At the version the project already runs (`studioVersion`), not at
1561
+ * `@valbuild/core`'s: the two stopped moving together, and a site declaring
1562
+ * an older ui than its `@valbuild/tanstack` installs a second, older Studio
1563
+ * the next time anything installs from this `package.json`. A rewrite also
1564
+ * means the site's `package.json` is no longer its template's, so the
1565
+ * templates declare it themselves and this leaves them alone.
1559
1566
  */
1560
1567
  var manifestRaw = files["package.json"];
1561
1568
  if (manifestRaw) {
@@ -1563,14 +1570,19 @@ function wireUp(files, options) {
1563
1570
  var _manifest$dependencie;
1564
1571
  var manifest = JSON.parse(manifestRaw);
1565
1572
  var deps = (_manifest$dependencie = manifest.dependencies) !== null && _manifest$dependencie !== void 0 ? _manifest$dependencie : {};
1566
- if (deps["@valbuild/core"] && !deps["@valbuild/ui"]) {
1567
- deps["@valbuild/ui"] = deps["@valbuild/core"];
1573
+ var core = deps["@valbuild/core"];
1574
+ if (core && !deps["@valbuild/ui"]) {
1575
+ var _options$studioVersio;
1576
+ deps["@valbuild/ui"] = (_options$studioVersio = options.studioVersion) !== null && _options$studioVersio !== void 0 ? _options$studioVersio : core;
1568
1577
  manifest.dependencies = deps;
1569
1578
  out["package.json"] = "".concat(JSON.stringify(manifest, null, 2), "\n");
1570
1579
  changes.push({
1571
1580
  what: "@valbuild/ui declared as a dependency",
1572
1581
  why: "it carries the Studio bundle and was only a transitive dependency; the vendor " + "layer is built from what the project declares"
1573
1582
  });
1583
+ if (!options.studioVersion) {
1584
+ warnings.push("@valbuild/ui was declared at @valbuild/core's version (".concat(core, "), because the ") + "installed one could not be read. Declare @valbuild/ui in package.json at the " + "version your @valbuild/tanstack depends on to be sure it is the Studio you run.");
1585
+ }
1574
1586
  }
1575
1587
  } catch (_unused3) {
1576
1588
  warnings.push("package.json could not be parsed, so @valbuild/ui was not declared.");
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.148.5",
10
+ "version": "0.149.2",
11
11
  "sideEffects": false,
12
12
  "main": "dist/valbuild-tanstack-build.cjs.js",
13
13
  "module": "dist/valbuild-tanstack-build.esm.js",