@valbuild/tanstack-build 0.138.6 → 0.139.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.
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
# @valbuild/tanstack-build
|
|
2
2
|
|
|
3
|
+
## 0.139.0
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#782](https://github.com/valbuild/val/pull/782) [`ab97279`](https://github.com/valbuild/val/commit/ab9727935223bd8356976a15d09cb69a523e1140) Thanks [@freekh](https://github.com/freekh)! - The `src/val/project-source.d.ts` that wiring a project up to the platform writes now actually declares `platform:project-source`. It was a module (it ended in `export {}`), which made its `declare module` an augmentation of a module that does not exist, so `import { FILES } from "platform:project-source"` in the generated `val.server.ts` failed to resolve in an editor and in `tsc`. Re-wiring a project rewrites the file.
|
|
8
|
+
|
|
3
9
|
## 0.138.6
|
|
4
10
|
|
|
5
11
|
### Patch Changes
|
|
@@ -3846,8 +3846,16 @@ var valServerSource = function valServerSource(_ref) {
|
|
|
3846
3846
|
* Declared rather than suppressed: an editor open on this project should know
|
|
3847
3847
|
* what `FILES` is, and the alternative is a file full of red squiggles that a
|
|
3848
3848
|
* developer learns to ignore.
|
|
3849
|
+
*
|
|
3850
|
+
* A SCRIPT, not a module -- no `export {}`, no `declare global` -- and that is
|
|
3851
|
+
* load bearing. In a module, `declare module 'platform:project-source'` is an
|
|
3852
|
+
* AUGMENTATION of a module that does not exist, which declares nothing; the
|
|
3853
|
+
* error saying so is in a `.d.ts`, where `skipLibCheck` hides it, so all that
|
|
3854
|
+
* is left is the import failing to resolve. In a script it is an ambient
|
|
3855
|
+
* declaration, and a top-level `declare var` is a global without needing
|
|
3856
|
+
* `declare global`, which a script may not contain.
|
|
3849
3857
|
*/
|
|
3850
|
-
var PROJECT_SOURCE_DECLARATIONS = "// Generated by the Val studio when this project was wired up to the platform.\n// The build resolves this specifier to the project's own source, shipped into\n// the isolate as a module.\ndeclare module 'platform:project-source' {\n /** Every source file of this project, keyed by its path from the root. */\n export const FILES: Record<string, string>\n}\n\
|
|
3858
|
+
var PROJECT_SOURCE_DECLARATIONS = "// Generated by the Val studio when this project was wired up to the platform.\n// The build resolves this specifier to the project's own source, shipped into\n// the isolate as a module.\n//\n// Deliberately not a module: an `export` anywhere in this file would turn the\n// declaration below into an augmentation, and the import would stop resolving.\ndeclare module 'platform:project-source' {\n /** Every source file of this project, keyed by its path from the root. */\n export const FILES: Record<string, string>\n}\n\n/**\n * The project this isolate is serving, set per request by the platform from\n * the id the loader resolved off the hostname.\n *\n * Absent when server-rendering outside the platform, and in the browser.\n */\n// eslint-disable-next-line no-var\ndeclare var __PLATFORM_PROJECT_ID: string | undefined\n/**\n * This project's secrets, handed over per request rather than built in.\n *\n * SERVER ONLY -- set by the platform's Worker entry, which never runs in a\n * browser. Absent outside the platform.\n */\n// eslint-disable-next-line no-var\ndeclare var __PLATFORM_SECRETS: Record<string, string> | undefined\n";
|
|
3851
3859
|
|
|
3852
3860
|
/**
|
|
3853
3861
|
* The wired `val.server.ts`, on its own.
|
|
@@ -3846,8 +3846,16 @@ var valServerSource = function valServerSource(_ref) {
|
|
|
3846
3846
|
* Declared rather than suppressed: an editor open on this project should know
|
|
3847
3847
|
* what `FILES` is, and the alternative is a file full of red squiggles that a
|
|
3848
3848
|
* developer learns to ignore.
|
|
3849
|
+
*
|
|
3850
|
+
* A SCRIPT, not a module -- no `export {}`, no `declare global` -- and that is
|
|
3851
|
+
* load bearing. In a module, `declare module 'platform:project-source'` is an
|
|
3852
|
+
* AUGMENTATION of a module that does not exist, which declares nothing; the
|
|
3853
|
+
* error saying so is in a `.d.ts`, where `skipLibCheck` hides it, so all that
|
|
3854
|
+
* is left is the import failing to resolve. In a script it is an ambient
|
|
3855
|
+
* declaration, and a top-level `declare var` is a global without needing
|
|
3856
|
+
* `declare global`, which a script may not contain.
|
|
3849
3857
|
*/
|
|
3850
|
-
var PROJECT_SOURCE_DECLARATIONS = "// Generated by the Val studio when this project was wired up to the platform.\n// The build resolves this specifier to the project's own source, shipped into\n// the isolate as a module.\ndeclare module 'platform:project-source' {\n /** Every source file of this project, keyed by its path from the root. */\n export const FILES: Record<string, string>\n}\n\
|
|
3858
|
+
var PROJECT_SOURCE_DECLARATIONS = "// Generated by the Val studio when this project was wired up to the platform.\n// The build resolves this specifier to the project's own source, shipped into\n// the isolate as a module.\n//\n// Deliberately not a module: an `export` anywhere in this file would turn the\n// declaration below into an augmentation, and the import would stop resolving.\ndeclare module 'platform:project-source' {\n /** Every source file of this project, keyed by its path from the root. */\n export const FILES: Record<string, string>\n}\n\n/**\n * The project this isolate is serving, set per request by the platform from\n * the id the loader resolved off the hostname.\n *\n * Absent when server-rendering outside the platform, and in the browser.\n */\n// eslint-disable-next-line no-var\ndeclare var __PLATFORM_PROJECT_ID: string | undefined\n/**\n * This project's secrets, handed over per request rather than built in.\n *\n * SERVER ONLY -- set by the platform's Worker entry, which never runs in a\n * browser. Absent outside the platform.\n */\n// eslint-disable-next-line no-var\ndeclare var __PLATFORM_SECRETS: Record<string, string> | undefined\n";
|
|
3851
3859
|
|
|
3852
3860
|
/**
|
|
3853
3861
|
* The wired `val.server.ts`, on its own.
|
|
@@ -3844,8 +3844,16 @@ var valServerSource = function valServerSource(_ref) {
|
|
|
3844
3844
|
* Declared rather than suppressed: an editor open on this project should know
|
|
3845
3845
|
* what `FILES` is, and the alternative is a file full of red squiggles that a
|
|
3846
3846
|
* developer learns to ignore.
|
|
3847
|
+
*
|
|
3848
|
+
* A SCRIPT, not a module -- no `export {}`, no `declare global` -- and that is
|
|
3849
|
+
* load bearing. In a module, `declare module 'platform:project-source'` is an
|
|
3850
|
+
* AUGMENTATION of a module that does not exist, which declares nothing; the
|
|
3851
|
+
* error saying so is in a `.d.ts`, where `skipLibCheck` hides it, so all that
|
|
3852
|
+
* is left is the import failing to resolve. In a script it is an ambient
|
|
3853
|
+
* declaration, and a top-level `declare var` is a global without needing
|
|
3854
|
+
* `declare global`, which a script may not contain.
|
|
3847
3855
|
*/
|
|
3848
|
-
var PROJECT_SOURCE_DECLARATIONS = "// Generated by the Val studio when this project was wired up to the platform.\n// The build resolves this specifier to the project's own source, shipped into\n// the isolate as a module.\ndeclare module 'platform:project-source' {\n /** Every source file of this project, keyed by its path from the root. */\n export const FILES: Record<string, string>\n}\n\
|
|
3856
|
+
var PROJECT_SOURCE_DECLARATIONS = "// Generated by the Val studio when this project was wired up to the platform.\n// The build resolves this specifier to the project's own source, shipped into\n// the isolate as a module.\n//\n// Deliberately not a module: an `export` anywhere in this file would turn the\n// declaration below into an augmentation, and the import would stop resolving.\ndeclare module 'platform:project-source' {\n /** Every source file of this project, keyed by its path from the root. */\n export const FILES: Record<string, string>\n}\n\n/**\n * The project this isolate is serving, set per request by the platform from\n * the id the loader resolved off the hostname.\n *\n * Absent when server-rendering outside the platform, and in the browser.\n */\n// eslint-disable-next-line no-var\ndeclare var __PLATFORM_PROJECT_ID: string | undefined\n/**\n * This project's secrets, handed over per request rather than built in.\n *\n * SERVER ONLY -- set by the platform's Worker entry, which never runs in a\n * browser. Absent outside the platform.\n */\n// eslint-disable-next-line no-var\ndeclare var __PLATFORM_SECRETS: Record<string, string> | undefined\n";
|
|
3849
3857
|
|
|
3850
3858
|
/**
|
|
3851
3859
|
* The wired `val.server.ts`, on its own.
|
package/package.json
CHANGED