@ryanatkn/gro 0.154.0 → 0.156.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/dist/build.task.d.ts +1 -1
- package/dist/build.task.js +2 -2
- package/dist/changelog.js +1 -1
- package/dist/changeset.task.d.ts +1 -1
- package/dist/changeset.task.js +6 -6
- package/dist/check.task.d.ts +1 -1
- package/dist/check.task.js +3 -3
- package/dist/clean.task.d.ts +1 -1
- package/dist/clean.task.js +2 -2
- package/dist/clean_fs.js +2 -2
- package/dist/cli.d.ts +1 -1
- package/dist/cli.js +2 -2
- package/dist/commit.task.d.ts +1 -1
- package/dist/commit.task.js +1 -1
- package/dist/constants.d.ts +0 -1
- package/dist/constants.d.ts.map +1 -1
- package/dist/constants.js +0 -1
- package/dist/deploy.task.d.ts +1 -1
- package/dist/deploy.task.js +5 -5
- package/dist/dev.task.d.ts +2 -2
- package/dist/dev.task.js +2 -2
- package/dist/esbuild_helpers.d.ts +1 -1
- package/dist/esbuild_helpers.d.ts.map +1 -1
- package/dist/esbuild_helpers.js +1 -2
- package/dist/esbuild_plugin_external_worker.d.ts +1 -1
- package/dist/esbuild_plugin_external_worker.js +7 -7
- package/dist/esbuild_plugin_svelte.d.ts +1 -1
- package/dist/esbuild_plugin_svelte.js +4 -4
- package/dist/esbuild_plugin_sveltekit_local_imports.js +2 -2
- package/dist/esbuild_plugin_sveltekit_shim_app.d.ts +1 -1
- package/dist/esbuild_plugin_sveltekit_shim_app.js +2 -2
- package/dist/esbuild_plugin_sveltekit_shim_env.js +3 -3
- package/dist/filer.d.ts +3 -3
- package/dist/filer.js +6 -6
- package/dist/format.task.d.ts +1 -1
- package/dist/format.task.js +3 -3
- package/dist/format_directory.d.ts +1 -1
- package/dist/format_directory.js +5 -5
- package/dist/format_file.js +1 -1
- package/dist/gen.d.ts +5 -5
- package/dist/gen.js +4 -4
- package/dist/gen.task.d.ts +1 -1
- package/dist/gen.task.js +8 -8
- package/dist/git.js +1 -1
- package/dist/gro.config.default.d.ts +1 -1
- package/dist/gro.config.default.js +16 -8
- package/dist/gro.d.ts +1 -1
- package/dist/gro.js +3 -2
- package/dist/gro_config.d.ts +4 -4
- package/dist/gro_config.js +12 -4
- package/dist/gro_helpers.d.ts.map +1 -1
- package/dist/gro_helpers.js +5 -2
- package/dist/gro_plugin_gen.d.ts +2 -2
- package/dist/gro_plugin_gen.js +4 -4
- package/dist/gro_plugin_server.d.ts +1 -1
- package/dist/gro_plugin_server.js +11 -11
- package/dist/gro_plugin_sveltekit_app.d.ts +3 -3
- package/dist/gro_plugin_sveltekit_app.js +10 -10
- package/dist/gro_plugin_sveltekit_library.d.ts +2 -2
- package/dist/gro_plugin_sveltekit_library.js +3 -3
- package/dist/index.d.ts +4 -4
- package/dist/index.js +2 -2
- package/dist/input_path.d.ts +1 -1
- package/dist/input_path.js +3 -3
- package/dist/invoke.js +4 -4
- package/dist/invoke_task.d.ts +4 -4
- package/dist/invoke_task.js +7 -7
- package/dist/lint.task.d.ts +1 -1
- package/dist/lint.task.js +3 -3
- package/dist/loader.d.ts.map +1 -1
- package/dist/loader.js +70 -47
- package/dist/module.js +2 -2
- package/dist/modules.d.ts +2 -2
- package/dist/modules.js +10 -2
- package/dist/package.d.ts +1 -0
- package/dist/package.d.ts.map +1 -1
- package/dist/package.gen.d.ts +1 -1
- package/dist/package.gen.js +5 -5
- package/dist/package.js +6 -6
- package/dist/package_json.js +5 -5
- package/dist/package_meta.d.ts +2 -2
- package/dist/package_meta.js +1 -1
- package/dist/parse_imports.d.ts +1 -1
- package/dist/parse_imports.js +2 -2
- package/dist/paths.d.ts +1 -1
- package/dist/paths.js +2 -2
- package/dist/plugin.d.ts +3 -3
- package/dist/plugin.d.ts.map +1 -1
- package/dist/publish.task.d.ts +1 -1
- package/dist/publish.task.js +8 -8
- package/dist/reinstall.task.d.ts +1 -1
- package/dist/reinstall.task.js +2 -2
- package/dist/release.task.d.ts +1 -1
- package/dist/release.task.js +2 -2
- package/dist/resolve.task.d.ts +1 -1
- package/dist/resolve.task.js +2 -2
- package/dist/resolve_specifier.d.ts +1 -1
- package/dist/resolve_specifier.js +1 -1
- package/dist/run.task.d.ts +1 -1
- package/dist/run.task.js +2 -2
- package/dist/run_gen.d.ts +3 -3
- package/dist/run_gen.js +3 -3
- package/dist/run_task.d.ts +5 -5
- package/dist/run_task.js +4 -4
- package/dist/search_fs.d.ts +1 -1
- package/dist/src_json.d.ts +1 -1
- package/dist/src_json.js +2 -2
- package/dist/svelte_config.js +10 -2
- package/dist/sveltekit_helpers.d.ts +3 -3
- package/dist/sveltekit_helpers.js +6 -6
- package/dist/sveltekit_shim_app.d.ts +1 -1
- package/dist/sveltekit_shim_app_state.js +1 -1
- package/dist/sveltekit_shim_env.js +1 -1
- package/dist/sync.task.d.ts +1 -1
- package/dist/sync.task.js +3 -3
- package/dist/task.d.ts +7 -7
- package/dist/task.js +4 -4
- package/dist/task_logging.d.ts +1 -1
- package/dist/task_logging.js +1 -1
- package/dist/test.task.d.ts +1 -1
- package/dist/test.task.js +3 -3
- package/dist/typecheck.task.d.ts +1 -1
- package/dist/typecheck.task.js +6 -6
- package/dist/upgrade.task.d.ts +1 -1
- package/dist/upgrade.task.js +6 -6
- package/dist/watch_dir.d.ts +1 -1
- package/package.json +5 -4
- package/src/lib/build.task.ts +3 -3
- package/src/lib/changelog.ts +1 -1
- package/src/lib/changeset.task.ts +6 -6
- package/src/lib/check.task.ts +3 -3
- package/src/lib/clean.task.ts +3 -3
- package/src/lib/clean_fs.ts +2 -2
- package/src/lib/cli.ts +3 -3
- package/src/lib/commit.task.ts +2 -2
- package/src/lib/constants.ts +0 -1
- package/src/lib/deploy.task.ts +5 -5
- package/src/lib/dev.task.ts +3 -3
- package/src/lib/esbuild_helpers.ts +2 -3
- package/src/lib/esbuild_plugin_external_worker.ts +9 -9
- package/src/lib/esbuild_plugin_svelte.ts +4 -4
- package/src/lib/esbuild_plugin_sveltekit_local_imports.ts +2 -2
- package/src/lib/esbuild_plugin_sveltekit_shim_app.ts +3 -3
- package/src/lib/esbuild_plugin_sveltekit_shim_env.ts +3 -3
- package/src/lib/filer.ts +8 -8
- package/src/lib/format.task.ts +3 -3
- package/src/lib/format_directory.ts +5 -5
- package/src/lib/format_file.ts +1 -1
- package/src/lib/gen.task.ts +8 -8
- package/src/lib/gen.ts +7 -7
- package/src/lib/git.ts +1 -1
- package/src/lib/gro.config.default.ts +8 -8
- package/src/lib/gro.ts +4 -2
- package/src/lib/gro_config.ts +7 -7
- package/src/lib/gro_helpers.ts +5 -2
- package/src/lib/gro_plugin_gen.ts +6 -6
- package/src/lib/gro_plugin_server.ts +13 -13
- package/src/lib/gro_plugin_sveltekit_app.ts +11 -11
- package/src/lib/gro_plugin_sveltekit_library.ts +4 -4
- package/src/lib/index.ts +4 -4
- package/src/lib/input_path.ts +4 -4
- package/src/lib/invoke.ts +4 -4
- package/src/lib/invoke_task.ts +8 -8
- package/src/lib/lint.task.ts +3 -3
- package/src/lib/loader.ts +75 -64
- package/src/lib/module.ts +2 -2
- package/src/lib/modules.ts +3 -3
- package/src/lib/package.gen.ts +6 -6
- package/src/lib/package.ts +8 -8
- package/src/lib/package_json.ts +5 -5
- package/src/lib/package_meta.ts +3 -3
- package/src/lib/parse_imports.ts +3 -3
- package/src/lib/paths.ts +3 -3
- package/src/lib/plugin.ts +8 -5
- package/src/lib/publish.task.ts +8 -8
- package/src/lib/reinstall.task.ts +2 -2
- package/src/lib/release.task.ts +3 -3
- package/src/lib/resolve.task.ts +2 -2
- package/src/lib/resolve_specifier.ts +2 -2
- package/src/lib/run.task.ts +2 -2
- package/src/lib/run_gen.ts +5 -5
- package/src/lib/run_task.ts +7 -7
- package/src/lib/search_fs.ts +1 -1
- package/src/lib/src_json.ts +2 -2
- package/src/lib/svelte_config.ts +1 -1
- package/src/lib/sveltekit_helpers.ts +6 -6
- package/src/lib/sveltekit_shim_app.ts +1 -1
- package/src/lib/sveltekit_shim_app_state.ts +1 -1
- package/src/lib/sveltekit_shim_env.ts +1 -1
- package/src/lib/sync.task.ts +3 -3
- package/src/lib/task.ts +9 -9
- package/src/lib/task_logging.ts +3 -3
- package/src/lib/test.task.ts +3 -3
- package/src/lib/typecheck.task.ts +6 -6
- package/src/lib/upgrade.task.ts +6 -6
- package/src/lib/watch_dir.ts +1 -1
|
@@ -8,19 +8,19 @@ import type {Result} from '@ryanatkn/belt/result.js';
|
|
|
8
8
|
import {existsSync} from 'node:fs';
|
|
9
9
|
import {throttle} from '@ryanatkn/belt/throttle.js';
|
|
10
10
|
|
|
11
|
-
import type {Plugin} from './plugin.
|
|
12
|
-
import {base_path_to_path_id, LIB_DIRNAME, paths} from './paths.
|
|
13
|
-
import type {Path_Id} from './path.
|
|
14
|
-
import {GRO_DEV_DIRNAME, SERVER_DIST_PATH} from './constants.
|
|
15
|
-
import {watch_dir, type Watch_Node_Fs} from './watch_dir.
|
|
16
|
-
import {parse_svelte_config, default_svelte_config} from './svelte_config.
|
|
17
|
-
import {esbuild_plugin_sveltekit_shim_app} from './esbuild_plugin_sveltekit_shim_app.
|
|
18
|
-
import {esbuild_plugin_sveltekit_shim_env} from './esbuild_plugin_sveltekit_shim_env.
|
|
19
|
-
import {print_build_result, to_define_import_meta_env} from './esbuild_helpers.
|
|
20
|
-
import {esbuild_plugin_sveltekit_shim_alias} from './esbuild_plugin_sveltekit_shim_alias.
|
|
21
|
-
import {esbuild_plugin_external_worker} from './esbuild_plugin_external_worker.
|
|
22
|
-
import {esbuild_plugin_sveltekit_local_imports} from './esbuild_plugin_sveltekit_local_imports.
|
|
23
|
-
import {esbuild_plugin_svelte} from './esbuild_plugin_svelte.
|
|
11
|
+
import type {Plugin} from './plugin.ts';
|
|
12
|
+
import {base_path_to_path_id, LIB_DIRNAME, paths} from './paths.ts';
|
|
13
|
+
import type {Path_Id} from './path.ts';
|
|
14
|
+
import {GRO_DEV_DIRNAME, SERVER_DIST_PATH} from './constants.ts';
|
|
15
|
+
import {watch_dir, type Watch_Node_Fs} from './watch_dir.ts';
|
|
16
|
+
import {parse_svelte_config, default_svelte_config} from './svelte_config.ts';
|
|
17
|
+
import {esbuild_plugin_sveltekit_shim_app} from './esbuild_plugin_sveltekit_shim_app.ts';
|
|
18
|
+
import {esbuild_plugin_sveltekit_shim_env} from './esbuild_plugin_sveltekit_shim_env.ts';
|
|
19
|
+
import {print_build_result, to_define_import_meta_env} from './esbuild_helpers.ts';
|
|
20
|
+
import {esbuild_plugin_sveltekit_shim_alias} from './esbuild_plugin_sveltekit_shim_alias.ts';
|
|
21
|
+
import {esbuild_plugin_external_worker} from './esbuild_plugin_external_worker.ts';
|
|
22
|
+
import {esbuild_plugin_sveltekit_local_imports} from './esbuild_plugin_sveltekit_local_imports.ts';
|
|
23
|
+
import {esbuild_plugin_svelte} from './esbuild_plugin_svelte.ts';
|
|
24
24
|
|
|
25
25
|
// TODO sourcemap as a hoisted option? disable for production by default - or like `outpaths`, passed a `dev` param
|
|
26
26
|
|
|
@@ -2,16 +2,16 @@ import type {Spawned_Process} from '@ryanatkn/belt/process.js';
|
|
|
2
2
|
import {cpSync, mkdirSync, rmSync, writeFileSync, existsSync} from 'node:fs';
|
|
3
3
|
import {dirname, join} from 'node:path';
|
|
4
4
|
|
|
5
|
-
import type {Plugin} from './plugin.
|
|
6
|
-
import {serialize_args, to_forwarded_args} from './args.
|
|
7
|
-
import {serialize_package_json, type Map_Package_Json, load_package_json} from './package_json.
|
|
8
|
-
import {Task_Error} from './task.
|
|
9
|
-
import {find_cli, spawn_cli, spawn_cli_process} from './cli.
|
|
10
|
-
import {type Map_Src_Json, serialize_src_json, create_src_json} from './src_json.
|
|
11
|
-
import {EXPORTS_EXCLUDER_DEFAULT} from './gro_config.
|
|
12
|
-
import {default_svelte_config} from './svelte_config.
|
|
13
|
-
import {SOURCE_DIRNAME} from './constants.
|
|
14
|
-
import {VITE_CLI} from './sveltekit_helpers.
|
|
5
|
+
import type {Plugin} from './plugin.ts';
|
|
6
|
+
import {serialize_args, to_forwarded_args} from './args.ts';
|
|
7
|
+
import {serialize_package_json, type Map_Package_Json, load_package_json} from './package_json.ts';
|
|
8
|
+
import {Task_Error} from './task.ts';
|
|
9
|
+
import {find_cli, spawn_cli, spawn_cli_process} from './cli.ts';
|
|
10
|
+
import {type Map_Src_Json, serialize_src_json, create_src_json} from './src_json.ts';
|
|
11
|
+
import {EXPORTS_EXCLUDER_DEFAULT} from './gro_config.ts';
|
|
12
|
+
import {default_svelte_config} from './svelte_config.ts';
|
|
13
|
+
import {SOURCE_DIRNAME} from './constants.ts';
|
|
14
|
+
import {VITE_CLI} from './sveltekit_helpers.ts';
|
|
15
15
|
|
|
16
16
|
export interface Gro_Plugin_Sveltekit_App_Options {
|
|
17
17
|
/**
|
|
@@ -60,7 +60,7 @@ export const gro_plugin_sveltekit_app = ({
|
|
|
60
60
|
setup: async ({dev, watch, log, config}) => {
|
|
61
61
|
const found_vite_cli = find_cli(vite_cli);
|
|
62
62
|
if (!found_vite_cli)
|
|
63
|
-
throw
|
|
63
|
+
throw Error(
|
|
64
64
|
`Failed to find Vite CLI \`${vite_cli}\`, do you need to run \`${config.pm_cli} i\`?`,
|
|
65
65
|
);
|
|
66
66
|
if (dev) {
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import {print_spawn_result, spawn} from '@ryanatkn/belt/process.js';
|
|
2
2
|
|
|
3
|
-
import type {Plugin} from './plugin.
|
|
4
|
-
import {Task_Error} from './task.
|
|
5
|
-
import {load_package_json} from './package_json.
|
|
3
|
+
import type {Plugin} from './plugin.ts';
|
|
4
|
+
import {Task_Error} from './task.ts';
|
|
5
|
+
import {load_package_json} from './package_json.ts';
|
|
6
6
|
import {
|
|
7
7
|
SVELTE_PACKAGE_CLI,
|
|
8
8
|
run_svelte_package,
|
|
9
9
|
type Svelte_Package_Options,
|
|
10
|
-
} from './sveltekit_helpers.
|
|
10
|
+
} from './sveltekit_helpers.ts';
|
|
11
11
|
|
|
12
12
|
export interface Gro_Plugin_Sveltekit_Library_Options {
|
|
13
13
|
/**
|
package/src/lib/index.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export type {Gro_Config, Create_Gro_Config, Raw_Gro_Config} from './gro_config.
|
|
2
|
-
export {type Plugin, replace_plugin} from './plugin.
|
|
3
|
-
export type {Gen, Gen_Context} from './gen.
|
|
4
|
-
export {type Task, type Task_Context, Task_Error} from './task.
|
|
1
|
+
export type {Gro_Config, Create_Gro_Config, Raw_Gro_Config} from './gro_config.ts';
|
|
2
|
+
export {type Plugin, replace_plugin} from './plugin.ts';
|
|
3
|
+
export type {Gen, Gen_Context} from './gen.ts';
|
|
4
|
+
export {type Task, type Task_Context, Task_Error} from './task.ts';
|
package/src/lib/input_path.ts
CHANGED
|
@@ -4,10 +4,10 @@ import {strip_start} from '@ryanatkn/belt/string.js';
|
|
|
4
4
|
import {z} from 'zod';
|
|
5
5
|
import type {Flavored} from '@ryanatkn/belt/types.js';
|
|
6
6
|
|
|
7
|
-
import {GRO_PACKAGE_DIR, GRO_DIST_DIR} from './paths.
|
|
8
|
-
import type {Path_Info, Path_Id, Resolved_Path} from './path.
|
|
9
|
-
import {search_fs} from './search_fs.
|
|
10
|
-
import {TASK_FILE_SUFFIX_JS} from './task.
|
|
7
|
+
import {GRO_PACKAGE_DIR, GRO_DIST_DIR} from './paths.ts';
|
|
8
|
+
import type {Path_Info, Path_Id, Resolved_Path} from './path.ts';
|
|
9
|
+
import {search_fs} from './search_fs.ts';
|
|
10
|
+
import {TASK_FILE_SUFFIX_JS} from './task.ts';
|
|
11
11
|
|
|
12
12
|
// TODO Flavored doesn't work when used in schemas, use Zod brand instead? problem is ergonomics
|
|
13
13
|
export const Input_Path = z.string();
|
package/src/lib/invoke.ts
CHANGED
|
@@ -3,10 +3,10 @@ import {configure_log_colors} from '@ryanatkn/belt/log.js';
|
|
|
3
3
|
import {set_colors} from '@ryanatkn/belt/print.js';
|
|
4
4
|
import {styleText} from 'node:util';
|
|
5
5
|
|
|
6
|
-
import {invoke_task} from './invoke_task.
|
|
7
|
-
import {to_task_args} from './args.
|
|
8
|
-
import {load_gro_config} from './gro_config.
|
|
9
|
-
import {sveltekit_sync_if_obviously_needed} from './sveltekit_helpers.
|
|
6
|
+
import {invoke_task} from './invoke_task.ts';
|
|
7
|
+
import {to_task_args} from './args.ts';
|
|
8
|
+
import {load_gro_config} from './gro_config.ts';
|
|
9
|
+
import {sveltekit_sync_if_obviously_needed} from './sveltekit_helpers.ts';
|
|
10
10
|
|
|
11
11
|
/*
|
|
12
12
|
|
package/src/lib/invoke_task.ts
CHANGED
|
@@ -3,14 +3,14 @@ import {System_Logger} from '@ryanatkn/belt/log.js';
|
|
|
3
3
|
import {create_stopwatch, Timings} from '@ryanatkn/belt/timings.js';
|
|
4
4
|
import {print_ms, print_timings, print_log_label} from '@ryanatkn/belt/print.js';
|
|
5
5
|
|
|
6
|
-
import {to_forwarded_args, type Args} from './args.
|
|
7
|
-
import {run_task} from './run_task.
|
|
8
|
-
import {to_input_path, Raw_Input_Path} from './input_path.
|
|
9
|
-
import {find_tasks, load_tasks, Silent_Error} from './task.
|
|
10
|
-
import {load_gro_package_json} from './package_json.
|
|
11
|
-
import {log_tasks, log_error_reasons} from './task_logging.
|
|
12
|
-
import type {Gro_Config} from './gro_config.
|
|
13
|
-
import {Filer} from './filer.
|
|
6
|
+
import {to_forwarded_args, type Args} from './args.ts';
|
|
7
|
+
import {run_task} from './run_task.ts';
|
|
8
|
+
import {to_input_path, Raw_Input_Path} from './input_path.ts';
|
|
9
|
+
import {find_tasks, load_tasks, Silent_Error} from './task.ts';
|
|
10
|
+
import {load_gro_package_json} from './package_json.ts';
|
|
11
|
+
import {log_tasks, log_error_reasons} from './task_logging.ts';
|
|
12
|
+
import type {Gro_Config} from './gro_config.ts';
|
|
13
|
+
import {Filer} from './filer.ts';
|
|
14
14
|
|
|
15
15
|
/**
|
|
16
16
|
* Invokes Gro tasks by name using the filesystem as the source.
|
package/src/lib/lint.task.ts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import {print_spawn_result} from '@ryanatkn/belt/process.js';
|
|
2
2
|
import {z} from 'zod';
|
|
3
3
|
|
|
4
|
-
import {Task_Error, type Task} from './task.
|
|
5
|
-
import {serialize_args, to_forwarded_args} from './args.
|
|
6
|
-
import {find_cli, spawn_cli} from './cli.
|
|
4
|
+
import {Task_Error, type Task} from './task.ts';
|
|
5
|
+
import {serialize_args, to_forwarded_args} from './args.ts';
|
|
6
|
+
import {find_cli, spawn_cli} from './cli.ts';
|
|
7
7
|
|
|
8
8
|
const ESLINT_CLI = 'eslint';
|
|
9
9
|
|
package/src/lib/loader.ts
CHANGED
|
@@ -1,26 +1,25 @@
|
|
|
1
|
-
import * as esbuild from 'esbuild';
|
|
2
1
|
import {compile, compileModule, preprocess} from 'svelte/compiler';
|
|
3
2
|
import {fileURLToPath, pathToFileURL} from 'node:url';
|
|
4
3
|
import {dirname, join} from 'node:path';
|
|
5
4
|
import type {LoadHook, ResolveHook} from 'node:module';
|
|
6
5
|
import {escape_regexp} from '@ryanatkn/belt/regexp.js';
|
|
7
6
|
import {readFileSync} from 'node:fs';
|
|
7
|
+
import ts_blank_space from 'ts-blank-space';
|
|
8
8
|
|
|
9
|
-
import {render_env_shim_module} from './sveltekit_shim_env.
|
|
9
|
+
import {render_env_shim_module} from './sveltekit_shim_env.ts';
|
|
10
10
|
import {
|
|
11
11
|
render_sveltekit_shim_app_environment,
|
|
12
12
|
render_sveltekit_shim_app_paths,
|
|
13
13
|
SVELTEKIT_SHIM_APP_ENVIRONMENT_MATCHER,
|
|
14
14
|
SVELTEKIT_SHIM_APP_PATHS_MATCHER,
|
|
15
15
|
sveltekit_shim_app_specifiers,
|
|
16
|
-
} from './sveltekit_shim_app.
|
|
17
|
-
import {default_svelte_config} from './svelte_config.
|
|
18
|
-
import {SVELTE_MATCHER, SVELTE_RUNES_MATCHER} from './svelte_helpers.
|
|
19
|
-
import {IS_THIS_GRO, paths} from './paths.
|
|
20
|
-
import {
|
|
21
|
-
import {
|
|
22
|
-
import {
|
|
23
|
-
import {map_sveltekit_aliases} from './sveltekit_helpers.js';
|
|
16
|
+
} from './sveltekit_shim_app.ts';
|
|
17
|
+
import {default_svelte_config} from './svelte_config.ts';
|
|
18
|
+
import {SVELTE_MATCHER, SVELTE_RUNES_MATCHER} from './svelte_helpers.ts';
|
|
19
|
+
import {IS_THIS_GRO, paths} from './paths.ts';
|
|
20
|
+
import {NODE_MODULES_DIRNAME, TS_MATCHER} from './constants.ts';
|
|
21
|
+
import {resolve_specifier} from './resolve_specifier.ts';
|
|
22
|
+
import {map_sveltekit_aliases} from './sveltekit_helpers.ts';
|
|
24
23
|
|
|
25
24
|
// TODO get out of the loader business, starting with https://nodejs.org/api/typescript.html#type-stripping
|
|
26
25
|
|
|
@@ -41,7 +40,7 @@ gro run foo.ts
|
|
|
41
40
|
Direct usage without register (see also `$lib/gro.ts`):
|
|
42
41
|
|
|
43
42
|
```bash
|
|
44
|
-
node --import 'data:text/javascript,import {register} from "node:module"; import {pathToFileURL} from "node:url"; register("@ryanatkn/gro/loader.js", pathToFileURL("./"));' --experimental-import-meta-resolve --
|
|
43
|
+
node --import 'data:text/javascript,import {register} from "node:module"; import {pathToFileURL} from "node:url"; register("@ryanatkn/gro/loader.js", pathToFileURL("./"));' --experimental-import-meta-resolve --experimental-strip-types' foo.ts
|
|
45
44
|
```
|
|
46
45
|
|
|
47
46
|
TODO how to improve that gnarly import line? was originally designed for the now-deprecated `--loader`
|
|
@@ -68,19 +67,13 @@ const {
|
|
|
68
67
|
svelte_preprocessors,
|
|
69
68
|
} = default_svelte_config;
|
|
70
69
|
|
|
71
|
-
const ts_transform_options: esbuild.TransformOptions = {
|
|
72
|
-
...default_ts_transform_options,
|
|
73
|
-
define: to_define_import_meta_env(dev, base_url),
|
|
74
|
-
sourcemap: 'inline',
|
|
75
|
-
};
|
|
76
|
-
|
|
77
70
|
const aliases = Object.entries(alias);
|
|
78
71
|
|
|
79
72
|
const RAW_MATCHER = /(%3Fraw|\.css|\.svg)$/; // TODO others? configurable?
|
|
80
|
-
const ENV_MATCHER = /src\/lib\/\$env\/(static|dynamic)\/(public|private)$/;
|
|
81
73
|
const NODE_MODULES_MATCHER = new RegExp(escape_regexp('/' + NODE_MODULES_DIRNAME + '/'), 'u');
|
|
82
74
|
|
|
83
75
|
export const load: LoadHook = async (url, context, nextLoad) => {
|
|
76
|
+
// console.log(`url`, url);
|
|
84
77
|
if (SVELTEKIT_SHIM_APP_PATHS_MATCHER.test(url)) {
|
|
85
78
|
// SvelteKit `$app/paths` shim
|
|
86
79
|
return {
|
|
@@ -96,33 +89,25 @@ export const load: LoadHook = async (url, context, nextLoad) => {
|
|
|
96
89
|
source: render_sveltekit_shim_app_environment(dev),
|
|
97
90
|
};
|
|
98
91
|
} else if (SVELTE_RUNES_MATCHER.test(url)) {
|
|
99
|
-
// Svelte runes in js/ts
|
|
100
|
-
const loaded = await nextLoad(
|
|
101
|
-
url,
|
|
102
|
-
context.format === 'module' ? context : {...context, format: 'module'}, // TODO dunno why this is needed, specifically with tests
|
|
103
|
-
);
|
|
92
|
+
// Svelte runes in js/ts, `.svelte.ts`
|
|
104
93
|
const filename = fileURLToPath(url);
|
|
105
|
-
const
|
|
106
|
-
const
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
const
|
|
94
|
+
const loaded = await nextLoad(url, {...context, format: 'module-typescript'});
|
|
95
|
+
const raw_source = loaded.source?.toString(); // eslint-disable-line @typescript-eslint/no-base-to-string
|
|
96
|
+
if (raw_source == null) throw Error(`Failed to load ${url}`);
|
|
97
|
+
// TODO should be nice if we could use Node's builtin amaro transform, but I couldn't find a way after digging into the source, AFAICT it's internal and not exposed
|
|
98
|
+
const source = ts_blank_space(raw_source); // TODO was using oxc-transform and probably should, but this doesn't require sourcemaps, and it's still alpha as of May 2025
|
|
99
|
+
const transformed = compileModule(source, {
|
|
100
|
+
...svelte_compile_module_options,
|
|
101
|
+
dev,
|
|
102
|
+
filename,
|
|
103
|
+
});
|
|
110
104
|
return {format: 'module', shortCircuit: true, source: transformed.js.code};
|
|
111
105
|
} else if (TS_MATCHER.test(url)) {
|
|
112
|
-
// ts
|
|
113
|
-
|
|
114
|
-
url,
|
|
115
|
-
context.format === 'module' ? context : {...context, format: 'module'}, // TODO dunno why this is needed, specifically with tests
|
|
116
|
-
);
|
|
117
|
-
const source = loaded.source!.toString(); // eslint-disable-line @typescript-eslint/no-base-to-string
|
|
118
|
-
const transformed = await esbuild.transform(source, {...ts_transform_options, sourcefile: url}); // TODO @many use warnings? handle not-inline sourcemaps?
|
|
119
|
-
return {format: 'module', shortCircuit: true, source: transformed.code};
|
|
106
|
+
// ts but not `.svelte.ts`
|
|
107
|
+
return nextLoad(url, {...context, format: 'module-typescript'});
|
|
120
108
|
} else if (SVELTE_MATCHER.test(url)) {
|
|
121
|
-
// Svelte
|
|
122
|
-
const loaded = await nextLoad(
|
|
123
|
-
url,
|
|
124
|
-
context.format === 'module' ? context : {...context, format: 'module'}, // TODO dunno why this is needed, specifically with tests
|
|
125
|
-
);
|
|
109
|
+
// Svelte, `.svelte`
|
|
110
|
+
const loaded = await nextLoad(url, {...context, format: 'module'});
|
|
126
111
|
const raw_source = loaded.source!.toString(); // eslint-disable-line @typescript-eslint/no-base-to-string
|
|
127
112
|
const filename = fileURLToPath(url);
|
|
128
113
|
const preprocessed = svelte_preprocessors // TODO @many use sourcemaps (and diagnostics?)
|
|
@@ -131,11 +116,14 @@ export const load: LoadHook = async (url, context, nextLoad) => {
|
|
|
131
116
|
const source = preprocessed?.code ?? raw_source;
|
|
132
117
|
const transformed = compile(source, {...svelte_compile_options, dev, filename});
|
|
133
118
|
return {format: 'module', shortCircuit: true, source: transformed.js.code};
|
|
134
|
-
} else if (
|
|
135
|
-
// json
|
|
136
|
-
// TODO probably follow esbuild and also export every top-level property for objects from the module - https://esbuild.github.io/content-types/#json (type generation?)
|
|
137
|
-
|
|
138
|
-
|
|
119
|
+
} else if (context.importAttributes.type === 'json') {
|
|
120
|
+
// json - any file extension
|
|
121
|
+
// TODO probably follow esbuild and also export every top-level property for objects from the module for good treeshaking - https://esbuild.github.io/content-types/#json (type generation?)
|
|
122
|
+
// TODO why is removing the importAttributes needed? can't pass no context either -
|
|
123
|
+
// error: `Module "file:///home/user/dev/repo/foo.json" is not of type "json"`
|
|
124
|
+
const loaded = await nextLoad(url, {...context, importAttributes: undefined});
|
|
125
|
+
const raw_source = loaded.source?.toString(); // eslint-disable-line @typescript-eslint/no-base-to-string
|
|
126
|
+
if (raw_source == null) throw Error(`Failed to load ${url}`);
|
|
139
127
|
const source = `export default ` + raw_source;
|
|
140
128
|
return {format: 'module', shortCircuit: true, source};
|
|
141
129
|
} else if (RAW_MATCHER.test(url)) {
|
|
@@ -146,23 +134,45 @@ export const load: LoadHook = async (url, context, nextLoad) => {
|
|
|
146
134
|
'export default `' + raw_source.replaceAll('\\', '\\\\').replaceAll('`', '\\`') + '`;';
|
|
147
135
|
return {format: 'module', shortCircuit: true, source};
|
|
148
136
|
} else {
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
137
|
+
// SvelteKit `$env`
|
|
138
|
+
// TODO use `format` from the resolve hook to speed this up and make it simpler
|
|
139
|
+
if (context.format === 'sveltekit-env') {
|
|
140
|
+
let mode: 'static' | 'dynamic';
|
|
141
|
+
let visibility: 'public' | 'private';
|
|
142
|
+
switch (context.importAttributes.virtual) {
|
|
143
|
+
case '$env/static/public': {
|
|
144
|
+
mode = 'static';
|
|
145
|
+
visibility = 'public';
|
|
146
|
+
break;
|
|
147
|
+
}
|
|
148
|
+
case '$env/static/private': {
|
|
149
|
+
mode = 'static';
|
|
150
|
+
visibility = 'private';
|
|
151
|
+
break;
|
|
152
|
+
}
|
|
153
|
+
case '$env/dynamic/public': {
|
|
154
|
+
mode = 'dynamic';
|
|
155
|
+
visibility = 'public';
|
|
156
|
+
break;
|
|
157
|
+
}
|
|
158
|
+
case '$env/dynamic/private': {
|
|
159
|
+
mode = 'dynamic';
|
|
160
|
+
visibility = 'private';
|
|
161
|
+
break;
|
|
162
|
+
}
|
|
163
|
+
default: {
|
|
164
|
+
throw Error(`Unknown $env import: ${context.importAttributes.virtual}`);
|
|
165
|
+
}
|
|
166
|
+
}
|
|
167
|
+
const source = render_env_shim_module(
|
|
168
|
+
dev,
|
|
169
|
+
mode,
|
|
170
|
+
visibility,
|
|
171
|
+
public_prefix,
|
|
172
|
+
private_prefix,
|
|
173
|
+
env_dir,
|
|
174
|
+
);
|
|
175
|
+
return {format: 'module', shortCircuit: true, source};
|
|
166
176
|
}
|
|
167
177
|
}
|
|
168
178
|
|
|
@@ -184,7 +194,8 @@ export const resolve: ResolveHook = async (specifier, context, nextResolve) => {
|
|
|
184
194
|
// so we need a slightly roundabout strategy to pass through the specifier for virtual files.
|
|
185
195
|
return {
|
|
186
196
|
url: pathToFileURL(join(dir, 'src/lib', s)).href,
|
|
187
|
-
format: '
|
|
197
|
+
format: 'sveltekit-env',
|
|
198
|
+
importAttributes: {virtual: s}, // TODO idk I'm just making this up
|
|
188
199
|
shortCircuit: true,
|
|
189
200
|
};
|
|
190
201
|
}
|
package/src/lib/module.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {LIB_DIRNAME} from './paths.
|
|
2
|
-
import {SOURCE_DIR, SOURCE_DIRNAME} from './constants.
|
|
1
|
+
import {LIB_DIRNAME} from './paths.ts';
|
|
2
|
+
import {SOURCE_DIR, SOURCE_DIRNAME} from './constants.ts';
|
|
3
3
|
|
|
4
4
|
export const MODULE_PATH_SRC_PREFIX = SOURCE_DIR;
|
|
5
5
|
export const MODULE_PATH_LIB_PREFIX = `$${LIB_DIRNAME}/`;
|
package/src/lib/modules.ts
CHANGED
|
@@ -3,9 +3,9 @@ import {Unreachable_Error} from '@ryanatkn/belt/error.js';
|
|
|
3
3
|
import type {Result} from '@ryanatkn/belt/result.js';
|
|
4
4
|
import {print_error} from '@ryanatkn/belt/print.js';
|
|
5
5
|
|
|
6
|
-
import type {Resolved_Input_File} from './input_path.
|
|
7
|
-
import {print_path} from './paths.
|
|
8
|
-
import type {Path_Id} from './path.
|
|
6
|
+
import type {Resolved_Input_File} from './input_path.ts';
|
|
7
|
+
import {print_path} from './paths.ts';
|
|
8
|
+
import type {Path_Id} from './path.ts';
|
|
9
9
|
|
|
10
10
|
export interface Module_Meta<T_Module extends Record<string, any> = Record<string, any>> {
|
|
11
11
|
id: Path_Id;
|
package/src/lib/package.gen.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import type {Gen} from './gen.
|
|
2
|
-
import {load_package_json} from './package_json.
|
|
3
|
-
import {IS_THIS_GRO} from './paths.
|
|
4
|
-
import {create_src_json} from './src_json.
|
|
1
|
+
import type {Gen} from './gen.ts';
|
|
2
|
+
import {load_package_json} from './package_json.ts';
|
|
3
|
+
import {IS_THIS_GRO} from './paths.ts';
|
|
4
|
+
import {create_src_json} from './src_json.ts';
|
|
5
5
|
|
|
6
6
|
// TODO rename? `Package_Json + Src_Json = package.ts` currently, idk
|
|
7
7
|
|
|
@@ -20,9 +20,9 @@ export const gen: Gen = ({origin_path}) => {
|
|
|
20
20
|
// generated by ${origin_path}
|
|
21
21
|
|
|
22
22
|
import type {Package_Json} from '${
|
|
23
|
-
IS_THIS_GRO ? './package_json.
|
|
23
|
+
IS_THIS_GRO ? './package_json.ts' : '@ryanatkn/gro/package_json.js'
|
|
24
24
|
}';
|
|
25
|
-
import type {Src_Json} from '${IS_THIS_GRO ? './src_json.
|
|
25
|
+
import type {Src_Json} from '${IS_THIS_GRO ? './src_json.ts' : '@ryanatkn/gro/src_json.js'}';
|
|
26
26
|
|
|
27
27
|
export const package_json = ${JSON.stringify(package_json)} satisfies Package_Json;
|
|
28
28
|
|
package/src/lib/package.ts
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
// generated by src/lib/package.gen.ts
|
|
2
2
|
|
|
3
|
-
import type {Package_Json} from './package_json.
|
|
4
|
-
import type {Src_Json} from './src_json.
|
|
3
|
+
import type {Package_Json} from './package_json.ts';
|
|
4
|
+
import type {Src_Json} from './src_json.ts';
|
|
5
5
|
|
|
6
6
|
export const package_json = {
|
|
7
7
|
name: '@ryanatkn/gro',
|
|
8
|
-
version: '0.
|
|
8
|
+
version: '0.156.0',
|
|
9
9
|
description: 'task runner and toolkit extending SvelteKit',
|
|
10
10
|
motto: 'generate, run, optimize',
|
|
11
11
|
glyph: '🌰',
|
|
@@ -30,7 +30,7 @@ export const package_json = {
|
|
|
30
30
|
deploy: 'gro deploy',
|
|
31
31
|
},
|
|
32
32
|
type: 'module',
|
|
33
|
-
engines: {node: '>=22.
|
|
33
|
+
engines: {node: '>=22.15'},
|
|
34
34
|
bin: {gro: 'dist/gro.js'},
|
|
35
35
|
keywords: [
|
|
36
36
|
'web',
|
|
@@ -52,6 +52,7 @@ export const package_json = {
|
|
|
52
52
|
'oxc-parser': '^0.67.0',
|
|
53
53
|
prettier: '^3.5.3',
|
|
54
54
|
'prettier-plugin-svelte': '^3.3.3',
|
|
55
|
+
'ts-blank-space': '^0.6.1',
|
|
55
56
|
'ts-morph': '^25.0.1',
|
|
56
57
|
tslib: '^2.8.1',
|
|
57
58
|
zod: '^3.24.3',
|
|
@@ -61,7 +62,7 @@ export const package_json = {
|
|
|
61
62
|
'@changesets/changelog-git': '^0.2.1',
|
|
62
63
|
'@changesets/types': '^6.1.0',
|
|
63
64
|
'@ryanatkn/eslint-config': '^0.8.0',
|
|
64
|
-
'@ryanatkn/fuz': '^0.
|
|
65
|
+
'@ryanatkn/fuz': '^0.141.1',
|
|
65
66
|
'@ryanatkn/moss': '^0.28.0',
|
|
66
67
|
'@sveltejs/adapter-static': '^3.0.8',
|
|
67
68
|
'@sveltejs/kit': '^2.20.8',
|
|
@@ -77,7 +78,7 @@ export const package_json = {
|
|
|
77
78
|
'typescript-eslint': '^8.31.1',
|
|
78
79
|
uvu: '^0.5.6',
|
|
79
80
|
},
|
|
80
|
-
optionalDependencies: {'@ryanatkn/moss': '
|
|
81
|
+
optionalDependencies: {'@ryanatkn/moss': '>=0.27.0 <0.29.0'},
|
|
81
82
|
prettier: {
|
|
82
83
|
plugins: ['prettier-plugin-svelte'],
|
|
83
84
|
useTabs: true,
|
|
@@ -263,7 +264,7 @@ export const package_json = {
|
|
|
263
264
|
|
|
264
265
|
export const src_json = {
|
|
265
266
|
name: '@ryanatkn/gro',
|
|
266
|
-
version: '0.
|
|
267
|
+
version: '0.156.0',
|
|
267
268
|
modules: {
|
|
268
269
|
'.': {
|
|
269
270
|
path: 'index.ts',
|
|
@@ -391,7 +392,6 @@ export const src_json = {
|
|
|
391
392
|
{name: 'TSCONFIG_FILENAME', kind: 'variable'},
|
|
392
393
|
{name: 'TS_MATCHER', kind: 'variable'},
|
|
393
394
|
{name: 'JS_MATCHER', kind: 'variable'},
|
|
394
|
-
{name: 'JSON_MATCHER', kind: 'variable'},
|
|
395
395
|
{name: 'SVELTE_SCRIPT_MATCHER', kind: 'variable'},
|
|
396
396
|
{name: 'EVERYTHING_MATCHER', kind: 'variable'},
|
|
397
397
|
{name: 'JS_CLI_DEFAULT', kind: 'variable'},
|
package/src/lib/package_json.ts
CHANGED
|
@@ -6,11 +6,11 @@ import type {Logger} from '@ryanatkn/belt/log.js';
|
|
|
6
6
|
import type {Flavored} from '@ryanatkn/belt/types.js';
|
|
7
7
|
import {styleText as st} from 'node:util';
|
|
8
8
|
|
|
9
|
-
import {paths, gro_paths, IS_THIS_GRO, replace_extension} from './paths.
|
|
10
|
-
import {SVELTEKIT_DIST_DIRNAME} from './constants.
|
|
11
|
-
import {search_fs} from './search_fs.
|
|
12
|
-
import {has_sveltekit_library} from './sveltekit_helpers.
|
|
13
|
-
import {GITHUB_REPO_MATCHER} from './github.
|
|
9
|
+
import {paths, gro_paths, IS_THIS_GRO, replace_extension} from './paths.ts';
|
|
10
|
+
import {SVELTEKIT_DIST_DIRNAME} from './constants.ts';
|
|
11
|
+
import {search_fs} from './search_fs.ts';
|
|
12
|
+
import {has_sveltekit_library} from './sveltekit_helpers.ts';
|
|
13
|
+
import {GITHUB_REPO_MATCHER} from './github.ts';
|
|
14
14
|
|
|
15
15
|
// TODO @many belongs elsewhere
|
|
16
16
|
export const Url = z.string();
|
package/src/lib/package_meta.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import {strip_start, strip_end, ensure_end} from '@ryanatkn/belt/string.js';
|
|
2
2
|
|
|
3
|
-
import type {Package_Json, Url} from './package_json.
|
|
4
|
-
import type {Src_Json} from './src_json.
|
|
3
|
+
import type {Package_Json, Url} from './package_json.ts';
|
|
4
|
+
import type {Src_Json} from './src_json.ts';
|
|
5
5
|
|
|
6
6
|
// TODO needs refactoring, more clarity
|
|
7
7
|
export interface Package_Meta {
|
|
@@ -42,7 +42,7 @@ export const parse_package_meta = (
|
|
|
42
42
|
: null,
|
|
43
43
|
);
|
|
44
44
|
if (!repo_url) {
|
|
45
|
-
throw
|
|
45
|
+
throw Error('failed to parse package_meta - `repo_url` is required in package_json');
|
|
46
46
|
}
|
|
47
47
|
|
|
48
48
|
const homepage_url = package_json.homepage ?? null;
|
package/src/lib/parse_imports.ts
CHANGED
|
@@ -2,9 +2,9 @@ import {parseSync, type ImportDeclaration} from 'oxc-parser';
|
|
|
2
2
|
import type {Flavored} from '@ryanatkn/belt/types.js';
|
|
3
3
|
import {Unreachable_Error} from '@ryanatkn/belt/error.js';
|
|
4
4
|
|
|
5
|
-
import type {Path_Id} from './path.
|
|
6
|
-
import {SVELTE_MATCHER} from './svelte_helpers.
|
|
7
|
-
import {JS_MATCHER, TS_MATCHER, SVELTE_SCRIPT_MATCHER} from './constants.
|
|
5
|
+
import type {Path_Id} from './path.ts';
|
|
6
|
+
import {SVELTE_MATCHER} from './svelte_helpers.ts';
|
|
7
|
+
import {JS_MATCHER, TS_MATCHER, SVELTE_SCRIPT_MATCHER} from './constants.ts';
|
|
8
8
|
|
|
9
9
|
export type Import_Specifier = Flavored<string, 'Import_Specifier'>;
|
|
10
10
|
|
package/src/lib/paths.ts
CHANGED
|
@@ -9,9 +9,9 @@ import {
|
|
|
9
9
|
GRO_DIR,
|
|
10
10
|
SOURCE_DIR,
|
|
11
11
|
SVELTEKIT_DIST_DIRNAME,
|
|
12
|
-
} from './constants.
|
|
13
|
-
import {default_svelte_config} from './svelte_config.
|
|
14
|
-
import type {Path_Id} from './path.
|
|
12
|
+
} from './constants.ts';
|
|
13
|
+
import {default_svelte_config} from './svelte_config.ts';
|
|
14
|
+
import type {Path_Id} from './path.ts';
|
|
15
15
|
|
|
16
16
|
/*
|
|
17
17
|
|
package/src/lib/plugin.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type {Task_Context} from './task.
|
|
1
|
+
import type {Task_Context} from './task.ts';
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
4
|
* Gro `Plugin`s enable custom behavior during `gro dev` and `gro build`.
|
|
@@ -22,10 +22,13 @@ export interface Plugin_Context<T_Args = object> extends Task_Context<T_Args> {
|
|
|
22
22
|
|
|
23
23
|
/** See `Plugins.create` for a usage example. */
|
|
24
24
|
export class Plugins<T_Plugin_Context extends Plugin_Context> {
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
) {
|
|
25
|
+
readonly ctx: T_Plugin_Context;
|
|
26
|
+
readonly instances: Array<Plugin<T_Plugin_Context>>;
|
|
27
|
+
|
|
28
|
+
constructor(ctx: T_Plugin_Context, instances: Array<Plugin>) {
|
|
29
|
+
this.ctx = ctx;
|
|
30
|
+
this.instances = instances;
|
|
31
|
+
}
|
|
29
32
|
|
|
30
33
|
static async create<T_Plugin_Context extends Plugin_Context>(
|
|
31
34
|
ctx: T_Plugin_Context,
|
package/src/lib/publish.task.ts
CHANGED
|
@@ -3,12 +3,12 @@ import {z} from 'zod';
|
|
|
3
3
|
import {styleText as st} from 'node:util';
|
|
4
4
|
import {existsSync} from 'node:fs';
|
|
5
5
|
|
|
6
|
-
import {Task_Error, type Task} from './task.
|
|
7
|
-
import {load_package_json, parse_repo_url} from './package_json.
|
|
8
|
-
import {find_cli, spawn_cli} from './cli.
|
|
9
|
-
import {has_sveltekit_library} from './sveltekit_helpers.
|
|
10
|
-
import {update_changelog} from './changelog.
|
|
11
|
-
import {load_from_env} from './env.
|
|
6
|
+
import {Task_Error, type Task} from './task.ts';
|
|
7
|
+
import {load_package_json, parse_repo_url} from './package_json.ts';
|
|
8
|
+
import {find_cli, spawn_cli} from './cli.ts';
|
|
9
|
+
import {has_sveltekit_library} from './sveltekit_helpers.ts';
|
|
10
|
+
import {update_changelog} from './changelog.ts';
|
|
11
|
+
import {load_from_env} from './env.ts';
|
|
12
12
|
import {
|
|
13
13
|
Git_Branch,
|
|
14
14
|
Git_Origin,
|
|
@@ -16,8 +16,8 @@ import {
|
|
|
16
16
|
git_checkout,
|
|
17
17
|
git_fetch,
|
|
18
18
|
git_pull,
|
|
19
|
-
} from './git.
|
|
20
|
-
import {CHANGESET_CLI} from './changeset_helpers.
|
|
19
|
+
} from './git.ts';
|
|
20
|
+
import {CHANGESET_CLI} from './changeset_helpers.ts';
|
|
21
21
|
|
|
22
22
|
export const Args = z
|
|
23
23
|
.object({
|
|
@@ -2,8 +2,8 @@ import {z} from 'zod';
|
|
|
2
2
|
import {spawn} from '@ryanatkn/belt/process.js';
|
|
3
3
|
import {rm} from 'node:fs/promises';
|
|
4
4
|
|
|
5
|
-
import {Task_Error, type Task} from './task.
|
|
6
|
-
import {LOCKFILE_FILENAME, NODE_MODULES_DIRNAME} from './constants.
|
|
5
|
+
import {Task_Error, type Task} from './task.ts';
|
|
6
|
+
import {LOCKFILE_FILENAME, NODE_MODULES_DIRNAME} from './constants.ts';
|
|
7
7
|
|
|
8
8
|
export const Args = z.object({}).strict();
|
|
9
9
|
export type Args = z.infer<typeof Args>;
|
package/src/lib/release.task.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import {z} from 'zod';
|
|
2
2
|
|
|
3
|
-
import type {Task} from './task.
|
|
4
|
-
import {has_sveltekit_library, has_sveltekit_app} from './sveltekit_helpers.
|
|
5
|
-
import {load_package_json} from './package_json.
|
|
3
|
+
import type {Task} from './task.ts';
|
|
4
|
+
import {has_sveltekit_library, has_sveltekit_app} from './sveltekit_helpers.ts';
|
|
5
|
+
import {load_package_json} from './package_json.ts';
|
|
6
6
|
|
|
7
7
|
export const Args = z.object({}).strict();
|
|
8
8
|
export type Args = z.infer<typeof Args>;
|