@stacksjs/build 0.70.57 → 0.70.59
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/dist/index.d.ts +25 -6
- package/dist/index.js +672 -56
- package/package.json +4 -4
package/dist/index.d.ts
CHANGED
|
@@ -7,12 +7,31 @@ export declare function outro(options: {
|
|
|
7
7
|
export declare function intro(options: { dir: string, pkgName?: string, styled?: boolean }): Promise<{
|
|
8
8
|
startTime: number
|
|
9
9
|
}>;
|
|
10
|
-
|
|
11
|
-
*
|
|
12
|
-
*
|
|
13
|
-
*
|
|
14
|
-
*
|
|
15
|
-
*
|
|
10
|
+
/**` file 1:1 to `dist/`,
|
|
11
|
+
* preserving the module graph, then emitting `.d.ts` alongside.
|
|
12
|
+
*
|
|
13
|
+
* WHY NOT `Bun.build` (bundling): several barrel packages here re-export named
|
|
14
|
+
* bindings from a source — `export { fromPromise } from 'ts-error-handling'`,
|
|
15
|
+
* `export { ERROR_PAGE_CSS } from './error-page'`. Bun's bundler mangles these:
|
|
16
|
+
* - with `splitting: true` it wires cross-chunk symbols wrong, emitting an
|
|
17
|
+
* `export { x as ok }` where `x` is never imported/declared in the file
|
|
18
|
+
* (`SyntaxError: Exported binding 'X' needs to refer to a top-level
|
|
19
|
+
* declared variable`);
|
|
20
|
+
* - marking the source external instead drops the `from` clause entirely,
|
|
21
|
+
* producing an invalid bare `export { ok }`.
|
|
22
|
+
* Affected: arrays, collections, datetime, error-handling, github, strings, ui.
|
|
23
|
+
*
|
|
24
|
+
* `Bun.Transpiler` sidesteps all of it: it strips types and leaves every
|
|
25
|
+
* import/export statement verbatim, so `export * from './handler'` and
|
|
26
|
+
* `export { ok } from 'ts-error-handling'` survive intact. Internal `./x`
|
|
27
|
+
* imports resolve to the sibling `dist/x.js`; external packages resolve from
|
|
28
|
+
* the consumer's node_modules at runtime. The `.d.ts` files still come from
|
|
29
|
+
* the dtsx plugin via a throwaway `Bun.build` (its `.js` output is discarded).
|
|
16
30
|
*/
|
|
31
|
+
export declare function transpilePackage(options: {
|
|
32
|
+
dir: string
|
|
33
|
+
pkgName?: string
|
|
34
|
+
external?: string[]
|
|
35
|
+
}): Promise<void>;
|
|
17
36
|
export declare function frameworkExternal(extras?: string[]): string[];
|
|
18
37
|
export * from './utils';
|